@microsoft/teams-js 2.0.0-beta.4-dev.15 → 2.0.0-beta.4-dev.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MicrosoftTeams.d.ts +166 -87
- package/dist/MicrosoftTeams.js +149 -72
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -1
package/dist/MicrosoftTeams.d.ts
CHANGED
|
@@ -351,6 +351,123 @@ export function registerCustomHandler(actionName: string, customHandler: (...arg
|
|
|
351
351
|
*/
|
|
352
352
|
export function registerUserSettingsChangeHandler(settingTypes: UserSettingTypes[], handler: (settingType: UserSettingTypes, value: any) => void): void;
|
|
353
353
|
|
|
354
|
+
/**
|
|
355
|
+
*
|
|
356
|
+
* @internal
|
|
357
|
+
*/
|
|
358
|
+
interface OpenChatRequest {
|
|
359
|
+
/**
|
|
360
|
+
* @hidden
|
|
361
|
+
* The message to send when opening chat
|
|
362
|
+
*/
|
|
363
|
+
message?: string;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* @hidden
|
|
367
|
+
* Hide from docs.
|
|
368
|
+
* ------
|
|
369
|
+
*
|
|
370
|
+
* @internal
|
|
371
|
+
*/
|
|
372
|
+
export interface OpenSingleChatRequest extends OpenChatRequest {
|
|
373
|
+
/**
|
|
374
|
+
* @hidden
|
|
375
|
+
* User's UPN to open chat with
|
|
376
|
+
*/
|
|
377
|
+
user: string;
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* @hidden
|
|
381
|
+
* Hide from docs.
|
|
382
|
+
* ------
|
|
383
|
+
*
|
|
384
|
+
* @internal
|
|
385
|
+
*/
|
|
386
|
+
export interface OpenGroupChatRequest extends OpenChatRequest {
|
|
387
|
+
/**
|
|
388
|
+
* @hidden
|
|
389
|
+
* Array containing UPNs of users to open chat with
|
|
390
|
+
*/
|
|
391
|
+
users: string[];
|
|
392
|
+
/**
|
|
393
|
+
* @hidden
|
|
394
|
+
* The display name of a conversation for 3 or more users
|
|
395
|
+
*/
|
|
396
|
+
topic?: string;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* @hidden
|
|
400
|
+
* Hide from docs.
|
|
401
|
+
* ------
|
|
402
|
+
*
|
|
403
|
+
* @internal
|
|
404
|
+
*/
|
|
405
|
+
export interface OpenConversationRequest {
|
|
406
|
+
/**
|
|
407
|
+
* @hidden
|
|
408
|
+
* The Id of the subEntity where the conversation is taking place
|
|
409
|
+
*/
|
|
410
|
+
subEntityId: string;
|
|
411
|
+
/**
|
|
412
|
+
* @hidden
|
|
413
|
+
* The title of the conversation
|
|
414
|
+
*/
|
|
415
|
+
title: string;
|
|
416
|
+
/**
|
|
417
|
+
* @hidden
|
|
418
|
+
* The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
|
|
419
|
+
*/
|
|
420
|
+
conversationId?: string;
|
|
421
|
+
/**
|
|
422
|
+
* @hidden
|
|
423
|
+
* The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
|
|
424
|
+
*/
|
|
425
|
+
channelId?: string;
|
|
426
|
+
/**
|
|
427
|
+
* @hidden
|
|
428
|
+
* The entity Id of the tab
|
|
429
|
+
*/
|
|
430
|
+
entityId: string;
|
|
431
|
+
/**
|
|
432
|
+
* @hidden
|
|
433
|
+
* A function that is called once the conversation Id has been created
|
|
434
|
+
*/
|
|
435
|
+
onStartConversation?: (conversationResponse: ConversationResponse) => void;
|
|
436
|
+
/**
|
|
437
|
+
* @hidden
|
|
438
|
+
* A function that is called if the pane is closed
|
|
439
|
+
*/
|
|
440
|
+
onCloseConversation?: (conversationResponse: ConversationResponse) => void;
|
|
441
|
+
}
|
|
442
|
+
/**
|
|
443
|
+
* @hidden
|
|
444
|
+
* Hide from docs.
|
|
445
|
+
* ------
|
|
446
|
+
*
|
|
447
|
+
* @internal
|
|
448
|
+
*/
|
|
449
|
+
export interface ConversationResponse {
|
|
450
|
+
/**
|
|
451
|
+
* @hidden
|
|
452
|
+
* The Id of the subEntity where the conversation is taking place
|
|
453
|
+
*/
|
|
454
|
+
subEntityId: string;
|
|
455
|
+
/**
|
|
456
|
+
* @hidden
|
|
457
|
+
* The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
|
|
458
|
+
*/
|
|
459
|
+
conversationId?: string;
|
|
460
|
+
/**
|
|
461
|
+
* @hidden
|
|
462
|
+
* The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
|
|
463
|
+
*/
|
|
464
|
+
channelId?: string;
|
|
465
|
+
/**
|
|
466
|
+
* @hidden
|
|
467
|
+
* The entity Id of the tab
|
|
468
|
+
*/
|
|
469
|
+
entityId?: string;
|
|
470
|
+
}
|
|
354
471
|
/**
|
|
355
472
|
* @hidden
|
|
356
473
|
* Namespace to interact with the conversational subEntities inside the tab
|
|
@@ -362,34 +479,62 @@ export namespace chat {
|
|
|
362
479
|
* @hidden
|
|
363
480
|
* Hide from docs
|
|
364
481
|
* --------------
|
|
365
|
-
* Allows the user to
|
|
482
|
+
* Allows the user to open a chat with a single user and allows
|
|
483
|
+
* for the user to specify the message they wish to send.
|
|
484
|
+
*
|
|
485
|
+
*@param openChatRequest: {@link OpenSingleChatRequest}- a request object that contains a user's email as well as an optional message parameter.
|
|
366
486
|
*
|
|
367
487
|
* @returns Promise resolved upon completion
|
|
368
488
|
*/
|
|
369
|
-
function
|
|
489
|
+
function openChat(openChatRequest: OpenSingleChatRequest): Promise<void>;
|
|
370
490
|
/**
|
|
371
491
|
* @hidden
|
|
372
492
|
* Hide from docs
|
|
373
493
|
* --------------
|
|
374
|
-
* Allows the user to
|
|
494
|
+
* Allows the user to create a chat with multiple users (2+) and allows
|
|
495
|
+
* for the user to specify a message and name the topic of the conversation. If
|
|
496
|
+
* only 1 user is provided into users array default back to origin openChat.
|
|
497
|
+
*
|
|
498
|
+
* @param openChatRequest: {@link OpenGroupChatRequest} - a request object that contains a list of user emails as well as optional parameters for message and topic (display name for the group chat).
|
|
499
|
+
*
|
|
500
|
+
* @returns Promise resolved upon completion
|
|
375
501
|
*/
|
|
376
|
-
function
|
|
502
|
+
function openGroupChat(openChatRequest: OpenGroupChatRequest): Promise<void>;
|
|
377
503
|
/**
|
|
378
504
|
* @hidden
|
|
379
505
|
* Hide from docs
|
|
380
506
|
* ------
|
|
381
|
-
* Allows
|
|
382
|
-
*
|
|
383
|
-
*
|
|
507
|
+
* Allows retrieval of information for all chat members.
|
|
508
|
+
* NOTE: This value should be used only as a hint as to who the members are
|
|
509
|
+
* and never as proof of membership in case your app is being hosted by a malicious party.
|
|
384
510
|
*
|
|
385
|
-
* @param callback The callback to invoke when the {@link ChatMembersInformation} object is retrieved.
|
|
386
511
|
* @returns Promise resolved with information on all chat members
|
|
387
512
|
*
|
|
388
513
|
* @internal
|
|
389
514
|
*/
|
|
390
515
|
function getChatMembers(): Promise<ChatMembersInformation>;
|
|
391
516
|
function isSupported(): boolean;
|
|
517
|
+
namespace conversation {
|
|
518
|
+
/**
|
|
519
|
+
* @hidden
|
|
520
|
+
* Hide from docs
|
|
521
|
+
* --------------
|
|
522
|
+
* Allows the user to start or continue a conversation with each subentity inside the tab
|
|
523
|
+
*
|
|
524
|
+
* @returns Promise resolved upon completion
|
|
525
|
+
*/
|
|
526
|
+
function openConversation(openConversationRequest: OpenConversationRequest): Promise<void>;
|
|
527
|
+
/**
|
|
528
|
+
* @hidden
|
|
529
|
+
* Hide from docs
|
|
530
|
+
* --------------
|
|
531
|
+
* Allows the user to close the conversation in the right pane
|
|
532
|
+
*/
|
|
533
|
+
function closeConversation(): void;
|
|
534
|
+
function isSupported(): boolean;
|
|
535
|
+
}
|
|
392
536
|
}
|
|
537
|
+
export {};
|
|
393
538
|
|
|
394
539
|
/**
|
|
395
540
|
* @hidden
|
|
@@ -2179,78 +2324,9 @@ export interface DialogInfo {
|
|
|
2179
2324
|
* As of 2.0.0-beta.1, please use {@link DialogInfo} instead.
|
|
2180
2325
|
*/
|
|
2181
2326
|
export type TaskInfo = DialogInfo;
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
|
|
2185
|
-
* ------
|
|
2186
|
-
*
|
|
2187
|
-
* @internal
|
|
2188
|
-
*/
|
|
2189
|
-
export interface OpenConversationRequest {
|
|
2190
|
-
/**
|
|
2191
|
-
* @hidden
|
|
2192
|
-
* The Id of the subEntity where the conversation is taking place
|
|
2193
|
-
*/
|
|
2194
|
-
subEntityId: string;
|
|
2195
|
-
/**
|
|
2196
|
-
* @hidden
|
|
2197
|
-
* The title of the conversation
|
|
2198
|
-
*/
|
|
2199
|
-
title: string;
|
|
2200
|
-
/**
|
|
2201
|
-
* @hidden
|
|
2202
|
-
* The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
|
|
2203
|
-
*/
|
|
2204
|
-
conversationId?: string;
|
|
2205
|
-
/**
|
|
2206
|
-
* @hidden
|
|
2207
|
-
* The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
|
|
2208
|
-
*/
|
|
2209
|
-
channelId?: string;
|
|
2210
|
-
/**
|
|
2211
|
-
* @hidden
|
|
2212
|
-
* The entity Id of the tab
|
|
2213
|
-
*/
|
|
2214
|
-
entityId: string;
|
|
2215
|
-
/**
|
|
2216
|
-
* @hidden
|
|
2217
|
-
* A function that is called once the conversation Id has been created
|
|
2218
|
-
*/
|
|
2219
|
-
onStartConversation?: (conversationResponse: ConversationResponse) => void;
|
|
2220
|
-
/**
|
|
2221
|
-
* @hidden
|
|
2222
|
-
* A function that is called if the pane is closed
|
|
2223
|
-
*/
|
|
2224
|
-
onCloseConversation?: (conversationResponse: ConversationResponse) => void;
|
|
2225
|
-
}
|
|
2226
|
-
/**
|
|
2227
|
-
* @hidden
|
|
2228
|
-
* Hide from docs.
|
|
2229
|
-
* ------
|
|
2230
|
-
*
|
|
2231
|
-
* @internal
|
|
2232
|
-
*/
|
|
2233
|
-
export interface ConversationResponse {
|
|
2234
|
-
/**
|
|
2235
|
-
* @hidden
|
|
2236
|
-
* The Id of the subEntity where the conversation is taking place
|
|
2237
|
-
*/
|
|
2238
|
-
subEntityId: string;
|
|
2239
|
-
/**
|
|
2240
|
-
* @hidden
|
|
2241
|
-
* The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
|
|
2242
|
-
*/
|
|
2243
|
-
conversationId?: string;
|
|
2244
|
-
/**
|
|
2245
|
-
* @hidden
|
|
2246
|
-
* The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
|
|
2247
|
-
*/
|
|
2248
|
-
channelId?: string;
|
|
2249
|
-
/**
|
|
2250
|
-
* @hidden
|
|
2251
|
-
* The entity Id of the tab
|
|
2252
|
-
*/
|
|
2253
|
-
entityId?: string;
|
|
2327
|
+
export interface DialogSize {
|
|
2328
|
+
height: DialogDimension | number;
|
|
2329
|
+
width: DialogDimension | number;
|
|
2254
2330
|
}
|
|
2255
2331
|
/**
|
|
2256
2332
|
* @hidden
|
|
@@ -2799,12 +2875,6 @@ export namespace dialog {
|
|
|
2799
2875
|
* @returns a function that can be used to send messages to the dialog.
|
|
2800
2876
|
*/
|
|
2801
2877
|
function open(urlDialogInfo: UrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): PostMessageChannel;
|
|
2802
|
-
/**
|
|
2803
|
-
* Update height/width dialog info properties.
|
|
2804
|
-
*
|
|
2805
|
-
* @param dialogInfo - An object containing width and height properties
|
|
2806
|
-
*/
|
|
2807
|
-
function resize(dialogInfo: DialogInfo): void;
|
|
2808
2878
|
/**
|
|
2809
2879
|
* Submit the dialog module.
|
|
2810
2880
|
*
|
|
@@ -2827,6 +2897,15 @@ export namespace dialog {
|
|
|
2827
2897
|
*/
|
|
2828
2898
|
function registerOnMessageFromParent(listener: (message: any) => void): void;
|
|
2829
2899
|
function isSupported(): boolean;
|
|
2900
|
+
namespace update {
|
|
2901
|
+
/**
|
|
2902
|
+
* Update dimensions - height/width of a dialog.
|
|
2903
|
+
*
|
|
2904
|
+
* @param dimensions - An object containing width and height properties.
|
|
2905
|
+
*/
|
|
2906
|
+
function resize(dimensions: DialogSize): void;
|
|
2907
|
+
function isSupported(): boolean;
|
|
2908
|
+
}
|
|
2830
2909
|
namespace bot {
|
|
2831
2910
|
function open(botUrlDialogInfo: BotUrlDialogInfo, submitHandler?: DialogSubmitHandler, messageFromChildHandler?: PostMessageChannel): PostMessageChannel;
|
|
2832
2911
|
function isSupported(): boolean;
|
|
@@ -5104,7 +5183,7 @@ export namespace tasks {
|
|
|
5104
5183
|
function startTask(taskInfo: TaskInfo, submitHandler?: (err: string, result: string | object) => void): IAppWindow;
|
|
5105
5184
|
/**
|
|
5106
5185
|
* @deprecated
|
|
5107
|
-
* As of 2.0.0-beta.
|
|
5186
|
+
* As of 2.0.0-beta.4, please use {@link dialog.update.resize dialog.update.resize(dimensions: DialogSize): void} instead.
|
|
5108
5187
|
*
|
|
5109
5188
|
* Update height/width task info properties.
|
|
5110
5189
|
*
|
package/dist/MicrosoftTeams.js
CHANGED
|
@@ -1121,7 +1121,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1121
1121
|
});
|
|
1122
1122
|
|
|
1123
1123
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
|
1124
|
-
var version = "2.0.0-beta.4-dev.
|
|
1124
|
+
var version = "2.0.0-beta.4-dev.18";
|
|
1125
1125
|
/**
|
|
1126
1126
|
* @hidden
|
|
1127
1127
|
* The client version when all SDK APIs started to check platform compatibility for the APIs was 1.6.0.
|
|
@@ -1819,9 +1819,12 @@ var runtime = {
|
|
|
1819
1819
|
bot: undefined,
|
|
1820
1820
|
calendar: undefined,
|
|
1821
1821
|
call: undefined,
|
|
1822
|
-
chat:
|
|
1822
|
+
chat: {
|
|
1823
|
+
conversation: undefined,
|
|
1824
|
+
},
|
|
1823
1825
|
dialog: {
|
|
1824
1826
|
bot: undefined,
|
|
1827
|
+
update: undefined,
|
|
1825
1828
|
},
|
|
1826
1829
|
location: undefined,
|
|
1827
1830
|
logs: undefined,
|
|
@@ -1857,9 +1860,12 @@ var teamsRuntimeConfig = {
|
|
|
1857
1860
|
appEntity: {},
|
|
1858
1861
|
bot: {},
|
|
1859
1862
|
call: {},
|
|
1860
|
-
chat: {
|
|
1863
|
+
chat: {
|
|
1864
|
+
conversation: {},
|
|
1865
|
+
},
|
|
1861
1866
|
dialog: {
|
|
1862
1867
|
bot: {},
|
|
1868
|
+
update: {},
|
|
1863
1869
|
},
|
|
1864
1870
|
files: {},
|
|
1865
1871
|
location: {},
|
|
@@ -4147,66 +4153,68 @@ var chat;
|
|
|
4147
4153
|
* @hidden
|
|
4148
4154
|
* Hide from docs
|
|
4149
4155
|
* --------------
|
|
4150
|
-
* Allows the user to
|
|
4156
|
+
* Allows the user to open a chat with a single user and allows
|
|
4157
|
+
* for the user to specify the message they wish to send.
|
|
4158
|
+
*
|
|
4159
|
+
*@param openChatRequest: {@link OpenSingleChatRequest}- a request object that contains a user's email as well as an optional message parameter.
|
|
4151
4160
|
*
|
|
4152
4161
|
* @returns Promise resolved upon completion
|
|
4153
4162
|
*/
|
|
4154
|
-
function
|
|
4163
|
+
function openChat(openChatRequest) {
|
|
4155
4164
|
return new Promise(function (resolve) {
|
|
4156
4165
|
ensureInitialized(FrameContexts.content);
|
|
4157
|
-
var sendPromise = sendAndHandleStatusAndReason('
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
conversationId: openConversationRequest.conversationId,
|
|
4161
|
-
channelId: openConversationRequest.channelId,
|
|
4162
|
-
entityId: openConversationRequest.entityId,
|
|
4166
|
+
var sendPromise = sendAndHandleStatusAndReason('chat.openChat', {
|
|
4167
|
+
members: openChatRequest.user,
|
|
4168
|
+
message: openChatRequest.message,
|
|
4163
4169
|
});
|
|
4164
|
-
if (openConversationRequest.onStartConversation) {
|
|
4165
|
-
registerHandler('startConversation', function (subEntityId, conversationId, channelId, entityId) {
|
|
4166
|
-
return openConversationRequest.onStartConversation({
|
|
4167
|
-
subEntityId: subEntityId,
|
|
4168
|
-
conversationId: conversationId,
|
|
4169
|
-
channelId: channelId,
|
|
4170
|
-
entityId: entityId,
|
|
4171
|
-
});
|
|
4172
|
-
});
|
|
4173
|
-
}
|
|
4174
|
-
if (openConversationRequest.onCloseConversation) {
|
|
4175
|
-
registerHandler('closeConversation', function (subEntityId, conversationId, channelId, entityId) {
|
|
4176
|
-
return openConversationRequest.onCloseConversation({
|
|
4177
|
-
subEntityId: subEntityId,
|
|
4178
|
-
conversationId: conversationId,
|
|
4179
|
-
channelId: channelId,
|
|
4180
|
-
entityId: entityId,
|
|
4181
|
-
});
|
|
4182
|
-
});
|
|
4183
|
-
}
|
|
4184
4170
|
resolve(sendPromise);
|
|
4185
4171
|
});
|
|
4186
4172
|
}
|
|
4187
|
-
chat.
|
|
4173
|
+
chat.openChat = openChat;
|
|
4188
4174
|
/**
|
|
4189
4175
|
* @hidden
|
|
4190
4176
|
* Hide from docs
|
|
4191
4177
|
* --------------
|
|
4192
|
-
* Allows the user to
|
|
4178
|
+
* Allows the user to create a chat with multiple users (2+) and allows
|
|
4179
|
+
* for the user to specify a message and name the topic of the conversation. If
|
|
4180
|
+
* only 1 user is provided into users array default back to origin openChat.
|
|
4181
|
+
*
|
|
4182
|
+
* @param openChatRequest: {@link OpenGroupChatRequest} - a request object that contains a list of user emails as well as optional parameters for message and topic (display name for the group chat).
|
|
4183
|
+
*
|
|
4184
|
+
* @returns Promise resolved upon completion
|
|
4193
4185
|
*/
|
|
4194
|
-
function
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4186
|
+
function openGroupChat(openChatRequest) {
|
|
4187
|
+
return new Promise(function (resolve) {
|
|
4188
|
+
if (openChatRequest.users.length < 1) {
|
|
4189
|
+
throw Error('OpenGroupChat Failed: No users specified');
|
|
4190
|
+
}
|
|
4191
|
+
if (openChatRequest.users.length === 1) {
|
|
4192
|
+
var chatRequest = {
|
|
4193
|
+
user: openChatRequest.users[0],
|
|
4194
|
+
message: openChatRequest.message,
|
|
4195
|
+
};
|
|
4196
|
+
openChat(chatRequest);
|
|
4197
|
+
}
|
|
4198
|
+
else {
|
|
4199
|
+
ensureInitialized(FrameContexts.content);
|
|
4200
|
+
var sendPromise = sendAndHandleStatusAndReason('chat.openChat', {
|
|
4201
|
+
members: openChatRequest.users,
|
|
4202
|
+
message: openChatRequest.message,
|
|
4203
|
+
topic: openChatRequest.topic,
|
|
4204
|
+
});
|
|
4205
|
+
resolve(sendPromise);
|
|
4206
|
+
}
|
|
4207
|
+
});
|
|
4199
4208
|
}
|
|
4200
|
-
chat.
|
|
4209
|
+
chat.openGroupChat = openGroupChat;
|
|
4201
4210
|
/**
|
|
4202
4211
|
* @hidden
|
|
4203
4212
|
* Hide from docs
|
|
4204
4213
|
* ------
|
|
4205
|
-
* Allows
|
|
4206
|
-
*
|
|
4207
|
-
*
|
|
4214
|
+
* Allows retrieval of information for all chat members.
|
|
4215
|
+
* NOTE: This value should be used only as a hint as to who the members are
|
|
4216
|
+
* and never as proof of membership in case your app is being hosted by a malicious party.
|
|
4208
4217
|
*
|
|
4209
|
-
* @param callback The callback to invoke when the {@link ChatMembersInformation} object is retrieved.
|
|
4210
4218
|
* @returns Promise resolved with information on all chat members
|
|
4211
4219
|
*
|
|
4212
4220
|
* @internal
|
|
@@ -4222,6 +4230,68 @@ var chat;
|
|
|
4222
4230
|
return runtime.supports.chat ? true : false;
|
|
4223
4231
|
}
|
|
4224
4232
|
chat.isSupported = isSupported;
|
|
4233
|
+
var conversation;
|
|
4234
|
+
(function (conversation) {
|
|
4235
|
+
/**
|
|
4236
|
+
* @hidden
|
|
4237
|
+
* Hide from docs
|
|
4238
|
+
* --------------
|
|
4239
|
+
* Allows the user to start or continue a conversation with each subentity inside the tab
|
|
4240
|
+
*
|
|
4241
|
+
* @returns Promise resolved upon completion
|
|
4242
|
+
*/
|
|
4243
|
+
function openConversation(openConversationRequest) {
|
|
4244
|
+
return new Promise(function (resolve) {
|
|
4245
|
+
ensureInitialized(FrameContexts.content);
|
|
4246
|
+
var sendPromise = sendAndHandleStatusAndReason('conversations.openConversation', {
|
|
4247
|
+
title: openConversationRequest.title,
|
|
4248
|
+
subEntityId: openConversationRequest.subEntityId,
|
|
4249
|
+
conversationId: openConversationRequest.conversationId,
|
|
4250
|
+
channelId: openConversationRequest.channelId,
|
|
4251
|
+
entityId: openConversationRequest.entityId,
|
|
4252
|
+
});
|
|
4253
|
+
if (openConversationRequest.onStartConversation) {
|
|
4254
|
+
registerHandler('startConversation', function (subEntityId, conversationId, channelId, entityId) {
|
|
4255
|
+
return openConversationRequest.onStartConversation({
|
|
4256
|
+
subEntityId: subEntityId,
|
|
4257
|
+
conversationId: conversationId,
|
|
4258
|
+
channelId: channelId,
|
|
4259
|
+
entityId: entityId,
|
|
4260
|
+
});
|
|
4261
|
+
});
|
|
4262
|
+
}
|
|
4263
|
+
if (openConversationRequest.onCloseConversation) {
|
|
4264
|
+
registerHandler('closeConversation', function (subEntityId, conversationId, channelId, entityId) {
|
|
4265
|
+
return openConversationRequest.onCloseConversation({
|
|
4266
|
+
subEntityId: subEntityId,
|
|
4267
|
+
conversationId: conversationId,
|
|
4268
|
+
channelId: channelId,
|
|
4269
|
+
entityId: entityId,
|
|
4270
|
+
});
|
|
4271
|
+
});
|
|
4272
|
+
}
|
|
4273
|
+
resolve(sendPromise);
|
|
4274
|
+
});
|
|
4275
|
+
}
|
|
4276
|
+
conversation.openConversation = openConversation;
|
|
4277
|
+
/**
|
|
4278
|
+
* @hidden
|
|
4279
|
+
* Hide from docs
|
|
4280
|
+
* --------------
|
|
4281
|
+
* Allows the user to close the conversation in the right pane
|
|
4282
|
+
*/
|
|
4283
|
+
function closeConversation() {
|
|
4284
|
+
ensureInitialized(FrameContexts.content);
|
|
4285
|
+
sendMessageToParent('conversations.closeConversation');
|
|
4286
|
+
removeHandler('startConversation');
|
|
4287
|
+
removeHandler('closeConversation');
|
|
4288
|
+
}
|
|
4289
|
+
conversation.closeConversation = closeConversation;
|
|
4290
|
+
function isSupported() {
|
|
4291
|
+
return runtime.supports.chat.conversation ? true : false;
|
|
4292
|
+
}
|
|
4293
|
+
conversation.isSupported = isSupported;
|
|
4294
|
+
})(conversation = chat.conversation || (chat.conversation = {}));
|
|
4225
4295
|
})(chat || (chat = {}));
|
|
4226
4296
|
|
|
4227
4297
|
;// CONCATENATED MODULE: ./src/public/appInstallDialog.ts
|
|
@@ -4255,17 +4325,6 @@ var appInstallDialog;
|
|
|
4255
4325
|
/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
|
|
4256
4326
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
4257
4327
|
/* eslint-disable @typescript-eslint/no-unused-vars */
|
|
4258
|
-
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
4259
|
-
var t = {};
|
|
4260
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
4261
|
-
t[p] = s[p];
|
|
4262
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
4263
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
4264
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
4265
|
-
t[p[i]] = s[p[i]];
|
|
4266
|
-
}
|
|
4267
|
-
return t;
|
|
4268
|
-
};
|
|
4269
4328
|
|
|
4270
4329
|
|
|
4271
4330
|
|
|
@@ -4298,22 +4357,6 @@ var dialog;
|
|
|
4298
4357
|
return sendMessageToDialog;
|
|
4299
4358
|
}
|
|
4300
4359
|
dialog.open = open;
|
|
4301
|
-
/**
|
|
4302
|
-
* Update height/width dialog info properties.
|
|
4303
|
-
*
|
|
4304
|
-
* @param dialogInfo - An object containing width and height properties
|
|
4305
|
-
*/
|
|
4306
|
-
function resize(dialogInfo) {
|
|
4307
|
-
ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
|
|
4308
|
-
var width = dialogInfo.width, height = dialogInfo.height, extra = __rest(dialogInfo, ["width", "height"]);
|
|
4309
|
-
if (!Object.keys(extra).length) {
|
|
4310
|
-
sendMessageToParent('tasks.updateTask', [dialogInfo]);
|
|
4311
|
-
}
|
|
4312
|
-
else {
|
|
4313
|
-
throw new Error('resize requires a dialogInfo argument containing only width and height');
|
|
4314
|
-
}
|
|
4315
|
-
}
|
|
4316
|
-
dialog.resize = resize;
|
|
4317
4360
|
/**
|
|
4318
4361
|
* Submit the dialog module.
|
|
4319
4362
|
*
|
|
@@ -4355,6 +4398,23 @@ var dialog;
|
|
|
4355
4398
|
return runtime.supports.dialog ? true : false;
|
|
4356
4399
|
}
|
|
4357
4400
|
dialog.isSupported = isSupported;
|
|
4401
|
+
var update;
|
|
4402
|
+
(function (update) {
|
|
4403
|
+
/**
|
|
4404
|
+
* Update dimensions - height/width of a dialog.
|
|
4405
|
+
*
|
|
4406
|
+
* @param dimensions - An object containing width and height properties.
|
|
4407
|
+
*/
|
|
4408
|
+
function resize(dimensions) {
|
|
4409
|
+
ensureInitialized(FrameContexts.content, FrameContexts.sidePanel, FrameContexts.task, FrameContexts.meetingStage);
|
|
4410
|
+
sendMessageToParent('tasks.updateTask', [dimensions]);
|
|
4411
|
+
}
|
|
4412
|
+
update.resize = resize;
|
|
4413
|
+
function isSupported() {
|
|
4414
|
+
return runtime.supports.dialog ? (runtime.supports.dialog.update ? true : false) : false;
|
|
4415
|
+
}
|
|
4416
|
+
update.isSupported = isSupported;
|
|
4417
|
+
})(update = dialog.update || (dialog.update = {}));
|
|
4358
4418
|
var bot;
|
|
4359
4419
|
(function (bot) {
|
|
4360
4420
|
function open(botUrlDialogInfo, submitHandler, messageFromChildHandler) {
|
|
@@ -6351,6 +6411,17 @@ var settings;
|
|
|
6351
6411
|
|
|
6352
6412
|
;// CONCATENATED MODULE: ./src/public/tasks.ts
|
|
6353
6413
|
/* eslint-disable @typescript-eslint/ban-types */
|
|
6414
|
+
var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
6415
|
+
var t = {};
|
|
6416
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
6417
|
+
t[p] = s[p];
|
|
6418
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
6419
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
6420
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
6421
|
+
t[p[i]] = s[p[i]];
|
|
6422
|
+
}
|
|
6423
|
+
return t;
|
|
6424
|
+
};
|
|
6354
6425
|
|
|
6355
6426
|
|
|
6356
6427
|
|
|
@@ -6396,14 +6467,20 @@ var tasks;
|
|
|
6396
6467
|
tasks.startTask = startTask;
|
|
6397
6468
|
/**
|
|
6398
6469
|
* @deprecated
|
|
6399
|
-
* As of 2.0.0-beta.
|
|
6470
|
+
* As of 2.0.0-beta.4, please use {@link dialog.update.resize dialog.update.resize(dimensions: DialogSize): void} instead.
|
|
6400
6471
|
*
|
|
6401
6472
|
* Update height/width task info properties.
|
|
6402
6473
|
*
|
|
6403
6474
|
* @param taskInfo - An object containing width and height properties
|
|
6404
6475
|
*/
|
|
6405
6476
|
function updateTask(taskInfo) {
|
|
6406
|
-
|
|
6477
|
+
taskInfo = getDefaultSizeIfNotProvided(taskInfo);
|
|
6478
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6479
|
+
var width = taskInfo.width, height = taskInfo.height, extra = __rest(taskInfo, ["width", "height"]);
|
|
6480
|
+
if (Object.keys(extra).length) {
|
|
6481
|
+
throw new Error('resize requires a TaskInfo argument containing only width and height');
|
|
6482
|
+
}
|
|
6483
|
+
dialog.update.resize(taskInfo);
|
|
6407
6484
|
}
|
|
6408
6485
|
tasks.updateTask = updateTask;
|
|
6409
6486
|
/**
|