import { D as DirectLineCardAction, W as WebChatActivity } from './WebChatActivity-CYqxBG_4.mjs'; export { b as DirectLineAttachment, c as DirectLineSuggestedAction } from './WebChatActivity-CYqxBG_4.mjs'; export { G as GlobalScopePonyfill, c as createStore, w as createStoreWithDevTools, a as createStoreWithOptions } from './createStore-CcvouBrW.mjs'; import { OrgSchemaCreativeWork as CreativeWorkOutput } from './botframework-webchat-core.org-schema.mjs'; import * as valibot from 'valibot'; import { InferOutput } from 'valibot'; export { O as OneOrMany, P as PromiseWithResolvers, i as isForbiddenPropertyName, s as singleToArray, w as withResolvers } from './_dtsroll-chunks/CAquHfZK-botframework-webchat-base.utils.js'; import './_dtsroll-chunks/B7Whm73Q-tagged.js'; import 'redux'; declare function connect({ directLine, userID, username }: { readonly directLine: any; readonly userID: string; readonly username: string; }): { type: string; payload: { directLine: any; userID: string; username: string; }; }; declare function disconnect(): { type: string; }; declare const DISMISS_NOTIFICATION = "WEB_CHAT/DISMISS_NOTIFICATION"; type DismissNotificationAction = { payload: { id: string; }; type: typeof DISMISS_NOTIFICATION; }; declare function dismissNotification(id: string): DismissNotificationAction; declare function emitTypingIndicator(): { type: string; }; type MarkActivityActionType = 'WEB_CHAT/MARK_ACTIVITY'; type MarkActivityAction = { payload: { activityID: string; name: string; value: any; }; type: MarkActivityActionType; }; declare function markActivity({ id: activityID }: { id: string; }, name: string, value: any): MarkActivityAction; declare const VOICE_MUTE_RECORDING: "WEB_CHAT/VOICE_MUTE_RECORDING"; type VoiceMuteRecordingAction = { type: typeof VOICE_MUTE_RECORDING; }; declare function muteVoiceRecording(): VoiceMuteRecordingAction; type PostActivityActionType = 'DIRECT_LINE/POST_ACTIVITY'; type PostActivityAction = { meta: { method: string; }; payload: { activity: WebChatActivity; }; type: PostActivityActionType; }; declare function postActivity(activity: WebChatActivity, method?: string): PostActivityAction; declare const VOICE_POST_ACTIVITY: "WEB_CHAT/VOICE_POST_ACTIVITY"; type VoicePostActivityAction = { type: typeof VOICE_POST_ACTIVITY; payload: { activity: WebChatActivity; }; }; declare function postVoiceActivity(activity: WebChatActivity): VoicePostActivityAction; declare const VOICE_REGISTER_HANDLER: "WEB_CHAT/VOICE_REGISTER_HANDLER"; type VoiceHandler = { queueAudio: (base64: string) => void; stopAllAudio: () => void; }; type VoiceRegisterHandlerAction = { type: typeof VOICE_REGISTER_HANDLER; payload: { id: string; voiceHandler: VoiceHandler; }; }; declare function registerVoiceHandler(id: string, voiceHandler: VoiceHandler): VoiceRegisterHandlerAction; declare function sendEvent(name: string, value: any): { type: string; payload: { name: string; value: any; }; }; declare function sendFiles(files: readonly Readonly<{ name: string; size: number; url: string; thumbnail?: string; }>[]): { type: string; payload: { files: readonly Readonly<{ name: string; size: number; url: string; thumbnail?: string; }>[]; }; }; type SendBoxAttachment = Readonly<{ blob: Blob | File; thumbnailURL?: URL; }>; declare function sendMessage(text: string | undefined, method: string | undefined, { attachments, channelData }?: { attachments?: readonly SendBoxAttachment[]; channelData?: any; }): { type: string; payload: { attachments: readonly Readonly<{ blob: Blob | File; thumbnailURL?: URL; }>[]; channelData: any; method: string; text: string; }; }; declare function sendMessageback(value: any, text: string | undefined, displayText: string | undefined): { type: string; payload: { displayText: string; text: string; value: any; }; }; declare function sendPostback(value: any): { type: string; payload: { value: any; }; }; declare function setDictateInterims(dictateInterims: readonly string[]): { type: string; payload: { dictateInterims: readonly string[]; }; }; declare function setDictateState(dictateState: number): { type: string; payload: { dictateState: number; }; }; declare function setLanguage(language: string): { type: string; payload: { language: string; }; }; type Notification = { alt: string; data: any; id: string; level: string; message: string; timestamp: number; }; declare const SET_NOTIFICATION = "WEB_CHAT/SET_NOTIFICATION"; type SetNotificationAction = { payload: Omit; type: typeof SET_NOTIFICATION; }; declare function setNotification({ alt, data, id, level, message }: Omit): SetNotificationAction; declare function setSendBox(text: string): { type: string; payload: { text: string; }; }; declare function setSendBoxAttachments(attachments: readonly SendBoxAttachment[]): { type: string; payload: { attachments: readonly Readonly<{ blob: Blob | File; thumbnailURL?: URL; }>[]; }; }; declare function setSendTimeout(sendTimeout: number): { type: string; payload: { sendTimeout: number; }; }; declare const SET_SEND_TYPING_INDICATOR = "WEB_CHAT/SET_SEND_TYPING_INDICATOR"; type SetSendTypingIndicatorAction = { payload: { sendTypingIndicator: boolean; }; type: typeof SET_SEND_TYPING_INDICATOR; }; declare function setSendTypingIndicator(value: boolean): SetSendTypingIndicatorAction; declare const VOICE_SET_STATE: "WEB_CHAT/VOICE_SET_STATE"; type VoiceState = 'idle' | 'listening' | 'user_speaking' | 'processing' | 'bot_speaking'; type VoiceSetStateAction = { type: typeof VOICE_SET_STATE; payload: { voiceState: VoiceState; }; }; declare function setVoiceState(voiceState: VoiceState): VoiceSetStateAction; declare function startDictate(): { type: string; }; declare function startSpeakingActivity(): { type: string; }; declare const VOICE_START_RECORDING: "WEB_CHAT/VOICE_START_RECORDING"; type VoiceStartRecordingAction = { type: typeof VOICE_START_RECORDING; }; declare function startVoiceRecording(): VoiceStartRecordingAction; declare function stopDictate(): { type: string; }; declare function stopSpeakingActivity(): { type: string; }; declare const VOICE_STOP_RECORDING: "WEB_CHAT/VOICE_STOP_RECORDING"; type VoiceStopRecordingAction = { type: typeof VOICE_STOP_RECORDING; }; declare function stopVoiceRecording(): VoiceStopRecordingAction; declare function submitSendBox(method?: string, { channelData }?: { channelData: any; }): { type: string; payload: { channelData: any; method: string; }; }; declare const VOICE_UNMUTE_RECORDING: "WEB_CHAT/VOICE_UNMUTE_RECORDING"; type VoiceUnmuteRecordingAction = { type: typeof VOICE_UNMUTE_RECORDING; }; declare function unmuteVoiceRecording(): VoiceUnmuteRecordingAction; declare const VOICE_UNREGISTER_HANDLER: "WEB_CHAT/VOICE_UNREGISTER_HANDLER"; type VoiceUnregisterHandlerAction = { type: typeof VOICE_UNREGISTER_HANDLER; payload: { id: string; }; }; declare function unregisterVoiceHandler(id: string): VoiceUnregisterHandlerAction; /** @deprecated This constant is being deprecated, please use string literal instead. Will be remove on or after 2024-07-31. */ declare const SEND_FAILED: "send failed"; /** @deprecated This constant is being deprecated, please use string literal instead. Will be remove on or after 2024-07-31. */ declare const SENDING: "sending"; /** @deprecated This constant is being deprecated, please use string literal instead. Will be remove on or after 2024-07-31. */ declare const SENT: "sent"; declare const ActivityClientState_SENDING: typeof SENDING; declare const ActivityClientState_SEND_FAILED: typeof SEND_FAILED; declare const ActivityClientState_SENT: typeof SENT; declare namespace ActivityClientState { export { ActivityClientState_SENDING as SENDING, ActivityClientState_SEND_FAILED as SEND_FAILED, ActivityClientState_SENT as SENT }; } declare const IDLE: 0; declare const WILL_START: 1; declare const STARTING: 2; declare const DICTATING: 3; declare const STOPPING: 4; declare const DictateState_DICTATING: typeof DICTATING; declare const DictateState_IDLE: typeof IDLE; declare const DictateState_STARTING: typeof STARTING; declare const DictateState_STOPPING: typeof STOPPING; declare const DictateState_WILL_START: typeof WILL_START; declare namespace DictateState { export { DictateState_DICTATING as DICTATING, DictateState_IDLE as IDLE, DictateState_STARTING as STARTING, DictateState_STOPPING as STOPPING, DictateState_WILL_START as WILL_START }; } /** * Gets the livestreaming metadata of the activity, or `undefined` if the activity is not participating in a livestreaming session. * * - `sessionId` - ID of the livestreaming session * - `sequenceNumber` - sequence number of the activity * - `type` * - `"contentless"` - ongoing but no content, should show indicator * - `"interim activity"` - current response, could be partial-from-start, or complete response. * More activities are expected. Future interim activities always replace past interim activities, enable erasing or backtracking response. * - `"informative message"` - optional side-channel informative message describing the current response, e.g. "Searching your document library". * Always replace past informative messages. May interleave with interim activities. * - `"final activity"` - complete-and-final response, always replace past interim activities and remove all informative messages. * This activity indicates end of the session, all future activities must be ignored. * - `undefined` - not part of a livestream session or the activity is not valid * * @returns {object} Livestreaming metadata of the activity, or `undefined` if the activity is not participating in a livestreaming session. */ declare function getActivityLivestreamingMetadata(activity: WebChatActivity): Readonly<{ sessionId: string; sequenceNumber: number; type: 'contentless' | 'final activity' | 'informative message' | 'interim activity'; }> | undefined; type EntityType = NonNullable[number]; declare function getOrgSchemaMessage(graph: readonly EntityType[]): CreativeWorkOutput | undefined; declare function onErrorResumeNext(fn: () => T): T | undefined; declare function onErrorResumeNext(fn: () => T, defaultValue: U): T | U; declare const getVoiceActivityRole: (activity: WebChatActivity) => "bot" | "user" | undefined; declare const getVoiceActivityText: (activity: WebChatActivity) => string | undefined; declare const VoiceActivitySchema: valibot.ObjectSchema<{ readonly name: valibot.StringSchema; readonly type: valibot.LiteralSchema<"event", undefined>; readonly value: valibot.LooseObjectSchema<{}, undefined>; readonly valueType: valibot.SchemaWithPipe, valibot.CheckAction]>; }, undefined>; declare const isVoiceActivity: (activity: WebChatActivity) => activity is WebChatActivity & InferOutput; declare const VoiceTranscriptActivitySchema: valibot.ObjectSchema<{ readonly name: valibot.LiteralSchema<"media.end", undefined>; readonly type: valibot.LiteralSchema<"event", undefined>; readonly value: valibot.ObjectSchema<{ readonly origin: valibot.PicklistSchema<["agent", "user"], undefined>; readonly transcription: valibot.StringSchema; }, undefined>; readonly valueType: valibot.SchemaWithPipe, valibot.CheckAction]>; }, undefined>; declare const isVoiceTranscriptActivity: (activity: WebChatActivity) => activity is WebChatActivity & InferOutput; declare const CLEAR_SUGGESTED_ACTIONS: "WEB_CHAT/CLEAR_SUGGESTED_ACTIONS"; declare const clearSuggestedActionsActionSchema: valibot.SchemaWithPipe; }, undefined>, valibot.ReadonlyAction<{ type: "WEB_CHAT/CLEAR_SUGGESTED_ACTIONS"; }>]>; type ClearSuggestedActionsAction = InferOutput; declare function clearSuggestedActions(): ClearSuggestedActionsAction; declare const SET_SUGGESTED_ACTIONS: "WEB_CHAT/SET_SUGGESTED_ACTIONS"; declare const setSuggestedActionsActionSchema: valibot.SchemaWithPipe, undefined>; readonly suggestedActions: valibot.SchemaWithPipe, undefined>, valibot.ReadonlyAction]>; }, undefined>, valibot.ReadonlyAction<{ originActivity?: WebChatActivity; readonly suggestedActions: readonly DirectLineCardAction[]; }>]>; readonly type: valibot.LiteralSchema<"WEB_CHAT/SET_SUGGESTED_ACTIONS", undefined>; }, undefined>, valibot.ReadonlyAction<{ readonly payload: Readonly<{ originActivity?: WebChatActivity; readonly suggestedActions: readonly DirectLineCardAction[]; }>; type: "WEB_CHAT/SET_SUGGESTED_ACTIONS"; }>]>; type SetSuggestedActionsAction = InferOutput; declare function setSuggestedActions(suggestedActions?: readonly DirectLineCardAction[], originActivity?: undefined | WebChatActivity): SetSuggestedActionsAction; type DirectLineActivity = Exclude unknown) | number | string>; type DirectLineMediaCardEssence = { aspect?: '4:3' | '16:9'; autoloop?: boolean; autostart?: boolean; buttons?: DirectLineCardAction[]; duration?: string; image?: { url: string; }; media: { profile?: string; url: string; }[]; shareable?: boolean; subtitle?: string; title?: string; value?: any; }; type DirectLineAnimationCard = DirectLineMediaCardEssence & { contentType: 'application/vnd.microsoft.card.animation'; }; type DirectLineAudioCard = DirectLineMediaCardEssence & { contentType: 'application/vnd.microsoft.card.audio'; }; type DirectLineCardImage = { alt: string; tap?: DirectLineCardAction; url: string; }; type DirectLineBasicCardEssence = { buttons?: DirectLineCardAction[]; images?: DirectLineCardImage[]; subtitle?: string; tap?: DirectLineCardAction; text?: string; title?: string; }; type DirectLineHeroCard = DirectLineBasicCardEssence & { contentType: 'application/vnd.microsoft.card.hero'; }; type DirectLineJSBotConnection = any; type DirectLineOAuthCard = { buttons?: DirectLineCardAction[]; contentType: 'application/vnd.microsoft.card.oauth'; text?: string; }; type Fact = { key?: string; value?: string; }; type ReceiptItem = { image?: DirectLineCardImage; price?: string; quantity?: string; subtitle?: string; tap?: DirectLineCardAction; text?: string; title?: string; }; type DirectLineReceiptCard = { buttons?: DirectLineCardAction[]; contentType: 'application/vnd.microsoft.card.receipt'; facts?: Fact[]; items?: ReceiptItem[]; tap?: DirectLineCardAction; tax?: string; title?: string; total?: string; vat?: string; }; type DirectLineSignInCard = { buttons?: DirectLineCardAction[]; contentType: 'application/vnd.microsoft.card.signin'; text?: string; }; type DirectLineThumbnailCard = DirectLineBasicCardEssence & { contentType: 'application/vnd.microsoft.card.thumbnail'; }; type DirectLineVideoCard = DirectLineMediaCardEssence & { contentType: 'application/vnd.microsoft.card.video'; }; /** Receives a completion notification */ type CompleteFunction = () => void; /** Receives the sequence error */ type ErrorFunction = (error: Error) => void; /** Receives the next value in the sequence */ type NextFunction = (value: T) => void; type SubscriberFunction = (observer: SubscriptionObserver) => Subscription; /** An `Observable` represents a sequence of values which may be observed. */ declare class Observable { constructor(subscriber: SubscriberFunction); /** Subscribes to the sequence with an observer */ subscribe(observer: Observer): Subscription; /** Subscribes to the sequence with callbacks */ subscribe(onNext: NextFunction, onError?: ErrorFunction, onComplete?: CompleteFunction): Subscription; } declare class Subscription { /** Cancels the subscription */ unsubscribe(): void; /** A boolean value indicating whether the subscription is closed */ get closed(): boolean; } /** * An `Observer` is used to receive data from an `Observable`, and is supplied as an argument to `subscribe`. * * All methods are optional. */ declare class Observer { /** Receives the subscription object when `subscribe` is called */ start(subscription: Subscription): void; /** Receives the next value in the sequence */ next: NextFunction; /** Receives the sequence error */ error: ErrorFunction; /** Receives a completion notification */ complete: CompleteFunction; } /** A `SubscriptionObserver` is a normalized `Observer` which wraps the observer object supplied to `subscribe`. */ declare class SubscriptionObserver { /** Sends the next value in the sequence */ next: NextFunction; /** Sends the sequence error */ error: ErrorFunction; /** Sends the completion notification */ complete: CompleteFunction; /** A boolean value indicating whether the subscription is closed */ get closed(): boolean; } declare const Constants: { ActivityClientState: typeof ActivityClientState; DictateState: typeof DictateState; }; declare const buildInfoObject: { readonly buildTool?: string | undefined; readonly moduleFormat?: string | undefined; readonly version?: string | undefined; }; declare const version: string; export { CLEAR_SUGGESTED_ACTIONS, Constants, DirectLineCardAction, Observable, SET_SUGGESTED_ACTIONS, WebChatActivity, buildInfoObject as buildInfo, clearSuggestedActions, clearSuggestedActionsActionSchema, connect, disconnect, dismissNotification, emitTypingIndicator, getActivityLivestreamingMetadata, getOrgSchemaMessage, getVoiceActivityRole, getVoiceActivityText, isVoiceActivity, isVoiceTranscriptActivity, markActivity, muteVoiceRecording, onErrorResumeNext, postActivity, postVoiceActivity, registerVoiceHandler, sendEvent, sendFiles, sendMessage, sendMessageback as sendMessageBack, sendPostback as sendPostBack, setDictateInterims, setDictateState, setLanguage, setNotification, setSendBox, setSendBoxAttachments, setSendTimeout, setSendTypingIndicator, setSuggestedActions, setSuggestedActionsActionSchema, setVoiceState, startDictate, startSpeakingActivity, startVoiceRecording, stopDictate, stopSpeakingActivity, stopVoiceRecording, submitSendBox, unmuteVoiceRecording, unregisterVoiceHandler, version }; export type { ClearSuggestedActionsAction, DirectLineActivity, DirectLineAnimationCard, DirectLineAudioCard, DirectLineHeroCard, DirectLineJSBotConnection, DirectLineOAuthCard, DirectLineReceiptCard, DirectLineSignInCard, DirectLineThumbnailCard, DirectLineVideoCard, SendBoxAttachment, SetSuggestedActionsAction, VoiceHandler, VoiceState };