import { ReactNode, FC } from 'react';
import { AdMeshTheme } from '../types/index';
import { HeadingsExtractionResult } from '../utils/extractHeadings';
export type PageContextMode = 'page' | 'ad-slot' | 'auto';
export interface AdMeshProviderProps {
/** AdMesh API key (required) */
apiKey: string;
/** Session ID (required) */
sessionId: string;
/** Optional: Whether this provider is being used by the extension (optional) */
extension?: boolean;
/** Optional theme configuration */
theme?: AdMeshTheme;
/** Optional API base URL (defaults to production) */
apiBaseUrl?: string;
/** Optional user language in BCP 47 format (e.g., "en-US") */
language?: string;
/** Optional detailed user location */
location?: {
city?: string;
state?: string;
stateCode?: string;
country?: string;
countryCode?: string;
zipcode?: string;
latitude?: number;
longitude?: number;
};
/** Optional anonymous hashed user ID */
userId?: string;
/** Optional AI model identifier (e.g., "gpt-4o") - forwarded as platform software version metadata */
model?: string;
/** Optional conversation history - forwarded in classification_input.interaction.input.messages */
messages?: Array<{
role: string;
content: string;
id?: string;
}>;
/** Pre-resolved page context (skips client/server extract) */
pageContext?: HeadingsExtractionResult | null;
/** Article URL for ad-slot / GAM (e.g. %%PAGE_URL%% macro) */
articleUrl?: string;
/** How to obtain page context: page DOM, ad-slot API, or auto-detect iframe */
contextMode?: PageContextMode;
/** Agent display id for optional content-index lookup */
agentDisplayId?: string;
/** Child components */
children: ReactNode;
}
/**
* AdMeshProvider - Simplified SDK integration for React applications
*
* Handles:
* - SDK initialization and lifecycle management
* - Message deduplication tracking
* - Session and message ID management
* - Error handling and logging
*
* @example
* ```tsx
*
*
*
*
* // Extension usage (skips intent analysis)
*
*
*
* ```
*/
export declare const AdMeshProvider: FC;
export default AdMeshProvider;
//# sourceMappingURL=AdMeshProvider.d.ts.map