@microsoft/teams-js 2.17.1-beta.1 → 2.18.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +4 -4
- package/dist/MicrosoftTeams.d.ts +50 -2
- package/dist/MicrosoftTeams.js +98 -27
- 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 +35 -1
package/README.md
CHANGED
@@ -24,7 +24,7 @@ To install the stable [version](https://learn.microsoft.com/javascript/api/overv
|
|
24
24
|
|
25
25
|
### Production
|
26
26
|
|
27
|
-
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.
|
27
|
+
You can reference these files directly [from here](https://res.cdn.office.net/teams-js/2.18.0/js/MicrosoftTeams.min.js) or point your package manager at them.
|
28
28
|
|
29
29
|
## Usage
|
30
30
|
|
@@ -45,13 +45,13 @@ Reference the library inside of your `.html` page using:
|
|
45
45
|
```html
|
46
46
|
<!-- Microsoft Teams JavaScript API (via CDN) -->
|
47
47
|
<script
|
48
|
-
src="https://res.cdn.office.net/teams-js/2.
|
49
|
-
integrity="sha384-
|
48
|
+
src="https://res.cdn.office.net/teams-js/2.18.0/js/MicrosoftTeams.min.js"
|
49
|
+
integrity="sha384-g8DoRkiR0ECQ9rwKIgY8GjQ5h0d2jp1347CmU/IRlyUHPjJZiFWEOYc+hFtT9MGL"
|
50
50
|
crossorigin="anonymous"
|
51
51
|
></script>
|
52
52
|
|
53
53
|
<!-- Microsoft Teams JavaScript API (via npm) -->
|
54
|
-
<script src="node_modules/@microsoft/teams-js@2.
|
54
|
+
<script src="node_modules/@microsoft/teams-js@2.18.0/dist/MicrosoftTeams.min.js"></script>
|
55
55
|
|
56
56
|
<!-- Microsoft Teams JavaScript API (via local) -->
|
57
57
|
<script src="MicrosoftTeams.min.js"></script>
|
package/dist/MicrosoftTeams.d.ts
CHANGED
@@ -3690,6 +3690,7 @@ export interface SdkError {
|
|
3690
3690
|
*/
|
3691
3691
|
message?: string;
|
3692
3692
|
}
|
3693
|
+
export function isSdkError(err: unknown): err is SdkError;
|
3693
3694
|
/** Error codes used to identify different types of errors that can occur while developing apps. */
|
3694
3695
|
export enum ErrorCode {
|
3695
3696
|
/**
|
@@ -4447,7 +4448,8 @@ interface OpenChatRequest {
|
|
4447
4448
|
*/
|
4448
4449
|
export interface OpenSingleChatRequest extends OpenChatRequest {
|
4449
4450
|
/**
|
4450
|
-
* The Microsoft Entra
|
4451
|
+
* The [Microsoft Entra UPNs](https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/plan-connect-userprincipalname) (usually but not always an e-mail address)
|
4452
|
+
* of the user with whom to begin a chat
|
4451
4453
|
*/
|
4452
4454
|
user: string;
|
4453
4455
|
}
|
@@ -4460,7 +4462,8 @@ export interface OpenSingleChatRequest extends OpenChatRequest {
|
|
4460
4462
|
*/
|
4461
4463
|
export interface OpenGroupChatRequest extends OpenChatRequest {
|
4462
4464
|
/**
|
4463
|
-
* Array containing Microsoft Entra UPNs
|
4465
|
+
* Array containing [Microsoft Entra UPNs](https://learn.microsoft.com/en-us/entra/identity/hybrid/connect/plan-connect-userprincipalname) (usually but not always an e-mail address)
|
4466
|
+
* of users with whom to begin a chat
|
4464
4467
|
*/
|
4465
4468
|
users: string[];
|
4466
4469
|
/**
|
@@ -6482,6 +6485,51 @@ export namespace meeting {
|
|
6482
6485
|
* @returns A promise with the updated microphone state
|
6483
6486
|
*/
|
6484
6487
|
micMuteStateChangedCallback: (micState: MicState) => Promise<MicState>;
|
6488
|
+
/**
|
6489
|
+
* Callback for the host to tell the app to change its speaker selection
|
6490
|
+
*/
|
6491
|
+
audioDeviceSelectionChangedCallback?: (selectedDevices: AudioDeviceSelection | SdkError) => void;
|
6492
|
+
}
|
6493
|
+
/**
|
6494
|
+
* Interface for AudioDeviceSelection from host selection.
|
6495
|
+
* If the speaker or the microphone is undefined or don't have a device label, you can try to find the default devices
|
6496
|
+
* by using
|
6497
|
+
* ```ts
|
6498
|
+
* const devices = await navigator.mediaDevices.enumerateDevices();
|
6499
|
+
* const defaultSpeaker = devices.find((d) => d.deviceId === 'default' && d.kind === 'audiooutput');
|
6500
|
+
* const defaultMic = devices.find((d) => d.deviceId === 'default' && d.kind === 'audioinput');
|
6501
|
+
* ```
|
6502
|
+
*
|
6503
|
+
* @hidden
|
6504
|
+
* Hide from docs.
|
6505
|
+
*
|
6506
|
+
* @internal
|
6507
|
+
* Limited to Microsoft-internal use
|
6508
|
+
*
|
6509
|
+
* @beta
|
6510
|
+
*/
|
6511
|
+
interface AudioDeviceSelection {
|
6512
|
+
speaker?: AudioDeviceInfo;
|
6513
|
+
microphone?: AudioDeviceInfo;
|
6514
|
+
}
|
6515
|
+
/**
|
6516
|
+
* Interface for AudioDeviceInfo, includes a device label with the same format as {@link MediaDeviceInfo.label}
|
6517
|
+
*
|
6518
|
+
* Hosted app can use this label to compare it with the device info fetched from {@link navigator.mediaDevices.enumerateDevices()}.
|
6519
|
+
* {@link MediaDeviceInfo} has {@link MediaDeviceInfo.deviceId} as an unique identifier, but that id is also unique to the origin
|
6520
|
+
* of the calling application, so {@link MediaDeviceInfo.deviceId} cannot be used here as an identifier. Notice there are some cases
|
6521
|
+
* that devices may have the same device label, but we don't have a better way to solve this, keep this as a known limitation for now.
|
6522
|
+
*
|
6523
|
+
* @hidden
|
6524
|
+
* Hide from docs.
|
6525
|
+
*
|
6526
|
+
* @internal
|
6527
|
+
* Limited to Microsoft-internal use
|
6528
|
+
*
|
6529
|
+
* @beta
|
6530
|
+
*/
|
6531
|
+
interface AudioDeviceInfo {
|
6532
|
+
deviceLabel: string;
|
6485
6533
|
}
|
6486
6534
|
/**
|
6487
6535
|
* Different types of meeting reactions that can be sent/received
|
package/dist/MicrosoftTeams.js
CHANGED
@@ -958,6 +958,14 @@ var ApiName;
|
|
958
958
|
ApiName["App_OpenLink"] = "app.openLink";
|
959
959
|
ApiName["App_RegisterOnThemeChangeHandler"] = "app.registerOnThemeChangeHandler";
|
960
960
|
ApiName["AppEntity_SelectAppEntity"] = "appEntity.selectAppEntity";
|
961
|
+
ApiName["BarCode_HasPermission"] = "barCode.hasPermission";
|
962
|
+
ApiName["BarCode_RequestPermission"] = "barCode.requestPermission";
|
963
|
+
ApiName["BarCode_ScanBarCode"] = "barCode.scanBarCode";
|
964
|
+
ApiName["Calendar_ComposeMeeting"] = "calendar.composeMeeting";
|
965
|
+
ApiName["Calendar_OpenCalendarItem"] = "calendar.openCalendarItem";
|
966
|
+
ApiName["Call_StartCall"] = "call.startCall";
|
967
|
+
ApiName["Clipboard_Read"] = "clipboard.read";
|
968
|
+
ApiName["Clipboard_Write"] = "clipboard.write";
|
961
969
|
ApiName["Dialog_AdaptiveCard_Bot_Open"] = "dialog.adaptiveCard.bot.open";
|
962
970
|
ApiName["Dialog_AdaptiveCard_Open"] = "dialog.adaptiveCard.open";
|
963
971
|
ApiName["Dialog_Update_Resize"] = "dialog.update.resize";
|
@@ -973,6 +981,20 @@ var ApiName;
|
|
973
981
|
ApiName["GeoLocation_ShowLocation"] = "geoLocation.showLocation";
|
974
982
|
ApiName["Location_GetLocation"] = "location.getLocation";
|
975
983
|
ApiName["Location_ShowLocation"] = "location.showLocation";
|
984
|
+
ApiName["Mail_ComposeMail"] = "mail.composeMail";
|
985
|
+
ApiName["Mail_OpenMailItem"] = "mail.openMailItem";
|
986
|
+
ApiName["Marketplace_AddOrUpdateCartItems"] = "marketplace.addOrUpdateCartItems";
|
987
|
+
ApiName["Marketplace_GetCart"] = "marketplace.getCart";
|
988
|
+
ApiName["Marketplace_RemoveCardItems"] = "marketplace.removeCartItems";
|
989
|
+
ApiName["Marketplace_UpdateCartStatus"] = "marketplace.updateCartStatus";
|
990
|
+
ApiName["Media_CaptureImage"] = "media.captureImage";
|
991
|
+
ApiName["Media_Controller"] = "media.controller";
|
992
|
+
ApiName["Media_GetMedia"] = "media.getMedia";
|
993
|
+
ApiName["Media_HasPermission"] = "media.hasPermission";
|
994
|
+
ApiName["Media_RequestPermission"] = "media.requestPermission";
|
995
|
+
ApiName["Media_ScanBarCode"] = "media.scanBarCode";
|
996
|
+
ApiName["Media_SelectMedia"] = "media.selectMedia";
|
997
|
+
ApiName["Media_ViewImages"] = "media.viewImages";
|
976
998
|
ApiName["Navigation_NavigateBack"] = "navigation.navigateBack";
|
977
999
|
ApiName["Navigation_NavigateCrossDomain"] = "navigation.navigateCrossDomain";
|
978
1000
|
ApiName["Navigation_NavigateToTab"] = "navigation.navigateToTab";
|
@@ -1170,6 +1192,7 @@ var validOrigins = [
|
|
1170
1192
|
'teams.cloud.microsoft',
|
1171
1193
|
'outlook.cloud.microsoft',
|
1172
1194
|
'm365.cloud.microsoft',
|
1195
|
+
'copilot.microsoft.com',
|
1173
1196
|
];
|
1174
1197
|
/**
|
1175
1198
|
* @hidden
|
@@ -1348,6 +1371,9 @@ var SecondaryM365ContentIdName;
|
|
1348
1371
|
/** User ID */
|
1349
1372
|
SecondaryM365ContentIdName["UserId"] = "userId";
|
1350
1373
|
})(SecondaryM365ContentIdName || (SecondaryM365ContentIdName = {}));
|
1374
|
+
function isSdkError(err) {
|
1375
|
+
return (err === null || err === void 0 ? void 0 : err.errorCode) !== undefined;
|
1376
|
+
}
|
1351
1377
|
/** Error codes used to identify different types of errors that can occur while developing apps. */
|
1352
1378
|
var ErrorCode;
|
1353
1379
|
(function (ErrorCode) {
|
@@ -2405,7 +2431,7 @@ var _minRuntimeConfigToUninitialize = {
|
|
2405
2431
|
* @hidden
|
2406
2432
|
* Package version.
|
2407
2433
|
*/
|
2408
|
-
var version = "2.
|
2434
|
+
var version = "2.18.0";
|
2409
2435
|
|
2410
2436
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
2411
2437
|
|
@@ -6301,6 +6327,10 @@ var __extends = (undefined && undefined.__extends) || (function () {
|
|
6301
6327
|
|
6302
6328
|
|
6303
6329
|
|
6330
|
+
/**
|
6331
|
+
* v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
|
6332
|
+
*/
|
6333
|
+
var mediaTelemetryVersionNumber = ApiVersionNumber.V_1;
|
6304
6334
|
var mediaLogger = getLogger('media');
|
6305
6335
|
/**
|
6306
6336
|
* Interact with media, including capturing and viewing images.
|
@@ -6353,7 +6383,7 @@ var media;
|
|
6353
6383
|
callback(oldPlatformError, []);
|
6354
6384
|
return;
|
6355
6385
|
}
|
6356
|
-
|
6386
|
+
communication_sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_CaptureImage), 'captureImage', callback);
|
6357
6387
|
}
|
6358
6388
|
media.captureImage = captureImage;
|
6359
6389
|
/**
|
@@ -6371,7 +6401,7 @@ var media;
|
|
6371
6401
|
}
|
6372
6402
|
var permissions = DevicePermission.Media;
|
6373
6403
|
return new Promise(function (resolve) {
|
6374
|
-
resolve(
|
6404
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_HasPermission), 'permissions.has', permissions));
|
6375
6405
|
});
|
6376
6406
|
}
|
6377
6407
|
media.hasPermission = hasPermission;
|
@@ -6390,7 +6420,7 @@ var media;
|
|
6390
6420
|
}
|
6391
6421
|
var permissions = DevicePermission.Media;
|
6392
6422
|
return new Promise(function (resolve) {
|
6393
|
-
resolve(
|
6423
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_RequestPermission), 'permissions.request', permissions));
|
6394
6424
|
});
|
6395
6425
|
}
|
6396
6426
|
media.requestPermission = requestPermission;
|
@@ -6485,7 +6515,7 @@ var media;
|
|
6485
6515
|
}
|
6486
6516
|
}
|
6487
6517
|
}
|
6488
|
-
|
6518
|
+
communication_sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_GetMedia), 'getMedia', localUriId, handleGetMediaCallbackRequest);
|
6489
6519
|
};
|
6490
6520
|
/** Function to retrieve media content, such as images or videos, via handler. */
|
6491
6521
|
Media.prototype.getMediaViaHandler = function (callback) {
|
@@ -6495,7 +6525,9 @@ var media;
|
|
6495
6525
|
assembleAttachment: [],
|
6496
6526
|
};
|
6497
6527
|
var params = [actionName, this.content];
|
6498
|
-
this.content &&
|
6528
|
+
this.content &&
|
6529
|
+
!isNullOrUndefined(callback) &&
|
6530
|
+
communication_sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_GetMedia), 'getMedia', params);
|
6499
6531
|
function handleGetMediaRequest(response) {
|
6500
6532
|
if (callback) {
|
6501
6533
|
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
@@ -6563,7 +6595,7 @@ var media;
|
|
6563
6595
|
return;
|
6564
6596
|
}
|
6565
6597
|
var params = { mediaType: this.getMediaType(), mediaControllerEvent: mediaEvent };
|
6566
|
-
|
6598
|
+
communication_sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_Controller), 'media.controller', [params], function (err) {
|
6567
6599
|
if (callback) {
|
6568
6600
|
callback(err);
|
6569
6601
|
}
|
@@ -6706,7 +6738,7 @@ var media;
|
|
6706
6738
|
}
|
6707
6739
|
var params = [mediaInputs];
|
6708
6740
|
// What comes back from native as attachments would just be objects and will be missing getMedia method on them
|
6709
|
-
|
6741
|
+
communication_sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_SelectMedia), 'selectMedia', params, function (err, localAttachments, mediaEvent) {
|
6710
6742
|
var _a, _b;
|
6711
6743
|
// MediaControllerEvent response is used to notify the app about events and is a partial response to selectMedia
|
6712
6744
|
if (mediaEvent) {
|
@@ -6751,7 +6783,7 @@ var media;
|
|
6751
6783
|
return;
|
6752
6784
|
}
|
6753
6785
|
var params = [uriList];
|
6754
|
-
|
6786
|
+
communication_sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_ViewImages), 'viewImages', params, callback);
|
6755
6787
|
}
|
6756
6788
|
media.viewImages = viewImages;
|
6757
6789
|
/**
|
@@ -6792,7 +6824,7 @@ var media;
|
|
6792
6824
|
callback(invalidInput, '');
|
6793
6825
|
return;
|
6794
6826
|
}
|
6795
|
-
|
6827
|
+
communication_sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_ScanBarCode), 'media.scanBarCode', [config], callback);
|
6796
6828
|
}
|
6797
6829
|
media.scanBarCode = scanBarCode;
|
6798
6830
|
})(media || (media = {}));
|
@@ -7021,6 +7053,11 @@ function validatePeoplePickerInput(peoplePickerInputs) {
|
|
7021
7053
|
|
7022
7054
|
|
7023
7055
|
|
7056
|
+
|
7057
|
+
/**
|
7058
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
7059
|
+
*/
|
7060
|
+
var barCodeTelemetryVersionNumber = ApiVersionNumber.V_2;
|
7024
7061
|
/**
|
7025
7062
|
* Namespace to interact with the barcode scanning-specific part of the SDK.
|
7026
7063
|
*
|
@@ -7046,7 +7083,7 @@ var barCode;
|
|
7046
7083
|
if (!validateScanBarCodeInput(barCodeConfig)) {
|
7047
7084
|
throw { errorCode: ErrorCode.INVALID_ARGUMENTS };
|
7048
7085
|
}
|
7049
|
-
resolve(
|
7086
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(barCodeTelemetryVersionNumber, ApiName.BarCode_ScanBarCode), 'media.scanBarCode', barCodeConfig));
|
7050
7087
|
});
|
7051
7088
|
}
|
7052
7089
|
barCode.scanBarCode = scanBarCode;
|
@@ -7064,7 +7101,7 @@ var barCode;
|
|
7064
7101
|
}
|
7065
7102
|
var permissions = DevicePermission.Media;
|
7066
7103
|
return new Promise(function (resolve) {
|
7067
|
-
resolve(
|
7104
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(barCodeTelemetryVersionNumber, ApiName.BarCode_HasPermission), 'permissions.has', permissions));
|
7068
7105
|
});
|
7069
7106
|
}
|
7070
7107
|
barCode.hasPermission = hasPermission;
|
@@ -7082,7 +7119,7 @@ var barCode;
|
|
7082
7119
|
}
|
7083
7120
|
var permissions = DevicePermission.Media;
|
7084
7121
|
return new Promise(function (resolve) {
|
7085
|
-
resolve(
|
7122
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(barCodeTelemetryVersionNumber, ApiName.BarCode_RequestPermission), 'permissions.request', permissions));
|
7086
7123
|
});
|
7087
7124
|
}
|
7088
7125
|
barCode.requestPermission = requestPermission;
|
@@ -7134,7 +7171,7 @@ var chat;
|
|
7134
7171
|
}
|
7135
7172
|
else {
|
7136
7173
|
var sendPromise = sendAndHandleStatusAndReason('chat.openChat', {
|
7137
|
-
members: openChatRequest.user,
|
7174
|
+
members: [openChatRequest.user],
|
7138
7175
|
message: openChatRequest.message,
|
7139
7176
|
});
|
7140
7177
|
resolve(sendPromise);
|
@@ -7163,7 +7200,7 @@ var chat;
|
|
7163
7200
|
user: openChatRequest.users[0],
|
7164
7201
|
message: openChatRequest.message,
|
7165
7202
|
};
|
7166
|
-
openChat(chatRequest);
|
7203
|
+
resolve(openChat(chatRequest));
|
7167
7204
|
}
|
7168
7205
|
else {
|
7169
7206
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.task);
|
@@ -7243,6 +7280,11 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
|
|
7243
7280
|
|
7244
7281
|
|
7245
7282
|
|
7283
|
+
|
7284
|
+
/**
|
7285
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
7286
|
+
*/
|
7287
|
+
var clipboardTelemetryVersionNumber = ApiVersionNumber.V_2;
|
7246
7288
|
/**
|
7247
7289
|
* Interact with the system clipboard
|
7248
7290
|
*
|
@@ -7281,7 +7323,7 @@ var clipboard;
|
|
7281
7323
|
mimeType: blob.type,
|
7282
7324
|
content: base64StringContent,
|
7283
7325
|
};
|
7284
|
-
return [2 /*return*/,
|
7326
|
+
return [2 /*return*/, sendAndHandleSdkErrorWithVersion(getApiVersionTag(clipboardTelemetryVersionNumber, ApiName.Clipboard_Write), 'clipboard.writeToClipboard', writeParams)];
|
7285
7327
|
}
|
7286
7328
|
});
|
7287
7329
|
});
|
@@ -7310,7 +7352,7 @@ var clipboard;
|
|
7310
7352
|
case 1:
|
7311
7353
|
response = _b.apply(_a, [_c.sent()]);
|
7312
7354
|
return [2 /*return*/, base64ToBlob(response.mimeType, response.content)];
|
7313
|
-
case 2: return [2 /*return*/,
|
7355
|
+
case 2: return [2 /*return*/, sendAndHandleSdkErrorWithVersion(getApiVersionTag(clipboardTelemetryVersionNumber, ApiName.Clipboard_Read), 'clipboard.readFromClipboard')];
|
7314
7356
|
}
|
7315
7357
|
});
|
7316
7358
|
});
|
@@ -8323,6 +8365,11 @@ var meeting;
|
|
8323
8365
|
});
|
8324
8366
|
}); };
|
8325
8367
|
registerHandler('meeting.micStateChanged', micStateChangedCallback);
|
8368
|
+
var audioDeviceSelectionChangedCallback = function (selectedDevicesInHost) {
|
8369
|
+
var _a;
|
8370
|
+
(_a = requestAppAudioHandlingParams.audioDeviceSelectionChangedCallback) === null || _a === void 0 ? void 0 : _a.call(requestAppAudioHandlingParams, selectedDevicesInHost);
|
8371
|
+
};
|
8372
|
+
registerHandler('meeting.audioDeviceSelectionChanged', audioDeviceSelectionChangedCallback);
|
8326
8373
|
callback(isHostAudioless);
|
8327
8374
|
};
|
8328
8375
|
sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalRequest);
|
@@ -8341,6 +8388,9 @@ var meeting;
|
|
8341
8388
|
if (doesHandlerExist('meeting.micStateChanged')) {
|
8342
8389
|
removeHandler('meeting.micStateChanged');
|
8343
8390
|
}
|
8391
|
+
if (doesHandlerExist('meeting.audioDeviceSelectionChanged')) {
|
8392
|
+
removeHandler('meeting.audioDeviceSelectionChanged');
|
8393
|
+
}
|
8344
8394
|
callback(isHostAudioless);
|
8345
8395
|
};
|
8346
8396
|
sendMessageToParent('meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalStop);
|
@@ -8428,6 +8478,11 @@ var monetization;
|
|
8428
8478
|
|
8429
8479
|
|
8430
8480
|
|
8481
|
+
|
8482
|
+
/**
|
8483
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
8484
|
+
*/
|
8485
|
+
var calendarTelemetryVersionNumber = ApiVersionNumber.V_2;
|
8431
8486
|
/**
|
8432
8487
|
* Interact with the user's calendar, including opening calendar items and composing meetings.
|
8433
8488
|
*/
|
@@ -8447,7 +8502,7 @@ var calendar;
|
|
8447
8502
|
if (!openCalendarItemParams.itemId || !openCalendarItemParams.itemId.trim()) {
|
8448
8503
|
throw new Error('Must supply an itemId to openCalendarItem');
|
8449
8504
|
}
|
8450
|
-
resolve(
|
8505
|
+
resolve(sendAndHandleStatusAndReasonWithVersion(getApiVersionTag(calendarTelemetryVersionNumber, ApiName.Calendar_OpenCalendarItem), 'calendar.openCalendarItem', openCalendarItemParams));
|
8451
8506
|
});
|
8452
8507
|
}
|
8453
8508
|
calendar.openCalendarItem = openCalendarItem;
|
@@ -8466,7 +8521,7 @@ var calendar;
|
|
8466
8521
|
resolve(sendAndHandleStatusAndReason('executeDeepLink', createTeamsDeepLinkForCalendar(composeMeetingParams.attendees, composeMeetingParams.startTime, composeMeetingParams.endTime, composeMeetingParams.subject, composeMeetingParams.content)));
|
8467
8522
|
}
|
8468
8523
|
else {
|
8469
|
-
resolve(
|
8524
|
+
resolve(sendAndHandleStatusAndReasonWithVersion(getApiVersionTag(calendarTelemetryVersionNumber, ApiName.Calendar_ComposeMeeting), 'calendar.composeMeeting', composeMeetingParams));
|
8470
8525
|
}
|
8471
8526
|
});
|
8472
8527
|
}
|
@@ -8488,6 +8543,11 @@ var calendar;
|
|
8488
8543
|
|
8489
8544
|
|
8490
8545
|
|
8546
|
+
|
8547
|
+
/**
|
8548
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
8549
|
+
*/
|
8550
|
+
var mailTelemetryVersionNumber = ApiVersionNumber.V_2;
|
8491
8551
|
/**
|
8492
8552
|
* Used to interact with mail capability, including opening and composing mail.
|
8493
8553
|
*/
|
@@ -8507,7 +8567,7 @@ var mail;
|
|
8507
8567
|
if (!openMailItemParams.itemId || !openMailItemParams.itemId.trim()) {
|
8508
8568
|
throw new Error('Must supply an itemId to openMailItem');
|
8509
8569
|
}
|
8510
|
-
resolve(
|
8570
|
+
resolve(sendAndHandleStatusAndReasonWithVersion(getApiVersionTag(mailTelemetryVersionNumber, ApiName.Mail_OpenMailItem), 'mail.openMailItem', openMailItemParams));
|
8511
8571
|
});
|
8512
8572
|
}
|
8513
8573
|
mail.openMailItem = openMailItem;
|
@@ -8523,7 +8583,7 @@ var mail;
|
|
8523
8583
|
if (!isSupported()) {
|
8524
8584
|
throw new Error('Not supported');
|
8525
8585
|
}
|
8526
|
-
resolve(
|
8586
|
+
resolve(sendAndHandleStatusAndReasonWithVersion(getApiVersionTag(mailTelemetryVersionNumber, ApiName.Mail_ComposeMail), 'mail.composeMail', composeMailParams));
|
8527
8587
|
});
|
8528
8588
|
}
|
8529
8589
|
mail.composeMail = composeMail;
|
@@ -10499,6 +10559,11 @@ var webStorage;
|
|
10499
10559
|
|
10500
10560
|
|
10501
10561
|
|
10562
|
+
|
10563
|
+
/**
|
10564
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
10565
|
+
*/
|
10566
|
+
var callTelemetryVersionNumber = ApiVersionNumber.V_2;
|
10502
10567
|
/**
|
10503
10568
|
* Used to interact with call functionality, including starting calls with other users.
|
10504
10569
|
*/
|
@@ -10528,6 +10593,7 @@ var call;
|
|
10528
10593
|
* @returns always true if the host notifies of a successful call inititation
|
10529
10594
|
*/
|
10530
10595
|
function startCall(startCallParams) {
|
10596
|
+
var apiVersionTag = getApiVersionTag(callTelemetryVersionNumber, ApiName.Call_StartCall);
|
10531
10597
|
return new Promise(function (resolve) {
|
10532
10598
|
var _a;
|
10533
10599
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.task);
|
@@ -10535,7 +10601,7 @@ var call;
|
|
10535
10601
|
throw errorNotSupportedOnPlatform;
|
10536
10602
|
}
|
10537
10603
|
if (runtime_runtime.isLegacyTeams) {
|
10538
|
-
resolve(
|
10604
|
+
resolve(sendAndUnwrapWithVersion(apiVersionTag, 'executeDeepLink', createTeamsDeepLinkForCall(startCallParams.targets, (_a = startCallParams.requestedModalities) === null || _a === void 0 ? void 0 : _a.includes(CallModalities.Video), startCallParams.source)).then(function (result) {
|
10539
10605
|
if (!result) {
|
10540
10606
|
throw new Error(errorCallNotStarted);
|
10541
10607
|
}
|
@@ -10543,7 +10609,7 @@ var call;
|
|
10543
10609
|
}));
|
10544
10610
|
}
|
10545
10611
|
else {
|
10546
|
-
return
|
10612
|
+
return communication_sendMessageToParentWithVersion(apiVersionTag, 'call.startCall', [startCallParams], resolve);
|
10547
10613
|
}
|
10548
10614
|
});
|
10549
10615
|
}
|
@@ -11709,6 +11775,11 @@ var marketplace_assign = (undefined && undefined.__assign) || function () {
|
|
11709
11775
|
|
11710
11776
|
|
11711
11777
|
|
11778
|
+
|
11779
|
+
/**
|
11780
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
11781
|
+
*/
|
11782
|
+
var marketplaceTelemetryVersionNumber = ApiVersionNumber.V_2;
|
11712
11783
|
/**
|
11713
11784
|
* @hidden
|
11714
11785
|
* Namespace for an app to support a checkout flow by interacting with the marketplace cart in the host.
|
@@ -11807,7 +11878,7 @@ var marketplace;
|
|
11807
11878
|
if (!isSupported()) {
|
11808
11879
|
throw errorNotSupportedOnPlatform;
|
11809
11880
|
}
|
11810
|
-
return
|
11881
|
+
return sendAndHandleSdkErrorWithVersion(getApiVersionTag(marketplaceTelemetryVersionNumber, ApiName.Marketplace_GetCart), 'marketplace.getCart', marketplace.cartVersion).then(deserializeCart);
|
11811
11882
|
}
|
11812
11883
|
marketplace.getCart = getCart;
|
11813
11884
|
/**
|
@@ -11827,7 +11898,7 @@ var marketplace;
|
|
11827
11898
|
}
|
11828
11899
|
validateUuid(addOrUpdateCartItemsParams === null || addOrUpdateCartItemsParams === void 0 ? void 0 : addOrUpdateCartItemsParams.cartId);
|
11829
11900
|
validateCartItems(addOrUpdateCartItemsParams === null || addOrUpdateCartItemsParams === void 0 ? void 0 : addOrUpdateCartItemsParams.cartItems);
|
11830
|
-
return
|
11901
|
+
return sendAndHandleSdkErrorWithVersion(getApiVersionTag(marketplaceTelemetryVersionNumber, ApiName.Marketplace_AddOrUpdateCartItems), 'marketplace.addOrUpdateCartItems', marketplace_assign(marketplace_assign({}, addOrUpdateCartItemsParams), { cartItems: serializeCartItems(addOrUpdateCartItemsParams.cartItems), cartVersion: marketplace.cartVersion })).then(deserializeCart);
|
11831
11902
|
}
|
11832
11903
|
marketplace.addOrUpdateCartItems = addOrUpdateCartItems;
|
11833
11904
|
/**
|
@@ -11849,7 +11920,7 @@ var marketplace;
|
|
11849
11920
|
if (!Array.isArray(removeCartItemsParams === null || removeCartItemsParams === void 0 ? void 0 : removeCartItemsParams.cartItemIds) || (removeCartItemsParams === null || removeCartItemsParams === void 0 ? void 0 : removeCartItemsParams.cartItemIds.length) === 0) {
|
11850
11921
|
throw new Error('cartItemIds must be a non-empty array');
|
11851
11922
|
}
|
11852
|
-
return
|
11923
|
+
return sendAndHandleSdkErrorWithVersion(getApiVersionTag(marketplaceTelemetryVersionNumber, ApiName.Marketplace_RemoveCardItems), 'marketplace.removeCartItems', marketplace_assign(marketplace_assign({}, removeCartItemsParams), { cartVersion: marketplace.cartVersion })).then(deserializeCart);
|
11853
11924
|
}
|
11854
11925
|
marketplace.removeCartItems = removeCartItems;
|
11855
11926
|
/**
|
@@ -11869,7 +11940,7 @@ var marketplace;
|
|
11869
11940
|
}
|
11870
11941
|
validateUuid(updateCartStatusParams === null || updateCartStatusParams === void 0 ? void 0 : updateCartStatusParams.cartId);
|
11871
11942
|
validateCartStatus(updateCartStatusParams === null || updateCartStatusParams === void 0 ? void 0 : updateCartStatusParams.cartStatus);
|
11872
|
-
return
|
11943
|
+
return sendAndHandleSdkErrorWithVersion(getApiVersionTag(marketplaceTelemetryVersionNumber, ApiName.Marketplace_UpdateCartStatus), 'marketplace.updateCartStatus', marketplace_assign(marketplace_assign({}, updateCartStatusParams), { cartVersion: marketplace.cartVersion })).then(deserializeCart);
|
11873
11944
|
}
|
11874
11945
|
marketplace.updateCartStatus = updateCartStatus;
|
11875
11946
|
/**
|