import * as valibot from 'valibot'; import { InferOutput } from 'valibot'; import { T as Tagged } from './_dtsroll-chunks/B7Whm73Q-tagged.js'; type Activity = WebChatActivity; declare const LocalIdSchema: valibot.SchemaWithPipe, valibot.GenericSchema<`https://${string}`>], "@id is required and must be an IRI or blank node identifier">, valibot.TransformAction<`_:${string}` | `https://${string}`, Tagged<`_:${string}` | `https://${string}`, "local id">>]>; type LocalId = InferOutput; declare function getLocalIdFromActivity(activity: Readonly): LocalId; type AnyAnd = Omit & T; type DirectLineAttachment = { content?: any; contentType: string; contentUrl?: string; name?: string; thumbnailUrl?: string; }; type CardActionWithImageAndTitle = { image: string; } | { title: string; } | { image: string; title: string; }; /** * A `call` action represents a telephone number that may be called. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#call */ type CallCardAction = CardActionWithImageAndTitle & { type: 'call'; value: string; }; /** * A `downloadFile` action represents a hyperlink to be downloaded. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#download-file-actions */ type DownloadFileCardAction = CardActionWithImageAndTitle & { type: 'downloadFile'; value: string; }; /** * An `imBack` action represents a text response that is added to the chat feed. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#im-back */ type IMBackCardAction = CardActionWithImageAndTitle & { type: 'imBack'; value: string; }; /** * A `messageBack` action represents a text response to be sent via the chat system. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#message-back */ type MessageBackCardAction = CardActionWithImageAndTitle & { displayText?: string; text?: string; type: 'messageBack'; value?: { [key: string]: any; }; }; /** * An `openUrl` action represents a hyperlink to be handled by the client. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#open-url-actions */ type OpenURLCardAction = CardActionWithImageAndTitle & { type: 'openUrl'; value: string; }; /** * A `playAudio` action represents audio media that may be played. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-audio */ type PlayAudioCardAction = CardActionWithImageAndTitle & { type: 'playAudio'; value: string; }; /** * A `playVideo` action represents video media that may be played. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#play-video */ type PlayVideoCardAction = CardActionWithImageAndTitle & { type: 'playVideo'; value: string; }; /** * A `postBack` action represents a text response that is not added to the chat feed. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#post-back */ type PostBackCardAction = CardActionWithImageAndTitle & { type: 'postBack'; value: any; }; /** * A `showImage` action represents an image that may be displayed. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#show-image-file-actions */ type ShowImageCardAction = CardActionWithImageAndTitle & { type: 'showImage'; value: string; }; /** * A `signin` action represents a hyperlink to be handled by the client's signin system. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#signin */ type SignInCardAction = CardActionWithImageAndTitle & { type: 'signin'; value: string; }; /** * A card action represents a clickable or interactive button for use within cards or as suggested actions. They are used to solicit input from users. Despite their name, card actions are not limited to use solely on cards. * * https://github.com/Microsoft/botframework-sdk/blob/main/specs/botframework-activity/botframework-activity.md#card-action */ type DirectLineCardAction = CallCardAction | DownloadFileCardAction | IMBackCardAction | MessageBackCardAction | OpenURLCardAction | PlayAudioCardAction | PlayVideoCardAction | PostBackCardAction | ShowImageCardAction | SignInCardAction; type DirectLineSuggestedAction = { actions?: DirectLineCardAction[]; to?: string[]; }; type SupportedRole = 'bot' | 'channel' | 'user'; type SupportedSendStatus = 'sending' | 'send failed' | 'sent'; type ChannelData = AnyAnd<{ attachmentSizes?: number[]; clientActivityID?: string; 'webchat:internal:local-id': LocalId; 'webchat:internal:position': number; /** * Time when the activity appear in chat history. * * Note: if the activity is updated, this value will also be updated. */ 'webchat:internal:received-at'?: number; 'webchat:sequence-id'?: number | undefined; webChat?: { /** * Per-activity style options. * * New in 4.18.0. */ styleOptions?: Record; }; } & (SendStatus extends SupportedSendStatus ? { /** * @deprecated Since 4.15.3: Please use `channelData['webchat:send-status']` or `useSendStatusByActivityKey()` hook instead. * Please refer to https://github.com/microsoft/BotFramework-WebChat/pull/4362 for details. This field will be removed on or after 2024-07-31. */ state?: SendStatus; /** * The send status of the activity. * * - `"sending"`, the activity is in-transit and it has not been timed out; * - `"send failed"`, the activity cannot be delivered permanently and further processing had been stopped; * - `"sent"`, the activity is delivered successfully. * * Due to network-related race conditions, the activity could be marked as `"send failed"` but delivered by the service. * In this case, the activity should continue to mark as `"send failed"`. * * For further details, please see [#4362](https://github.com/microsoft/BotFramework-WebChat/pull/4362). */ 'webchat:send-status': SendStatus; } : Record) & (Type extends 'message' ? { messageBack?: { displayText: string; }; postBack?: boolean; speak?: boolean; speechSynthesisUtterance?: SpeechSynthesisUtterance; 'webchat:fallback-text'?: string; feedbackLoop?: { type: 'default'; disclaimer?: string; }; } : Record)>; type ClientCapabilitiesEntity = { requiresBotState?: boolean; supportsListening?: boolean; supportsTts?: boolean; type: 'ClientCapabilities'; }; type Entity = ClientCapabilitiesEntity | { type: string; }; type ChannelAcount = { id: string; name?: string; role: Role; }; type EventActivityEssence = { name: string; type: 'event'; value?: any; }; type MessageActivityEssence = { attachmentLayout?: 'carousel' | 'stacked'; attachments?: DirectLineAttachment[]; channelData: { streamId?: string; streamSequence?: number; streamType?: 'final'; }; inputHint?: 'accepting' | 'expecting' | 'ignoring'; locale?: string; speak?: string; suggestedActions?: DirectLineSuggestedAction; text: string | undefined; textFormat?: 'markdown' | 'plain' | 'xml'; type: 'message'; value?: any; }; type TypingActivityEssence = { attachmentLayout?: 'carousel' | 'stacked'; attachments?: DirectLineAttachment[]; text?: undefined; type: 'typing'; } | { attachmentLayout?: 'carousel' | 'stacked'; attachments?: DirectLineAttachment[]; channelData: { streamId?: string | undefined; streamSequence: number; streamType: 'informative' | 'streaming' | 'final'; }; text?: string | undefined; type: 'typing'; }; type TimestampFromServerEssence = { id: string; localTimestamp?: string; timestamp: string; }; type TimestampInTransitEssence = { id?: string; localTimestamp: string; timestamp?: string; }; type TimestampEssence = Role extends 'user' ? SendStatus extends 'sending' | 'send failed' ? TimestampInTransitEssence : TimestampFromServerEssence : TimestampFromServerEssence; type CoreActivityEssence = { channelData: ChannelData; channelId?: string; entities?: Entity[]; from: ChannelAcount; localTimezone?: string; replyToId?: string; type: string; } & TimestampEssence & (Type extends 'event' ? EventActivityEssence : Type extends 'message' ? MessageActivityEssence : Type extends 'typing' ? TypingActivityEssence : { type: Type; }); type OthersActivity = CoreActivityEssence<'bot' | 'channel', undefined>; type SelfActivitySendFailed = CoreActivityEssence<'user', 'send failed'>; type SelfActivitySending = CoreActivityEssence<'user', 'sending'>; type SelfActivitySent = CoreActivityEssence<'user', 'sent'>; type SelfActivity = SelfActivitySendFailed | SelfActivitySending | SelfActivitySent; type WebChatActivity = SelfActivity | OthersActivity; export { LocalIdSchema as a, getLocalIdFromActivity as g }; export type { Activity as A, DirectLineCardAction as D, LocalId as L, WebChatActivity as W, DirectLineAttachment as b, DirectLineSuggestedAction as c };