botframework-schema
Version:
Activity schema for the Microsoft Bot Framework.
1,803 lines (1,802 loc) • 83.9 kB
TypeScript
/**
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import * as z from 'zod';
import { TokenExchangeInvokeRequest } from './tokenExchangeInvokeRequest';
export * from './activityInterfaces';
export * from './activityEx';
export { CallerIdConstants } from './callerIdConstants';
export { SpeechConstants } from './speechConstants';
export { TokenExchangeInvokeRequest } from './tokenExchangeInvokeRequest';
export { TokenExchangeInvokeResponse } from './tokenExchangeInvokeResponse';
export * from './teams';
export * from './sharepoint';
/**
* Attachment View name and size
*/
export interface AttachmentView {
/**
* Id of the attachment
*/
viewId: string;
/**
* Size of the attachment
*/
size: number;
}
/**
* @internal
*/
export declare function assertAttachmentView(val: unknown, ..._args: unknown[]): asserts val is AttachmentView;
/**
* @internal
*/
export declare function isAttachmentView(val: unknown): val is AttachmentView;
/**
* Metadata for an attachment
*/
export interface AttachmentInfo {
/**
* Name of the attachment
*/
name: string;
/**
* ContentType of the attachment
*/
type: string;
/**
* attachment views
*/
views: AttachmentView[];
}
/**
* @internal
*/
export declare function assertAttachmentInfo(val: unknown, ..._args: unknown[]): asserts val is AttachmentInfo;
/**
* @internal
*/
export declare function isAttachmentInfo(val: unknown): val is AttachmentInfo;
/**
* Object representing inner http error
*/
export interface InnerHttpError {
/**
* HttpStatusCode from failed request
*/
statusCode: number;
/**
* Body from failed request
*/
body: any;
}
/**
* Object representing error information
*/
export interface ErrorModel {
/**
* Error code
*/
code: string;
/**
* Error message
*/
message: string;
/**
* Error from inner http call
*/
innerHttpError: InnerHttpError;
}
/**
* An HTTP API response
*/
export interface ErrorResponse {
/**
* Error message
*/
error: ErrorModel;
}
/**
* Channel account information needed to route a message
*/
export interface ChannelAccount {
/**
* Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or
* 123456)
*/
id: string;
/**
* Display friendly name
*/
name: string;
/**
* This account's object ID within Azure Active Directory (AAD)
*/
aadObjectId?: string;
/**
* Role of the entity behind the account (Example: User, Bot, etc.). Possible values include:
* 'user', 'bot', 'skill'
*/
role?: RoleTypes | string;
/**
* Custom properties object (optional)
*/
properties?: any;
}
/**
* @internal
*/
export declare function assertChannelAccount(val: unknown, ..._args: unknown[]): asserts val is ChannelAccount;
/**
* @internal
*/
export declare function isChannelAccount(val: unknown): val is ChannelAccount;
/**
* Channel account information for a conversation
*/
export interface ConversationAccount {
/**
* Indicates whether the conversation contains more than two participants at the time the
* activity was generated
*/
isGroup: boolean;
/**
* Indicates the type of the conversation in channels that distinguish between conversation types
*/
conversationType: string;
/**
* This conversation's tenant ID
*/
tenantId?: string;
/**
* Channel id for the user or bot on this channel (Example: joe@smith.com, or @joesmith or
* 123456)
*/
id: string;
/**
* Display friendly name
*/
name: string;
/**
* This account's object ID within Azure Active Directory (AAD)
*/
aadObjectId?: string;
/**
* Role of the entity behind the account (Example: User, Bot, etc.). Possible values include:
* 'user', 'bot'
*/
role?: RoleTypes;
/**
* Custom properties object (optional)
*/
properties?: any;
}
/**
* @internal
*/
export declare function assertConversationAccount(val: unknown, ..._args: unknown[]): asserts val is ConversationAccount;
/**
* @internal
*/
export declare function isConversationAccount(val: unknown): val is ConversationAccount;
/**
* Message reaction object
*/
export interface MessageReaction {
/**
* Message reaction type. Possible values include: 'like', 'plusOne'
*/
type: MessageReactionTypes | string;
}
/**
* @internal
*/
export declare function assertMessageReaction(val: unknown, ..._args: unknown[]): asserts val is MessageReaction;
/**
* @internal
*/
export declare function isMessageReaction(val: unknown): val is MessageReaction;
/**
* A clickable action
*/
export interface CardAction {
/**
* The type of action implemented by this button. Possible values include: 'openUrl', 'imBack',
* 'postBack', 'playAudio', 'playVideo', 'showImage', 'downloadFile', 'signin', 'call',
* messageBack', 'openApp'
*/
type: ActionTypes | string;
/**
* Text description which appears on the button
*/
title: string;
/**
* Image URL which will appear on the button, next to text label
*/
image?: string;
/**
* Text for this action
*/
text?: string;
/**
* (Optional) text to display in the chat feed if the button is clicked
*/
displayText?: string;
/**
* Supplementary parameter for action. Content of this property depends on the ActionType
*/
value: any;
/**
* Channel-specific data associated with this action
*/
channelData?: any;
/**
* Alternate image text to be used in place of the `image` field
*/
imageAltText?: string;
}
/**
* @internal
*/
export declare function assertCardAction(val: unknown, ..._args: unknown[]): asserts val is CardAction;
/**
* @internal
*/
export declare function isCardAction(val: unknown): val is CardAction;
/**
* SuggestedActions that can be performed
*/
export interface SuggestedActions {
/**
* Ids of the recipients that the actions should be shown to. These Ids are relative to the
* channelId and a subset of all recipients of the activity
*/
to: string[];
/**
* Actions that can be shown to the user
*/
actions: CardAction[];
}
/**
* @internal
*/
export declare function assertSuggestedActions(val: unknown, ..._args: unknown[]): asserts val is SuggestedActions;
/**
* @internal
*/
export declare function isSuggestedActions(val: unknown): val is SuggestedActions;
/**
* An attachment within an activity
*/
export interface Attachment {
/**
* mimetype/Contenttype for the file
*/
contentType: string;
/**
* Content Url
*/
contentUrl?: string;
/**
* Embedded content
*/
content?: any;
/**
* (OPTIONAL) The name of the attachment
*/
name?: string;
/**
* (OPTIONAL) Thumbnail associated with attachment
*/
thumbnailUrl?: string;
}
/**
* @internal
*/
export declare function assertAttachment(val: unknown, ..._args: unknown[]): asserts val is Attachment;
/**
* @internal
*/
export declare function isAttachment(val: unknown): val is Attachment;
/**
* Metadata object pertaining to an activity
*/
export interface Entity {
/**
* Type of this entity (RFC 3987 IRI)
*/
type: string;
/**
* Additional properties.
*/
[key: string]: any;
}
/**
* @internal
*/
export declare function assertEntity(val: unknown, ..._args: unknown[]): asserts val is Entity;
/**
* @internal
*/
export declare function isEntity(val: unknown): val is Entity;
/**
* An object relating to a particular point in a conversation
*/
export interface ConversationReference {
/**
* (Optional) ID of the activity to refer to
*/
activityId?: string;
/**
* (Optional) User participating in this conversation
*/
user?: ChannelAccount;
/**
* A locale name for the contents of the text field.
* The locale name is a combination of an ISO 639 two- or three-letter
* culture code associated with a language and an ISO 3166 two-letter
* subculture code associated with a country or region.
* The locale name can also correspond to a valid BCP-47 language tag.
*/
locale?: string;
/**
* Bot participating in this conversation
*/
bot: ChannelAccount;
/**
* Conversation reference
*/
conversation: ConversationAccount;
/**
* Channel ID
*/
channelId: string;
/**
* Service endpoint where operations concerning the referenced conversation may be performed
*/
serviceUrl: string;
}
/**
* @internal
*/
export declare function assertConversationReference(val: unknown, ..._args: unknown[]): asserts val is ConversationReference;
/**
* @internal
*/
export declare function isConversationReference(val: unknown): val is ConversationReference;
/**
* Refers to a substring of content within another field
*/
export interface TextHighlight {
/**
* Defines the snippet of text to highlight
*/
text: string;
/**
* Occurrence of the text field within the referenced text, if multiple exist.
*/
occurrence: number;
}
/**
* Represents a reference to a programmatic action
*/
export interface SemanticAction {
/**
* ID of this action
*/
id: string;
/**
* State of this action. Allowed values: 'start', 'continue', 'done'
*/
state: SemanticActionStateTypes | string;
/**
* Entities associated with this action
*/
entities: {
[propertyName: string]: Entity;
};
}
/**
* @internal
*/
export declare function assertSemanticAction(val: unknown, ..._args: unknown[]): asserts val is SemanticAction;
/**
* @internal
*/
export declare function isSemanticAction(val: unknown): val is SemanticAction;
/**
* An Activity is the basic communication type for the Bot Framework 3.0 protocol.
*/
export interface Activity {
/**
* Contains the activity type. Possible values include: 'message', 'contactRelationUpdate',
* 'conversationUpdate', 'typing', 'endOfConversation', 'event', 'invoke', 'deleteUserData',
* 'messageUpdate', 'messageDelete', 'installationUpdate', 'messageReaction', 'suggestion',
* 'trace', 'handoff'
*/
type: ActivityTypes | string;
/**
* Contains an ID that uniquely identifies the activity on the channel.
*/
id?: string;
/**
* Contains the date and time that the message was sent, in UTC, expressed in ISO-8601 format.
*/
timestamp?: Date;
/**
* Contains the local date and time of the message, expressed in ISO-8601 format.
* For example, 2016-09-23T13:07:49.4714686-07:00.
*/
localTimestamp?: Date;
/**
* Contains the name of the local timezone of the message, expressed in IANA Time Zone database format.
* For example, America/Los_Angeles.
*/
localTimezone: string;
/**
* A string containing a URI identifying the caller of a bot. This field is not intended to be transmitted over
* the wire, but is instead populated by bots and clients based on cryptographically verifiable data that asserts
* the identity of the callers (e.g. tokens).
*/
callerId: string;
/**
* Contains the URL that specifies the channel's service endpoint. Set by the channel.
*/
serviceUrl: string;
/**
* Contains an ID that uniquely identifies the channel. Set by the channel.
*/
channelId: string;
/**
* Identifies the sender of the message.
*/
from: ChannelAccount;
/**
* Identifies the conversation to which the activity belongs.
*/
conversation: ConversationAccount;
/**
* Identifies the recipient of the message.
*/
recipient: ChannelAccount;
/**
* Format of text fields Default:markdown. Possible values include: 'markdown', 'plain', 'xml'
*/
textFormat?: TextFormatTypes | string;
/**
* The layout hint for multiple attachments. Default: list. Possible values include: 'list',
* 'carousel'
*/
attachmentLayout?: AttachmentLayoutTypes | string;
/**
* The collection of members added to the conversation.
*/
membersAdded?: ChannelAccount[];
/**
* The collection of members removed from the conversation.
*/
membersRemoved?: ChannelAccount[];
/**
* The collection of reactions added to the conversation.
*/
reactionsAdded?: MessageReaction[];
/**
* The collection of reactions removed from the conversation.
*/
reactionsRemoved?: MessageReaction[];
/**
* The updated topic name of the conversation.
*/
topicName?: string;
/**
* Indicates whether the prior history of the channel is disclosed.
*/
historyDisclosed?: boolean;
/**
* A locale name for the contents of the text field.
* The locale name is a combination of an ISO 639 two- or three-letter culture code associated
* with a language
* and an ISO 3166 two-letter subculture code associated with a country or region.
* The locale name can also correspond to a valid BCP-47 language tag.
*/
locale?: string;
/**
* The text content of the message.
*/
text: string;
/**
* The text to speak.
*/
speak?: string;
/**
* Indicates whether your bot is accepting,
* expecting, or ignoring user input after the message is delivered to the client. Possible
* values include: 'acceptingInput', 'ignoringInput', 'expectingInput'
*/
inputHint?: InputHints | string;
/**
* The text to display if the channel cannot render cards.
*/
summary?: string;
/**
* The suggested actions for the activity.
*/
suggestedActions?: SuggestedActions;
/**
* Attachments
*/
attachments?: Attachment[];
/**
* Represents the entities that were mentioned in the message.
*/
entities?: Entity[];
/**
* Contains channel-specific content.
*/
channelData?: any;
/**
* Indicates whether the recipient of a contactRelationUpdate was added or removed from the
* sender's contact list.
*/
action?: string;
/**
* Contains the ID of the message to which this message is a reply.
*/
replyToId?: string;
/**
* A descriptive label for the activity.
*/
label: string;
/**
* The type of the activity's value object.
*/
valueType: string;
/**
* A value that is associated with the activity.
*/
value?: any;
/**
* The name of the operation associated with an invoke or event activity.
*/
name?: ActivityEventNames | string;
/**
* A reference to another conversation or activity.
*/
relatesTo?: ConversationReference;
/**
* The a code for endOfConversation activities that indicates why the conversation ended.
* Possible values include: 'unknown', 'completedSuccessfully', 'userCancelled', 'botTimedOut',
* 'botIssuedInvalidMessage', 'channelFailed'
*/
code?: EndOfConversationCodes | string;
/**
* The time at which the activity should be considered to be "expired" and should not be
* presented to the recipient.
*/
expiration?: Date;
/**
* The importance of the activity. Possible values include: 'low', 'normal', 'high'
*/
importance?: ActivityImportance | string;
/**
* A delivery hint to signal to the recipient alternate delivery paths for the activity.
* The default delivery mode is "default". Possible values include: 'normal', 'notification', 'expectReplies', 'ephemeral'
*/
deliveryMode?: DeliveryModes | string;
/**
* List of phrases and references that speech and language priming systems should listen for
*/
listenFor: string[];
/**
* The collection of text fragments to highlight when the activity contains a ReplyToId value.
*/
textHighlights?: TextHighlight[];
/**
* An optional programmatic action accompanying this request
*/
semanticAction?: SemanticAction;
}
/**
* @internal
*/
export declare function assertActivity(val: unknown, ..._args: unknown[]): asserts val is Activity;
/**
* @internal
*/
export declare function isActivity(val: unknown): val is Activity;
/**
* This interface is used to preserve the original string values of dates on Activities.
* When an Activity is received, timestamps are converted to Dates. Due to how Javascript
* Date objects are UTC, timezone offset values are lost.
*/
export interface ActivityTimestamps extends Activity {
rawTimestamp?: string;
rawExpiration?: string;
rawLocalTimestamp?: string;
}
export declare const conversationParametersObject: z.ZodObject<{
isGroup: z.ZodBoolean;
bot: z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}>;
members: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}>, "many">>;
topicName: z.ZodOptional<z.ZodString>;
tenantId: z.ZodOptional<z.ZodString>;
activity: z.ZodObject<{
type: z.ZodString;
id: z.ZodOptional<z.ZodString>;
timestamp: z.ZodOptional<z.ZodType<Date, z.ZodTypeDef, Date>>;
localTimestamp: z.ZodOptional<z.ZodType<Date, z.ZodTypeDef, Date>>;
localTimezone: z.ZodString;
callerId: z.ZodString;
serviceUrl: z.ZodString;
channelId: z.ZodString;
from: z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}>;
conversation: z.ZodObject<{
isGroup: z.ZodBoolean;
conversationType: z.ZodString;
tenantId: z.ZodOptional<z.ZodString>;
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
}>;
recipient: z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}>;
textFormat: z.ZodOptional<z.ZodString>;
attachmentLayout: z.ZodOptional<z.ZodString>;
membersAdded: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}>, "many">>;
membersRemoved: z.ZodOptional<z.ZodArray<z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}>, "many">>;
reactionsAdded: z.ZodOptional<z.ZodArray<z.ZodObject<{
type: z.ZodString;
}, "strip", z.ZodTypeAny, {
type?: string;
}, {
type?: string;
}>, "many">>;
reactionsRemoved: z.ZodOptional<z.ZodArray<z.ZodObject<{
type: z.ZodString;
}, "strip", z.ZodTypeAny, {
type?: string;
}, {
type?: string;
}>, "many">>;
topicName: z.ZodOptional<z.ZodString>;
historyDisclosed: z.ZodOptional<z.ZodBoolean>;
locale: z.ZodOptional<z.ZodString>;
text: z.ZodString;
speak: z.ZodOptional<z.ZodString>;
inputHint: z.ZodOptional<z.ZodString>;
summary: z.ZodOptional<z.ZodString>;
suggestedActions: z.ZodOptional<z.ZodObject<{
to: z.ZodArray<z.ZodString, "many">;
actions: z.ZodArray<z.ZodObject<{
type: z.ZodString;
title: z.ZodString;
image: z.ZodOptional<z.ZodString>;
text: z.ZodOptional<z.ZodString>;
displayText: z.ZodOptional<z.ZodString>;
value: z.ZodUnknown;
channelData: z.ZodUnknown;
imageAltText: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
type?: string;
value?: unknown;
text?: string;
title?: string;
image?: string;
displayText?: string;
channelData?: unknown;
imageAltText?: string;
}, {
type?: string;
value?: unknown;
text?: string;
title?: string;
image?: string;
displayText?: string;
channelData?: unknown;
imageAltText?: string;
}>, "many">;
}, "strip", z.ZodTypeAny, {
actions?: {
type?: string;
value?: unknown;
text?: string;
title?: string;
image?: string;
displayText?: string;
channelData?: unknown;
imageAltText?: string;
}[];
to?: string[];
}, {
actions?: {
type?: string;
value?: unknown;
text?: string;
title?: string;
image?: string;
displayText?: string;
channelData?: unknown;
imageAltText?: string;
}[];
to?: string[];
}>>;
attachments: z.ZodOptional<z.ZodArray<z.ZodObject<{
contentType: z.ZodString;
contentUrl: z.ZodOptional<z.ZodString>;
content: z.ZodOptional<z.ZodUnknown>;
name: z.ZodOptional<z.ZodString>;
thumbnailUrl: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
name?: string;
contentType?: string;
contentUrl?: string;
content?: unknown;
thumbnailUrl?: string;
}, {
name?: string;
contentType?: string;
contentUrl?: string;
content?: unknown;
thumbnailUrl?: string;
}>, "many">>;
entities: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>, "many">>;
channelData: z.ZodOptional<z.ZodUnknown>;
action: z.ZodOptional<z.ZodString>;
replyToId: z.ZodOptional<z.ZodString>;
label: z.ZodString;
valueType: z.ZodString;
value: z.ZodOptional<z.ZodUnknown>;
name: z.ZodOptional<z.ZodString>;
relatesTo: z.ZodOptional<z.ZodObject<{
ActivityId: z.ZodOptional<z.ZodString>;
user: z.ZodOptional<z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}>>;
locale: z.ZodOptional<z.ZodString>;
bot: z.ZodObject<{
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}>;
conversation: z.ZodObject<{
isGroup: z.ZodBoolean;
conversationType: z.ZodString;
tenantId: z.ZodOptional<z.ZodString>;
id: z.ZodString;
name: z.ZodString;
aadObjectId: z.ZodOptional<z.ZodString>;
role: z.ZodOptional<z.ZodString>;
properties: z.ZodOptional<z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
}, {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
}>;
channelId: z.ZodString;
serviceUrl: z.ZodString;
}, "strip", z.ZodTypeAny, {
bot?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
ActivityId?: string;
user?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
}, {
bot?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
ActivityId?: string;
user?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
}>>;
code: z.ZodOptional<z.ZodString>;
importance: z.ZodOptional<z.ZodString>;
deliveryMode: z.ZodOptional<z.ZodString>;
listenFor: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
textHighlights: z.ZodOptional<z.ZodArray<z.ZodObject<{
text: z.ZodString;
occurrence: z.ZodNumber;
}, "strip", z.ZodTypeAny, {
text?: string;
occurrence?: number;
}, {
text?: string;
occurrence?: number;
}>, "many">>;
semanticAction: z.ZodOptional<z.ZodObject<{
id: z.ZodString;
state: z.ZodString;
entities: z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodUnknown>, Record<string, unknown>, Record<string, unknown>>>;
}, "strip", z.ZodTypeAny, {
id?: string;
state?: string;
entities?: Record<string, Record<string, unknown>>;
}, {
id?: string;
state?: string;
entities?: Record<string, Record<string, unknown>>;
}>>;
}, "strip", z.ZodTypeAny, {
code?: string;
type?: string;
value?: unknown;
valueType?: string;
text?: string;
id?: string;
speak?: string;
name?: string;
channelData?: unknown;
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
entities?: Record<string, unknown>[];
timestamp?: Date;
localTimestamp?: Date;
localTimezone?: string;
callerId?: string;
from?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
recipient?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
textFormat?: string;
attachmentLayout?: string;
membersAdded?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
membersRemoved?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
reactionsAdded?: {
type?: string;
}[];
reactionsRemoved?: {
type?: string;
}[];
topicName?: string;
historyDisclosed?: boolean;
inputHint?: string;
summary?: string;
suggestedActions?: {
actions?: {
type?: string;
value?: unknown;
text?: string;
title?: string;
image?: string;
displayText?: string;
channelData?: unknown;
imageAltText?: string;
}[];
to?: string[];
};
attachments?: {
name?: string;
contentType?: string;
contentUrl?: string;
content?: unknown;
thumbnailUrl?: string;
}[];
action?: string;
replyToId?: string;
label?: string;
relatesTo?: {
bot?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
ActivityId?: string;
user?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
};
importance?: string;
deliveryMode?: string;
listenFor?: string[];
textHighlights?: {
text?: string;
occurrence?: number;
}[];
semanticAction?: {
id?: string;
state?: string;
entities?: Record<string, Record<string, unknown>>;
};
}, {
code?: string;
type?: string;
value?: unknown;
valueType?: string;
text?: string;
id?: string;
speak?: string;
name?: string;
channelData?: unknown;
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
entities?: Record<string, unknown>[];
timestamp?: Date;
localTimestamp?: Date;
localTimezone?: string;
callerId?: string;
from?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
recipient?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
textFormat?: string;
attachmentLayout?: string;
membersAdded?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
membersRemoved?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
reactionsAdded?: {
type?: string;
}[];
reactionsRemoved?: {
type?: string;
}[];
topicName?: string;
historyDisclosed?: boolean;
inputHint?: string;
summary?: string;
suggestedActions?: {
actions?: {
type?: string;
value?: unknown;
text?: string;
title?: string;
image?: string;
displayText?: string;
channelData?: unknown;
imageAltText?: string;
}[];
to?: string[];
};
attachments?: {
name?: string;
contentType?: string;
contentUrl?: string;
content?: unknown;
thumbnailUrl?: string;
}[];
action?: string;
replyToId?: string;
label?: string;
relatesTo?: {
bot?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
ActivityId?: string;
user?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
};
importance?: string;
deliveryMode?: string;
listenFor?: string[];
textHighlights?: {
text?: string;
occurrence?: number;
}[];
semanticAction?: {
id?: string;
state?: string;
entities?: Record<string, Record<string, unknown>>;
};
}>;
channelData: z.ZodOptional<z.ZodUnknown>;
}, "strip", z.ZodTypeAny, {
bot?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
isGroup?: boolean;
tenantId?: string;
channelData?: unknown;
topicName?: string;
members?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
activity?: {
code?: string;
type?: string;
value?: unknown;
valueType?: string;
text?: string;
id?: string;
speak?: string;
name?: string;
channelData?: unknown;
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
entities?: Record<string, unknown>[];
timestamp?: Date;
localTimestamp?: Date;
localTimezone?: string;
callerId?: string;
from?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
recipient?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
textFormat?: string;
attachmentLayout?: string;
membersAdded?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
membersRemoved?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
reactionsAdded?: {
type?: string;
}[];
reactionsRemoved?: {
type?: string;
}[];
topicName?: string;
historyDisclosed?: boolean;
inputHint?: string;
summary?: string;
suggestedActions?: {
actions?: {
type?: string;
value?: unknown;
text?: string;
title?: string;
image?: string;
displayText?: string;
channelData?: unknown;
imageAltText?: string;
}[];
to?: string[];
};
attachments?: {
name?: string;
contentType?: string;
contentUrl?: string;
content?: unknown;
thumbnailUrl?: string;
}[];
action?: string;
replyToId?: string;
label?: string;
relatesTo?: {
bot?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
ActivityId?: string;
user?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
};
importance?: string;
deliveryMode?: string;
listenFor?: string[];
textHighlights?: {
text?: string;
occurrence?: number;
}[];
semanticAction?: {
id?: string;
state?: string;
entities?: Record<string, Record<string, unknown>>;
};
};
}, {
bot?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
isGroup?: boolean;
tenantId?: string;
channelData?: unknown;
topicName?: string;
members?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
activity?: {
code?: string;
type?: string;
value?: unknown;
valueType?: string;
text?: string;
id?: string;
speak?: string;
name?: string;
channelData?: unknown;
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
entities?: Record<string, unknown>[];
timestamp?: Date;
localTimestamp?: Date;
localTimezone?: string;
callerId?: string;
from?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
recipient?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
textFormat?: string;
attachmentLayout?: string;
membersAdded?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
membersRemoved?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
}[];
reactionsAdded?: {
type?: string;
}[];
reactionsRemoved?: {
type?: string;
}[];
topicName?: string;
historyDisclosed?: boolean;
inputHint?: string;
summary?: string;
suggestedActions?: {
actions?: {
type?: string;
value?: unknown;
text?: string;
title?: string;
image?: string;
displayText?: string;
channelData?: unknown;
imageAltText?: string;
}[];
to?: string[];
};
attachments?: {
name?: string;
contentType?: string;
contentUrl?: string;
content?: unknown;
thumbnailUrl?: string;
}[];
action?: string;
replyToId?: string;
label?: string;
relatesTo?: {
bot?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
ActivityId?: string;
user?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
};
locale?: string;
conversation?: {
id?: string;
name?: string;
aadObjectId?: string;
role?: string;
isGroup?: boolean;
conversationType?: string;
tenantId?: string;
properties?: unknown;
};
channelId?: string;
serviceUrl?: string;
};
importance?: string;
deliveryMode?: string;
listenFor?: string[];
textHighlights?: {
text?: string;
occurrence?: number;
}[];
semanticAction?: {
id?: string;
state?: string;
entities?: Record<string, Record<string, unknown>>;
};
};
}>;
/**
* Parameters for creating a new conversation
*/
export interface ConversationParameters {
/**
* IsGroup
*/
isGroup: boolean;
/**
* The bot address for this conversation
*/
bot: ChannelAccount;
/**
* Members to add to the conversation
*/
members?: ChannelAccount[];
/**
* (Optional) Topic of the conversation (if supported by the channel)
*/
topicName?: string;
/**
* (Optional) The tenant ID in which the conversation should be created
*/
tenantId?: string;
/**
* (Optional) When creating a new conversation, use this activity as the initial message to the
* conversation
*/
activity?: Activity;
/**
* Channel specific payload for creating the conversation
*/
channelData: any;
}
/**
* A response containing a resource
*/
export interface ConversationResourceResponse {
/**
* ID of the Activity (if sent)
*/
activityId: string;
/**
* Service endpoint where operations concerning the conversation may be performed
*/
serviceUrl: string;
/**
* Id of the resource
*/
id: string;
}
/**
* Conversation and its members
*/
export interface ConversationMembers {
/**
* Conversation ID
*/
id: string;
/**
* List of members in this conversation
*/
members: ChannelAccount[];
}
/**
* Conversations result
*/
export interface ConversationsResult {
/**
* Paging token
*/
continuationToken: string;
/**
* List of conversations
*/
conversations: ConversationMembers[];
}
/**
* Expected Replies in response to DeliveryModes.ExpectReplies
*/
export interface ExpectedReplies {
/**
* A collection of Activities that conforms to the ExpectedReplies schema.
*/
activities: Activity[];
}
/**
* A response containing a resource ID
*/
export interface ResourceResponse {
/**
* Id of the resource
*/
id: string;
}
/**
* Transcript
*/
export interface Transcript {
/**
* A collection of Activities that conforms to the Transcript schema.
*/
activities: Activity[];
}
/**
* Page of members.
*/
export interface PagedMembersResult {
/**
* Paging token
*/
continuationToken: string;
/**
* The Channel Accounts.
*/
members: ChannelAccount[];
}
/**
* Attachment data
*/
export interface AttachmentData {
/**
* Content-Type of the attachment
*/
type: string;
/**
* Name of the attachment
*/
name: string;
/**
* Attachment content
*/
originalBase64: Uint8Array;
/**
* Attachment thumbnail
*/
thumbnailBase64: Uint8Array;
}
/**
* An image on a card
*/
export interface CardImage {
/**
* URL thumbnail image for major content property
*/
url: string;
/**
* Image description intended for screen readers
*/
alt?: string;
/**
* Action assigned to specific Attachment
*/
tap?: CardAction;
}
/**
* A Hero card (card with a single, large image)
*/
export interface HeroCard {
/**
* Title of the card
*/
title: string;
/**
* Subtitle of the card
*/
subtitle: string;
/**
* Text for the card
*/
text: string;
/**
* Array of images for the card
*/
images: CardImage[];
/**
* Set of actions applicable to the current card
*/
buttons: CardAction[];
/**
* This action will be activated when user taps on the card itself
*/
tap: CardAction;
}
/**
* Thumbnail URL
*/
export interface ThumbnailUrl {
/**
* URL pointing to the thumbnail to use for media content
*/
url: string;
/**
* HTML alt text to include on this thumbnail image
*/
alt: string;
}
/**
* Media URL
*/
export interface MediaUrl {
/**
* Url for the media
*/
url: string;
/**
* Optional profile hint to the client to differentiate multiple MediaUrl objects from each other
*/
profile?: string;
}
/**
* An animation card (Ex: gif or short video clip)
*/
export interface AnimationCard {
/**
* Title of this card
*/
title: string;
/**
* Subtitle of this card
*/
subtitle: string;
/**
* Text of this card
*/
text: string;
/**
* Thumbnail placeholder
*/
image: ThumbnailUrl;
/**
* Media URLs for this card. When this field contains more than one URL, each URL is an
* alternative format of the same content.
*/
media: MediaUrl[];
/**
* Actions on this card
*/
buttons: CardAction[];
/**
* This content may be shared with others (default:true)
*/
shareable: boolean;
/**
* Should the client loop playback at end of content (default:true)
*/
autoloop: boolean;
/**
* Should the client automatically start playback of media in this card (default:true)