UNPKG

@coherenceplatform/sdk

Version:

Coherence SDK for embedding AI-powered chat into your applications

79 lines 2.57 kB
export default CoherenceSDK; export class CoherenceSDK { constructor(config?: {}); config: { theme: any; oauth: any; demo: any; iframeStyle: any; screenshots: any; chatEndpoint: string; appBackendUrl: any; backendUrl: string; iframeUrl: string; name: string; threadSuggestions: any[]; placeholderText: string; containerElementId: any; toolsEnabled: boolean; inline: boolean; extraContext: any; getExtraContext: any; }; isInitialized: boolean; authProvider: BaseAuthProvider; conversationIdRef: { current: any; }; applicationConfig: any; iframeController: IframeController; messageBus: MessageBus; messageHandler: MessageHandler; streamHandler: StreamHandler; attachmentService: AttachmentService; streamProcessor: StreamProcessor; integrationManager: IntegrationManager; screenshotService: ScreenshotService; init(): Promise<void>; fetchApplicationConfig(): Promise<any>; applyBackendConfig(sdkConfig: any): void; fetchExternalUserId(): Promise<void>; setupMessageHandlers(): void; iframeReady: boolean; processStream(streamUrl: any, token: any, requestId: any): Promise<void>; waitForIframeReady(): Promise<any>; sendInitialConfig(): void; getCoherenceToken(): Promise<any>; sendMessage(message: any, options?: {}): Promise<{ success: boolean; }>; show(): void; hide(): void; toggle(): void; updateConfig(configUpdates: any): void; destroy(): void; } export class CoherenceGlobal { _instance: CoherenceSDK; isInitialized: boolean; create(config: any): CoherenceSDK; init(config?: {}): Promise<CoherenceSDK>; getInstance(): CoherenceSDK; show(): void; hide(): void; toggle(): void; sendMessage(message: any, options?: {}): Promise<{ success: boolean; }>; } import { createCSSVariablesStyle } from './config/index.js'; import { IframeController } from './managers/index.js'; import { MessageBus } from './services/index.js'; import { MessageHandler } from './managers/index.js'; import { StreamHandler } from './managers/index.js'; import { AttachmentService } from './services/index.js'; import { StreamProcessor } from './services/index.js'; import { IntegrationManager } from './managers/index.js'; import { ScreenshotService } from './services/screenshot-service.js'; export { createCSSVariablesStyle }; //# sourceMappingURL=sdk.d.ts.map