import type { Corti } from "@corti/sdk"; import { LitElement, type PropertyValues } from "lit"; import type { ConfigureApplicationPayload, ConfigureApplicationResponse, ConfigurePayload, ConfigureResponse, CreateInteractionPayload, DeviceLinkTokenResponse, NavigatePayload, SetInteractionOptionsPayload, SetCredentialsPayload, CortiEmbeddedAPI, InteractionDetails, SessionConfig, User, GetStatusResponse, GetTemplatesResponse, KeycloakTokenResponse, ShowDeviceLinkQRResponse } from "./public-types.js"; type DOMEventListener = ((event: Event) => void) | { handleEvent(event: Event): void; }; type DOMAddEventListenerOptions = boolean | { capture?: boolean; once?: boolean; passive?: boolean; signal?: AbortSignal; }; export declare class CortiEmbedded extends LitElement implements CortiEmbeddedAPI { static styles: import("lit").CSSResult[]; visibility: string; baseURL: string; private postMessageHandler; private normalizedBaseURL; private warnedDeprecatedEventSubscriptions; addEventListener(type: string, callback: DOMEventListener, options?: DOMAddEventListenerOptions): void; private warnDeprecatedEventSubscription; private getIframeAllowPolicy; connectedCallback(): void; disconnectedCallback(): void; private setupPostMessageHandler; private dispatchPublicEvent; private dispatchEmbeddedEvent; private dispatchErrorEvent; private static warnDeprecatedAPI; private isRealIframeLoad; private handleIframeLoad; private getIframe; protected updated(changedProps: PropertyValues): void; /** * Authenticate with the Corti system * @param credentials Authentication credentials * @returns Promise resolving to user information */ auth(credentials: KeycloakTokenResponse): Promise; /** * Create a new interaction * @param encounter Encounter request data * @returns Promise resolving to interaction details */ createInteraction(encounter: CreateInteractionPayload): Promise; /** * Configure the current session * @param config Session configuration * @returns Promise that resolves when configuration is complete */ configureSession(config: SessionConfig): Promise; /** * Add facts to the current session * @param facts Array of facts to add * @returns Promise that resolves when facts are added */ addFacts(facts: Corti.FactsCreateInput[]): Promise; /** * Navigate to a specific path within the embedded UI * @param payload Navigation request payload or legacy path string * @returns Promise that resolves when navigation is complete */ navigate(payload: NavigatePayload | string): Promise; /** * Start recording * @returns Promise that resolves when recording starts */ startRecording(): Promise; /** * Stop recording * @returns Promise that resolves when recording stops */ stopRecording(): Promise; /** * Get current component status * @returns Promise resolving to current status */ getStatus(): Promise; /** * Configure the component * @param config Component configuration * @returns Promise that resolves when configuration is applied */ configureApp(config: ConfigureApplicationPayload): Promise; /** * Configure the component * @param config Component configuration * @returns Promise that resolves when configuration is applied */ configure(config: ConfigurePayload): Promise; /** * Set one-shot interaction options for the embedded instance. * @param config Interaction/session-level options * @returns Promise that resolves when options are applied */ setInteractionOptions(config: SetInteractionOptionsPayload): Promise; /** * Set authentication credentials without triggering auth flow * @param credentials Authentication credentials to store * @returns Promise that resolves when credentials are set */ setCredentials(credentials: SetCredentialsPayload): Promise; /** * Show the embedded UI */ show(): void; /** * Hide the embedded UI */ hide(): void; /** * Get templates */ getTemplates(): Promise; /** * Show the device-link QR code in the embedded UI * @param payload Device-link token response to render as a QR code * @returns Promise resolving to the rendered QR code state */ showDeviceLinkQR(payload: DeviceLinkTokenResponse): Promise; /** * Check the current status of the iframe and PostMessageHandler * Useful for debugging * @deprecated Use getStatus() instead */ getDebugStatus(): { ready: boolean; iframeExists: boolean; iframeSrc: string | undefined; iframeContentWindow: boolean; iframeContentDocument: boolean; iframeReadyState: DocumentReadyState | undefined; postMessageHandlerExists: boolean; postMessageHandlerReady: boolean; baseURL: string; }; render(): import("lit-html").TemplateResult<1>; } export {};