Skip to content

Commit e482c56

Browse files
Updating Teams Types (#1789)
* fixes #1398 * adding type * updating documentation * updating typing references Co-authored-by: Steven Ickman <stevenic@microsoft.com>
1 parent a4cb9ea commit e482c56

File tree

2 files changed

+31
-15
lines changed

2 files changed

+31
-15
lines changed

libraries/botframework-schema/src/teams/extension/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface O365ConnectorCardActionBase {
5656
}
5757

5858
/**
59-
* Defines values for Type1.
59+
* Defines values for O365ConnectorCardInputType.
6060
* Possible values include: 'textInput', 'dateInput', 'multichoiceInput'
6161
* @readonly
6262
* @enum {string}
@@ -71,7 +71,7 @@ export type O365ConnectorCardInputType = 'textInput' | 'dateInput' | 'multichoic
7171
*/
7272
export interface O365ConnectorCardInputBase {
7373
/**
74-
* @member {Type1} [type] Input type name. Possible values include:
74+
* @member {O365ConnectorCardInputBaseType} [type] Input type name. Possible values include:
7575
* 'textInput', 'dateInput', 'multichoiceInput'
7676
*/
7777
'@type'?: O365ConnectorCardInputType;

libraries/botframework-schema/src/teams/index.ts

Lines changed: 29 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -852,7 +852,7 @@ export interface MessagingExtensionAction extends TaskModuleRequest {
852852
* @member {BotMessagePreviewAction} [botMessagePreviewAction] Bot message
853853
* preview action taken by user. Possible values include: 'edit', 'send'
854854
*/
855-
botMessagePreviewAction?: BotMessagePreviewAction;
855+
botMessagePreviewAction?: BotMessagePreviewActionType;
856856
/**
857857
* @member {Activity[]} [botActivityPreview]
858858
*/
@@ -872,10 +872,10 @@ export interface MessagingExtensionAction extends TaskModuleRequest {
872872
*/
873873
export interface TaskModuleResponseBase {
874874
/**
875-
* @member {Type2} [type] Choice of action options when responding to the
875+
* @member {BotMessagePreviewActionType} [type] Choice of action options when responding to the
876876
* task/submit message. Possible values include: 'message', 'continue'
877877
*/
878-
type?: Type2;
878+
type?: BotMessagePreviewActionType;
879879
}
880880

881881
/**
@@ -918,10 +918,10 @@ export interface MessagingExtensionResult {
918918
*/
919919
attachmentLayout?: AttachmentLayout;
920920
/**
921-
* @member {Type3} [type] The type of the result. Possible values include:
921+
* @member {MessagingExtensionResultType} [type] The type of the result. Possible values include:
922922
* 'result', 'auth', 'config', 'message', 'botMessagePreview'
923923
*/
924-
type?: Type3;
924+
type?: MessagingExtensionResultType;
925925
/**
926926
* @member {MessagingExtensionAttachment[]} [attachments] (Only when type is
927927
* result) Attachments
@@ -1241,12 +1241,17 @@ export type ActivityImageType = 'avatar' | 'article';
12411241
export type Os = 'default' | 'iOS' | 'android' | 'windows';
12421242

12431243
/**
1244-
* Defines values for Type1.
1244+
* Defines values for O365ConnectorCardInputBaseType.
12451245
* Possible values include: 'textInput', 'dateInput', 'multichoiceInput'
12461246
* @readonly
12471247
* @enum {string}
12481248
*/
1249-
export type Type1 = 'textInput' | 'dateInput' | 'multichoiceInput';
1249+
export type O365ConnectorCardInputBaseType = 'textInput' | 'dateInput' | 'multichoiceInput';
1250+
1251+
/**
1252+
* @deprecated Use O365ConnectorCardInputBaseType instead.
1253+
*/
1254+
export type Type1 = O365ConnectorCardInputBaseType;
12501255

12511256
/**
12521257
* Defines values for Style.
@@ -1321,20 +1326,26 @@ export type Importance = 'normal' | 'high' | 'urgent';
13211326
export type CommandContext = 'message' | 'compose' | 'commandbox';
13221327

13231328
/**
1324-
* Defines values for BotMessagePreviewAction.
1329+
* Defines values for BotMessagePreviewActionType.
13251330
* Possible values include: 'edit', 'send'
13261331
* @readonly
13271332
* @enum {string}
13281333
*/
1329-
export type BotMessagePreviewAction = 'edit' | 'send';
1334+
export type BotMessagePreviewActionType = 'edit' | 'send';
13301335

13311336
/**
1332-
* Defines values for Type2.
1337+
* Defines values for BotMessagePreviewType.
13331338
* Possible values include: 'message', 'continue'
13341339
* @readonly
13351340
* @enum {string}
13361341
*/
1337-
export type Type2 = 'message' | 'continue';
1342+
export type BotMessagePreviewType = 'message' | 'continue';
1343+
1344+
1345+
/**
1346+
* @deprecated Use BotMessagePreviewType
1347+
*/
1348+
export type Type2 = BotMessagePreviewActionType
13381349

13391350
/**
13401351
* Defines values for AttachmentLayout.
@@ -1345,13 +1356,18 @@ export type Type2 = 'message' | 'continue';
13451356
export type AttachmentLayout = 'list' | 'grid';
13461357

13471358
/**
1348-
* Defines values for Type3.
1359+
* Defines values for MessagingExtensionResultType.
13491360
* Possible values include: 'result', 'auth', 'config', 'message', 'botMessagePreview'
13501361
* @readonly
13511362
* @enum {string}
13521363
*/
1353-
export type Type3 = 'result' | 'auth' | 'config' | 'message' | 'botMessagePreview';
1364+
export type MessagingExtensionResultType = 'result' | 'auth' | 'config' | 'message' | 'botMessagePreview';
1365+
13541366

1367+
/**
1368+
* @deprecated Use MessagingExtensionResultType instead
1369+
*/
1370+
export type Type3 = MessagingExtensionResultType
13551371
/**
13561372
* Defines values for Action.
13571373
* Possible values include: 'accept', 'decline'

0 commit comments

Comments
 (0)