@microsoft/teams-js 2.19.0 → 2.20.0-beta.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/MicrosoftTeams.d.ts +77 -104
- package/dist/MicrosoftTeams.js +850 -352
- 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 -35
package/dist/MicrosoftTeams.js
CHANGED
@@ -997,23 +997,58 @@ var ApiName;
|
|
997
997
|
ApiName["Calendar_ComposeMeeting"] = "calendar.composeMeeting";
|
998
998
|
ApiName["Calendar_OpenCalendarItem"] = "calendar.openCalendarItem";
|
999
999
|
ApiName["Call_StartCall"] = "call.startCall";
|
1000
|
+
ApiName["Chat_OpenChat"] = "chat.openChat";
|
1001
|
+
ApiName["Chat_OpenGroupChat"] = "chat.openGroupChat";
|
1000
1002
|
ApiName["Clipboard_Read"] = "clipboard.read";
|
1001
1003
|
ApiName["Clipboard_Write"] = "clipboard.write";
|
1004
|
+
ApiName["Conversations_CloseConversation"] = "conversations.closeConversation";
|
1005
|
+
ApiName["Conversations_GetChatMember"] = "conversations.getChatMember";
|
1006
|
+
ApiName["Conversations_OpenConversation"] = "conversations.openConversation";
|
1007
|
+
ApiName["Conversations_RegisterCloseConversationHandler"] = "conversations.registerCloseConversationHandler";
|
1008
|
+
ApiName["Conversations_RegisterStartConversationHandler"] = "conversations.registerStartConversationHandler";
|
1002
1009
|
ApiName["Dialog_AdaptiveCard_Bot_Open"] = "dialog.adaptiveCard.bot.open";
|
1003
1010
|
ApiName["Dialog_AdaptiveCard_Open"] = "dialog.adaptiveCard.open";
|
1004
1011
|
ApiName["Dialog_Update_Resize"] = "dialog.update.resize";
|
1005
1012
|
ApiName["Dialog_Url_Bot_Open"] = "dialog.url.bot.open";
|
1006
1013
|
ApiName["Dialog_Url_Open"] = "dialog.url.open";
|
1007
1014
|
ApiName["Dialog_Url_Submit"] = "dialog.url.submit";
|
1008
|
-
ApiName["
|
1009
|
-
ApiName["
|
1015
|
+
ApiName["Dialog_Url_ParentCommunication_SendMessageToParentFromDialog"] = "dialog.url.parentCommunication.sendMessageToParentFromDialog";
|
1016
|
+
ApiName["Dialog_Url_ParentCommunication_SendMessageToDialog"] = "dialog.url.parentCommunication.sendMessageToDialog";
|
1017
|
+
ApiName["Files_AddCloudStorageFolder"] = "files.addCloudStorageFolder";
|
1018
|
+
ApiName["Files_AddCloudStorageProvider"] = "files.addCloudStorageProvider";
|
1019
|
+
ApiName["Files_AddCloudStorageProviderFile"] = "files.addCloudStorageProviderFile";
|
1020
|
+
ApiName["Files_CopyMoveFiles"] = "files.copyMoveFiles";
|
1021
|
+
ApiName["Files_DeleteCloudStorageFolder"] = "files.deleteCloudStorageFolder";
|
1022
|
+
ApiName["Files_DeleteCloudStorageProviderFile"] = "files.deleteCloudStorageProviderFile";
|
1023
|
+
ApiName["Files_DownloadCloudStorageProviderFile"] = "files.downloadCloudStorageProviderFile";
|
1024
|
+
ApiName["Files_GetCloudStorageFolderContents"] = "files.getCloudStorageFolderContents";
|
1025
|
+
ApiName["Files_GetCloudStorageFolders"] = "files.getCloudStorageFolders";
|
1026
|
+
ApiName["Files_GetExternalProviders"] = "files.getExternalProviders";
|
1027
|
+
ApiName["Files_GetFileDownloads"] = "files.getFileDownloads";
|
1028
|
+
ApiName["Files_OpenCloudStorageFile"] = "files.openCloudStorageFile";
|
1029
|
+
ApiName["Files_OpenDownloadFolder"] = "files.openDownloadFolder";
|
1030
|
+
ApiName["Files_RegisterCloudStorageProviderContentChangeHandler"] = "files.registerCloudStorageProviderContentChangeHandler";
|
1031
|
+
ApiName["Files_RegisterCloudStorageProviderListChangeHandler"] = "files.registerCloudStorageProviderListChangeHandler";
|
1032
|
+
ApiName["Files_RemoveCloudStorageProvider"] = "files.removeCloudStorageProvider";
|
1033
|
+
ApiName["Files_RenameCloudStorageProviderFile"] = "files.renameCloudStorageProviderFile";
|
1034
|
+
ApiName["Files_UploadCloudStorageProviderFile"] = "files.uploadCloudStorageProviderFile";
|
1010
1035
|
ApiName["GeoLocation_GetCurrentLocation"] = "geoLocation.getCurrentLocation";
|
1011
1036
|
ApiName["GeoLocation_HasPermission"] = "geoLocation.hasPermission";
|
1012
1037
|
ApiName["GeoLocation_Map_ChooseLocation"] = "geoLocation.map.chooseLocation";
|
1013
|
-
ApiName["GeoLocation_RequestPermission"] = "geoLocation.
|
1038
|
+
ApiName["GeoLocation_RequestPermission"] = "geoLocation.requestPermission";
|
1014
1039
|
ApiName["GeoLocation_ShowLocation"] = "geoLocation.showLocation";
|
1040
|
+
ApiName["Interactive_GetClientInfo"] = "interactive.getClientInfo";
|
1041
|
+
ApiName["Interactive_GetClientRoles"] = "interactive.getClientRoles";
|
1042
|
+
ApiName["Interactive_GetFluidContainerId"] = "interactive.getFluidContainerId";
|
1043
|
+
ApiName["Interactive_GetFluidTenantInfo"] = "interactive.getFluidTenantInfo";
|
1044
|
+
ApiName["Interactive_GetFluidToken"] = "interactive.getFluidToken";
|
1045
|
+
ApiName["Interactive_GetNtpTime"] = "interactive.getNtpTime";
|
1046
|
+
ApiName["Interactive_RegisterClientId"] = "interactive.registerClientId";
|
1047
|
+
ApiName["Interactive_SetFluidContainerId"] = "interactive.setFluidContainerId";
|
1015
1048
|
ApiName["Location_GetLocation"] = "location.getLocation";
|
1016
1049
|
ApiName["Location_ShowLocation"] = "location.showLocation";
|
1050
|
+
ApiName["Logs_Receive"] = "log.receive";
|
1051
|
+
ApiName["Logs_RegisterLogRequestHandler"] = "log.request";
|
1017
1052
|
ApiName["Mail_ComposeMail"] = "mail.composeMail";
|
1018
1053
|
ApiName["Mail_OpenMailItem"] = "mail.openMailItem";
|
1019
1054
|
ApiName["Marketplace_AddOrUpdateCartItems"] = "marketplace.addOrUpdateCartItems";
|
@@ -1028,18 +1063,53 @@ var ApiName;
|
|
1028
1063
|
ApiName["Media_ScanBarCode"] = "media.scanBarCode";
|
1029
1064
|
ApiName["Media_SelectMedia"] = "media.selectMedia";
|
1030
1065
|
ApiName["Media_ViewImages"] = "media.viewImages";
|
1066
|
+
ApiName["Meeting_AppShareButton_SetOptions"] = "meeting.appShareButton.setOptions";
|
1067
|
+
ApiName["Meeting_GetAppContentStageSharingCapabilities"] = "meeting.getAppContentStageSharingCapabilities";
|
1068
|
+
ApiName["Meeting_GetAppContentStageSharingState"] = "meeting.getAppContentStageSharingState";
|
1069
|
+
ApiName["Meeting_GetAuthenticationTokenForAnonymousUser"] = "meeting.getAuthenticationTokenForAnonymousUser";
|
1070
|
+
ApiName["Meeting_GetIncomingClientAudioState"] = "meeting.getIncomingClientAudioState";
|
1071
|
+
ApiName["Meeting_GetLiveStreamState"] = "meeting.getLiveStreamState";
|
1072
|
+
ApiName["Meeting_GetMeetingDetails"] = "meeting.getMeetingDetails";
|
1073
|
+
ApiName["Meeting_RegisterAudioDeviceSelectionChangedHandler"] = "meeting.registerAudioDeviceSelectionChangedHandler";
|
1074
|
+
ApiName["Meeting_RegisterLiveStreamChangedHandler"] = "meeting.registerLiveStreamChangedHandler";
|
1075
|
+
ApiName["Meeting_RegisterMeetingReactionReceivedHandler"] = "meeting.registerMeetingReactionReceivedHandler";
|
1076
|
+
ApiName["Meeting_RegisterMicStateChangeHandler"] = "meeting.registerMicStateChangeHandler";
|
1077
|
+
ApiName["Meeting_RegisterRaiseHandStateChangedHandler"] = "meeting.registerRaiseHandStateChangedHandler";
|
1078
|
+
ApiName["Meeting_RegisterSpeakingStateChangeHandler"] = "meeting.registerSpeakingStateChangeHandler";
|
1079
|
+
ApiName["Meeting_RequestAppAudioHandling"] = "meeting.requestAppAudioHandling";
|
1080
|
+
ApiName["Meeting_RequestStartLiveStreaming"] = "meeting.requestStartLiveStreaming";
|
1081
|
+
ApiName["Meeting_RequestStopLiveStreaming"] = "meeting.requestStopLiveStreaming";
|
1082
|
+
ApiName["Meeting_SetMicStateWithReason"] = "meeting.setMicStateWithReason";
|
1083
|
+
ApiName["Meeting_ShareAppContentToStage"] = "meeting.shareAppContentToStage";
|
1084
|
+
ApiName["Meeting_StopSharingAppContentToStage"] = "meeting.stopSharingAppContentToStage";
|
1085
|
+
ApiName["Meeting_ToggleIncomingClientAudio"] = "meeting.toggleIncomingClientAudio";
|
1086
|
+
ApiName["MeetingRoom_GetPairedMeetingRoomInfo"] = "meetingRoom.getPairedMeetingRoomInfo";
|
1087
|
+
ApiName["MeetingRoom_RegisterMeetingRoomCapabilitiesUpdateHandler"] = "meetingRoom.registerMeetingRoomCapabilitiesUpdateHandler";
|
1088
|
+
ApiName["MeetingRoom_RegisterMeetingRoomStatesUpdateHandler"] = "meetingRoom.registerMeetingRoomStatesUpdateHandler";
|
1089
|
+
ApiName["MeetingRoom_SendCommandToPairedMeetingRoom"] = "meetingRoom.sendCommandToPairedMeetingRoom";
|
1090
|
+
ApiName["Menus_HandleActionMenuItemPress"] = "menus.handleActionMenuItemPress";
|
1091
|
+
ApiName["Menus_HandleNavBarMenuItemPress"] = "menus.handleNavBarMenuItemPress";
|
1092
|
+
ApiName["Menus_HandleViewConfigItemPress"] = "menus.handleViewConfigItemPress";
|
1093
|
+
ApiName["Menus_RegisterActionMenuItemPressHandler"] = "menus.registerActionMenuItemPressHandler";
|
1094
|
+
ApiName["Menus_RegisterNavBarMenuItemPressHandler"] = "menus.registerNavBarMenuItemPressHandler";
|
1095
|
+
ApiName["Menus_RegisterSetModuleViewHandler"] = "menus.registerSetModuleViewHandler";
|
1096
|
+
ApiName["Menus_SetNavBarMenu"] = "menus.setNavBarMenu";
|
1097
|
+
ApiName["Menus_SetUpViews"] = "menus.setUpViews";
|
1098
|
+
ApiName["Menus_ShowActionMenu"] = "menus.showActionMenu";
|
1099
|
+
ApiName["Monetization_OpenPurchaseExperience"] = "monetization.openPurchaseExperience";
|
1031
1100
|
ApiName["Navigation_NavigateBack"] = "navigation.navigateBack";
|
1032
1101
|
ApiName["Navigation_NavigateCrossDomain"] = "navigation.navigateCrossDomain";
|
1033
1102
|
ApiName["Navigation_NavigateToTab"] = "navigation.navigateToTab";
|
1034
1103
|
ApiName["Navigation_ReturnFocus"] = "navigation.returnFocus";
|
1104
|
+
ApiName["Notifications_ShowNotification"] = "notifications.showNotification";
|
1035
1105
|
ApiName["Pages_AppButton_OnClick"] = "pages.appButton.onClick";
|
1036
1106
|
ApiName["Pages_AppButton_OnHoverEnter"] = "pages.appButton.onHoverEnter";
|
1037
1107
|
ApiName["Pages_AppButton_OnHoverLeave"] = "pages.appButton.onHoverLeave";
|
1038
1108
|
ApiName["Pages_BackStack_NavigateBack"] = "pages.backStack.navigateBack";
|
1039
1109
|
ApiName["Pages_BackStack_RegisterBackButtonHandler"] = "pages.backStack.registerBackButtonHandler";
|
1040
1110
|
ApiName["Pages_Config_RegisterChangeConfigHandler"] = "pages.config.registerChangeConfigHandler";
|
1041
|
-
ApiName["
|
1042
|
-
ApiName["
|
1111
|
+
ApiName["Pages_Config_RegisterOnRemoveHandler"] = "pages.config.registerOnRemoveHandler";
|
1112
|
+
ApiName["Pages_Config_RegisterOnSaveHandler"] = "pages.config.registerOnSaveHandler";
|
1043
1113
|
ApiName["Pages_Config_SetConfig"] = "pages.config.setConfig";
|
1044
1114
|
ApiName["Pages_Config_SetValidityState"] = "pages.config.setValidityState";
|
1045
1115
|
ApiName["Pages_CurrentApp_NavigateTo"] = "pages.currentApp.navigateTo";
|
@@ -1051,12 +1121,18 @@ var ApiName;
|
|
1051
1121
|
ApiName["Pages_NavigateToApp"] = "pages.navigateToApp";
|
1052
1122
|
ApiName["Pages_RegisterFocusEnterHandler"] = "pages.registerFocusEnterHandler";
|
1053
1123
|
ApiName["Pages_RegisterFullScreenHandler"] = "pages.registerFullScreenHandler";
|
1124
|
+
ApiName["Pages_RemoveEvent_NotifyFailure"] = "pages.removeEvent.notifyFailure";
|
1125
|
+
ApiName["Pages_RemoveEvent_NotifySuccess"] = "pages.removeEvent.notifySuccess";
|
1054
1126
|
ApiName["Pages_ReturnFocus"] = "pages.returnFocus";
|
1127
|
+
ApiName["Pages_SaveEvent_NotifyFailure"] = "pages.saveEvent.notifyFailure";
|
1128
|
+
ApiName["Pages_SaveEvent_NotifySuccess"] = "pages.saveEvent.notifySuccess";
|
1055
1129
|
ApiName["Pages_SetCurrentFrame"] = "pages.setCurrentFrame";
|
1056
1130
|
ApiName["Pages_ShareDeepLink"] = "pages.shareDeepLink";
|
1057
1131
|
ApiName["Pages_Tabs_GetMruTabInstances"] = "pages.tabs.getMruTabInstances";
|
1058
1132
|
ApiName["Pages_Tabs_GetTabInstances"] = "pages.tabs.getTabInstances";
|
1059
1133
|
ApiName["Pages_Tabs_NavigateToTab"] = "pages.tabs.navigateToTab";
|
1134
|
+
ApiName["People_SelectPeople"] = "people.selectPeople";
|
1135
|
+
ApiName["Profile_ShowProfile"] = "profile.showProfile";
|
1060
1136
|
ApiName["PublicAPIs_ExecuteDeepLink"] = "executeDeepLink";
|
1061
1137
|
ApiName["PublicAPIs_GetContext"] = "getContext";
|
1062
1138
|
ApiName["PublicAPIs_GetMruTabInstances"] = "getMruTabInstances";
|
@@ -1075,17 +1151,43 @@ var ApiName;
|
|
1075
1151
|
ApiName["PublicAPIs_ShareDeepLink"] = "shareDeepLink";
|
1076
1152
|
ApiName["RegisterHandler"] = "registerHandler";
|
1077
1153
|
ApiName["RegisterOnThemeChangeHandler"] = "registerOnThemeChangeHandler";
|
1078
|
-
ApiName["
|
1079
|
-
ApiName["
|
1080
|
-
ApiName["
|
1081
|
-
ApiName["
|
1154
|
+
ApiName["Search_CloseSearch"] = "search.closeSearch";
|
1155
|
+
ApiName["Search_RegisterOnChangeHandler"] = "search.registerOnChangeHandler";
|
1156
|
+
ApiName["Search_RegisterOnClosedHandler"] = "search.registerOnClosedHandler";
|
1157
|
+
ApiName["Search_RegisterOnExecutedHandler"] = "search.registerOnExecutedHandler";
|
1158
|
+
ApiName["Search_UnregisterHandlers"] = "search.unregisterHandlers";
|
1159
|
+
ApiName["SecondaryBrowser_OpenUrl"] = "secondaryBrowser.openUrl";
|
1160
|
+
ApiName["Settings_GetSettings"] = "settings.getSettings";
|
1161
|
+
ApiName["Settings_RegisterOnRemoveHandler"] = "settings.registerOnRemoveHandler";
|
1162
|
+
ApiName["Settings_RegisterOnSaveHandler"] = "settings.registerOnSaveHandler";
|
1163
|
+
ApiName["Settings_SetSettings"] = "settings.setSettings";
|
1164
|
+
ApiName["Settings_SetValidityState"] = "settings.setValidityState";
|
1165
|
+
ApiName["StageView_Open"] = "stageView.open";
|
1082
1166
|
ApiName["Tasks_StartTask"] = "tasks.startTask";
|
1083
1167
|
ApiName["Tasks_SubmitTask"] = "tasks.submitTask";
|
1084
1168
|
ApiName["Tasks_UpdateTask"] = "tasks.updateTask";
|
1169
|
+
ApiName["VideoEffects_MediaStream_RegisterForVideoFrame"] = "videoEffects.mediaStream.registerForVideoFrame";
|
1170
|
+
ApiName["VideoEffects_NotifySelectedVideoEffectChanged"] = "videoEffects.notifySelectedVideoEffectChanged";
|
1171
|
+
ApiName["VideoEffects_NotifyError"] = "videoEffects.notifyError";
|
1172
|
+
ApiName["VideoEffects_NotifyVideoFrameProcessed"] = "videoEffects.notifyVideoFrameProcessed";
|
1173
|
+
ApiName["VideoEffects_RegisterEffectParameterChangeHandler"] = "videoEffects.registerEffectParameterChangeHandler";
|
1174
|
+
ApiName["VideoEffects_RegisterForVideoEffect"] = "videoEffects.registerForVideoEffect";
|
1175
|
+
ApiName["VideoEffects_RegisterForVideoFrame"] = "videoEffects.registerForVideoFrame";
|
1176
|
+
ApiName["VideoEffects_RegisterSetFrameProcessTimeLimitHandler"] = "videoEffects.setFrameProcessTimeLimitHandler";
|
1177
|
+
ApiName["VideoEffects_RegisterStartVideoExtensibilityVideoStreamHandler"] = "videoEffects.startVideoExtensibilityVideoStreamHandler";
|
1178
|
+
ApiName["VideoEffects_RegisterForVideoBufferHandler"] = "videoEffects.registerForVideoBufferHandler";
|
1179
|
+
ApiName["VideoPerformanceMonitor_Constructor"] = "videoPerformanceMonitor.performanceDataGenerated";
|
1180
|
+
ApiName["VideoPerformanceMonitor_ReportFrameProcessed"] = "videoPerformanceMonitor.reportFrameProcessed";
|
1181
|
+
ApiName["VideoPerformanceMonitor_ReportTextureStreamAcquired"] = "videoPerformanceMonitor.reportTextureStreamAcquired";
|
1182
|
+
ApiName["VideoPerformanceMonitor_StartMonitorSlowFrameProcessing"] = "videoPerformanceMonitor.startMonitorSlowFrameProcessing";
|
1183
|
+
ApiName["VisualMedia_HasPermission"] = "visualMedia.hasPermission";
|
1184
|
+
ApiName["VisualMedia_Image_CaptureImages"] = "visualMedia.image.captureImages";
|
1185
|
+
ApiName["VisualMedia_Image_RetrieveImages"] = "visualMedia.image.retrieveImages";
|
1186
|
+
ApiName["VisualMedia_RequestPermission"] = "visualMedia.requestPermission";
|
1085
1187
|
})(ApiName || (ApiName = {}));
|
1086
1188
|
|
1087
1189
|
;// CONCATENATED MODULE: ./src/artifactsForCDN/validDomains.json
|
1088
|
-
const validDomains_namespaceObject = JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","teams.
|
1190
|
+
const validDomains_namespaceObject = JSON.parse('{"validOrigins":["teams.microsoft.com","teams.microsoft.us","gov.teams.microsoft.us","dod.teams.microsoft.us","int.teams.microsoft.com","*.teams.microsoft.com","outlook.office.com","outlook-sdf.office.com","outlook.office365.com","outlook-sdf.office365.com","outlook.live.com","outlook-sdf.live.com","teams.live.com","local.teams.live.com","local.teams.live.com:8080","local.teams.office.com","local.teams.office.com:8080","devspaces.skype.com","ssauth.skype.com","*.www.office.com","www.office.com","word.office.com","excel.office.com","powerpoint.office.com","www.officeppe.com","*.www.microsoft365.com","www.microsoft365.com","bing.com","edgeservices.bing.com","www.bing.com","www.staging-bing-int.com","teams.cloud.microsoft","outlook.cloud.microsoft","m365.cloud.microsoft","copilot.microsoft.com","windows.msn.com"]}');
|
1089
1191
|
var artifactsForCDN_validDomains_namespaceObject = /*#__PURE__*/__webpack_require__.t(validDomains_namespaceObject, 2);
|
1090
1192
|
;// CONCATENATED MODULE: ./src/internal/constants.ts
|
1091
1193
|
|
@@ -2031,7 +2133,7 @@ var __rest = (undefined && undefined.__rest) || function (s, e) {
|
|
2031
2133
|
|
2032
2134
|
|
2033
2135
|
const runtimeLogger = getLogger('runtime');
|
2034
|
-
const latestRuntimeApiVersion =
|
2136
|
+
const latestRuntimeApiVersion = 4;
|
2035
2137
|
function isLatestRuntimeVersion(runtime) {
|
2036
2138
|
return runtime.apiVersion === latestRuntimeApiVersion;
|
2037
2139
|
}
|
@@ -2063,7 +2165,7 @@ function isRuntimeInitialized(runtime) {
|
|
2063
2165
|
}
|
2064
2166
|
let runtime_runtime = _uninitializedRuntime;
|
2065
2167
|
const versionAndPlatformAgnosticTeamsRuntimeConfig = {
|
2066
|
-
apiVersion:
|
2168
|
+
apiVersion: 4,
|
2067
2169
|
hostVersionsInfo: teamsMinAdaptiveCardVersion,
|
2068
2170
|
isLegacyTeams: true,
|
2069
2171
|
supports: {
|
@@ -2078,6 +2180,7 @@ const versionAndPlatformAgnosticTeamsRuntimeConfig = {
|
|
2078
2180
|
},
|
2079
2181
|
url: {
|
2080
2182
|
bot: {},
|
2183
|
+
parentCommunication: {},
|
2081
2184
|
},
|
2082
2185
|
update: {},
|
2083
2186
|
},
|
@@ -2175,6 +2278,27 @@ const upgradeChain = [
|
|
2175
2278
|
return Object.assign(Object.assign({}, previousVersionRuntime), { apiVersion: 3, supports: newSupports });
|
2176
2279
|
},
|
2177
2280
|
},
|
2281
|
+
{
|
2282
|
+
versionToUpgradeFrom: 3,
|
2283
|
+
upgradeToNextVersion: (previousVersionRuntime) => {
|
2284
|
+
var _a, _b, _c, _d, _e;
|
2285
|
+
return {
|
2286
|
+
apiVersion: 4,
|
2287
|
+
hostVersionsInfo: previousVersionRuntime.hostVersionsInfo,
|
2288
|
+
isLegacyTeams: previousVersionRuntime.isLegacyTeams,
|
2289
|
+
supports: Object.assign(Object.assign({}, previousVersionRuntime.supports), { dialog: previousVersionRuntime.supports.dialog
|
2290
|
+
? {
|
2291
|
+
card: (_a = previousVersionRuntime.supports.dialog) === null || _a === void 0 ? void 0 : _a.card,
|
2292
|
+
url: {
|
2293
|
+
bot: (_c = (_b = previousVersionRuntime.supports.dialog) === null || _b === void 0 ? void 0 : _b.url) === null || _c === void 0 ? void 0 : _c.bot,
|
2294
|
+
parentCommunication: ((_d = previousVersionRuntime.supports.dialog) === null || _d === void 0 ? void 0 : _d.url) ? {} : undefined,
|
2295
|
+
},
|
2296
|
+
update: (_e = previousVersionRuntime.supports.dialog) === null || _e === void 0 ? void 0 : _e.update,
|
2297
|
+
}
|
2298
|
+
: undefined }),
|
2299
|
+
};
|
2300
|
+
},
|
2301
|
+
},
|
2178
2302
|
];
|
2179
2303
|
const mapTeamsVersionToSupportedCapabilities = {
|
2180
2304
|
// 1.0.0 just signifies "these capabilities have practically always been supported." For some of these
|
@@ -2346,7 +2470,7 @@ const _minRuntimeConfigToUninitialize = {
|
|
2346
2470
|
* @hidden
|
2347
2471
|
* Package version.
|
2348
2472
|
*/
|
2349
|
-
const version = "2.
|
2473
|
+
const version = "2.20.0-beta.0";
|
2350
2474
|
|
2351
2475
|
;// CONCATENATED MODULE: ./src/internal/internalAPIs.ts
|
2352
2476
|
|
@@ -2620,7 +2744,6 @@ function validateOrigin(messageOrigin) {
|
|
2620
2744
|
|
2621
2745
|
|
2622
2746
|
|
2623
|
-
|
2624
2747
|
/**
|
2625
2748
|
* Namespace to interact with the authentication-specific part of the SDK.
|
2626
2749
|
*
|
@@ -2759,6 +2882,7 @@ var authentication;
|
|
2759
2882
|
authTokenRequest === null || authTokenRequest === void 0 ? void 0 : authTokenRequest.resources,
|
2760
2883
|
authTokenRequest === null || authTokenRequest === void 0 ? void 0 : authTokenRequest.claims,
|
2761
2884
|
authTokenRequest === null || authTokenRequest === void 0 ? void 0 : authTokenRequest.silent,
|
2885
|
+
authTokenRequest === null || authTokenRequest === void 0 ? void 0 : authTokenRequest.tenantId,
|
2762
2886
|
]));
|
2763
2887
|
}).then(([success, result]) => {
|
2764
2888
|
if (success) {
|
@@ -2897,21 +3021,11 @@ var authentication;
|
|
2897
3021
|
});
|
2898
3022
|
}
|
2899
3023
|
/**
|
2900
|
-
*
|
2901
|
-
*
|
2902
|
-
* {@link authentication.
|
2903
|
-
* authentication request was successful.
|
2904
|
-
*
|
2905
|
-
* @remarks
|
2906
|
-
* This function is usable only from the authentication window.
|
2907
|
-
* This call causes the authentication window to be closed.
|
2908
|
-
*
|
2909
|
-
* @param result - Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives
|
2910
|
-
* this value in its callback or via the `Promise` return value
|
2911
|
-
* @param callbackUrl - Specifies the url to redirect back to if the client is Win32 Outlook.
|
3024
|
+
* @deprecated
|
3025
|
+
* This function used to have an unused optional second parameter called callbackUrl. Because it was not used, it has been removed.
|
3026
|
+
* Please use the {@link authentication.notifySuccess authentication.notifySuccess(result?: string): void} instead.
|
2912
3027
|
*/
|
2913
|
-
function notifySuccess(result,
|
2914
|
-
redirectIfWin32Outlook(callbackUrl, 'result', result);
|
3028
|
+
function notifySuccess(result, _callbackUrl) {
|
2915
3029
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.authentication);
|
2916
3030
|
sendMessageToParent('authentication.authenticate.success', [result]);
|
2917
3031
|
// Wait for the message to be sent before closing the window
|
@@ -2919,22 +3033,11 @@ var authentication;
|
|
2919
3033
|
}
|
2920
3034
|
authentication.notifySuccess = notifySuccess;
|
2921
3035
|
/**
|
2922
|
-
*
|
2923
|
-
*
|
2924
|
-
* {@link authentication.
|
2925
|
-
* authentication request failed.
|
2926
|
-
|
2927
|
-
*
|
2928
|
-
* @remarks
|
2929
|
-
* This function is usable only on the authentication window.
|
2930
|
-
* This call causes the authentication window to be closed.
|
2931
|
-
*
|
2932
|
-
* @param result - Specifies a result for the authentication. If specified, the frame that initiated the authentication pop-up receives
|
2933
|
-
* this value in its callback or via the `Promise` return value
|
2934
|
-
* @param callbackUrl - Specifies the url to redirect back to if the client is Win32 Outlook.
|
3036
|
+
* @deprecated
|
3037
|
+
* This function used to have an unused optional second parameter called callbackUrl. Because it was not used, it has been removed.
|
3038
|
+
* Please use the {@link authentication.notifyFailure authentication.notifyFailure(result?: string): void} instead.
|
2935
3039
|
*/
|
2936
|
-
function notifyFailure(reason,
|
2937
|
-
redirectIfWin32Outlook(callbackUrl, 'reason', reason);
|
3040
|
+
function notifyFailure(reason, _callbackUrl) {
|
2938
3041
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.authentication);
|
2939
3042
|
sendMessageToParent('authentication.authenticate.failure', [reason]);
|
2940
3043
|
// Wait for the message to be sent before closing the window
|
@@ -2963,48 +3066,6 @@ var authentication;
|
|
2963
3066
|
closeAuthenticationWindow();
|
2964
3067
|
}
|
2965
3068
|
}
|
2966
|
-
/**
|
2967
|
-
* Validates that the callbackUrl param is a valid connector url, appends the result/reason and authSuccess/authFailure as URL fragments and redirects the window
|
2968
|
-
* @param callbackUrl - the connectors url to redirect to
|
2969
|
-
* @param key - "result" in case of success and "reason" in case of failure
|
2970
|
-
* @param value - the value of the passed result/reason parameter
|
2971
|
-
*/
|
2972
|
-
function redirectIfWin32Outlook(callbackUrl, key, value) {
|
2973
|
-
if (callbackUrl) {
|
2974
|
-
const link = document.createElement('a');
|
2975
|
-
link.href = decodeURIComponent(callbackUrl);
|
2976
|
-
if (link.host &&
|
2977
|
-
link.host !== ssrSafeWindow().location.host &&
|
2978
|
-
link.host === 'outlook.office.com' &&
|
2979
|
-
link.search.indexOf('client_type=Win32_Outlook') > -1) {
|
2980
|
-
if (key && key === 'result') {
|
2981
|
-
if (value) {
|
2982
|
-
link.href = updateUrlParameter(link.href, 'result', value);
|
2983
|
-
}
|
2984
|
-
Communication.currentWindow.location.assign(updateUrlParameter(link.href, 'authSuccess', ''));
|
2985
|
-
}
|
2986
|
-
if (key && key === 'reason') {
|
2987
|
-
if (value) {
|
2988
|
-
link.href = updateUrlParameter(link.href, 'reason', value);
|
2989
|
-
}
|
2990
|
-
Communication.currentWindow.location.assign(updateUrlParameter(link.href, 'authFailure', ''));
|
2991
|
-
}
|
2992
|
-
}
|
2993
|
-
}
|
2994
|
-
}
|
2995
|
-
/**
|
2996
|
-
* Appends either result or reason as a fragment to the 'callbackUrl'
|
2997
|
-
* @param uri - the url to modify
|
2998
|
-
* @param key - the fragment key
|
2999
|
-
* @param value - the fragment value
|
3000
|
-
*/
|
3001
|
-
function updateUrlParameter(uri, key, value) {
|
3002
|
-
const i = uri.indexOf('#');
|
3003
|
-
let hash = i === -1 ? '#' : uri.substr(i);
|
3004
|
-
hash = hash + '&' + key + (value !== '' ? '=' + value : '');
|
3005
|
-
uri = i === -1 ? uri : uri.substr(0, i);
|
3006
|
-
return uri + hash;
|
3007
|
-
}
|
3008
3069
|
/**
|
3009
3070
|
* @hidden
|
3010
3071
|
* Limited set of data residencies information exposed to 1P application developers
|
@@ -3050,7 +3111,7 @@ function updateResizeHelper(apiVersionTag, dimensions) {
|
|
3050
3111
|
if (!dialog.update.isSupported()) {
|
3051
3112
|
throw errorNotSupportedOnPlatform;
|
3052
3113
|
}
|
3053
|
-
|
3114
|
+
sendMessageToParentWithVersion(apiVersionTag, 'tasks.updateTask', [dimensions]);
|
3054
3115
|
}
|
3055
3116
|
function urlOpenHelper(apiVersionTag, urlDialogInfo, submitHandler, messageFromChildHandler) {
|
3056
3117
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
@@ -3061,7 +3122,7 @@ function urlOpenHelper(apiVersionTag, urlDialogInfo, submitHandler, messageFromC
|
|
3061
3122
|
registerHandler('messageForParent', messageFromChildHandler);
|
3062
3123
|
}
|
3063
3124
|
const dialogInfo = dialog.url.getDialogInfoFromUrlDialogInfo(urlDialogInfo);
|
3064
|
-
|
3125
|
+
sendMessageToParentWithVersion(apiVersionTag, 'tasks.startTask', [dialogInfo], (err, result) => {
|
3065
3126
|
submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err, result });
|
3066
3127
|
removeHandler('messageForParent');
|
3067
3128
|
});
|
@@ -3075,7 +3136,7 @@ function botUrlOpenHelper(apiVersionTag, urlDialogInfo, submitHandler, messageFr
|
|
3075
3136
|
registerHandler('messageForParent', messageFromChildHandler);
|
3076
3137
|
}
|
3077
3138
|
const dialogInfo = dialog.url.getDialogInfoFromBotUrlDialogInfo(urlDialogInfo);
|
3078
|
-
|
3139
|
+
sendMessageToParentWithVersion(apiVersionTag, 'tasks.startTask', [dialogInfo], (err, result) => {
|
3079
3140
|
submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err, result });
|
3080
3141
|
removeHandler('messageForParent');
|
3081
3142
|
});
|
@@ -3089,7 +3150,7 @@ function urlSubmitHelper(apiVersionTag, result, appIds) {
|
|
3089
3150
|
throw errorNotSupportedOnPlatform;
|
3090
3151
|
}
|
3091
3152
|
// Send tasks.completeTask instead of tasks.submitTask message for backward compatibility with Mobile clients
|
3092
|
-
|
3153
|
+
sendMessageToParentWithVersion(apiVersionTag, 'tasks.completeTask', [
|
3093
3154
|
result,
|
3094
3155
|
appIds ? (Array.isArray(appIds) ? appIds : [appIds]) : [],
|
3095
3156
|
]);
|
@@ -3174,69 +3235,94 @@ var dialog;
|
|
3174
3235
|
}
|
3175
3236
|
url.submit = submit;
|
3176
3237
|
/**
|
3177
|
-
*
|
3238
|
+
* Subcapability that allows communication between the dialog and the parent app.
|
3178
3239
|
*
|
3179
3240
|
* @remarks
|
3180
|
-
*
|
3181
|
-
*
|
3182
|
-
* @param message - The message to send to the parent
|
3241
|
+
* Note that dialog can be invoked from parentless scenarios e.g. Search Message Extensions. The subcapability `parentCommunication` is not supported in such scenarios.
|
3183
3242
|
*
|
3184
3243
|
* @beta
|
3185
3244
|
*/
|
3186
|
-
|
3187
|
-
|
3188
|
-
|
3189
|
-
|
3190
|
-
|
3191
|
-
|
3245
|
+
let parentCommunication;
|
3246
|
+
(function (parentCommunication) {
|
3247
|
+
/**
|
3248
|
+
* Send message to the parent from dialog
|
3249
|
+
*
|
3250
|
+
* @remarks
|
3251
|
+
* This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
|
3252
|
+
*
|
3253
|
+
* @param message - The message to send to the parent
|
3254
|
+
*
|
3255
|
+
* @beta
|
3256
|
+
*/
|
3257
|
+
function sendMessageToParentFromDialog(
|
3258
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
3259
|
+
message) {
|
3260
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.task);
|
3261
|
+
if (!isSupported()) {
|
3262
|
+
throw errorNotSupportedOnPlatform;
|
3263
|
+
}
|
3264
|
+
sendMessageToParentWithVersion(getApiVersionTag(dialogTelemetryVersionNumber, ApiName.Dialog_Url_ParentCommunication_SendMessageToParentFromDialog), 'messageForParent', [message]);
|
3192
3265
|
}
|
3193
|
-
|
3194
|
-
|
3195
|
-
|
3196
|
-
|
3197
|
-
|
3198
|
-
|
3199
|
-
|
3200
|
-
|
3201
|
-
|
3202
|
-
|
3203
|
-
|
3204
|
-
|
3205
|
-
|
3206
|
-
|
3207
|
-
|
3208
|
-
|
3266
|
+
parentCommunication.sendMessageToParentFromDialog = sendMessageToParentFromDialog;
|
3267
|
+
/**
|
3268
|
+
* Send message to the dialog from the parent
|
3269
|
+
*
|
3270
|
+
* @param message - The message to send
|
3271
|
+
*
|
3272
|
+
* @beta
|
3273
|
+
*/
|
3274
|
+
function sendMessageToDialog(
|
3275
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
3276
|
+
message) {
|
3277
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
3278
|
+
if (!isSupported()) {
|
3279
|
+
throw errorNotSupportedOnPlatform;
|
3280
|
+
}
|
3281
|
+
sendMessageToParentWithVersion(getApiVersionTag(dialogTelemetryVersionNumber, ApiName.Dialog_Url_ParentCommunication_SendMessageToDialog), 'messageForChild', [message]);
|
3209
3282
|
}
|
3210
|
-
|
3211
|
-
|
3212
|
-
|
3213
|
-
|
3214
|
-
|
3215
|
-
|
3216
|
-
|
3217
|
-
|
3218
|
-
|
3219
|
-
|
3220
|
-
|
3221
|
-
|
3222
|
-
|
3223
|
-
|
3224
|
-
|
3225
|
-
|
3226
|
-
|
3283
|
+
parentCommunication.sendMessageToDialog = sendMessageToDialog;
|
3284
|
+
/**
|
3285
|
+
* Register a listener that will be triggered when a message is received from the app that opened the dialog.
|
3286
|
+
*
|
3287
|
+
* @remarks
|
3288
|
+
* This function is only intended to be called from code running within the dialog. Calling it from outside the dialog will have no effect.
|
3289
|
+
*
|
3290
|
+
* @param listener - The listener that will be triggered.
|
3291
|
+
*
|
3292
|
+
* @beta
|
3293
|
+
*/
|
3294
|
+
function registerOnMessageFromParent(listener) {
|
3295
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.task);
|
3296
|
+
if (!isSupported()) {
|
3297
|
+
throw errorNotSupportedOnPlatform;
|
3298
|
+
}
|
3299
|
+
// We need to remove the original 'messageForChild'
|
3300
|
+
// handler since the original does not allow for post messages.
|
3301
|
+
// It is replaced by the user specified listener that is passed in.
|
3302
|
+
removeHandler('messageForChild');
|
3303
|
+
registerHandler('messageForChild', listener);
|
3304
|
+
storedMessages.reverse();
|
3305
|
+
while (storedMessages.length > 0) {
|
3306
|
+
const message = storedMessages.pop();
|
3307
|
+
listener(message);
|
3308
|
+
}
|
3227
3309
|
}
|
3228
|
-
|
3229
|
-
|
3230
|
-
|
3231
|
-
|
3232
|
-
|
3233
|
-
|
3234
|
-
|
3235
|
-
|
3236
|
-
|
3310
|
+
parentCommunication.registerOnMessageFromParent = registerOnMessageFromParent;
|
3311
|
+
/**
|
3312
|
+
* Checks if dialog.url.parentCommunication capability is supported by the host
|
3313
|
+
*
|
3314
|
+
* @returns boolean to represent whether dialog.url.parentCommunication capability is supported
|
3315
|
+
*
|
3316
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed
|
3317
|
+
*
|
3318
|
+
* @beta
|
3319
|
+
*/
|
3320
|
+
function isSupported() {
|
3321
|
+
var _a, _b;
|
3322
|
+
return internalAPIs_ensureInitialized(runtime_runtime) && !!((_b = (_a = runtime_runtime.supports.dialog) === null || _a === void 0 ? void 0 : _a.url) === null || _b === void 0 ? void 0 : _b.parentCommunication);
|
3237
3323
|
}
|
3238
|
-
|
3239
|
-
url.
|
3324
|
+
parentCommunication.isSupported = isSupported;
|
3325
|
+
})(parentCommunication = url.parentCommunication || (url.parentCommunication = {}));
|
3240
3326
|
/**
|
3241
3327
|
* Checks if dialog.url module is supported by the host
|
3242
3328
|
*
|
@@ -3390,7 +3476,7 @@ var dialog;
|
|
3390
3476
|
throw errorNotSupportedOnPlatform;
|
3391
3477
|
}
|
3392
3478
|
const dialogInfo = getDialogInfoFromAdaptiveCardDialogInfo(adaptiveCardDialogInfo);
|
3393
|
-
|
3479
|
+
sendMessageToParentWithVersion(getApiVersionTag(dialogTelemetryVersionNumber, ApiName.Dialog_AdaptiveCard_Open), 'tasks.startTask', [dialogInfo], (err, result) => {
|
3394
3480
|
submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err, result });
|
3395
3481
|
});
|
3396
3482
|
}
|
@@ -3433,7 +3519,7 @@ var dialog;
|
|
3433
3519
|
throw errorNotSupportedOnPlatform;
|
3434
3520
|
}
|
3435
3521
|
const dialogInfo = getDialogInfoFromBotAdaptiveCardDialogInfo(botAdaptiveCardDialogInfo);
|
3436
|
-
|
3522
|
+
sendMessageToParentWithVersion(getApiVersionTag(dialogTelemetryVersionNumber, ApiName.Dialog_AdaptiveCard_Bot_Open), 'tasks.startTask', [dialogInfo], (err, result) => {
|
3437
3523
|
submitHandler === null || submitHandler === void 0 ? void 0 : submitHandler({ err, result });
|
3438
3524
|
});
|
3439
3525
|
}
|
@@ -3498,6 +3584,11 @@ var dialog;
|
|
3498
3584
|
|
3499
3585
|
|
3500
3586
|
|
3587
|
+
|
3588
|
+
/**
|
3589
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
3590
|
+
*/
|
3591
|
+
const menuTelemetryVersionNumber = ApiVersionNumber.V_2;
|
3501
3592
|
/**
|
3502
3593
|
* Namespace to interact with the menu-specific part of the SDK.
|
3503
3594
|
* This object is used to show View Configuration, Action Menu and Navigation Bar Menu.
|
@@ -3559,9 +3650,9 @@ var menus;
|
|
3559
3650
|
* Limited to Microsoft-internal use.
|
3560
3651
|
*/
|
3561
3652
|
function initialize() {
|
3562
|
-
|
3563
|
-
|
3564
|
-
|
3653
|
+
registerHandlerWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_RegisterNavBarMenuItemPressHandler), 'navBarMenuItemPress', handleNavBarMenuItemPress, false);
|
3654
|
+
registerHandlerWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_RegisterActionMenuItemPressHandler), 'actionMenuItemPress', handleActionMenuItemPress, false);
|
3655
|
+
registerHandlerWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_RegisterSetModuleViewHandler), 'setModuleView', handleViewConfigItemPress, false);
|
3565
3656
|
}
|
3566
3657
|
menus.initialize = initialize;
|
3567
3658
|
/**
|
@@ -3578,13 +3669,13 @@ var menus;
|
|
3578
3669
|
throw errorNotSupportedOnPlatform;
|
3579
3670
|
}
|
3580
3671
|
viewConfigItemPressHandler = handler;
|
3581
|
-
|
3672
|
+
sendMessageToParentWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_SetUpViews), 'setUpViews', [viewConfig]);
|
3582
3673
|
}
|
3583
3674
|
menus.setUpViews = setUpViews;
|
3584
3675
|
function handleViewConfigItemPress(id) {
|
3585
3676
|
if (!viewConfigItemPressHandler || !viewConfigItemPressHandler(id)) {
|
3586
3677
|
internalAPIs_ensureInitialized(runtime_runtime);
|
3587
|
-
|
3678
|
+
sendMessageToParentWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_HandleViewConfigItemPress), 'viewConfigItemPress', [id]);
|
3588
3679
|
}
|
3589
3680
|
}
|
3590
3681
|
/**
|
@@ -3600,13 +3691,13 @@ var menus;
|
|
3600
3691
|
throw errorNotSupportedOnPlatform;
|
3601
3692
|
}
|
3602
3693
|
navBarMenuItemPressHandler = handler;
|
3603
|
-
|
3694
|
+
sendMessageToParentWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_SetNavBarMenu), 'setNavBarMenu', [items]);
|
3604
3695
|
}
|
3605
3696
|
menus.setNavBarMenu = setNavBarMenu;
|
3606
3697
|
function handleNavBarMenuItemPress(id) {
|
3607
3698
|
if (!navBarMenuItemPressHandler || !navBarMenuItemPressHandler(id)) {
|
3608
3699
|
internalAPIs_ensureInitialized(runtime_runtime);
|
3609
|
-
|
3700
|
+
sendMessageToParentWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_HandleNavBarMenuItemPress), 'handleNavBarMenuItemPress', [id]);
|
3610
3701
|
}
|
3611
3702
|
}
|
3612
3703
|
/**
|
@@ -3622,13 +3713,13 @@ var menus;
|
|
3622
3713
|
throw errorNotSupportedOnPlatform;
|
3623
3714
|
}
|
3624
3715
|
actionMenuItemPressHandler = handler;
|
3625
|
-
|
3716
|
+
sendMessageToParentWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_ShowActionMenu), 'showActionMenu', [params]);
|
3626
3717
|
}
|
3627
3718
|
menus.showActionMenu = showActionMenu;
|
3628
3719
|
function handleActionMenuItemPress(id) {
|
3629
3720
|
if (!actionMenuItemPressHandler || !actionMenuItemPressHandler(id)) {
|
3630
3721
|
internalAPIs_ensureInitialized(runtime_runtime);
|
3631
|
-
|
3722
|
+
sendMessageToParentWithVersion(getApiVersionTag(menuTelemetryVersionNumber, ApiName.Menus_HandleActionMenuItemPress), 'handleActionMenuItemPress', [id]);
|
3632
3723
|
}
|
3633
3724
|
}
|
3634
3725
|
/**
|
@@ -3942,7 +4033,7 @@ var app;
|
|
3942
4033
|
*/
|
3943
4034
|
function notifyAppLoaded() {
|
3944
4035
|
ensureInitializeCalled();
|
3945
|
-
|
4036
|
+
sendMessageToParentWithVersion(getApiVersionTag(appTelemetryVersionNumber, ApiName.App_NotifyAppLoaded), app.Messages.AppLoaded, [version]);
|
3946
4037
|
}
|
3947
4038
|
app.notifyAppLoaded = notifyAppLoaded;
|
3948
4039
|
/**
|
@@ -3950,7 +4041,7 @@ var app;
|
|
3950
4041
|
*/
|
3951
4042
|
function notifySuccess() {
|
3952
4043
|
ensureInitializeCalled();
|
3953
|
-
|
4044
|
+
sendMessageToParentWithVersion(getApiVersionTag(appTelemetryVersionNumber, ApiName.App_NotifySuccess), app.Messages.Success, [version]);
|
3954
4045
|
}
|
3955
4046
|
app.notifySuccess = notifySuccess;
|
3956
4047
|
/**
|
@@ -3961,7 +4052,7 @@ var app;
|
|
3961
4052
|
*/
|
3962
4053
|
function notifyFailure(appInitializationFailedRequest) {
|
3963
4054
|
ensureInitializeCalled();
|
3964
|
-
|
4055
|
+
sendMessageToParentWithVersion(getApiVersionTag(appTelemetryVersionNumber, ApiName.App_NotifyFailure), app.Messages.Failure, [appInitializationFailedRequest.reason, appInitializationFailedRequest.message]);
|
3965
4056
|
}
|
3966
4057
|
app.notifyFailure = notifyFailure;
|
3967
4058
|
/**
|
@@ -3971,7 +4062,7 @@ var app;
|
|
3971
4062
|
*/
|
3972
4063
|
function notifyExpectedFailure(expectedFailureRequest) {
|
3973
4064
|
ensureInitializeCalled();
|
3974
|
-
|
4065
|
+
sendMessageToParentWithVersion(getApiVersionTag(appTelemetryVersionNumber, ApiName.App_NotifyExpectedFailure), app.Messages.ExpectedFailure, [expectedFailureRequest.reason, expectedFailureRequest.message]);
|
3975
4066
|
}
|
3976
4067
|
app.notifyExpectedFailure = notifyExpectedFailure;
|
3977
4068
|
/**
|
@@ -4194,7 +4285,7 @@ function returnFocusHelper(apiVersionTag, navigateForward) {
|
|
4194
4285
|
if (!pages.isSupported()) {
|
4195
4286
|
throw errorNotSupportedOnPlatform;
|
4196
4287
|
}
|
4197
|
-
|
4288
|
+
sendMessageToParentWithVersion(apiVersionTag, 'returnFocus', [navigateForward]);
|
4198
4289
|
}
|
4199
4290
|
function getTabInstancesHelper(apiVersionTag, tabInstanceParameters) {
|
4200
4291
|
return new Promise((resolve) => {
|
@@ -4221,7 +4312,7 @@ function shareDeepLinkHelper(apiVersionTag, deepLinkParameters) {
|
|
4221
4312
|
if (!pages.isSupported()) {
|
4222
4313
|
throw errorNotSupportedOnPlatform;
|
4223
4314
|
}
|
4224
|
-
|
4315
|
+
sendMessageToParentWithVersion(apiVersionTag, 'shareDeepLink', [
|
4225
4316
|
deepLinkParameters.subPageId,
|
4226
4317
|
deepLinkParameters.subPageLabel,
|
4227
4318
|
deepLinkParameters.subPageWebUrl,
|
@@ -4232,7 +4323,32 @@ function setCurrentFrameHelper(apiVersionTag, frameInfo) {
|
|
4232
4323
|
if (!pages.isSupported()) {
|
4233
4324
|
throw errorNotSupportedOnPlatform;
|
4234
4325
|
}
|
4235
|
-
|
4326
|
+
sendMessageToParentWithVersion(apiVersionTag, 'setFrameContext', [frameInfo]);
|
4327
|
+
}
|
4328
|
+
function configSetValidityStateHelper(apiVersionTag, validityState) {
|
4329
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.settings, FrameContexts.remove);
|
4330
|
+
if (!pages.config.isSupported()) {
|
4331
|
+
throw errorNotSupportedOnPlatform;
|
4332
|
+
}
|
4333
|
+
sendMessageToParentWithVersion(apiVersionTag, 'settings.setValidityState', [validityState]);
|
4334
|
+
}
|
4335
|
+
function getConfigHelper(apiVersionTag) {
|
4336
|
+
return new Promise((resolve) => {
|
4337
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.settings, FrameContexts.remove, FrameContexts.sidePanel);
|
4338
|
+
if (!pages.isSupported()) {
|
4339
|
+
throw errorNotSupportedOnPlatform;
|
4340
|
+
}
|
4341
|
+
resolve(sendAndUnwrapWithVersion(apiVersionTag, 'settings.getSettings'));
|
4342
|
+
});
|
4343
|
+
}
|
4344
|
+
function configSetConfigHelper(apiVersionTag, instanceConfig) {
|
4345
|
+
return new Promise((resolve) => {
|
4346
|
+
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.settings, FrameContexts.sidePanel);
|
4347
|
+
if (!pages.config.isSupported()) {
|
4348
|
+
throw errorNotSupportedOnPlatform;
|
4349
|
+
}
|
4350
|
+
resolve(sendAndHandleStatusAndReasonWithVersion(apiVersionTag, 'settings.setSettings', instanceConfig));
|
4351
|
+
});
|
4236
4352
|
}
|
4237
4353
|
/**
|
4238
4354
|
* Navigation-specific part of the SDK.
|
@@ -4299,13 +4415,7 @@ var pages;
|
|
4299
4415
|
* @returns Promise that resolves with the {@link InstanceConfig} object.
|
4300
4416
|
*/
|
4301
4417
|
function getConfig() {
|
4302
|
-
return
|
4303
|
-
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.settings, FrameContexts.remove, FrameContexts.sidePanel);
|
4304
|
-
if (!isSupported()) {
|
4305
|
-
throw errorNotSupportedOnPlatform;
|
4306
|
-
}
|
4307
|
-
resolve(sendAndUnwrapWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_GetConfig), 'settings.getSettings'));
|
4308
|
-
});
|
4418
|
+
return getConfigHelper(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_GetConfig));
|
4309
4419
|
}
|
4310
4420
|
pages.getConfig = getConfig;
|
4311
4421
|
/**
|
@@ -4457,11 +4567,7 @@ var pages;
|
|
4457
4567
|
* @param validityState - Indicates whether the save or remove button is enabled for the user.
|
4458
4568
|
*/
|
4459
4569
|
function setValidityState(validityState) {
|
4460
|
-
|
4461
|
-
if (!isSupported()) {
|
4462
|
-
throw errorNotSupportedOnPlatform;
|
4463
|
-
}
|
4464
|
-
communication_sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_Config_SetValidityState), 'settings.setValidityState', [validityState]);
|
4570
|
+
return configSetValidityStateHelper(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_Config_SetValidityState), validityState);
|
4465
4571
|
}
|
4466
4572
|
config.setValidityState = setValidityState;
|
4467
4573
|
/**
|
@@ -4471,13 +4577,7 @@ var pages;
|
|
4471
4577
|
* @returns Promise that resolves when the operation has completed.
|
4472
4578
|
*/
|
4473
4579
|
function setConfig(instanceConfig) {
|
4474
|
-
return
|
4475
|
-
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.settings, FrameContexts.sidePanel);
|
4476
|
-
if (!isSupported()) {
|
4477
|
-
throw errorNotSupportedOnPlatform;
|
4478
|
-
}
|
4479
|
-
resolve(sendAndHandleStatusAndReasonWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_Config_SetConfig), 'settings.setSettings', instanceConfig));
|
4480
|
-
});
|
4580
|
+
return configSetConfigHelper(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_Config_SetConfig), instanceConfig);
|
4481
4581
|
}
|
4482
4582
|
config.setConfig = setConfig;
|
4483
4583
|
/**
|
@@ -4488,7 +4588,7 @@ var pages;
|
|
4488
4588
|
* @param handler - The handler to invoke when the user selects the Save button.
|
4489
4589
|
*/
|
4490
4590
|
function registerOnSaveHandler(handler) {
|
4491
|
-
registerOnSaveHandlerHelper(handler, () => {
|
4591
|
+
registerOnSaveHandlerHelper(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_Config_RegisterOnSaveHandler), handler, () => {
|
4492
4592
|
if (!isNullOrUndefined(handler) && !isSupported()) {
|
4493
4593
|
throw errorNotSupportedOnPlatform;
|
4494
4594
|
}
|
@@ -4502,18 +4602,18 @@ var pages;
|
|
4502
4602
|
* @internal
|
4503
4603
|
* Limited to Microsoft-internal use
|
4504
4604
|
*
|
4605
|
+
* @param apiVersionTag - The API version tag, which is used for telemetry, composed by API version number and source API name.
|
4505
4606
|
* @param handler - The handler to invoke when the user selects the Save button.
|
4506
4607
|
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
4507
4608
|
*/
|
4508
|
-
function registerOnSaveHandlerHelper(handler, versionSpecificHelper) {
|
4609
|
+
function registerOnSaveHandlerHelper(apiVersionTag, handler, versionSpecificHelper) {
|
4509
4610
|
// allow for registration cleanup even when not finished initializing
|
4510
4611
|
!isNullOrUndefined(handler) && internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.settings);
|
4511
4612
|
if (versionSpecificHelper) {
|
4512
4613
|
versionSpecificHelper();
|
4513
4614
|
}
|
4514
4615
|
saveHandler = handler;
|
4515
|
-
!isNullOrUndefined(handler) &&
|
4516
|
-
communication_sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_Config_RegisterOnSaveHandlerHelper), 'registerHandler', ['save']);
|
4616
|
+
!isNullOrUndefined(handler) && sendMessageToParentWithVersion(apiVersionTag, 'registerHandler', ['save']);
|
4517
4617
|
}
|
4518
4618
|
config.registerOnSaveHandlerHelper = registerOnSaveHandlerHelper;
|
4519
4619
|
/**
|
@@ -4524,7 +4624,7 @@ var pages;
|
|
4524
4624
|
* @param handler - The handler to invoke when the user selects the Remove button.
|
4525
4625
|
*/
|
4526
4626
|
function registerOnRemoveHandler(handler) {
|
4527
|
-
registerOnRemoveHandlerHelper(handler, () => {
|
4627
|
+
registerOnRemoveHandlerHelper(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_Config_RegisterOnRemoveHandler), handler, () => {
|
4528
4628
|
if (!isNullOrUndefined(handler) && !isSupported()) {
|
4529
4629
|
throw errorNotSupportedOnPlatform;
|
4530
4630
|
}
|
@@ -4538,18 +4638,18 @@ var pages;
|
|
4538
4638
|
* @internal
|
4539
4639
|
* Limited to Microsoft-internal use
|
4540
4640
|
*
|
4641
|
+
* @param apiVersionTag - The API version tag, which is used for telemetry, composed by API version number and source API name.
|
4541
4642
|
* @param handler - The handler to invoke when the user selects the Remove button.
|
4542
4643
|
* @param versionSpecificHelper - The helper function containing logic pertaining to a specific version of the API.
|
4543
4644
|
*/
|
4544
|
-
function registerOnRemoveHandlerHelper(handler, versionSpecificHelper) {
|
4645
|
+
function registerOnRemoveHandlerHelper(apiVersionTag, handler, versionSpecificHelper) {
|
4545
4646
|
// allow for registration cleanup even when not finished initializing
|
4546
4647
|
!isNullOrUndefined(handler) && internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.remove, FrameContexts.settings);
|
4547
4648
|
if (versionSpecificHelper) {
|
4548
4649
|
versionSpecificHelper();
|
4549
4650
|
}
|
4550
4651
|
removeHandler = handler;
|
4551
|
-
!isNullOrUndefined(handler) &&
|
4552
|
-
communication_sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_Config_RegisterOnRemoveHandlerHelper), 'registerHandler', ['remove']);
|
4652
|
+
!isNullOrUndefined(handler) && sendMessageToParentWithVersion(apiVersionTag, 'registerHandler', ['remove']);
|
4553
4653
|
}
|
4554
4654
|
config.registerOnRemoveHandlerHelper = registerOnRemoveHandlerHelper;
|
4555
4655
|
function handleSave(result) {
|
@@ -4588,12 +4688,12 @@ var pages;
|
|
4588
4688
|
}
|
4589
4689
|
notifySuccess() {
|
4590
4690
|
this.ensureNotNotified();
|
4591
|
-
|
4691
|
+
sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_SaveEvent_NotifySuccess), 'settings.save.success');
|
4592
4692
|
this.notified = true;
|
4593
4693
|
}
|
4594
4694
|
notifyFailure(reason) {
|
4595
4695
|
this.ensureNotNotified();
|
4596
|
-
|
4696
|
+
sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_SaveEvent_NotifyFailure), 'settings.save.failure', [reason]);
|
4597
4697
|
this.notified = true;
|
4598
4698
|
}
|
4599
4699
|
ensureNotNotified() {
|
@@ -4625,12 +4725,12 @@ var pages;
|
|
4625
4725
|
}
|
4626
4726
|
notifySuccess() {
|
4627
4727
|
this.ensureNotNotified();
|
4628
|
-
|
4728
|
+
sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_RemoveEvent_NotifySuccess), 'settings.remove.success');
|
4629
4729
|
this.notified = true;
|
4630
4730
|
}
|
4631
4731
|
notifyFailure(reason) {
|
4632
4732
|
this.ensureNotNotified();
|
4633
|
-
|
4733
|
+
sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_RemoveEvent_NotifyFailure), 'settings.remove.failure', [reason]);
|
4634
4734
|
this.notified = true;
|
4635
4735
|
}
|
4636
4736
|
ensureNotNotified() {
|
@@ -4711,7 +4811,7 @@ var pages;
|
|
4711
4811
|
versionSpecificHelper();
|
4712
4812
|
}
|
4713
4813
|
backButtonPressHandler = handler;
|
4714
|
-
!isNullOrUndefined(handler) &&
|
4814
|
+
!isNullOrUndefined(handler) && sendMessageToParentWithVersion(apiVersionTag, 'registerHandler', ['backButton']);
|
4715
4815
|
}
|
4716
4816
|
backStack.registerBackButtonHandlerHelper = registerBackButtonHandlerHelper;
|
4717
4817
|
function handleBackButtonPress() {
|
@@ -4745,6 +4845,8 @@ var pages;
|
|
4745
4845
|
* Hide from docs
|
4746
4846
|
* ------
|
4747
4847
|
* Provides APIs to interact with the full-trust part of the SDK. Limited to 1P applications
|
4848
|
+
* @internal
|
4849
|
+
* Limited to Microsoft-internal use
|
4748
4850
|
*/
|
4749
4851
|
let fullTrust;
|
4750
4852
|
(function (fullTrust) {
|
@@ -4753,13 +4855,14 @@ var pages;
|
|
4753
4855
|
* Hide from docs
|
4754
4856
|
* ------
|
4755
4857
|
* Place the tab into full-screen mode.
|
4858
|
+
*
|
4756
4859
|
*/
|
4757
4860
|
function enterFullscreen() {
|
4758
4861
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
4759
4862
|
if (!isSupported()) {
|
4760
4863
|
throw errorNotSupportedOnPlatform;
|
4761
4864
|
}
|
4762
|
-
|
4865
|
+
sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_FullTrust_EnterFullscreen), 'enterFullscreen', []);
|
4763
4866
|
}
|
4764
4867
|
fullTrust.enterFullscreen = enterFullscreen;
|
4765
4868
|
/**
|
@@ -4773,7 +4876,7 @@ var pages;
|
|
4773
4876
|
if (!isSupported()) {
|
4774
4877
|
throw errorNotSupportedOnPlatform;
|
4775
4878
|
}
|
4776
|
-
|
4879
|
+
sendMessageToParentWithVersion(getApiVersionTag(pagesTelemetryVersionNumber, ApiName.Pages_FullTrust_ExitFullscreen), 'exitFullscreen', []);
|
4777
4880
|
}
|
4778
4881
|
fullTrust.exitFullscreen = exitFullscreen;
|
4779
4882
|
/**
|
@@ -5020,7 +5123,7 @@ function registerHandler(name, handler, sendMessage = true, args = []) {
|
|
5020
5123
|
if (handler) {
|
5021
5124
|
HandlersPrivate.handlers[name] = handler;
|
5022
5125
|
sendMessage &&
|
5023
|
-
|
5126
|
+
sendMessageToParentWithVersion(getApiVersionTag(ApiVersionNumber.V_0, ApiName.RegisterHandler), 'registerHandler', [name, ...args]);
|
5024
5127
|
}
|
5025
5128
|
else {
|
5026
5129
|
delete HandlersPrivate.handlers[name];
|
@@ -5087,7 +5190,7 @@ function registerHandlerHelper(name, handler, contexts, registrationHelper) {
|
|
5087
5190
|
*/
|
5088
5191
|
function registerOnThemeChangeHandler(apiVersionTag, handler) {
|
5089
5192
|
HandlersPrivate.themeChangeHandler = handler;
|
5090
|
-
!isNullOrUndefined(handler) &&
|
5193
|
+
!isNullOrUndefined(handler) && sendMessageToParentWithVersion(apiVersionTag, 'registerHandler', ['themeChange']);
|
5091
5194
|
}
|
5092
5195
|
/**
|
5093
5196
|
* @internal
|
@@ -5110,7 +5213,7 @@ function handleThemeChange(theme) {
|
|
5110
5213
|
function handlers_registerOnLoadHandler(handler) {
|
5111
5214
|
HandlersPrivate.loadHandler = handler;
|
5112
5215
|
!isNullOrUndefined(handler) &&
|
5113
|
-
|
5216
|
+
sendMessageToParentWithVersion(getApiVersionTag(ApiVersionNumber.V_2, ApiName.RegisterHandler), 'registerHandler', [
|
5114
5217
|
'load',
|
5115
5218
|
]);
|
5116
5219
|
}
|
@@ -5138,7 +5241,7 @@ function handleLoad(context) {
|
|
5138
5241
|
function handlers_registerBeforeUnloadHandler(handler) {
|
5139
5242
|
HandlersPrivate.beforeUnloadHandler = handler;
|
5140
5243
|
!isNullOrUndefined(handler) &&
|
5141
|
-
|
5244
|
+
sendMessageToParentWithVersion(getApiVersionTag(ApiVersionNumber.V_2, ApiName.RegisterHandler), 'registerHandler', [
|
5142
5245
|
'beforeUnload',
|
5143
5246
|
]);
|
5144
5247
|
}
|
@@ -5185,6 +5288,125 @@ function handlers_registerOnResumeHandler(handler) {
|
|
5185
5288
|
!isNullOrUndefined(handler) && sendMessageToParent('registerHandler', ['load']);
|
5186
5289
|
}
|
5187
5290
|
|
5291
|
+
;// CONCATENATED MODULE: ./src/internal/nestedAppAuth.ts
|
5292
|
+
|
5293
|
+
|
5294
|
+
const nestedAppAuthLogger = getLogger('nestedAppAuth');
|
5295
|
+
const tryPolyfillWithNestedAppAuthBridgeLogger = nestedAppAuthLogger.extend('tryPolyfillWithNestedAppAuthBridge');
|
5296
|
+
/**
|
5297
|
+
* @hidden
|
5298
|
+
* Enumeration for nested app authentication message event names.
|
5299
|
+
*
|
5300
|
+
* @internal
|
5301
|
+
* Limited to Microsoft-internal use
|
5302
|
+
*
|
5303
|
+
* @enum {string}
|
5304
|
+
*
|
5305
|
+
* @property {string} Request - Event name for a nested app authentication request.
|
5306
|
+
* @property {string} Response - Event name for a nested app authentication response.
|
5307
|
+
*/
|
5308
|
+
var NestedAppAuthMessageEventNames;
|
5309
|
+
(function (NestedAppAuthMessageEventNames) {
|
5310
|
+
NestedAppAuthMessageEventNames["Request"] = "NestedAppAuthRequest";
|
5311
|
+
NestedAppAuthMessageEventNames["Response"] = "NestedAppAuthResponse";
|
5312
|
+
})(NestedAppAuthMessageEventNames || (NestedAppAuthMessageEventNames = {}));
|
5313
|
+
/**
|
5314
|
+
* @hidden
|
5315
|
+
* Attempt to polyfill the nestedAppAuthBridge object on the given window
|
5316
|
+
*
|
5317
|
+
* @internal
|
5318
|
+
* Limited to Microsoft-internal use
|
5319
|
+
*/
|
5320
|
+
function tryPolyfillWithNestedAppAuthBridge(clientSupportedSDKVersion, window, handlers) {
|
5321
|
+
var _a;
|
5322
|
+
const logger = tryPolyfillWithNestedAppAuthBridgeLogger;
|
5323
|
+
if (GlobalVars.isFramelessWindow) {
|
5324
|
+
logger('Cannot polyfill nestedAppAuthBridge as current window is frameless');
|
5325
|
+
return;
|
5326
|
+
}
|
5327
|
+
if (!window) {
|
5328
|
+
logger('Cannot polyfill nestedAppAuthBridge as current window does not exist');
|
5329
|
+
return;
|
5330
|
+
}
|
5331
|
+
const parsedClientSupportedSDKVersion = (() => {
|
5332
|
+
try {
|
5333
|
+
return JSON.parse(clientSupportedSDKVersion);
|
5334
|
+
}
|
5335
|
+
catch (e) {
|
5336
|
+
return null;
|
5337
|
+
}
|
5338
|
+
})();
|
5339
|
+
if (!parsedClientSupportedSDKVersion || !((_a = parsedClientSupportedSDKVersion.supports) === null || _a === void 0 ? void 0 : _a.nestedAppAuth)) {
|
5340
|
+
logger('Cannot polyfill nestedAppAuthBridge as current hub does not support nested app auth');
|
5341
|
+
return;
|
5342
|
+
}
|
5343
|
+
const extendedWindow = window;
|
5344
|
+
if (extendedWindow.nestedAppAuthBridge) {
|
5345
|
+
logger('nestedAppAuthBridge already exists on current window, skipping polyfill');
|
5346
|
+
return;
|
5347
|
+
}
|
5348
|
+
const nestedAppAuthBridge = createNestedAppAuthBridge(extendedWindow, handlers);
|
5349
|
+
if (nestedAppAuthBridge) {
|
5350
|
+
extendedWindow.nestedAppAuthBridge = nestedAppAuthBridge;
|
5351
|
+
}
|
5352
|
+
}
|
5353
|
+
const createNestedAppAuthBridgeLogger = nestedAppAuthLogger.extend('createNestedAppAuthBridge');
|
5354
|
+
/**
|
5355
|
+
* @hidden
|
5356
|
+
* Creates a bridge for nested app authentication.
|
5357
|
+
*
|
5358
|
+
* @internal
|
5359
|
+
* Limited to Microsoft-internal use
|
5360
|
+
*
|
5361
|
+
* @param {Window | null} window - The window object where the nested app authentication bridge will be created. If null, the function will log an error message and return null.
|
5362
|
+
* @returns {NestedAppAuthBridge | null} Returns an object with methods for adding and removing event listeners, and posting messages. If the provided window is null, returns null.
|
5363
|
+
*
|
5364
|
+
* @property {Function} addEventListener - Adds an event listener to the window. Only supports the 'message' event. If an unsupported event is passed, logs an error message.
|
5365
|
+
* @property {Function} postMessage - Posts a message to the window. The message should be a stringified JSON object with a messageType of 'NestedAppAuthRequest'. If the message does not meet these criteria, logs an error message.
|
5366
|
+
* @property {Function} removeEventListener - Removes an event listener from the window.
|
5367
|
+
*/
|
5368
|
+
function createNestedAppAuthBridge(window, bridgeHandlers) {
|
5369
|
+
const logger = createNestedAppAuthBridgeLogger;
|
5370
|
+
if (!window) {
|
5371
|
+
logger('nestedAppAuthBridge cannot be created as current window does not exist');
|
5372
|
+
return null;
|
5373
|
+
}
|
5374
|
+
const { onMessage, sendPostMessage } = bridgeHandlers;
|
5375
|
+
const nestedAppAuthBridgeHandler = (callback) => (evt) => onMessage(evt, callback);
|
5376
|
+
return {
|
5377
|
+
addEventListener: (eventName, callback) => {
|
5378
|
+
if (eventName === 'message') {
|
5379
|
+
window.addEventListener(eventName, nestedAppAuthBridgeHandler(callback));
|
5380
|
+
}
|
5381
|
+
else {
|
5382
|
+
logger(`Event ${eventName} is not supported by nestedAppAuthBridge`);
|
5383
|
+
}
|
5384
|
+
},
|
5385
|
+
postMessage: (message) => {
|
5386
|
+
// Validate that it is a valid auth bridge request message
|
5387
|
+
const parsedMessage = (() => {
|
5388
|
+
try {
|
5389
|
+
return JSON.parse(message);
|
5390
|
+
}
|
5391
|
+
catch (e) {
|
5392
|
+
return null;
|
5393
|
+
}
|
5394
|
+
})();
|
5395
|
+
if (!parsedMessage ||
|
5396
|
+
typeof parsedMessage !== 'object' ||
|
5397
|
+
parsedMessage.messageType !== NestedAppAuthMessageEventNames.Request) {
|
5398
|
+
logger('Unrecognized data format received by app, message being ignored. Message: %o', message);
|
5399
|
+
return;
|
5400
|
+
}
|
5401
|
+
// Post the message to the top window
|
5402
|
+
sendPostMessage(message);
|
5403
|
+
},
|
5404
|
+
removeEventListener: (eventName, callback) => {
|
5405
|
+
window.removeEventListener(eventName, nestedAppAuthBridgeHandler(callback));
|
5406
|
+
},
|
5407
|
+
};
|
5408
|
+
}
|
5409
|
+
|
5188
5410
|
;// CONCATENATED MODULE: ./src/internal/communication.ts
|
5189
5411
|
/* eslint-disable @typescript-eslint/ban-types */
|
5190
5412
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
@@ -5206,6 +5428,7 @@ var communication_awaiter = (undefined && undefined.__awaiter) || function (this
|
|
5206
5428
|
|
5207
5429
|
|
5208
5430
|
|
5431
|
+
|
5209
5432
|
const communicationLogger = getLogger('communication');
|
5210
5433
|
/**
|
5211
5434
|
* @internal
|
@@ -5221,6 +5444,7 @@ class CommunicationPrivate {
|
|
5221
5444
|
}
|
5222
5445
|
CommunicationPrivate.parentMessageQueue = [];
|
5223
5446
|
CommunicationPrivate.childMessageQueue = [];
|
5447
|
+
CommunicationPrivate.topMessageQueue = [];
|
5224
5448
|
CommunicationPrivate.nextMessageId = 0;
|
5225
5449
|
CommunicationPrivate.callbacks = {};
|
5226
5450
|
CommunicationPrivate.promiseCallbacks = {};
|
@@ -5238,6 +5462,7 @@ function initializeCommunication(validMessageOrigins, apiVersionTag) {
|
|
5238
5462
|
Communication.currentWindow.parent !== Communication.currentWindow.self
|
5239
5463
|
? Communication.currentWindow.parent
|
5240
5464
|
: Communication.currentWindow.opener;
|
5465
|
+
Communication.topWindow = Communication.currentWindow.top;
|
5241
5466
|
// Listen to messages from the parent or child frame.
|
5242
5467
|
// Frameless windows will only receive this event from child frames and if validMessageOrigins is passed.
|
5243
5468
|
if (Communication.parentWindow || validMessageOrigins) {
|
@@ -5262,6 +5487,10 @@ function initializeCommunication(validMessageOrigins, apiVersionTag) {
|
|
5262
5487
|
version,
|
5263
5488
|
latestRuntimeApiVersion,
|
5264
5489
|
]).then(([context, clientType, runtimeConfig, clientSupportedSDKVersion]) => {
|
5490
|
+
tryPolyfillWithNestedAppAuthBridge(clientSupportedSDKVersion, Communication.currentWindow, {
|
5491
|
+
onMessage: processAuthBridgeMessage,
|
5492
|
+
sendPostMessage: sendNestedAuthRequestToTopWindow,
|
5493
|
+
});
|
5265
5494
|
return { context, clientType, runtimeConfig, clientSupportedSDKVersion };
|
5266
5495
|
});
|
5267
5496
|
}
|
@@ -5437,7 +5666,7 @@ function waitForResponse(requestId) {
|
|
5437
5666
|
* for telemetry work. The code inside of this function will be used to replace sendMessageToParent function
|
5438
5667
|
* and this function will be removed when the project is completed.
|
5439
5668
|
*/
|
5440
|
-
function
|
5669
|
+
function sendMessageToParentWithVersion(apiVersionTag, actionName, argsOrCallback, callback) {
|
5441
5670
|
let args;
|
5442
5671
|
if (argsOrCallback instanceof Function) {
|
5443
5672
|
callback = argsOrCallback;
|
@@ -5477,19 +5706,29 @@ function sendMessageToParent(actionName, argsOrCallback, callback) {
|
|
5477
5706
|
CommunicationPrivate.callbacks[request.id] = callback;
|
5478
5707
|
}
|
5479
5708
|
}
|
5480
|
-
const
|
5709
|
+
const sendNestedAuthRequestToTopWindowLogger = communicationLogger.extend('sendNestedAuthRequestToTopWindow');
|
5481
5710
|
/**
|
5482
5711
|
* @internal
|
5483
5712
|
* Limited to Microsoft-internal use
|
5484
5713
|
*/
|
5485
|
-
function
|
5486
|
-
const logger =
|
5487
|
-
const targetWindow = Communication.
|
5488
|
-
const request =
|
5489
|
-
logger('Message %i information: %o', request.id, { actionName
|
5714
|
+
function sendNestedAuthRequestToTopWindow(message) {
|
5715
|
+
const logger = sendNestedAuthRequestToTopWindowLogger;
|
5716
|
+
const targetWindow = Communication.topWindow;
|
5717
|
+
const request = createNestedAppAuthRequest(message);
|
5718
|
+
logger('Message %i information: %o', request.id, { actionName: request.func });
|
5719
|
+
return sendRequestToTargetWindowHelper(targetWindow, request);
|
5720
|
+
}
|
5721
|
+
const sendRequestToTargetWindowHelperLogger = communicationLogger.extend('sendRequestToTargetWindowHelper');
|
5722
|
+
/**
|
5723
|
+
* @internal
|
5724
|
+
* Limited to Microsoft-internal use
|
5725
|
+
*/
|
5726
|
+
function sendRequestToTargetWindowHelper(targetWindow, request) {
|
5727
|
+
const logger = sendRequestToTargetWindowHelperLogger;
|
5728
|
+
const targetWindowName = getTargetName(targetWindow);
|
5490
5729
|
if (GlobalVars.isFramelessWindow) {
|
5491
5730
|
if (Communication.currentWindow && Communication.currentWindow.nativeInterface) {
|
5492
|
-
logger(
|
5731
|
+
logger(`Sending message %i to ${targetWindowName} via framelessPostMessage interface`, request.id);
|
5493
5732
|
Communication.currentWindow.nativeInterface.framelessPostMessage(JSON.stringify(request));
|
5494
5733
|
}
|
5495
5734
|
}
|
@@ -5498,16 +5737,29 @@ function sendMessageToParentHelper(apiVersionTag, actionName, args) {
|
|
5498
5737
|
// If the target window isn't closed and we already know its origin, send the message right away; otherwise,
|
5499
5738
|
// queue the message and send it after the origin is established
|
5500
5739
|
if (targetWindow && targetOrigin) {
|
5501
|
-
logger(
|
5740
|
+
logger(`Sending message %i to ${targetWindowName} via postMessage`, request.id);
|
5502
5741
|
targetWindow.postMessage(request, targetOrigin);
|
5503
5742
|
}
|
5504
5743
|
else {
|
5505
|
-
logger(
|
5744
|
+
logger(`Adding message %i to ${targetWindowName} message queue`, request.id);
|
5506
5745
|
getTargetMessageQueue(targetWindow).push(request);
|
5507
5746
|
}
|
5508
5747
|
}
|
5509
5748
|
return request;
|
5510
5749
|
}
|
5750
|
+
const sendMessageToParentHelperLogger = communicationLogger.extend('sendMessageToParentHelper');
|
5751
|
+
/**
|
5752
|
+
* @internal
|
5753
|
+
* Limited to Microsoft-internal use
|
5754
|
+
*/
|
5755
|
+
function sendMessageToParentHelper(apiVersionTag, actionName, args) {
|
5756
|
+
const logger = sendMessageToParentHelperLogger;
|
5757
|
+
const targetWindow = Communication.parentWindow;
|
5758
|
+
const request = createMessageRequest(apiVersionTag, actionName, args);
|
5759
|
+
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
5760
|
+
logger('Message %i information: %o', request.id, { actionName, args });
|
5761
|
+
return sendRequestToTargetWindowHelper(targetWindow, request);
|
5762
|
+
}
|
5511
5763
|
const processMessageLogger = communicationLogger.extend('processMessage');
|
5512
5764
|
/**
|
5513
5765
|
* @internal
|
@@ -5542,6 +5794,69 @@ function processMessage(evt) {
|
|
5542
5794
|
});
|
5543
5795
|
});
|
5544
5796
|
}
|
5797
|
+
const processAuthBridgeMessageLogger = communicationLogger.extend('processAuthBridgeMessage');
|
5798
|
+
/**
|
5799
|
+
* @internal
|
5800
|
+
* Limited to Microsoft-internal use
|
5801
|
+
*/
|
5802
|
+
function processAuthBridgeMessage(evt, onMessageReceived) {
|
5803
|
+
var _a, _b;
|
5804
|
+
const logger = processAuthBridgeMessageLogger;
|
5805
|
+
// Process only if we received a valid message
|
5806
|
+
if (!evt || !evt.data || typeof evt.data !== 'object') {
|
5807
|
+
logger('Unrecognized message format received by app, message being ignored. Message: %o', evt);
|
5808
|
+
return;
|
5809
|
+
}
|
5810
|
+
const { args } = evt.data;
|
5811
|
+
const [, message] = args !== null && args !== void 0 ? args : [];
|
5812
|
+
const parsedData = (() => {
|
5813
|
+
try {
|
5814
|
+
return JSON.parse(message);
|
5815
|
+
}
|
5816
|
+
catch (e) {
|
5817
|
+
return null;
|
5818
|
+
}
|
5819
|
+
})();
|
5820
|
+
// Validate that it is a valid auth bridge response message
|
5821
|
+
if (!parsedData ||
|
5822
|
+
typeof parsedData !== 'object' ||
|
5823
|
+
parsedData.messageType !== NestedAppAuthMessageEventNames.Response) {
|
5824
|
+
logger('Unrecognized data format received by app, message being ignored. Message: %o', evt);
|
5825
|
+
return;
|
5826
|
+
}
|
5827
|
+
// Process only if the message is coming from a different window and a valid origin
|
5828
|
+
// valid origins are either a pre-known origin or one specified by the app developer
|
5829
|
+
// in their call to app.initialize
|
5830
|
+
const messageSource = evt.source || ((_a = evt === null || evt === void 0 ? void 0 : evt.originalEvent) === null || _a === void 0 ? void 0 : _a.source);
|
5831
|
+
const messageOrigin = evt.origin || ((_b = evt === null || evt === void 0 ? void 0 : evt.originalEvent) === null || _b === void 0 ? void 0 : _b.origin);
|
5832
|
+
if (!messageSource) {
|
5833
|
+
logger('Message being ignored by app because it is coming for a target that is null');
|
5834
|
+
return;
|
5835
|
+
}
|
5836
|
+
if (!shouldProcessMessage(messageSource, messageOrigin)) {
|
5837
|
+
logger('Message being ignored by app because it is either coming from the current window or a different window with an invalid origin');
|
5838
|
+
return;
|
5839
|
+
}
|
5840
|
+
/**
|
5841
|
+
* In most cases, top level window and the parent window will be same.
|
5842
|
+
* If they're not, perform the necessary updates for the top level window.
|
5843
|
+
*
|
5844
|
+
* Top window logic to flush messages is kept independent so that we don't affect
|
5845
|
+
* any of the code for the existing communication channel.
|
5846
|
+
*/
|
5847
|
+
if (!Communication.topWindow || Communication.topWindow.closed || messageSource === Communication.topWindow) {
|
5848
|
+
Communication.topWindow = messageSource;
|
5849
|
+
Communication.topOrigin = messageOrigin;
|
5850
|
+
}
|
5851
|
+
// Clean up pointers to closed parent and child windows
|
5852
|
+
if (Communication.topWindow && Communication.topWindow.closed) {
|
5853
|
+
Communication.topWindow = null;
|
5854
|
+
Communication.topOrigin = null;
|
5855
|
+
}
|
5856
|
+
flushMessageQueue(Communication.topWindow);
|
5857
|
+
// Return the response to the registered callback
|
5858
|
+
onMessageReceived(message);
|
5859
|
+
}
|
5545
5860
|
const shouldProcessMessageLogger = communicationLogger.extend('shouldProcessMessage');
|
5546
5861
|
/**
|
5547
5862
|
* @hidden
|
@@ -5680,27 +5995,70 @@ function handleChildMessage(evt) {
|
|
5680
5995
|
}
|
5681
5996
|
}
|
5682
5997
|
}
|
5998
|
+
/**
|
5999
|
+
* @internal
|
6000
|
+
* Limited to Microsoft-internal use
|
6001
|
+
*
|
6002
|
+
* Checks if the top window and the parent window are different.
|
6003
|
+
*
|
6004
|
+
* @returns {boolean} Returns true if the top window and the parent window are different, false otherwise.
|
6005
|
+
*/
|
6006
|
+
function areTopAndParentWindowsDistinct() {
|
6007
|
+
return Communication.topWindow !== Communication.parentWindow;
|
6008
|
+
}
|
5683
6009
|
/**
|
5684
6010
|
* @internal
|
5685
6011
|
* Limited to Microsoft-internal use
|
5686
6012
|
*/
|
5687
6013
|
function getTargetMessageQueue(targetWindow) {
|
5688
|
-
|
5689
|
-
|
5690
|
-
|
5691
|
-
|
5692
|
-
|
6014
|
+
if (targetWindow === Communication.topWindow && areTopAndParentWindowsDistinct()) {
|
6015
|
+
return CommunicationPrivate.topMessageQueue;
|
6016
|
+
}
|
6017
|
+
else if (targetWindow === Communication.parentWindow) {
|
6018
|
+
return CommunicationPrivate.parentMessageQueue;
|
6019
|
+
}
|
6020
|
+
else if (targetWindow === Communication.childWindow) {
|
6021
|
+
return CommunicationPrivate.childMessageQueue;
|
6022
|
+
}
|
6023
|
+
else {
|
6024
|
+
return [];
|
6025
|
+
}
|
5693
6026
|
}
|
5694
6027
|
/**
|
5695
6028
|
* @internal
|
5696
6029
|
* Limited to Microsoft-internal use
|
5697
6030
|
*/
|
5698
6031
|
function getTargetOrigin(targetWindow) {
|
5699
|
-
|
5700
|
-
|
5701
|
-
|
5702
|
-
|
5703
|
-
|
6032
|
+
if (targetWindow === Communication.topWindow && areTopAndParentWindowsDistinct()) {
|
6033
|
+
return Communication.topOrigin;
|
6034
|
+
}
|
6035
|
+
else if (targetWindow === Communication.parentWindow) {
|
6036
|
+
return Communication.parentOrigin;
|
6037
|
+
}
|
6038
|
+
else if (targetWindow === Communication.childWindow) {
|
6039
|
+
return Communication.childOrigin;
|
6040
|
+
}
|
6041
|
+
else {
|
6042
|
+
return null;
|
6043
|
+
}
|
6044
|
+
}
|
6045
|
+
/**
|
6046
|
+
* @internal
|
6047
|
+
* Limited to Microsoft-internal use
|
6048
|
+
*/
|
6049
|
+
function getTargetName(targetWindow) {
|
6050
|
+
if (targetWindow === Communication.topWindow && areTopAndParentWindowsDistinct()) {
|
6051
|
+
return 'top';
|
6052
|
+
}
|
6053
|
+
else if (targetWindow === Communication.parentWindow) {
|
6054
|
+
return 'parent';
|
6055
|
+
}
|
6056
|
+
else if (targetWindow === Communication.childWindow) {
|
6057
|
+
return 'child';
|
6058
|
+
}
|
6059
|
+
else {
|
6060
|
+
return null;
|
6061
|
+
}
|
5704
6062
|
}
|
5705
6063
|
const flushMessageQueueLogger = communicationLogger.extend('flushMessageQueue');
|
5706
6064
|
/**
|
@@ -5710,7 +6068,7 @@ const flushMessageQueueLogger = communicationLogger.extend('flushMessageQueue');
|
|
5710
6068
|
function flushMessageQueue(targetWindow) {
|
5711
6069
|
const targetOrigin = getTargetOrigin(targetWindow);
|
5712
6070
|
const targetMessageQueue = getTargetMessageQueue(targetWindow);
|
5713
|
-
const target = targetWindow
|
6071
|
+
const target = getTargetName(targetWindow);
|
5714
6072
|
while (targetWindow && targetOrigin && targetMessageQueue.length > 0) {
|
5715
6073
|
const request = targetMessageQueue.shift();
|
5716
6074
|
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
@@ -5784,6 +6142,28 @@ function createMessageRequest(apiVersionTag, func, args) {
|
|
5784
6142
|
apiversiontag: apiVersionTag,
|
5785
6143
|
};
|
5786
6144
|
}
|
6145
|
+
/**
|
6146
|
+
* @internal
|
6147
|
+
* Limited to Microsoft-internal use
|
6148
|
+
*
|
6149
|
+
* Creates a nested app authentication request.
|
6150
|
+
*
|
6151
|
+
* @param {string} message - The message to be included in the request. This is typically a stringified JSON object containing the details of the authentication request.
|
6152
|
+
* The reason for using a string is to allow complex data structures to be sent as a message while avoiding potential issues with object serialization and deserialization.
|
6153
|
+
*
|
6154
|
+
* @returns {NestedAppAuthRequest} Returns a NestedAppAuthRequest object with a unique id, the function name set to 'nestedAppAuthRequest', the current timestamp, an empty args array, and the provided message as data.
|
6155
|
+
*/
|
6156
|
+
function createNestedAppAuthRequest(message) {
|
6157
|
+
return {
|
6158
|
+
id: CommunicationPrivate.nextMessageId++,
|
6159
|
+
func: 'nestedAppAuth.execute',
|
6160
|
+
timestamp: Date.now(),
|
6161
|
+
// Since this is a nested app auth request, we don't need to send any args.
|
6162
|
+
// We avoid overloading the args array with the message to avoid potential issues processing of these messages on the hubSDK.
|
6163
|
+
args: [],
|
6164
|
+
data: message,
|
6165
|
+
};
|
6166
|
+
}
|
5787
6167
|
/**
|
5788
6168
|
* @internal
|
5789
6169
|
* Limited to Microsoft-internal use
|
@@ -5816,6 +6196,7 @@ function createMessageEvent(func, args) {
|
|
5816
6196
|
|
5817
6197
|
|
5818
6198
|
|
6199
|
+
|
5819
6200
|
/**
|
5820
6201
|
* @hidden
|
5821
6202
|
* Namespace to interact with the logging part of the SDK.
|
@@ -5823,7 +6204,10 @@ function createMessageEvent(func, args) {
|
|
5823
6204
|
*
|
5824
6205
|
* @internal
|
5825
6206
|
* Limited to Microsoft-internal use
|
6207
|
+
*
|
6208
|
+
* v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
|
5826
6209
|
*/
|
6210
|
+
const logsTelemetryVersionNumber = ApiVersionNumber.V_1;
|
5827
6211
|
var logs;
|
5828
6212
|
(function (logs) {
|
5829
6213
|
/**
|
@@ -5843,9 +6227,9 @@ var logs;
|
|
5843
6227
|
throw errorNotSupportedOnPlatform;
|
5844
6228
|
}
|
5845
6229
|
if (handler) {
|
5846
|
-
|
6230
|
+
registerHandlerWithVersion(getApiVersionTag(logsTelemetryVersionNumber, ApiName.Logs_RegisterLogRequestHandler), 'log.request', () => {
|
5847
6231
|
const log = handler();
|
5848
|
-
|
6232
|
+
sendMessageToParentWithVersion(getApiVersionTag(logsTelemetryVersionNumber, ApiName.Logs_Receive), 'log.receive', [log]);
|
5849
6233
|
});
|
5850
6234
|
}
|
5851
6235
|
else {
|
@@ -6042,6 +6426,16 @@ function openFilePreview(filePreviewParameters) {
|
|
6042
6426
|
|
6043
6427
|
|
6044
6428
|
|
6429
|
+
|
6430
|
+
/**
|
6431
|
+
* @hidden
|
6432
|
+
*
|
6433
|
+
* @internal
|
6434
|
+
* Limited to Microsoft-internal use
|
6435
|
+
*
|
6436
|
+
* v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
|
6437
|
+
*/
|
6438
|
+
const conversationsTelemetryVersionNumber = ApiVersionNumber.V_1;
|
6045
6439
|
/**
|
6046
6440
|
* @hidden
|
6047
6441
|
* Namespace to interact with the conversational subEntities inside the tab
|
@@ -6068,7 +6462,7 @@ var conversations;
|
|
6068
6462
|
if (!isSupported()) {
|
6069
6463
|
throw errorNotSupportedOnPlatform;
|
6070
6464
|
}
|
6071
|
-
const sendPromise =
|
6465
|
+
const sendPromise = sendAndHandleStatusAndReasonWithVersion(getApiVersionTag(conversationsTelemetryVersionNumber, ApiName.Conversations_OpenConversation), 'conversations.openConversation', {
|
6072
6466
|
title: openConversationRequest.title,
|
6073
6467
|
subEntityId: openConversationRequest.subEntityId,
|
6074
6468
|
conversationId: openConversationRequest.conversationId,
|
@@ -6076,7 +6470,7 @@ var conversations;
|
|
6076
6470
|
entityId: openConversationRequest.entityId,
|
6077
6471
|
});
|
6078
6472
|
if (openConversationRequest.onStartConversation) {
|
6079
|
-
|
6473
|
+
registerHandlerWithVersion(getApiVersionTag(conversationsTelemetryVersionNumber, ApiName.Conversations_RegisterStartConversationHandler), 'startConversation', (subEntityId, conversationId, channelId, entityId) => {
|
6080
6474
|
var _a;
|
6081
6475
|
return (_a = openConversationRequest.onStartConversation) === null || _a === void 0 ? void 0 : _a.call(openConversationRequest, {
|
6082
6476
|
subEntityId,
|
@@ -6087,7 +6481,7 @@ var conversations;
|
|
6087
6481
|
});
|
6088
6482
|
}
|
6089
6483
|
if (openConversationRequest.onCloseConversation) {
|
6090
|
-
|
6484
|
+
registerHandlerWithVersion(getApiVersionTag(conversationsTelemetryVersionNumber, ApiName.Conversations_RegisterCloseConversationHandler), 'closeConversation', (subEntityId, conversationId, channelId, entityId) => {
|
6091
6485
|
var _a;
|
6092
6486
|
return (_a = openConversationRequest.onCloseConversation) === null || _a === void 0 ? void 0 : _a.call(openConversationRequest, {
|
6093
6487
|
subEntityId,
|
@@ -6114,7 +6508,7 @@ var conversations;
|
|
6114
6508
|
if (!isSupported()) {
|
6115
6509
|
throw errorNotSupportedOnPlatform;
|
6116
6510
|
}
|
6117
|
-
|
6511
|
+
sendMessageToParentWithVersion(getApiVersionTag(conversationsTelemetryVersionNumber, ApiName.Conversations_CloseConversation), 'conversations.closeConversation');
|
6118
6512
|
removeHandler('startConversation');
|
6119
6513
|
removeHandler('closeConversation');
|
6120
6514
|
}
|
@@ -6138,7 +6532,7 @@ var conversations;
|
|
6138
6532
|
if (!isSupported()) {
|
6139
6533
|
throw errorNotSupportedOnPlatform;
|
6140
6534
|
}
|
6141
|
-
resolve(
|
6535
|
+
resolve(sendAndUnwrapWithVersion(getApiVersionTag(conversationsTelemetryVersionNumber, ApiName.Conversations_GetChatMember), 'getChatMembers'));
|
6142
6536
|
});
|
6143
6537
|
}
|
6144
6538
|
conversations.getChatMembers = getChatMembers;
|
@@ -6333,7 +6727,7 @@ var media;
|
|
6333
6727
|
callback(oldPlatformError, []);
|
6334
6728
|
return;
|
6335
6729
|
}
|
6336
|
-
|
6730
|
+
sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_CaptureImage), 'captureImage', callback);
|
6337
6731
|
}
|
6338
6732
|
media.captureImage = captureImage;
|
6339
6733
|
/**
|
@@ -6463,7 +6857,7 @@ var media;
|
|
6463
6857
|
}
|
6464
6858
|
}
|
6465
6859
|
}
|
6466
|
-
|
6860
|
+
sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_GetMedia), 'getMedia', localUriId, handleGetMediaCallbackRequest);
|
6467
6861
|
}
|
6468
6862
|
/** Function to retrieve media content, such as images or videos, via handler. */
|
6469
6863
|
getMediaViaHandler(callback) {
|
@@ -6475,7 +6869,7 @@ var media;
|
|
6475
6869
|
const params = [actionName, this.content];
|
6476
6870
|
this.content &&
|
6477
6871
|
!isNullOrUndefined(callback) &&
|
6478
|
-
|
6872
|
+
sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_GetMedia), 'getMedia', params);
|
6479
6873
|
function handleGetMediaRequest(response) {
|
6480
6874
|
if (callback) {
|
6481
6875
|
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
@@ -6542,7 +6936,7 @@ var media;
|
|
6542
6936
|
return;
|
6543
6937
|
}
|
6544
6938
|
const params = { mediaType: this.getMediaType(), mediaControllerEvent: mediaEvent };
|
6545
|
-
|
6939
|
+
sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_Controller), 'media.controller', [params], (err) => {
|
6546
6940
|
if (callback) {
|
6547
6941
|
callback(err);
|
6548
6942
|
}
|
@@ -6679,7 +7073,7 @@ var media;
|
|
6679
7073
|
}
|
6680
7074
|
const params = [mediaInputs];
|
6681
7075
|
// What comes back from native as attachments would just be objects and will be missing getMedia method on them
|
6682
|
-
|
7076
|
+
sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_SelectMedia), 'selectMedia', params, (err, localAttachments, mediaEvent) => {
|
6683
7077
|
var _a, _b;
|
6684
7078
|
// MediaControllerEvent response is used to notify the app about events and is a partial response to selectMedia
|
6685
7079
|
if (mediaEvent) {
|
@@ -6723,7 +7117,7 @@ var media;
|
|
6723
7117
|
return;
|
6724
7118
|
}
|
6725
7119
|
const params = [uriList];
|
6726
|
-
|
7120
|
+
sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_ViewImages), 'viewImages', params, callback);
|
6727
7121
|
}
|
6728
7122
|
media.viewImages = viewImages;
|
6729
7123
|
/**
|
@@ -6764,7 +7158,7 @@ var media;
|
|
6764
7158
|
callback(invalidInput, '');
|
6765
7159
|
return;
|
6766
7160
|
}
|
6767
|
-
|
7161
|
+
sendMessageToParentWithVersion(getApiVersionTag(mediaTelemetryVersionNumber, ApiName.Media_ScanBarCode), 'media.scanBarCode', [config], callback);
|
6768
7162
|
}
|
6769
7163
|
media.scanBarCode = scanBarCode;
|
6770
7164
|
})(media || (media = {}));
|
@@ -7083,6 +7477,16 @@ var barCode;
|
|
7083
7477
|
|
7084
7478
|
|
7085
7479
|
|
7480
|
+
|
7481
|
+
/**
|
7482
|
+
* Describes information needed to start a chat
|
7483
|
+
*
|
7484
|
+
* @beta
|
7485
|
+
*/
|
7486
|
+
/**
|
7487
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
7488
|
+
*/
|
7489
|
+
const chatTelemetryVersionNumber = ApiVersionNumber.V_2;
|
7086
7490
|
/**
|
7087
7491
|
* Contains functionality to start chat with others
|
7088
7492
|
*
|
@@ -7101,16 +7505,21 @@ var chat;
|
|
7101
7505
|
* @beta
|
7102
7506
|
*/
|
7103
7507
|
function openChat(openChatRequest) {
|
7508
|
+
const apiVersionTag = getApiVersionTag(chatTelemetryVersionNumber, ApiName.Chat_OpenChat);
|
7509
|
+
return openChatHelper(apiVersionTag, openChatRequest);
|
7510
|
+
}
|
7511
|
+
chat.openChat = openChat;
|
7512
|
+
function openChatHelper(apiVersionTag, openChatRequest) {
|
7104
7513
|
return new Promise((resolve) => {
|
7105
7514
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.task);
|
7106
7515
|
if (!isSupported()) {
|
7107
7516
|
throw errorNotSupportedOnPlatform;
|
7108
7517
|
}
|
7109
7518
|
if (runtime_runtime.isLegacyTeams) {
|
7110
|
-
resolve(
|
7519
|
+
resolve(sendAndHandleStatusAndReasonWithVersion(apiVersionTag, 'executeDeepLink', createTeamsDeepLinkForChat([openChatRequest.user], undefined /*topic*/, openChatRequest.message)));
|
7111
7520
|
}
|
7112
7521
|
else {
|
7113
|
-
const sendPromise =
|
7522
|
+
const sendPromise = sendAndHandleStatusAndReasonWithVersion(apiVersionTag, 'chat.openChat', {
|
7114
7523
|
members: [openChatRequest.user],
|
7115
7524
|
message: openChatRequest.message,
|
7116
7525
|
});
|
@@ -7118,7 +7527,6 @@ var chat;
|
|
7118
7527
|
}
|
7119
7528
|
});
|
7120
7529
|
}
|
7121
|
-
chat.openChat = openChat;
|
7122
7530
|
/**
|
7123
7531
|
* Allows the user to create a chat with multiple users (2+) and allows
|
7124
7532
|
* for the user to specify a message and name the topic of the conversation. If
|
@@ -7131,6 +7539,7 @@ var chat;
|
|
7131
7539
|
* @beta
|
7132
7540
|
*/
|
7133
7541
|
function openGroupChat(openChatRequest) {
|
7542
|
+
const apiVersionTag = getApiVersionTag(chatTelemetryVersionNumber, ApiName.Chat_OpenGroupChat);
|
7134
7543
|
return new Promise((resolve) => {
|
7135
7544
|
if (openChatRequest.users.length < 1) {
|
7136
7545
|
throw Error('OpenGroupChat Failed: No users specified');
|
@@ -7140,7 +7549,7 @@ var chat;
|
|
7140
7549
|
user: openChatRequest.users[0],
|
7141
7550
|
message: openChatRequest.message,
|
7142
7551
|
};
|
7143
|
-
resolve(
|
7552
|
+
resolve(openChatHelper(apiVersionTag, chatRequest));
|
7144
7553
|
}
|
7145
7554
|
else {
|
7146
7555
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.task);
|
@@ -7148,10 +7557,10 @@ var chat;
|
|
7148
7557
|
throw errorNotSupportedOnPlatform;
|
7149
7558
|
}
|
7150
7559
|
if (runtime_runtime.isLegacyTeams) {
|
7151
|
-
resolve(
|
7560
|
+
resolve(sendAndHandleStatusAndReasonWithVersion(apiVersionTag, 'executeDeepLink', createTeamsDeepLinkForChat(openChatRequest.users, openChatRequest.topic, openChatRequest.message)));
|
7152
7561
|
}
|
7153
7562
|
else {
|
7154
|
-
const sendPromise =
|
7563
|
+
const sendPromise = sendAndHandleStatusAndReasonWithVersion(apiVersionTag, 'chat.openChat', {
|
7155
7564
|
members: openChatRequest.users,
|
7156
7565
|
message: openChatRequest.message,
|
7157
7566
|
topic: openChatRequest.topic,
|
@@ -7516,6 +7925,11 @@ class ParentAppWindow {
|
|
7516
7925
|
|
7517
7926
|
|
7518
7927
|
|
7928
|
+
|
7929
|
+
/**
|
7930
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
7931
|
+
*/
|
7932
|
+
const secondaryBrowserTelemetryVersionNumber = ApiVersionNumber.V_2;
|
7519
7933
|
/**
|
7520
7934
|
* Namespace to power up the in-app browser experiences in the host app.
|
7521
7935
|
* For e.g., opening a URL in the host app inside a browser
|
@@ -7546,7 +7960,7 @@ var secondaryBrowser;
|
|
7546
7960
|
if (!url || !isValidHttpsURL(url)) {
|
7547
7961
|
throw { errorCode: ErrorCode.INVALID_ARGUMENTS, message: 'Invalid Url: Only https URL is allowed' };
|
7548
7962
|
}
|
7549
|
-
return
|
7963
|
+
return sendAndHandleSdkErrorWithVersion(getApiVersionTag(secondaryBrowserTelemetryVersionNumber, ApiName.SecondaryBrowser_OpenUrl), 'secondaryBrowser.open', url.toString());
|
7550
7964
|
}
|
7551
7965
|
secondaryBrowser.open = open;
|
7552
7966
|
/**
|
@@ -7607,7 +8021,7 @@ var location_location;
|
|
7607
8021
|
if (!isSupported()) {
|
7608
8022
|
throw errorNotSupportedOnPlatform;
|
7609
8023
|
}
|
7610
|
-
|
8024
|
+
sendMessageToParentWithVersion(getApiVersionTag(locationTelemetryVersionNumber, ApiName.Location_GetLocation), 'location.getLocation', [props], callback);
|
7611
8025
|
}
|
7612
8026
|
location_1.getLocation = getLocation;
|
7613
8027
|
/**
|
@@ -7633,7 +8047,7 @@ var location_location;
|
|
7633
8047
|
if (!isSupported()) {
|
7634
8048
|
throw errorNotSupportedOnPlatform;
|
7635
8049
|
}
|
7636
|
-
|
8050
|
+
sendMessageToParentWithVersion(getApiVersionTag(locationTelemetryVersionNumber, ApiName.Location_ShowLocation), 'location.showLocation', [location], callback);
|
7637
8051
|
}
|
7638
8052
|
location_1.showLocation = showLocation;
|
7639
8053
|
/**
|
@@ -7667,6 +8081,11 @@ var meeting_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _
|
|
7667
8081
|
|
7668
8082
|
|
7669
8083
|
|
8084
|
+
|
8085
|
+
/**
|
8086
|
+
* v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
|
8087
|
+
*/
|
8088
|
+
const meetingTelemetryVersionNumber = ApiVersionNumber.V_1;
|
7670
8089
|
/**
|
7671
8090
|
* Interact with meetings, including retrieving meeting details, getting mic status, and sharing app content.
|
7672
8091
|
* This namespace is used to handle meeting related functionality like
|
@@ -7821,7 +8240,7 @@ var meeting;
|
|
7821
8240
|
throw new Error('[get incoming client audio state] Callback cannot be null');
|
7822
8241
|
}
|
7823
8242
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
7824
|
-
|
8243
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_GetIncomingClientAudioState), 'getIncomingClientAudioState', callback);
|
7825
8244
|
}
|
7826
8245
|
meeting.getIncomingClientAudioState = getIncomingClientAudioState;
|
7827
8246
|
/**
|
@@ -7843,7 +8262,7 @@ var meeting;
|
|
7843
8262
|
throw new Error('[toggle incoming client audio] Callback cannot be null');
|
7844
8263
|
}
|
7845
8264
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
7846
|
-
|
8265
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_ToggleIncomingClientAudio), 'toggleIncomingClientAudio', callback);
|
7847
8266
|
}
|
7848
8267
|
meeting.toggleIncomingClientAudio = toggleIncomingClientAudio;
|
7849
8268
|
/**
|
@@ -7862,7 +8281,7 @@ var meeting;
|
|
7862
8281
|
throw new Error('[get meeting details] Callback cannot be null');
|
7863
8282
|
}
|
7864
8283
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage, FrameContexts.settings, FrameContexts.content);
|
7865
|
-
|
8284
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_GetMeetingDetails), 'meeting.getMeetingDetails', callback);
|
7866
8285
|
}
|
7867
8286
|
meeting.getMeetingDetails = getMeetingDetails;
|
7868
8287
|
/**
|
@@ -7881,7 +8300,7 @@ var meeting;
|
|
7881
8300
|
throw new Error('[get Authentication Token For AnonymousUser] Callback cannot be null');
|
7882
8301
|
}
|
7883
8302
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage, FrameContexts.task);
|
7884
|
-
|
8303
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_GetAuthenticationTokenForAnonymousUser), 'meeting.getAuthenticationTokenForAnonymousUser', callback);
|
7885
8304
|
}
|
7886
8305
|
meeting.getAuthenticationTokenForAnonymousUser = getAuthenticationTokenForAnonymousUser;
|
7887
8306
|
/**
|
@@ -7902,7 +8321,7 @@ var meeting;
|
|
7902
8321
|
throw new Error('[get live stream state] Callback cannot be null');
|
7903
8322
|
}
|
7904
8323
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel);
|
7905
|
-
|
8324
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_GetLiveStreamState), 'meeting.getLiveStreamState', callback);
|
7906
8325
|
}
|
7907
8326
|
meeting.getLiveStreamState = getLiveStreamState;
|
7908
8327
|
/**
|
@@ -7926,7 +8345,7 @@ var meeting;
|
|
7926
8345
|
throw new Error('[request start live streaming] Callback cannot be null');
|
7927
8346
|
}
|
7928
8347
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel);
|
7929
|
-
|
8348
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RequestStartLiveStreaming), 'meeting.requestStartLiveStreaming', [streamUrl, streamKey], callback);
|
7930
8349
|
}
|
7931
8350
|
meeting.requestStartLiveStreaming = requestStartLiveStreaming;
|
7932
8351
|
/**
|
@@ -7945,7 +8364,7 @@ var meeting;
|
|
7945
8364
|
throw new Error('[request stop live streaming] Callback cannot be null');
|
7946
8365
|
}
|
7947
8366
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel);
|
7948
|
-
|
8367
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RequestStopLiveStreaming), 'meeting.requestStopLiveStreaming', callback);
|
7949
8368
|
}
|
7950
8369
|
meeting.requestStopLiveStreaming = requestStopLiveStreaming;
|
7951
8370
|
/**
|
@@ -7965,7 +8384,7 @@ var meeting;
|
|
7965
8384
|
throw new Error('[register live stream changed handler] Handler cannot be null');
|
7966
8385
|
}
|
7967
8386
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel);
|
7968
|
-
|
8387
|
+
registerHandlerWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RegisterLiveStreamChangedHandler), 'meeting.liveStreamChanged', handler);
|
7969
8388
|
}
|
7970
8389
|
meeting.registerLiveStreamChangedHandler = registerLiveStreamChangedHandler;
|
7971
8390
|
/**
|
@@ -7993,7 +8412,7 @@ var meeting;
|
|
7993
8412
|
throw new Error('[share app content to stage] Callback cannot be null');
|
7994
8413
|
}
|
7995
8414
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
7996
|
-
|
8415
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_ShareAppContentToStage), 'meeting.shareAppContentToStage', [appContentUrl, shareOptions], callback);
|
7997
8416
|
}
|
7998
8417
|
meeting.shareAppContentToStage = shareAppContentToStage;
|
7999
8418
|
/**
|
@@ -8018,7 +8437,7 @@ var meeting;
|
|
8018
8437
|
throw new Error('[get app content stage sharing capabilities] Callback cannot be null');
|
8019
8438
|
}
|
8020
8439
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
8021
|
-
|
8440
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_GetAppContentStageSharingCapabilities), 'meeting.getAppContentStageSharingCapabilities', callback);
|
8022
8441
|
}
|
8023
8442
|
meeting.getAppContentStageSharingCapabilities = getAppContentStageSharingCapabilities;
|
8024
8443
|
/**
|
@@ -8035,7 +8454,7 @@ var meeting;
|
|
8035
8454
|
throw new Error('[stop sharing app content to stage] Callback cannot be null');
|
8036
8455
|
}
|
8037
8456
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
8038
|
-
|
8457
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_StopSharingAppContentToStage), 'meeting.stopSharingAppContentToStage', callback);
|
8039
8458
|
}
|
8040
8459
|
meeting.stopSharingAppContentToStage = stopSharingAppContentToStage;
|
8041
8460
|
/**
|
@@ -8057,7 +8476,7 @@ var meeting;
|
|
8057
8476
|
throw new Error('[get app content stage sharing state] Callback cannot be null');
|
8058
8477
|
}
|
8059
8478
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
8060
|
-
|
8479
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_GetAppContentStageSharingState), 'meeting.getAppContentStageSharingState', callback);
|
8061
8480
|
}
|
8062
8481
|
meeting.getAppContentStageSharingState = getAppContentStageSharingState;
|
8063
8482
|
/**
|
@@ -8080,7 +8499,7 @@ var meeting;
|
|
8080
8499
|
throw new Error('[registerSpeakingStateChangeHandler] Handler cannot be null');
|
8081
8500
|
}
|
8082
8501
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
8083
|
-
|
8502
|
+
registerHandlerWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RegisterSpeakingStateChangeHandler), 'meeting.speakingStateChanged', handler);
|
8084
8503
|
}
|
8085
8504
|
meeting.registerSpeakingStateChangeHandler = registerSpeakingStateChangeHandler;
|
8086
8505
|
/**
|
@@ -8104,7 +8523,7 @@ var meeting;
|
|
8104
8523
|
throw new Error('[registerRaiseHandStateChangedHandler] Handler cannot be null');
|
8105
8524
|
}
|
8106
8525
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
8107
|
-
|
8526
|
+
registerHandlerWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RegisterRaiseHandStateChangedHandler), 'meeting.raiseHandStateChanged', handler);
|
8108
8527
|
}
|
8109
8528
|
meeting.registerRaiseHandStateChangedHandler = registerRaiseHandStateChangedHandler;
|
8110
8529
|
/**
|
@@ -8126,7 +8545,7 @@ var meeting;
|
|
8126
8545
|
throw new Error('[registerMeetingReactionReceivedHandler] Handler cannot be null');
|
8127
8546
|
}
|
8128
8547
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
8129
|
-
|
8548
|
+
registerHandlerWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RegisterMeetingReactionReceivedHandler), 'meeting.meetingReactionReceived', handler);
|
8130
8549
|
}
|
8131
8550
|
meeting.registerMeetingReactionReceivedHandler = registerMeetingReactionReceivedHandler;
|
8132
8551
|
/**
|
@@ -8164,7 +8583,7 @@ var meeting;
|
|
8164
8583
|
if (shareInformation.contentUrl) {
|
8165
8584
|
new URL(shareInformation.contentUrl);
|
8166
8585
|
}
|
8167
|
-
|
8586
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_AppShareButton_SetOptions), 'meeting.appShareButton.setOptions', [shareInformation]);
|
8168
8587
|
}
|
8169
8588
|
appShareButton.setOptions = setOptions;
|
8170
8589
|
})(appShareButton = meeting.appShareButton || (meeting.appShareButton = {}));
|
@@ -8230,15 +8649,15 @@ var meeting;
|
|
8230
8649
|
setMicStateWithReason(micState, MicStateChangeReason.AppFailedToChange);
|
8231
8650
|
}
|
8232
8651
|
});
|
8233
|
-
|
8652
|
+
registerHandlerWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RegisterMicStateChangeHandler), 'meeting.micStateChanged', micStateChangedCallback);
|
8234
8653
|
const audioDeviceSelectionChangedCallback = (selectedDevicesInHost) => {
|
8235
8654
|
var _a;
|
8236
8655
|
(_a = requestAppAudioHandlingParams.audioDeviceSelectionChangedCallback) === null || _a === void 0 ? void 0 : _a.call(requestAppAudioHandlingParams, selectedDevicesInHost);
|
8237
8656
|
};
|
8238
|
-
|
8657
|
+
registerHandlerWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RegisterAudioDeviceSelectionChangedHandler), 'meeting.audioDeviceSelectionChanged', audioDeviceSelectionChangedCallback);
|
8239
8658
|
callback(isHostAudioless);
|
8240
8659
|
};
|
8241
|
-
|
8660
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RequestAppAudioHandling), 'meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalRequest);
|
8242
8661
|
}
|
8243
8662
|
function stopAppAudioHandling(requestAppAudioHandlingParams, callback) {
|
8244
8663
|
const callbackInternalStop = (error, isHostAudioless) => {
|
@@ -8259,7 +8678,7 @@ var meeting;
|
|
8259
8678
|
}
|
8260
8679
|
callback(isHostAudioless);
|
8261
8680
|
};
|
8262
|
-
|
8681
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_RequestAppAudioHandling), 'meeting.requestAppAudioHandling', [requestAppAudioHandlingParams.isAppHandlingAudio], callbackInternalStop);
|
8263
8682
|
}
|
8264
8683
|
/**
|
8265
8684
|
* Notifies the host that the microphone state has changed in the app.
|
@@ -8280,7 +8699,7 @@ var meeting;
|
|
8280
8699
|
meeting.updateMicState = updateMicState;
|
8281
8700
|
function setMicStateWithReason(micState, reason) {
|
8282
8701
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
8283
|
-
|
8702
|
+
sendMessageToParentWithVersion(getApiVersionTag(meetingTelemetryVersionNumber, ApiName.Meeting_SetMicStateWithReason), 'meeting.updateMicState', [micState, reason]);
|
8284
8703
|
}
|
8285
8704
|
})(meeting || (meeting = {}));
|
8286
8705
|
|
@@ -8290,6 +8709,7 @@ var meeting;
|
|
8290
8709
|
|
8291
8710
|
|
8292
8711
|
|
8712
|
+
|
8293
8713
|
/**
|
8294
8714
|
* @hidden
|
8295
8715
|
* Hidden from Docs
|
@@ -8297,6 +8717,11 @@ var meeting;
|
|
8297
8717
|
* @internal
|
8298
8718
|
* Limited to Microsoft-internal use
|
8299
8719
|
*/
|
8720
|
+
/**
|
8721
|
+
* Exceptional APIs telemetry versioning file: v1 and v2 APIs are mixed together in this file
|
8722
|
+
*/
|
8723
|
+
const monetizationTelemetryVersionNumber_v1 = ApiVersionNumber.V_1;
|
8724
|
+
const monetizationTelemetryVersionNumber_v2 = ApiVersionNumber.V_2;
|
8300
8725
|
var monetization;
|
8301
8726
|
(function (monetization) {
|
8302
8727
|
/**
|
@@ -8311,12 +8736,15 @@ var monetization;
|
|
8311
8736
|
function openPurchaseExperience(param1, param2) {
|
8312
8737
|
let callback;
|
8313
8738
|
let planInfo;
|
8739
|
+
let apiVersionTag = '';
|
8314
8740
|
if (typeof param1 === 'function') {
|
8315
8741
|
callback = param1;
|
8316
8742
|
planInfo = param2;
|
8743
|
+
apiVersionTag = getApiVersionTag(monetizationTelemetryVersionNumber_v1, ApiName.Monetization_OpenPurchaseExperience);
|
8317
8744
|
}
|
8318
8745
|
else {
|
8319
8746
|
planInfo = param1;
|
8747
|
+
apiVersionTag = getApiVersionTag(monetizationTelemetryVersionNumber_v2, ApiName.Monetization_OpenPurchaseExperience);
|
8320
8748
|
}
|
8321
8749
|
const wrappedFunction = () => {
|
8322
8750
|
return new Promise((resolve) => {
|
@@ -8324,7 +8752,7 @@ var monetization;
|
|
8324
8752
|
throw errorNotSupportedOnPlatform;
|
8325
8753
|
}
|
8326
8754
|
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
8327
|
-
resolve(
|
8755
|
+
resolve(sendAndHandleSdkErrorWithVersion(apiVersionTag, 'monetization.openPurchaseExperience', planInfo));
|
8328
8756
|
});
|
8329
8757
|
};
|
8330
8758
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content);
|
@@ -8629,9 +9057,14 @@ var teamsCore;
|
|
8629
9057
|
|
8630
9058
|
|
8631
9059
|
|
9060
|
+
|
8632
9061
|
/**
|
8633
9062
|
* Allows your app to add a people picker enabling users to search for and select people in their organization.
|
9063
|
+
*
|
9064
|
+
* Exceptional APIs telemetry versioning file: v1 and v2 APIs are mixed together in this file
|
8634
9065
|
*/
|
9066
|
+
const peopleTelemetryVersionNumber_v1 = ApiVersionNumber.V_1;
|
9067
|
+
const peopleTelemetryVersionNumber_v2 = ApiVersionNumber.V_2;
|
8635
9068
|
var people;
|
8636
9069
|
(function (people_1) {
|
8637
9070
|
/**
|
@@ -8647,16 +9080,19 @@ var people;
|
|
8647
9080
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.task, FrameContexts.settings);
|
8648
9081
|
let callback = undefined;
|
8649
9082
|
let peoplePickerInputs = undefined;
|
9083
|
+
let apiVersionTag = '';
|
8650
9084
|
if (typeof param1 === 'function') {
|
8651
9085
|
[callback, peoplePickerInputs] = [param1, param2];
|
9086
|
+
apiVersionTag = getApiVersionTag(peopleTelemetryVersionNumber_v1, ApiName.People_SelectPeople);
|
8652
9087
|
}
|
8653
9088
|
else {
|
8654
9089
|
peoplePickerInputs = param1;
|
9090
|
+
apiVersionTag = getApiVersionTag(peopleTelemetryVersionNumber_v2, ApiName.People_SelectPeople);
|
8655
9091
|
}
|
8656
|
-
return callCallbackWithErrorOrResultFromPromiseAndReturnPromise(selectPeopleHelper, callback /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */, peoplePickerInputs);
|
9092
|
+
return callCallbackWithErrorOrResultFromPromiseAndReturnPromise(selectPeopleHelper, callback /* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */, apiVersionTag, peoplePickerInputs);
|
8657
9093
|
}
|
8658
9094
|
people_1.selectPeople = selectPeople;
|
8659
|
-
function selectPeopleHelper(peoplePickerInputs) {
|
9095
|
+
function selectPeopleHelper(apiVersionTag, peoplePickerInputs) {
|
8660
9096
|
return new Promise((resolve) => {
|
8661
9097
|
if (!isCurrentSDKVersionAtLeast(peoplePickerRequiredVersion)) {
|
8662
9098
|
throw { errorCode: ErrorCode.OLD_PLATFORM };
|
@@ -8668,7 +9104,7 @@ var people;
|
|
8668
9104
|
throw errorNotSupportedOnPlatform;
|
8669
9105
|
}
|
8670
9106
|
/* eslint-disable-next-line strict-null-checks/all */ /* Fix tracked by 5730662 */
|
8671
|
-
resolve(
|
9107
|
+
resolve(sendAndHandleSdkErrorWithVersion(apiVersionTag, 'people.selectPeople', peoplePickerInputs));
|
8672
9108
|
});
|
8673
9109
|
}
|
8674
9110
|
/**
|
@@ -8753,6 +9189,11 @@ function validatePersona(persona) {
|
|
8753
9189
|
|
8754
9190
|
|
8755
9191
|
|
9192
|
+
|
9193
|
+
/**
|
9194
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
9195
|
+
*/
|
9196
|
+
const profileTelemetryVersionNumber = ApiVersionNumber.V_2;
|
8756
9197
|
/**
|
8757
9198
|
* Namespace for profile related APIs.
|
8758
9199
|
*
|
@@ -8786,7 +9227,7 @@ var profile;
|
|
8786
9227
|
height: showProfileRequest.targetElementBoundingRect.height,
|
8787
9228
|
},
|
8788
9229
|
};
|
8789
|
-
resolve(
|
9230
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(profileTelemetryVersionNumber, ApiName.Profile_ShowProfile), 'profile.showProfile', requestInternal));
|
8790
9231
|
});
|
8791
9232
|
}
|
8792
9233
|
profile.showProfile = showProfile;
|
@@ -9287,6 +9728,11 @@ VideoPerformanceStatistics.maxSessionTimeoutInMs = 1000 * 30;
|
|
9287
9728
|
;// CONCATENATED MODULE: ./src/internal/videoPerformanceMonitor.ts
|
9288
9729
|
|
9289
9730
|
|
9731
|
+
|
9732
|
+
/**
|
9733
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
9734
|
+
*/
|
9735
|
+
const videoPerformanceMonitorTelemetryVersionNumber = ApiVersionNumber.V_2;
|
9290
9736
|
/**
|
9291
9737
|
* This class is used to monitor the performance of video processing, and report performance events.
|
9292
9738
|
*/
|
@@ -9298,7 +9744,7 @@ class VideoPerformanceMonitor {
|
|
9298
9744
|
this.frameProcessingStartedAt = 0;
|
9299
9745
|
this.frameProcessingTimeCost = 0;
|
9300
9746
|
this.processedFrameCount = 0;
|
9301
|
-
this.performanceStatistics = new VideoPerformanceStatistics(VideoPerformanceMonitor.distributionBinSize, (result) => this.reportPerformanceEvent('video.performance.performanceDataGenerated', [result]));
|
9747
|
+
this.performanceStatistics = new VideoPerformanceStatistics(VideoPerformanceMonitor.distributionBinSize, (result) => this.reportPerformanceEvent(getApiVersionTag(videoPerformanceMonitorTelemetryVersionNumber, ApiName.VideoPerformanceMonitor_Constructor), 'video.performance.performanceDataGenerated', [result]));
|
9302
9748
|
}
|
9303
9749
|
/**
|
9304
9750
|
* Start to check frame processing time intervally
|
@@ -9311,7 +9757,7 @@ class VideoPerformanceMonitor {
|
|
9311
9757
|
}
|
9312
9758
|
const averageFrameProcessingTime = this.frameProcessingTimeCost / this.processedFrameCount;
|
9313
9759
|
if (averageFrameProcessingTime > this.frameProcessTimeLimit) {
|
9314
|
-
this.reportPerformanceEvent('video.performance.frameProcessingSlow', [averageFrameProcessingTime]);
|
9760
|
+
this.reportPerformanceEvent(getApiVersionTag(videoPerformanceMonitorTelemetryVersionNumber, ApiName.VideoPerformanceMonitor_StartMonitorSlowFrameProcessing), 'video.performance.frameProcessingSlow', [averageFrameProcessingTime]);
|
9315
9761
|
}
|
9316
9762
|
this.frameProcessingTimeCost = 0;
|
9317
9763
|
this.processedFrameCount = 0;
|
@@ -9379,11 +9825,7 @@ class VideoPerformanceMonitor {
|
|
9379
9825
|
this.performanceStatistics.processEnds();
|
9380
9826
|
if (!this.isFirstFrameProcessed) {
|
9381
9827
|
this.isFirstFrameProcessed = true;
|
9382
|
-
this.reportPerformanceEvent('video.performance.firstFrameProcessed', [
|
9383
|
-
Date.now(),
|
9384
|
-
this.appliedEffect.effectId,
|
9385
|
-
(_a = this.appliedEffect) === null || _a === void 0 ? void 0 : _a.effectParam,
|
9386
|
-
]);
|
9828
|
+
this.reportPerformanceEvent(getApiVersionTag(videoPerformanceMonitorTelemetryVersionNumber, ApiName.VideoPerformanceMonitor_ReportFrameProcessed), 'video.performance.firstFrameProcessed', [Date.now(), this.appliedEffect.effectId, (_a = this.appliedEffect) === null || _a === void 0 ? void 0 : _a.effectParam]);
|
9387
9829
|
}
|
9388
9830
|
}
|
9389
9831
|
/**
|
@@ -9399,7 +9841,7 @@ class VideoPerformanceMonitor {
|
|
9399
9841
|
reportTextureStreamAcquired() {
|
9400
9842
|
if (this.gettingTextureStreamStartedAt !== undefined) {
|
9401
9843
|
const timeTaken = performance.now() - this.gettingTextureStreamStartedAt;
|
9402
|
-
this.reportPerformanceEvent('video.performance.textureStreamAcquired', [this.currentStreamId, timeTaken]);
|
9844
|
+
this.reportPerformanceEvent(getApiVersionTag(videoPerformanceMonitorTelemetryVersionNumber, ApiName.VideoPerformanceMonitor_ReportTextureStreamAcquired), 'video.performance.textureStreamAcquired', [this.currentStreamId, timeTaken]);
|
9403
9845
|
}
|
9404
9846
|
}
|
9405
9847
|
}
|
@@ -9435,6 +9877,11 @@ var videoEffects_rest = (undefined && undefined.__rest) || function (s, e) {
|
|
9435
9877
|
|
9436
9878
|
|
9437
9879
|
|
9880
|
+
|
9881
|
+
/**
|
9882
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
9883
|
+
*/
|
9884
|
+
const videoEffectsTelemetryVersionNumber = ApiVersionNumber.V_2;
|
9438
9885
|
/**
|
9439
9886
|
* Namespace to video extensibility of the SDK
|
9440
9887
|
* @beta
|
@@ -9443,7 +9890,7 @@ var videoEffects;
|
|
9443
9890
|
(function (videoEffects) {
|
9444
9891
|
const videoPerformanceMonitor = inServerSideRenderingEnvironment()
|
9445
9892
|
? undefined
|
9446
|
-
: new VideoPerformanceMonitor(
|
9893
|
+
: new VideoPerformanceMonitor(sendMessageToParentWithVersion);
|
9447
9894
|
/**
|
9448
9895
|
* Video frame format enum, currently only support NV12
|
9449
9896
|
* @beta
|
@@ -9529,7 +9976,7 @@ var videoEffects;
|
|
9529
9976
|
if (!parameters.videoFrameHandler || !parameters.videoBufferHandler) {
|
9530
9977
|
throw new Error('Both videoFrameHandler and videoBufferHandler must be provided');
|
9531
9978
|
}
|
9532
|
-
|
9979
|
+
registerHandlerWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_RegisterSetFrameProcessTimeLimitHandler), 'video.setFrameProcessTimeLimit', (timeLimitInfo) => videoPerformanceMonitor === null || videoPerformanceMonitor === void 0 ? void 0 : videoPerformanceMonitor.setFrameProcessTimeLimit(timeLimitInfo.timeLimit), false);
|
9533
9980
|
if (doesSupportMediaStream()) {
|
9534
9981
|
registerForMediaStream(parameters.videoFrameHandler, parameters.config);
|
9535
9982
|
}
|
@@ -9556,7 +10003,7 @@ var videoEffects;
|
|
9556
10003
|
if (!isSupported()) {
|
9557
10004
|
throw errorNotSupportedOnPlatform;
|
9558
10005
|
}
|
9559
|
-
|
10006
|
+
sendMessageToParentWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_NotifySelectedVideoEffectChanged), 'video.videoEffectChanged', [effectChangeType, effectId]);
|
9560
10007
|
}
|
9561
10008
|
videoEffects.notifySelectedVideoEffectChanged = notifySelectedVideoEffectChanged;
|
9562
10009
|
/**
|
@@ -9569,8 +10016,8 @@ var videoEffects;
|
|
9569
10016
|
if (!isSupported()) {
|
9570
10017
|
throw errorNotSupportedOnPlatform;
|
9571
10018
|
}
|
9572
|
-
|
9573
|
-
|
10019
|
+
registerHandlerWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_RegisterEffectParameterChangeHandler), 'video.effectParameterChange', createEffectParameterChangeCallback(callback, videoPerformanceMonitor), false);
|
10020
|
+
sendMessageToParentWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_RegisterForVideoEffect), 'video.registerForVideoEffect');
|
9574
10021
|
}
|
9575
10022
|
videoEffects.registerForVideoEffect = registerForVideoEffect;
|
9576
10023
|
/**
|
@@ -9579,7 +10026,7 @@ var videoEffects;
|
|
9579
10026
|
* @beta
|
9580
10027
|
*/
|
9581
10028
|
function notifyVideoFrameProcessed(timestamp) {
|
9582
|
-
|
10029
|
+
sendMessageToParentWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_NotifyVideoFrameProcessed), 'video.videoFrameProcessed', [timestamp]);
|
9583
10030
|
}
|
9584
10031
|
/**
|
9585
10032
|
* Sending error notification to host
|
@@ -9587,7 +10034,7 @@ var videoEffects;
|
|
9587
10034
|
* @param errorMessage - The error message that will be sent to the host
|
9588
10035
|
*/
|
9589
10036
|
function notifyError(errorMessage) {
|
9590
|
-
|
10037
|
+
sendMessageToParentWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_NotifyError), 'video.notifyError', [errorMessage]);
|
9591
10038
|
}
|
9592
10039
|
/**
|
9593
10040
|
* Checks if video capability is supported by the host.
|
@@ -9609,13 +10056,13 @@ var videoEffects;
|
|
9609
10056
|
if (!isSupported() || !doesSupportMediaStream()) {
|
9610
10057
|
throw errorNotSupportedOnPlatform;
|
9611
10058
|
}
|
9612
|
-
|
10059
|
+
registerHandlerWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_RegisterStartVideoExtensibilityVideoStreamHandler), 'video.startVideoExtensibilityVideoStream', (mediaStreamInfo) => videoEffects_awaiter(this, void 0, void 0, function* () {
|
9613
10060
|
// when a new streamId is ready:
|
9614
10061
|
const { streamId } = mediaStreamInfo;
|
9615
10062
|
const monitoredVideoFrameHandler = createMonitoredVideoFrameHandler(videoFrameHandler, videoPerformanceMonitor);
|
9616
10063
|
yield processMediaStream(streamId, monitoredVideoFrameHandler, notifyError, videoPerformanceMonitor);
|
9617
10064
|
}), false);
|
9618
|
-
|
10065
|
+
sendMessageToParentWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_MediaStream_RegisterForVideoFrame), 'video.mediaStream.registerForVideoFrame', [config]);
|
9619
10066
|
}
|
9620
10067
|
function createMonitoredVideoFrameHandler(videoFrameHandler, videoPerformanceMonitor) {
|
9621
10068
|
return (videoFrameData) => videoEffects_awaiter(this, void 0, void 0, function* () {
|
@@ -9632,7 +10079,7 @@ var videoEffects;
|
|
9632
10079
|
if (!isSupported() || !doesSupportSharedFrame()) {
|
9633
10080
|
throw errorNotSupportedOnPlatform;
|
9634
10081
|
}
|
9635
|
-
|
10082
|
+
registerHandlerWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_RegisterForVideoBufferHandler), 'video.newVideoFrame',
|
9636
10083
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
9637
10084
|
(videoBufferData) => {
|
9638
10085
|
if (videoBufferData) {
|
@@ -9644,7 +10091,7 @@ var videoEffects;
|
|
9644
10091
|
}, notifyError);
|
9645
10092
|
}
|
9646
10093
|
}, false);
|
9647
|
-
|
10094
|
+
sendMessageToParentWithVersion(getApiVersionTag(videoEffectsTelemetryVersionNumber, ApiName.VideoEffects_RegisterForVideoFrame), 'video.registerForVideoFrame', [config]);
|
9648
10095
|
}
|
9649
10096
|
function normalizeVideoBufferData(videoBufferData) {
|
9650
10097
|
if ('videoFrameBuffer' in videoBufferData) {
|
@@ -9678,6 +10125,11 @@ var videoEffects;
|
|
9678
10125
|
|
9679
10126
|
|
9680
10127
|
|
10128
|
+
|
10129
|
+
/**
|
10130
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
10131
|
+
*/
|
10132
|
+
const searchTelemetryVersionNumber = ApiVersionNumber.V_2;
|
9681
10133
|
/**
|
9682
10134
|
* Allows your application to interact with the host M365 application's search box.
|
9683
10135
|
* By integrating your application with the host's search box, users can search
|
@@ -9737,10 +10189,10 @@ var search;
|
|
9737
10189
|
if (!isSupported()) {
|
9738
10190
|
throw errorNotSupportedOnPlatform;
|
9739
10191
|
}
|
9740
|
-
|
9741
|
-
|
10192
|
+
registerHandlerWithVersion(getApiVersionTag(searchTelemetryVersionNumber, ApiName.Search_RegisterOnClosedHandler), onClosedHandlerName, onClosedHandler);
|
10193
|
+
registerHandlerWithVersion(getApiVersionTag(searchTelemetryVersionNumber, ApiName.Search_RegisterOnExecutedHandler), onExecutedHandlerName, onExecuteHandler);
|
9742
10194
|
if (onChangeHandler) {
|
9743
|
-
|
10195
|
+
registerHandlerWithVersion(getApiVersionTag(searchTelemetryVersionNumber, ApiName.Search_RegisterOnChangeHandler), onChangeHandlerName, onChangeHandler);
|
9744
10196
|
}
|
9745
10197
|
}
|
9746
10198
|
search.registerHandlers = registerHandlers;
|
@@ -9757,7 +10209,7 @@ var search;
|
|
9757
10209
|
}
|
9758
10210
|
// This should let the host know to stop making the app scope show up in the search experience
|
9759
10211
|
// Can also be used to clean up handlers on the host if desired
|
9760
|
-
|
10212
|
+
sendMessageToParentWithVersion(getApiVersionTag(searchTelemetryVersionNumber, ApiName.Search_UnregisterHandlers), 'search.unregister');
|
9761
10213
|
removeHandler(onChangeHandlerName);
|
9762
10214
|
removeHandler(onClosedHandlerName);
|
9763
10215
|
removeHandler(onExecutedHandlerName);
|
@@ -9786,7 +10238,7 @@ var search;
|
|
9786
10238
|
if (!isSupported()) {
|
9787
10239
|
throw new Error('Not supported');
|
9788
10240
|
}
|
9789
|
-
resolve(
|
10241
|
+
resolve(sendAndHandleStatusAndReasonWithVersion(getApiVersionTag(searchTelemetryVersionNumber, ApiName.Search_CloseSearch), 'search.closeSearch'));
|
9790
10242
|
});
|
9791
10243
|
}
|
9792
10244
|
search.closeSearch = closeSearch;
|
@@ -9799,6 +10251,10 @@ var search;
|
|
9799
10251
|
|
9800
10252
|
|
9801
10253
|
|
10254
|
+
|
10255
|
+
/* eslint-disable @typescript-eslint/no-unused-vars */
|
10256
|
+
const sharingTelemetryVersionNumber_v1 = ApiVersionNumber.V_1;
|
10257
|
+
const sharingTelemetryVersionNumber_v2 = ApiVersionNumber.V_2;
|
9802
10258
|
/**
|
9803
10259
|
* Namespace to open a share dialog for web content.
|
9804
10260
|
* For more info, see [Share to Teams from personal app or tab](https://learn.microsoft.com/microsoftteams/platform/concepts/build-and-test/share-to-teams-from-personal-app-or-tab)
|
@@ -9814,6 +10270,7 @@ var sharing;
|
|
9814
10270
|
shareWebContent: 'sharing.shareWebContent',
|
9815
10271
|
};
|
9816
10272
|
function shareWebContent(shareWebContentRequest, callback) {
|
10273
|
+
const apiVersionTag = '';
|
9817
10274
|
// validate the given input (synchronous check)
|
9818
10275
|
try {
|
9819
10276
|
validateNonEmptyContent(shareWebContentRequest);
|
@@ -9902,6 +10359,11 @@ var sharing;
|
|
9902
10359
|
|
9903
10360
|
|
9904
10361
|
|
10362
|
+
|
10363
|
+
/**
|
10364
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
10365
|
+
*/
|
10366
|
+
const stageViewTelemetryVersionNumber = ApiVersionNumber.V_2;
|
9905
10367
|
/**
|
9906
10368
|
* Namespace to interact with the stage view specific part of the SDK.
|
9907
10369
|
*
|
@@ -9945,7 +10407,7 @@ var stageView;
|
|
9945
10407
|
if (!stageViewParams) {
|
9946
10408
|
throw new Error('[stageView.open] Stage view params cannot be null');
|
9947
10409
|
}
|
9948
|
-
resolve(
|
10410
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(stageViewTelemetryVersionNumber, ApiName.StageView_Open), 'stageView.open', stageViewParams));
|
9949
10411
|
});
|
9950
10412
|
}
|
9951
10413
|
stageView.open = open;
|
@@ -9978,6 +10440,11 @@ var visualMedia_awaiter = (undefined && undefined.__awaiter) || function (thisAr
|
|
9978
10440
|
|
9979
10441
|
|
9980
10442
|
|
10443
|
+
|
10444
|
+
/**
|
10445
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
10446
|
+
*/
|
10447
|
+
const visualMediaTelemetryVersionNumber = ApiVersionNumber.V_2;
|
9981
10448
|
/**
|
9982
10449
|
* @hidden
|
9983
10450
|
* Interact with images. Allows the app developer ask the user to get images from their camera / camera roll / file system.
|
@@ -10031,7 +10498,7 @@ var visualMedia;
|
|
10031
10498
|
throw errorNotSupportedOnPlatform;
|
10032
10499
|
}
|
10033
10500
|
const permissions = DevicePermission.Media;
|
10034
|
-
return
|
10501
|
+
return sendAndHandleSdkErrorWithVersion(getApiVersionTag(visualMediaTelemetryVersionNumber, ApiName.VisualMedia_HasPermission), 'permissions.has', permissions);
|
10035
10502
|
}
|
10036
10503
|
visualMedia.hasPermission = hasPermission;
|
10037
10504
|
/**
|
@@ -10049,7 +10516,7 @@ var visualMedia;
|
|
10049
10516
|
throw errorNotSupportedOnPlatform;
|
10050
10517
|
}
|
10051
10518
|
const permissions = DevicePermission.Media;
|
10052
|
-
return
|
10519
|
+
return sendAndHandleSdkErrorWithVersion(getApiVersionTag(visualMediaTelemetryVersionNumber, ApiName.VisualMedia_RequestPermission), 'permissions.request', permissions);
|
10053
10520
|
}
|
10054
10521
|
visualMedia.requestPermission = requestPermission;
|
10055
10522
|
/**
|
@@ -10074,7 +10541,7 @@ var visualMedia;
|
|
10074
10541
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.task);
|
10075
10542
|
ensureSupported();
|
10076
10543
|
ensureImageInputValid(cameraImageInputs);
|
10077
|
-
const files = yield
|
10544
|
+
const files = yield sendAndHandleSdkErrorWithVersion(getApiVersionTag(visualMediaTelemetryVersionNumber, ApiName.VisualMedia_Image_CaptureImages), 'visualMedia.image.captureImages', cameraImageInputs);
|
10078
10545
|
ensureResponseValid(cameraImageInputs.maxVisualMediaCount, files);
|
10079
10546
|
return files;
|
10080
10547
|
});
|
@@ -10094,7 +10561,7 @@ var visualMedia;
|
|
10094
10561
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.task);
|
10095
10562
|
ensureSupported();
|
10096
10563
|
ensureImageInputValid(galleryImageInputs);
|
10097
|
-
const files = yield
|
10564
|
+
const files = yield sendAndHandleSdkErrorWithVersion(getApiVersionTag(visualMediaTelemetryVersionNumber, ApiName.VisualMedia_Image_RetrieveImages), 'visualMedia.image.retrieveImages', galleryImageInputs);
|
10098
10565
|
ensureResponseValid(galleryImageInputs.maxVisualMediaCount, files);
|
10099
10566
|
return files;
|
10100
10567
|
});
|
@@ -10254,7 +10721,7 @@ var call;
|
|
10254
10721
|
}));
|
10255
10722
|
}
|
10256
10723
|
else {
|
10257
|
-
return
|
10724
|
+
return sendMessageToParentWithVersion(apiVersionTag, 'call.startCall', [startCallParams], resolve);
|
10258
10725
|
}
|
10259
10726
|
});
|
10260
10727
|
}
|
@@ -10358,12 +10825,18 @@ const Files3PLogger = getLogger('thirdPartyCloudStorage');
|
|
10358
10825
|
*/
|
10359
10826
|
var thirdPartyCloudStorage;
|
10360
10827
|
(function (thirdPartyCloudStorage) {
|
10361
|
-
/**
|
10828
|
+
/**
|
10829
|
+
* Class to assemble files
|
10830
|
+
* @beta
|
10831
|
+
*/
|
10832
|
+
class AttachmentListHelper {
|
10833
|
+
constructor(fileType, assembleAttachment) {
|
10834
|
+
this.fileType = fileType;
|
10835
|
+
this.assembleAttachment = assembleAttachment;
|
10836
|
+
}
|
10837
|
+
}
|
10362
10838
|
let files = [];
|
10363
|
-
let helper =
|
10364
|
-
fileType: '',
|
10365
|
-
assembleAttachment: [],
|
10366
|
-
};
|
10839
|
+
let helper = null;
|
10367
10840
|
let lastChunkVal = true; // setting it to true so that the very first file and first chunk does not fail
|
10368
10841
|
let callback = null;
|
10369
10842
|
/**
|
@@ -10420,6 +10893,10 @@ var thirdPartyCloudStorage;
|
|
10420
10893
|
}
|
10421
10894
|
const assemble = decodeAttachment(fileResult.fileChunk, fileResult.fileType);
|
10422
10895
|
if (assemble) {
|
10896
|
+
if (!helper) {
|
10897
|
+
// creating helper object for received file chunk
|
10898
|
+
helper = new AttachmentListHelper(fileResult.fileType, []);
|
10899
|
+
}
|
10423
10900
|
helper.assembleAttachment.push(assemble);
|
10424
10901
|
}
|
10425
10902
|
else {
|
@@ -10433,7 +10910,7 @@ var thirdPartyCloudStorage;
|
|
10433
10910
|
}
|
10434
10911
|
// we will store this value to determine whether we received the last chunk of the previous file
|
10435
10912
|
lastChunkVal = fileResult.fileChunk.endOfFile;
|
10436
|
-
if (fileResult.fileChunk.endOfFile) {
|
10913
|
+
if (fileResult.fileChunk.endOfFile && helper) {
|
10437
10914
|
const fileBlob = createFile(helper.assembleAttachment, helper.fileType);
|
10438
10915
|
if (fileBlob) {
|
10439
10916
|
// Convert blob to File
|
@@ -10448,10 +10925,7 @@ var thirdPartyCloudStorage;
|
|
10448
10925
|
callback = null;
|
10449
10926
|
lastChunkVal = true;
|
10450
10927
|
}
|
10451
|
-
helper =
|
10452
|
-
fileType: '',
|
10453
|
-
assembleAttachment: [],
|
10454
|
-
};
|
10928
|
+
helper = null;
|
10455
10929
|
}
|
10456
10930
|
}
|
10457
10931
|
catch (e) {
|
@@ -10547,7 +11021,7 @@ function print() {
|
|
10547
11021
|
*/
|
10548
11022
|
function getContext(callback) {
|
10549
11023
|
ensureInitializeCalled();
|
10550
|
-
|
11024
|
+
sendMessageToParentWithVersion(getApiVersionTag(publicAPIsTelemetryVersionNumber, ApiName.PublicAPIs_GetContext), 'getContext', (context) => {
|
10551
11025
|
if (!context.frameContext) {
|
10552
11026
|
// Fallback logic for frameContext properties
|
10553
11027
|
context.frameContext = GlobalVars.frameContext;
|
@@ -10862,6 +11336,11 @@ function navigateBack(onComplete) {
|
|
10862
11336
|
|
10863
11337
|
|
10864
11338
|
|
11339
|
+
|
11340
|
+
/**
|
11341
|
+
* v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
|
11342
|
+
*/
|
11343
|
+
const settingsTelemetryVersionNumber = ApiVersionNumber.V_1;
|
10865
11344
|
/**
|
10866
11345
|
* @deprecated
|
10867
11346
|
* As of 2.0.0, please use {@link pages.config} namespace instead.
|
@@ -10881,7 +11360,7 @@ var settings;
|
|
10881
11360
|
* @param validityState - Indicates whether the save or remove button is enabled for the user.
|
10882
11361
|
*/
|
10883
11362
|
function setValidityState(validityState) {
|
10884
|
-
|
11363
|
+
configSetValidityStateHelper(getApiVersionTag(settingsTelemetryVersionNumber, ApiName.Settings_SetValidityState), validityState);
|
10885
11364
|
}
|
10886
11365
|
settings.setValidityState = setValidityState;
|
10887
11366
|
/**
|
@@ -10894,7 +11373,7 @@ var settings;
|
|
10894
11373
|
*/
|
10895
11374
|
function getSettings(callback) {
|
10896
11375
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.settings, FrameContexts.remove, FrameContexts.sidePanel);
|
10897
|
-
|
11376
|
+
getConfigHelper(getApiVersionTag(settingsTelemetryVersionNumber, ApiName.Settings_GetSettings)).then((config) => {
|
10898
11377
|
callback(config);
|
10899
11378
|
});
|
10900
11379
|
}
|
@@ -10911,8 +11390,7 @@ var settings;
|
|
10911
11390
|
function setSettings(instanceSettings, onComplete) {
|
10912
11391
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.settings, FrameContexts.sidePanel);
|
10913
11392
|
const completionHandler = onComplete !== null && onComplete !== void 0 ? onComplete : getGenericOnCompleteHandler();
|
10914
|
-
|
10915
|
-
.setConfig(instanceSettings)
|
11393
|
+
configSetConfigHelper(getApiVersionTag(settingsTelemetryVersionNumber, ApiName.Settings_SetSettings), instanceSettings)
|
10916
11394
|
.then(() => {
|
10917
11395
|
completionHandler(true);
|
10918
11396
|
})
|
@@ -10933,7 +11411,7 @@ var settings;
|
|
10933
11411
|
* @param handler - The handler to invoke when the user selects the save button.
|
10934
11412
|
*/
|
10935
11413
|
function registerOnSaveHandler(handler) {
|
10936
|
-
pages.config.registerOnSaveHandlerHelper(handler);
|
11414
|
+
pages.config.registerOnSaveHandlerHelper(getApiVersionTag(settingsTelemetryVersionNumber, ApiName.Settings_RegisterOnSaveHandler), handler);
|
10937
11415
|
}
|
10938
11416
|
settings.registerOnSaveHandler = registerOnSaveHandler;
|
10939
11417
|
/**
|
@@ -10948,7 +11426,7 @@ var settings;
|
|
10948
11426
|
* @param handler - The handler to invoke when the user selects the remove button.
|
10949
11427
|
*/
|
10950
11428
|
function registerOnRemoveHandler(handler) {
|
10951
|
-
pages.config.registerOnRemoveHandlerHelper(handler);
|
11429
|
+
pages.config.registerOnRemoveHandlerHelper(getApiVersionTag(settingsTelemetryVersionNumber, ApiName.Settings_RegisterOnRemoveHandler), handler);
|
10952
11430
|
}
|
10953
11431
|
settings.registerOnRemoveHandler = registerOnRemoveHandler;
|
10954
11432
|
})(settings || (settings = {}));
|
@@ -11009,11 +11487,11 @@ var tasks;
|
|
11009
11487
|
: undefined;
|
11010
11488
|
if (taskInfo.card === undefined && taskInfo.url === undefined) {
|
11011
11489
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
11012
|
-
|
11490
|
+
sendMessageToParentWithVersion(apiVersionTag, 'tasks.startTask', [taskInfo], submitHandler);
|
11013
11491
|
}
|
11014
11492
|
else if (taskInfo.card) {
|
11015
11493
|
internalAPIs_ensureInitialized(runtime_runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
11016
|
-
|
11494
|
+
sendMessageToParentWithVersion(apiVersionTag, 'tasks.startTask', [taskInfo], submitHandler);
|
11017
11495
|
}
|
11018
11496
|
else if (taskInfo.completionBotId !== undefined) {
|
11019
11497
|
botUrlOpenHelper(apiVersionTag, getBotUrlDialogInfoFromTaskInfo(taskInfo), dialogSubmitHandler);
|
@@ -11115,6 +11593,11 @@ var tasks;
|
|
11115
11593
|
|
11116
11594
|
|
11117
11595
|
|
11596
|
+
|
11597
|
+
/**
|
11598
|
+
* v2 APIs telemetry file: All of APIs in this capability file should send out API version v2 ONLY
|
11599
|
+
*/
|
11600
|
+
const interactiveTelemetryVersionNumber = ApiVersionNumber.V_2;
|
11118
11601
|
/**
|
11119
11602
|
* APIs involving Live Share, a framework for building real-time collaborative apps.
|
11120
11603
|
* For more information, visit https://aka.ms/teamsliveshare
|
@@ -11207,7 +11690,7 @@ class LiveShareHost {
|
|
11207
11690
|
getFluidTenantInfo() {
|
11208
11691
|
ensureSupported();
|
11209
11692
|
return new Promise((resolve) => {
|
11210
|
-
resolve(
|
11693
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(interactiveTelemetryVersionNumber, ApiName.Interactive_GetFluidTenantInfo), 'interactive.getFluidTenantInfo'));
|
11211
11694
|
});
|
11212
11695
|
}
|
11213
11696
|
/**
|
@@ -11220,8 +11703,9 @@ class LiveShareHost {
|
|
11220
11703
|
getFluidToken(containerId) {
|
11221
11704
|
ensureSupported();
|
11222
11705
|
return new Promise((resolve) => {
|
11706
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(interactiveTelemetryVersionNumber, ApiName.Interactive_GetFluidToken), 'interactive.getFluidToken',
|
11223
11707
|
// eslint-disable-next-line strict-null-checks/all
|
11224
|
-
|
11708
|
+
containerId));
|
11225
11709
|
});
|
11226
11710
|
}
|
11227
11711
|
/**
|
@@ -11231,7 +11715,7 @@ class LiveShareHost {
|
|
11231
11715
|
getFluidContainerId() {
|
11232
11716
|
ensureSupported();
|
11233
11717
|
return new Promise((resolve) => {
|
11234
|
-
resolve(
|
11718
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(interactiveTelemetryVersionNumber, ApiName.Interactive_GetFluidContainerId), 'interactive.getFluidContainerId'));
|
11235
11719
|
});
|
11236
11720
|
}
|
11237
11721
|
/**
|
@@ -11247,7 +11731,7 @@ class LiveShareHost {
|
|
11247
11731
|
setFluidContainerId(containerId) {
|
11248
11732
|
ensureSupported();
|
11249
11733
|
return new Promise((resolve) => {
|
11250
|
-
resolve(
|
11734
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(interactiveTelemetryVersionNumber, ApiName.Interactive_SetFluidContainerId), 'interactive.setFluidContainerId', containerId));
|
11251
11735
|
});
|
11252
11736
|
}
|
11253
11737
|
/**
|
@@ -11257,7 +11741,7 @@ class LiveShareHost {
|
|
11257
11741
|
getNtpTime() {
|
11258
11742
|
ensureSupported();
|
11259
11743
|
return new Promise((resolve) => {
|
11260
|
-
resolve(
|
11744
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(interactiveTelemetryVersionNumber, ApiName.Interactive_GetNtpTime), 'interactive.getNtpTime'));
|
11261
11745
|
});
|
11262
11746
|
}
|
11263
11747
|
/**
|
@@ -11270,7 +11754,7 @@ class LiveShareHost {
|
|
11270
11754
|
registerClientId(clientId) {
|
11271
11755
|
ensureSupported();
|
11272
11756
|
return new Promise((resolve) => {
|
11273
|
-
resolve(
|
11757
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(interactiveTelemetryVersionNumber, ApiName.Interactive_RegisterClientId), 'interactive.registerClientId', clientId));
|
11274
11758
|
});
|
11275
11759
|
}
|
11276
11760
|
/**
|
@@ -11283,7 +11767,7 @@ class LiveShareHost {
|
|
11283
11767
|
getClientRoles(clientId) {
|
11284
11768
|
ensureSupported();
|
11285
11769
|
return new Promise((resolve) => {
|
11286
|
-
resolve(
|
11770
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(interactiveTelemetryVersionNumber, ApiName.Interactive_GetClientRoles), 'interactive.getClientRoles', clientId));
|
11287
11771
|
});
|
11288
11772
|
}
|
11289
11773
|
/**
|
@@ -11296,7 +11780,7 @@ class LiveShareHost {
|
|
11296
11780
|
getClientInfo(clientId) {
|
11297
11781
|
ensureSupported();
|
11298
11782
|
return new Promise((resolve) => {
|
11299
|
-
resolve(
|
11783
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(interactiveTelemetryVersionNumber, ApiName.Interactive_GetClientInfo), 'interactive.getClientInfo', clientId));
|
11300
11784
|
});
|
11301
11785
|
}
|
11302
11786
|
/**
|
@@ -12080,6 +12564,7 @@ var externalAppCardActions;
|
|
12080
12564
|
|
12081
12565
|
|
12082
12566
|
|
12567
|
+
|
12083
12568
|
/**
|
12084
12569
|
* @hidden
|
12085
12570
|
*
|
@@ -12087,7 +12572,10 @@ var externalAppCardActions;
|
|
12087
12572
|
*
|
12088
12573
|
* @internal
|
12089
12574
|
* Limited to Microsoft-internal use
|
12575
|
+
*
|
12576
|
+
* v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
|
12090
12577
|
*/
|
12578
|
+
const filesTelemetryVersionNumber = ApiVersionNumber.V_1;
|
12091
12579
|
var files;
|
12092
12580
|
(function (files_1) {
|
12093
12581
|
/**
|
@@ -12185,7 +12673,9 @@ var files;
|
|
12185
12673
|
* @hidden
|
12186
12674
|
* Hide from docs
|
12187
12675
|
*
|
12188
|
-
* Gets a list of cloud storage folders added to the channel
|
12676
|
+
* Gets a list of cloud storage folders added to the channel. This function will not timeout;
|
12677
|
+
* the callback will only return when the host responds with a list of folders or error.
|
12678
|
+
*
|
12189
12679
|
* @param channelId - ID of the channel whose cloud storage folders should be retrieved
|
12190
12680
|
* @param callback - Callback that will be triggered post folders load
|
12191
12681
|
*
|
@@ -12200,7 +12690,7 @@ var files;
|
|
12200
12690
|
if (!callback) {
|
12201
12691
|
throw new Error('[files.getCloudStorageFolders] Callback cannot be null');
|
12202
12692
|
}
|
12203
|
-
|
12693
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_GetCloudStorageFolders), 'files.getCloudStorageFolders', [channelId], callback);
|
12204
12694
|
}
|
12205
12695
|
files_1.getCloudStorageFolders = getCloudStorageFolders;
|
12206
12696
|
/**
|
@@ -12223,7 +12713,7 @@ var files;
|
|
12223
12713
|
if (!callback) {
|
12224
12714
|
throw new Error('[files.addCloudStorageFolder] Callback cannot be null');
|
12225
12715
|
}
|
12226
|
-
|
12716
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_AddCloudStorageFolder), 'files.addCloudStorageFolder', [channelId], callback);
|
12227
12717
|
}
|
12228
12718
|
files_1.addCloudStorageFolder = addCloudStorageFolder;
|
12229
12719
|
/**
|
@@ -12251,7 +12741,7 @@ var files;
|
|
12251
12741
|
if (!callback) {
|
12252
12742
|
throw new Error('[files.deleteCloudStorageFolder] Callback cannot be null');
|
12253
12743
|
}
|
12254
|
-
|
12744
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_DeleteCloudStorageFolder), 'files.deleteCloudStorageFolder', [channelId, folderToDelete], callback);
|
12255
12745
|
}
|
12256
12746
|
files_1.deleteCloudStorageFolder = deleteCloudStorageFolder;
|
12257
12747
|
/**
|
@@ -12279,7 +12769,7 @@ var files;
|
|
12279
12769
|
if ('isSubdirectory' in folder && !folder.isSubdirectory) {
|
12280
12770
|
throw new Error('[files.getCloudStorageFolderContents] provided folder is not a subDirectory');
|
12281
12771
|
}
|
12282
|
-
|
12772
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_GetCloudStorageFolderContents), 'files.getCloudStorageFolderContents', [folder, providerCode], callback);
|
12283
12773
|
}
|
12284
12774
|
files_1.getCloudStorageFolderContents = getCloudStorageFolderContents;
|
12285
12775
|
/**
|
@@ -12304,7 +12794,7 @@ var files;
|
|
12304
12794
|
if (file.isSubdirectory) {
|
12305
12795
|
throw new Error('[files.openCloudStorageFile] provided file is a subDirectory');
|
12306
12796
|
}
|
12307
|
-
|
12797
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_OpenCloudStorageFile), 'files.openCloudStorageFile', [file, providerCode, fileOpenPreference]);
|
12308
12798
|
}
|
12309
12799
|
files_1.openCloudStorageFile = openCloudStorageFile;
|
12310
12800
|
/**
|
@@ -12322,7 +12812,7 @@ var files;
|
|
12322
12812
|
if (!callback) {
|
12323
12813
|
throw new Error('[files.getExternalProviders] Callback cannot be null');
|
12324
12814
|
}
|
12325
|
-
|
12815
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_GetExternalProviders), 'files.getExternalProviders', [excludeAddedProviders], callback);
|
12326
12816
|
}
|
12327
12817
|
files_1.getExternalProviders = getExternalProviders;
|
12328
12818
|
/**
|
@@ -12350,7 +12840,7 @@ var files;
|
|
12350
12840
|
if (!callback) {
|
12351
12841
|
throw new Error('[files.copyMoveFiles] callback cannot be null');
|
12352
12842
|
}
|
12353
|
-
|
12843
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_CopyMoveFiles), 'files.copyMoveFiles', [selectedFiles, providerCode, destinationFolder, destinationProviderCode, isMove], callback);
|
12354
12844
|
}
|
12355
12845
|
files_1.copyMoveFiles = copyMoveFiles;
|
12356
12846
|
/**
|
@@ -12369,7 +12859,7 @@ var files;
|
|
12369
12859
|
if (!callback) {
|
12370
12860
|
throw new Error('[files.getFileDownloads] Callback cannot be null');
|
12371
12861
|
}
|
12372
|
-
|
12862
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_GetFileDownloads), 'files.getFileDownloads', [], callback);
|
12373
12863
|
}
|
12374
12864
|
files_1.getFileDownloads = getFileDownloads;
|
12375
12865
|
/**
|
@@ -12388,7 +12878,7 @@ var files;
|
|
12388
12878
|
if (!callback) {
|
12389
12879
|
throw new Error('[files.openDownloadFolder] Callback cannot be null');
|
12390
12880
|
}
|
12391
|
-
|
12881
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_OpenDownloadFolder), 'files.openDownloadFolder', [fileObjectId], callback);
|
12392
12882
|
}
|
12393
12883
|
files_1.openDownloadFolder = openDownloadFolder;
|
12394
12884
|
/**
|
@@ -12412,7 +12902,7 @@ var files;
|
|
12412
12902
|
if (!callback) {
|
12413
12903
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.addCloudStorageProvider] callback cannot be null');
|
12414
12904
|
}
|
12415
|
-
|
12905
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_AddCloudStorageProvider), 'files.addCloudStorageProvider', [], callback);
|
12416
12906
|
}
|
12417
12907
|
files_1.addCloudStorageProvider = addCloudStorageProvider;
|
12418
12908
|
/**
|
@@ -12437,7 +12927,7 @@ var files;
|
|
12437
12927
|
if (!(logoutRequest && logoutRequest.content)) {
|
12438
12928
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.removeCloudStorageProvider] 3P cloud storage provider request content is missing');
|
12439
12929
|
}
|
12440
|
-
|
12930
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_RemoveCloudStorageProvider), 'files.removeCloudStorageProvider', [logoutRequest], callback);
|
12441
12931
|
}
|
12442
12932
|
files_1.removeCloudStorageProvider = removeCloudStorageProvider;
|
12443
12933
|
/**
|
@@ -12460,7 +12950,7 @@ var files;
|
|
12460
12950
|
if (!(addNewFileRequest && addNewFileRequest.content)) {
|
12461
12951
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.addCloudStorageProviderFile] 3P cloud storage provider request content is missing');
|
12462
12952
|
}
|
12463
|
-
|
12953
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_AddCloudStorageProviderFile), 'files.addCloudStorageProviderFile', [addNewFileRequest], callback);
|
12464
12954
|
}
|
12465
12955
|
files_1.addCloudStorageProviderFile = addCloudStorageProviderFile;
|
12466
12956
|
/**
|
@@ -12483,7 +12973,7 @@ var files;
|
|
12483
12973
|
if (!(renameFileRequest && renameFileRequest.content)) {
|
12484
12974
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.renameCloudStorageProviderFile] 3P cloud storage provider request content is missing');
|
12485
12975
|
}
|
12486
|
-
|
12976
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_RenameCloudStorageProviderFile), 'files.renameCloudStorageProviderFile', [renameFileRequest], callback);
|
12487
12977
|
}
|
12488
12978
|
files_1.renameCloudStorageProviderFile = renameCloudStorageProviderFile;
|
12489
12979
|
/**
|
@@ -12510,7 +13000,7 @@ var files;
|
|
12510
13000
|
deleteFileRequest.content.itemList.length > 0)) {
|
12511
13001
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.deleteCloudStorageProviderFile] 3P cloud storage provider request content details are missing');
|
12512
13002
|
}
|
12513
|
-
|
13003
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_DeleteCloudStorageProviderFile), 'files.deleteCloudStorageProviderFile', [deleteFileRequest], callback);
|
12514
13004
|
}
|
12515
13005
|
files_1.deleteCloudStorageProviderFile = deleteCloudStorageProviderFile;
|
12516
13006
|
/**
|
@@ -12537,7 +13027,7 @@ var files;
|
|
12537
13027
|
downloadFileRequest.content.itemList.length > 0)) {
|
12538
13028
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.downloadCloudStorageProviderFile] 3P cloud storage provider request content details are missing');
|
12539
13029
|
}
|
12540
|
-
|
13030
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_DownloadCloudStorageProviderFile), 'files.downloadCloudStorageProviderFile', [downloadFileRequest], callback);
|
12541
13031
|
}
|
12542
13032
|
files_1.downloadCloudStorageProviderFile = downloadCloudStorageProviderFile;
|
12543
13033
|
/**
|
@@ -12567,7 +13057,7 @@ var files;
|
|
12567
13057
|
if (!uploadFileRequest.content.destinationFolder) {
|
12568
13058
|
throw getSdkError(ErrorCode.INVALID_ARGUMENTS, '[files.uploadCloudStorageProviderFile] Invalid destination folder details');
|
12569
13059
|
}
|
12570
|
-
|
13060
|
+
sendMessageToParentWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_UploadCloudStorageProviderFile), 'files.uploadCloudStorageProviderFile', [uploadFileRequest], callback);
|
12571
13061
|
}
|
12572
13062
|
files_1.uploadCloudStorageProviderFile = uploadCloudStorageProviderFile;
|
12573
13063
|
/**
|
@@ -12586,7 +13076,7 @@ var files;
|
|
12586
13076
|
if (!handler) {
|
12587
13077
|
throw new Error('[registerCloudStorageProviderListChangeHandler] Handler cannot be null');
|
12588
13078
|
}
|
12589
|
-
|
13079
|
+
registerHandlerWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_RegisterCloudStorageProviderListChangeHandler), 'files.cloudStorageProviderListChange', handler);
|
12590
13080
|
}
|
12591
13081
|
files_1.registerCloudStorageProviderListChangeHandler = registerCloudStorageProviderListChangeHandler;
|
12592
13082
|
/**
|
@@ -12606,7 +13096,7 @@ var files;
|
|
12606
13096
|
if (!handler) {
|
12607
13097
|
throw new Error('[registerCloudStorageProviderContentChangeHandler] Handler cannot be null');
|
12608
13098
|
}
|
12609
|
-
|
13099
|
+
registerHandlerWithVersion(getApiVersionTag(filesTelemetryVersionNumber, ApiName.Files_RegisterCloudStorageProviderContentChangeHandler), 'files.cloudStorageProviderContentChange', handler);
|
12610
13100
|
}
|
12611
13101
|
files_1.registerCloudStorageProviderContentChangeHandler = registerCloudStorageProviderContentChangeHandler;
|
12612
13102
|
function getSdkError(errorCode, message) {
|
@@ -12624,12 +13114,16 @@ var files;
|
|
12624
13114
|
|
12625
13115
|
|
12626
13116
|
|
13117
|
+
|
12627
13118
|
/**
|
12628
13119
|
* @hidden
|
12629
13120
|
*
|
12630
13121
|
* @internal
|
12631
13122
|
* Limited to Microsoft-internal use
|
13123
|
+
*
|
13124
|
+
* v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
|
12632
13125
|
*/
|
13126
|
+
const meetingRoomTelemetryVersionNumber = ApiVersionNumber.V_1;
|
12633
13127
|
var meetingRoom;
|
12634
13128
|
(function (meetingRoom) {
|
12635
13129
|
/**
|
@@ -12647,7 +13141,7 @@ var meetingRoom;
|
|
12647
13141
|
if (!isSupported()) {
|
12648
13142
|
throw errorNotSupportedOnPlatform;
|
12649
13143
|
}
|
12650
|
-
resolve(
|
13144
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(meetingRoomTelemetryVersionNumber, ApiName.MeetingRoom_GetPairedMeetingRoomInfo), 'meetingRoom.getPairedMeetingRoomInfo'));
|
12651
13145
|
});
|
12652
13146
|
}
|
12653
13147
|
meetingRoom.getPairedMeetingRoomInfo = getPairedMeetingRoomInfo;
|
@@ -12670,7 +13164,7 @@ var meetingRoom;
|
|
12670
13164
|
if (!isSupported()) {
|
12671
13165
|
throw errorNotSupportedOnPlatform;
|
12672
13166
|
}
|
12673
|
-
resolve(
|
13167
|
+
resolve(sendAndHandleSdkErrorWithVersion(getApiVersionTag(meetingRoomTelemetryVersionNumber, ApiName.MeetingRoom_SendCommandToPairedMeetingRoom), 'meetingRoom.sendCommandToPairedMeetingRoom', commandName));
|
12674
13168
|
});
|
12675
13169
|
}
|
12676
13170
|
meetingRoom.sendCommandToPairedMeetingRoom = sendCommandToPairedMeetingRoom;
|
@@ -12692,7 +13186,7 @@ var meetingRoom;
|
|
12692
13186
|
if (!isSupported()) {
|
12693
13187
|
throw errorNotSupportedOnPlatform;
|
12694
13188
|
}
|
12695
|
-
|
13189
|
+
registerHandlerWithVersion(getApiVersionTag(meetingRoomTelemetryVersionNumber, ApiName.MeetingRoom_RegisterMeetingRoomCapabilitiesUpdateHandler), 'meetingRoom.meetingRoomCapabilitiesUpdate', (capabilities) => {
|
12696
13190
|
internalAPIs_ensureInitialized(runtime_runtime);
|
12697
13191
|
handler(capabilities);
|
12698
13192
|
});
|
@@ -12717,7 +13211,7 @@ var meetingRoom;
|
|
12717
13211
|
if (!isSupported()) {
|
12718
13212
|
throw errorNotSupportedOnPlatform;
|
12719
13213
|
}
|
12720
|
-
|
13214
|
+
registerHandlerWithVersion(getApiVersionTag(meetingRoomTelemetryVersionNumber, ApiName.MeetingRoom_RegisterMeetingRoomStatesUpdateHandler), 'meetingRoom.meetingRoomStatesUpdate', (states) => {
|
12721
13215
|
internalAPIs_ensureInitialized(runtime_runtime);
|
12722
13216
|
handler(states);
|
12723
13217
|
});
|
@@ -12745,13 +13239,17 @@ var meetingRoom;
|
|
12745
13239
|
|
12746
13240
|
|
12747
13241
|
|
13242
|
+
|
12748
13243
|
/**
|
12749
13244
|
* @hidden
|
12750
13245
|
* Hidden from Docs
|
12751
13246
|
*
|
12752
13247
|
* @internal
|
12753
13248
|
* Limited to Microsoft-internal use
|
13249
|
+
*
|
13250
|
+
* v1 APIs telemetry file: All of APIs in this capability file should send out API version v1 ONLY
|
12754
13251
|
*/
|
13252
|
+
const notificationsTelemetryVersionNumber = ApiVersionNumber.V_1;
|
12755
13253
|
var notifications;
|
12756
13254
|
(function (notifications) {
|
12757
13255
|
/**
|
@@ -12769,7 +13267,7 @@ var notifications;
|
|
12769
13267
|
if (!isSupported()) {
|
12770
13268
|
throw errorNotSupportedOnPlatform;
|
12771
13269
|
}
|
12772
|
-
|
13270
|
+
sendMessageToParentWithVersion(getApiVersionTag(notificationsTelemetryVersionNumber, ApiName.Notifications_ShowNotification), 'notifications.showNotification', [showNotificationParameters]);
|
12773
13271
|
}
|
12774
13272
|
notifications.showNotification = showNotification;
|
12775
13273
|
/**
|
@@ -13101,7 +13599,7 @@ var appEntity;
|
|
13101
13599
|
if (!callback) {
|
13102
13600
|
throw new Error('[appEntity.selectAppEntity] Callback cannot be null');
|
13103
13601
|
}
|
13104
|
-
|
13602
|
+
sendMessageToParentWithVersion(getApiVersionTag(appEntityTelemetryVersionNumber, ApiName.AppEntity_SelectAppEntity), 'appEntity.selectAppEntity', [threadId, categories, subEntityId], callback);
|
13105
13603
|
}
|
13106
13604
|
appEntity_1.selectAppEntity = selectAppEntity;
|
13107
13605
|
/**
|
@@ -13346,7 +13844,7 @@ var videoEffectsEx;
|
|
13346
13844
|
videoEffectsEx.frameProcessingTimeoutInMs = 2000;
|
13347
13845
|
const videoPerformanceMonitor = inServerSideRenderingEnvironment()
|
13348
13846
|
? undefined
|
13349
|
-
: new VideoPerformanceMonitor(
|
13847
|
+
: new VideoPerformanceMonitor(sendMessageToParentWithVersion);
|
13350
13848
|
/**
|
13351
13849
|
* @hidden
|
13352
13850
|
* Error level when notifying errors to the host, the host will decide what to do acording to the error level.
|