<?php

namespace Limb_Chatbot\Includes\Interfaces;

use WP_Post;

/**
 * Interface for integrations that can manage knowledge content of posts.
 *
 * Integrations implementing this interface can extract and format custom fields
 * from WordPress posts to be included in knowledge generation.
 *
 * @package Limb_Chatbot\Includes\Interfaces
 * @since 1.0.0
 */
interface Knowledge_Content_Interface {

	/**
	 * Get custom fields content for a post.
	 *
	 * Extracts and formats custom fields from a WordPress post that should be
	 * included in the knowledge base content.
	 *
	 * @param  WP_Post  $post  WordPress post object.
	 * @param  array  $field_keys  Array of custom field keys to extract (optional).
	 *
	 * @return string Formatted content from custom fields, or empty string if none found.
	 * @since 1.0.0
	 */
	public function get_post_custom_fields_content( WP_Post $post, array $field_keys = [] ): string;

	/**
	 * Get all available custom field keys for a post type.
	 *
	 * Returns a list of custom field keys that can be indexed for a given post type.
	 *
	 * @param  string  $post_type  WordPress post type.
	 *
	 * @return array Array of custom field keys.
	 * @since 1.0.0
	 */
	public function get_available_custom_fields( string $post_type ): array;
}
