import { Store as IStore } from "redux"; import { MultiStepIntentProcessor } from "./actionProcessors/multiStepProcessor"; import { SlangIntentHandler } from "./common/slangIntentHandler"; import { SlangIntent } from "./common/slangIntent"; import { SlangBuddyTemplate } from "./common/slangBuddyTemplate"; import { SlangAppProperties, SlangUserProperties } from "./common/slangAppProperties"; import { UnOrderedIntentProcessor } from "./actionProcessors/unorderedProcessor"; import { TelemetryType } from "./telemetry/subsystemAPI"; import { UIDisambiguationType } from "./utils/uiEnums"; import { SlangBuddyLifecycleListener } from "./common/slangBuddyLifecycleListener"; import { SlangAnalyticsTags, SlangBuddyOptions } from "./utils/slangBuddyUtils"; import { SlangBuiltInUI } from "./ui/slangBuiltInUI"; declare class SlangInitializer { static identifier: string; intentHandler: SlangIntentHandler; /** * Internal properties */ store: IStore; internalIsInitialized: boolean; currentIntentProcessor: null | MultiStepIntentProcessor | UnOrderedIntentProcessor; eventQueue: any[]; escalatingGreetingPromptCount: number; isOnboardingInProgress: boolean; isStartConversationTriggered: boolean; /** * Properties to be set by user */ appProperties: SlangAppProperties; userProperties: SlangUserProperties; /** * Internal functions */ getAnalyserNode: (analyzerNode: AnalyserNode) => void; dispatchSlangEvent: (event: any) => void; removeNetworkListener: () => void; flushAllSlangEvents: () => Promise; dispatchSlangEventAndFlush: (event: any) => Promise; /** * Functions to be overriden by the user */ onInitSuccess: () => void; onInitFailure: (failureReason: string) => void; onUtteranceDetected: (userUtterance: string, alternativeUtterances?: string[]) => void; onUtteranceUnresolved: (userUtterance: string, getUtteranceForLocale?: Function) => boolean; onHintSelected: (hintText: string) => Promise; onLocaleChanged: (newLocale: string, oldLocale?: string) => void; mlifeCycleListener: SlangBuddyLifecycleListener; constructor(); checkNetworkStatus: () => () => void; initializeUi: () => void; changeLocale: (newLocale: string) => Promise; initializeDecorator: (callback: Function) => (slangInitParams: SlangBuddyOptions) => any; initializeInternal: ({ buddyId, apiKey, env, locale, requestedLocales, onSuccess, onFailure, appProperties, configOverrides, assistantVersion, enableExperimentalPlatforms, onLocaleChanged, lifecycleListener, }: SlangBuddyOptions) => Promise; initialize: (slangInitParams: SlangBuddyOptions) => any; setIntentActionHandler: (intentHandlerSetByDev: (() => any) | SlangIntentHandler) => void; setUnOrderedIntentActionHandler: (intentHandlerSetByDev: SlangIntentHandler) => void; setMultiStepIntentActionHandler: (intentHandlerSetByDev: SlangIntentHandler) => void; defaultIntentHandler: (intent: SlangIntent) => boolean; cancel: (reason?: string, isSurfaceDismissedByUser?: boolean) => Promise; getStore: () => IStore; getMicPermission: () => Promise; inbuiltTriggerSlang: (event?: any) => Promise; triggerSlang: () => Promise; startConversation: () => Promise; getWelcomePromptCount: () => number; startWithUtterance: (utterance: string) => Promise; toggleMute: () => void; setASRHints: (hints: { [propName: string]: string[]; }) => void; setSpeechMetadata: (metadata: any) => void; speak: (statement: any, sourceEvent?: string) => Promise; requestHelp: () => void; getBuiltInUI: () => SlangBuiltInUI; capabilities: { isAutoplayAllowed: () => Promise; }; handleUserOnboardingSuccess: () => Promise; userOnboardingFailure: (reason?: string) => Promise; apiTracker: (apiName: string) => void; addCustomAnalyticsTags: (customAnalyticsTags: SlangAnalyticsTags) => void; reportException: (exception: any, identifier: string, customMessage?: string, logToConsole?: boolean) => void; reportStateChangeErrors: (exception: any, identifier: string, customMessage?: string, logToConsole?: boolean) => void; setOnHintSelected: (onHintSelected: (hintText: string) => Promise) => void; setOnUtteranceDetected: (onUtteranceDetected: (utterance: string, alternativeUtterances?: string[]) => void) => void; setOnUtteranceUnresolved: (onUtteranceUnresolved: (utterance: string, getUtteranceForLocale?: Function) => boolean) => void; setUiInitializer: (uiInitializer: () => any) => void; registerUIObserver: (uiObserver: (uiState: object) => any) => void; registerAnalyserNodeGetter: (getAnalyserNode: (analyzerNode: AnalyserNode) => any) => void; getSupportedLocales: () => any; requestLocales: (requestedLocales: string[]) => void; setUserProperties: (userProperties: SlangUserProperties) => void; setAppProperties: (appProperties: SlangAppProperties) => void; setSubdomainString: (subDomainString: string) => void; createIntentFromName: (name: string) => SlangIntent; getBuddyTemplate: () => SlangBuddyTemplate | null; getActiveLocale: () => string; getAssistantRemoteConfig: () => any; isInitialized: () => boolean; trackAppEvent: (name: string, data: { [key: string]: string; }) => void; notifyConversationStart: (conversationName: string) => void; setIntentEntityInContext: (intentName: string, entityName?: string, entityValue?: string) => void; notifyConversationEnd: (userJourneyName: string, conversationData: { [key: string]: string; }) => void; reportBuddyTelemetry: (type: TelemetryType, identifier: string, payload: any) => void; reportAssistantTelemetry: (type: TelemetryType, identifier: string, payload: any) => void; handleUserHintSelected: (hintText: string, isDisambiguation?: boolean) => void; toggleStrictIntentMode: (isStrictIntentModeEnabled: boolean) => void; toggleStrictEntityMode: (isStrictEntityModeEnabled: boolean) => void; setDisambiguationMode: (disambiguationMode: UIDisambiguationType) => void; checkIfMicPermissionGrantedWithPrompt: () => Promise; } declare const SlangInternal: SlangInitializer; export { SlangInternal };