-
Notifications
You must be signed in to change notification settings - Fork 281
/
Copy pathindex.ts
2527 lines (2383 loc) · 60.8 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* 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';
// The Teams schemas was manually added to this library. This file has been updated to export those schemas.
export * from './teams';
// The SharePoint schemas was manually added to this library. This file has been updated to export those schemas.
export * from './sharepoint';
/**
* Attachment View name and size
*/
export interface AttachmentView {
/**
* Id of the attachment
*/
viewId: string;
/**
* Size of the attachment
*/
size: number;
}
const attachmentView = z.object({
viewId: z.string(),
size: z.number(),
});
/**
* @internal
*/
export function assertAttachmentView(val: unknown, ..._args: unknown[]): asserts val is AttachmentView {
attachmentView.parse(val);
}
/**
* @internal
*/
export function isAttachmentView(val: unknown): val is AttachmentView {
return attachmentView.safeParse(val).success;
}
/**
* Metadata for an attachment
*/
export interface AttachmentInfo {
/**
* Name of the attachment
*/
name: string;
/**
* ContentType of the attachment
*/
type: string;
/**
* attachment views
*/
views: AttachmentView[];
}
const attachmentInfo = z.object({
name: z.string(),
type: z.string(),
views: z.array(attachmentView),
});
/**
* @internal
*/
export function assertAttachmentInfo(val: unknown, ..._args: unknown[]): asserts val is AttachmentInfo {
attachmentInfo.parse(val);
}
/**
* @internal
*/
export function isAttachmentInfo(val: unknown): val is AttachmentInfo {
return attachmentInfo.safeParse(val).success;
}
/**
* Object representing inner http error
*/
export interface InnerHttpError {
/**
* HttpStatusCode from failed request
*/
statusCode: number;
/**
* Body from failed request
*/
body: any; // eslint-disable-line @typescript-eslint/no-explicit-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;
}
const channelAccount = z.object({
id: z.string(),
name: z.string(),
aadObjectId: z.string().optional(),
role: z.string().optional(),
});
/**
* @internal
*/
export function assertChannelAccount(val: unknown, ..._args: unknown[]): asserts val is ChannelAccount {
channelAccount.parse(val);
}
/**
* @internal
*/
export function isChannelAccount(val: unknown): val is ChannelAccount {
return channelAccount.safeParse(val).success;
}
/**
* 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; // eslint-disable-line @typescript-eslint/no-explicit-any
}
const conversationAccount = z.object({
isGroup: z.boolean(),
conversationType: z.string(),
tenantId: z.string().optional(),
id: z.string(),
name: z.string(),
aadObjectId: z.string().optional(),
role: z.string().optional(),
properties: z.unknown().optional(),
});
/**
* @internal
*/
export function assertConversationAccount(val: unknown, ..._args: unknown[]): asserts val is ConversationAccount {
conversationAccount.parse(val);
}
/**
* @internal
*/
export function isConversationAccount(val: unknown): val is ConversationAccount {
return conversationAccount.safeParse(val).success;
}
/**
* Message reaction object
*/
export interface MessageReaction {
/**
* Message reaction type. Possible values include: 'like', 'plusOne'
*/
type: MessageReactionTypes | string;
}
const messageReaction = z.object({
type: z.string(),
});
/**
* @internal
*/
export function assertMessageReaction(val: unknown, ..._args: unknown[]): asserts val is MessageReaction {
messageReaction.parse(val);
}
/**
* @internal
*/
export function isMessageReaction(val: unknown): val is MessageReaction {
return messageReaction.safeParse(val).success;
}
/**
* 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; // eslint-disable-line @typescript-eslint/no-explicit-any
/**
* Channel-specific data associated with this action
*/
channelData?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
/**
* Alternate image text to be used in place of the `image` field
*/
imageAltText?: string;
}
const cardAction = z.object({
type: z.string(),
title: z.string(),
image: z.string().optional(),
text: z.string().optional(),
displayText: z.string().optional(),
value: z.unknown(),
channelData: z.unknown(),
imageAltText: z.string().optional(),
});
/**
* @internal
*/
export function assertCardAction(val: unknown, ..._args: unknown[]): asserts val is CardAction {
cardAction.parse(val);
}
/**
* @internal
*/
export function isCardAction(val: unknown): val is CardAction {
return cardAction.safeParse(val).success;
}
/**
* 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[];
}
const suggestedActions = z.object({
to: z.array(z.string()),
actions: z.array(cardAction),
});
/**
* @internal
*/
export function assertSuggestedActions(val: unknown, ..._args: unknown[]): asserts val is SuggestedActions {
suggestedActions.parse(val);
}
/**
* @internal
*/
export function isSuggestedActions(val: unknown): val is SuggestedActions {
return suggestedActions.safeParse(val).success;
}
/**
* An attachment within an activity
*/
export interface Attachment {
/**
* mimetype/Contenttype for the file
*/
contentType: string;
/**
* Content Url
*/
contentUrl?: string;
/**
* Embedded content
*/
content?: any; // eslint-disable-line @typescript-eslint/no-explicit-any
/**
* (OPTIONAL) The name of the attachment
*/
name?: string;
/**
* (OPTIONAL) Thumbnail associated with attachment
*/
thumbnailUrl?: string;
}
const attachment = z.object({
contentType: z.string(),
contentUrl: z.string().optional(),
content: z.unknown().optional(),
name: z.string().optional(),
thumbnailUrl: z.string().optional(),
});
/**
* @internal
*/
export function assertAttachment(val: unknown, ..._args: unknown[]): asserts val is Attachment {
attachment.parse(val);
}
/**
* @internal
*/
export function isAttachment(val: unknown): val is Attachment {
return attachment.safeParse(val).success;
}
/**
* Metadata object pertaining to an activity
*/
export interface Entity {
/**
* Type of this entity (RFC 3987 IRI)
*/
type: string;
/**
* Additional properties.
*/
[key: string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any
}
const entity = z.record(z.unknown()).refine((val) => typeof val.type === 'string');
/**
* @internal
*/
export function assertEntity(val: unknown, ..._args: unknown[]): asserts val is Entity {
entity.parse(val);
}
/**
* @internal
*/
export function isEntity(val: unknown): val is Entity {
return entity.safeParse(val).success;
}
/**
* 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;
}
const conversationReference = z.object({
ActivityId: z.string().optional(),
user: channelAccount.optional(),
locale: z.string().optional(),
bot: channelAccount,
conversation: conversationAccount,
channelId: z.string(),
serviceUrl: z.string(),
});
/**
* @internal
*/
export function assertConversationReference(val: unknown, ..._args: unknown[]): asserts val is ConversationReference {
conversationReference.parse(val);
}
/**
* @internal
*/
export function isConversationReference(val: unknown): val is ConversationReference {
return conversationReference.safeParse(val).success;
}
/**
* 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;
}
const textHighlight = z.object({
text: z.string(),
occurrence: z.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 };
}
const semanticAction = z.object({
id: z.string(),
state: z.string(),
entities: z.record(entity),
});
/**
* @internal
*/
export function assertSemanticAction(val: unknown, ..._args: unknown[]): asserts val is SemanticAction {
semanticAction.parse(val);
}
/**
* @internal
*/
export function isSemanticAction(val: unknown): val is SemanticAction {
return semanticAction.safeParse(val).success;
}
/**
* 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; // eslint-disable-line @typescript-eslint/no-explicit-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; // eslint-disable-line @typescript-eslint/no-explicit-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;
}
const activity = z.object({
type: z.string(),
id: z.string().optional(),
timestamp: z.instanceof(Date).optional(),
localTimestamp: z.instanceof(Date).optional(),
localTimezone: z.string(),
callerId: z.string(),
serviceUrl: z.string(),
channelId: z.string(),
from: channelAccount,
conversation: conversationAccount,
recipient: channelAccount,
textFormat: z.string().optional(),
attachmentLayout: z.string().optional(),
membersAdded: z.array(channelAccount).optional(),
membersRemoved: z.array(channelAccount).optional(),
reactionsAdded: z.array(messageReaction).optional(),
reactionsRemoved: z.array(messageReaction).optional(),
topicName: z.string().optional(),
historyDisclosed: z.boolean().optional(),
locale: z.string().optional(),
text: z.string(),
speak: z.string().optional(),
inputHint: z.string().optional(),
summary: z.string().optional(),
suggestedActions: suggestedActions.optional(),
attachments: z.array(attachment).optional(),
entities: z.array(entity).optional(),
channelData: z.unknown().optional(),
action: z.string().optional(),
replyToId: z.string().optional(),
label: z.string(),
valueType: z.string(),
value: z.unknown().optional(),
name: z.string().optional(),
relatesTo: conversationReference.optional(),
code: z.string().optional(),
importance: z.string().optional(),
deliveryMode: z.string().optional(),
listenFor: z.array(z.string()).optional(),
textHighlights: z.array(textHighlight).optional(),
semanticAction: semanticAction.optional(),
});
/**
* @internal
*/
export function assertActivity(val: unknown, ..._args: unknown[]): asserts val is Activity {
activity.parse(val);
}
/**
* @internal
*/
export function isActivity(val: unknown): val is Activity {
return activity.safeParse(val).success;
}
/**
* 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 const conversationParametersObject = z.object({
isGroup: z.boolean(),
bot: channelAccount,
members: z.array(channelAccount).optional(),
topicName: z.string().optional(),
tenantId: z.string().optional(),
activity: activity,
channelData: z.unknown().optional(),
});
/**
* 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; // eslint-disable-line @typescript-eslint/no-explicit-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
*/