<?php
/**
 * Third-party schema extension contributor contract (Architecture V2).
 *
 * Extensions may contribute entities with explicit source tagging. They always
 * pass sanitization and readiness; they never become trusted integrations.
 *
 * @package SEOvaultSEO\Schema
 */

namespace SEOvaultSEO\Schema;

if ( ! defined( 'ABSPATH' ) ) {
	exit;
}

/**
 * Contract for documented third-party schema extensions.
 */
interface SchemaExtensionContributor {

	/**
	 * Stable extension identifier (used in source_ref).
	 *
	 * @return string
	 */
	public function get_extension_id();

	/**
	 * Collect tagged schema contributions for an object/context.
	 *
	 * Each item must be:
	 * array{source:'extension', source_ref:string, schema:array}
	 *
	 * Raw schema-only rows are accepted by the registry and re-tagged as extension.
	 *
	 * @param \WP_Post|\WP_Term|\WP_User|null $object Render object.
	 * @return array<int,array>
	 */
	public function collect_tagged_schemas( $object );
}
