@microsoft/teams-js 2.33.0 → 3.0.0-beta.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +4 -1
- package/dist/esm/packages/teams-js/dts/private/store.d.ts +52 -47
- package/dist/esm/packages/teams-js/src/private/store.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/umd/MicrosoftTeams.js +66 -67
- package/dist/umd/MicrosoftTeams.js.map +1 -1
- package/dist/umd/MicrosoftTeams.min.js +1 -1
- package/dist/umd/MicrosoftTeams.min.js.map +1 -1
- package/package.json +1 -50
@@ -300,7 +300,10 @@ export declare const enum ApiName {
|
|
300
300
|
Sharing_ShareWebContent = "sharing.shareWebContent",
|
301
301
|
StageView_Open = "stageView.open",
|
302
302
|
StageView_Self_Close = "stageView.self.close",
|
303
|
-
|
303
|
+
Store_OpenFullStore = "store.openFullStore",
|
304
|
+
Store_OpenAppDetail = "store.openAppDetail",
|
305
|
+
Store_OpenInContextStore = "store.openInContextStore",
|
306
|
+
Store_OpenSpecificStore = "store.openSpecificStore",
|
304
307
|
Tasks_StartTask = "tasks.startTask",
|
305
308
|
Tasks_SubmitTask = "tasks.submitTask",
|
306
309
|
Tasks_UpdateTask = "tasks.updateTask",
|
@@ -1,41 +1,57 @@
|
|
1
|
+
import { DialogSize } from '../public';
|
1
2
|
import { AppId } from '../public/appId';
|
2
3
|
/**
|
3
4
|
* @beta
|
4
5
|
* @hidden
|
5
|
-
*
|
6
|
+
* @module
|
7
|
+
* Namespace to open app store
|
6
8
|
* @internal
|
7
9
|
* Limited to Microsoft-internal use
|
8
10
|
*/
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
SpecificStore = "specificstore",
|
18
|
-
/**
|
19
|
-
* open in-context-store
|
20
|
-
*/
|
21
|
-
InContextStore = "ics",
|
11
|
+
/**
|
12
|
+
* @beta
|
13
|
+
* @hidden
|
14
|
+
* Interface for opening the full store function parameters
|
15
|
+
* @internal
|
16
|
+
* Limited to Microsoft-internal use
|
17
|
+
*/
|
18
|
+
export interface OpenFullStoreParams {
|
22
19
|
/**
|
23
|
-
*
|
20
|
+
* the store dialog size, defined by {@link DialogSize}, if not present, the host will choose an appropriate size
|
24
21
|
*/
|
25
|
-
|
22
|
+
size?: DialogSize;
|
26
23
|
}
|
27
24
|
/**
|
28
25
|
* @beta
|
29
26
|
* @hidden
|
30
|
-
* Interface
|
27
|
+
* Interface for opening the in-context store function parameters
|
31
28
|
* @internal
|
32
29
|
* Limited to Microsoft-internal use
|
33
30
|
*/
|
34
|
-
export interface
|
31
|
+
export interface OpenInContextStoreParams {
|
32
|
+
/**
|
33
|
+
* the store dialog size, defined by {@link DialogSize}, if not present, the host will choose an appropriate size
|
34
|
+
*/
|
35
|
+
size?: DialogSize;
|
36
|
+
/**
|
37
|
+
* The application capability (e.g., "Tab", "Bot", "Messaging", "Connector", "CUSTOMBOT").
|
38
|
+
* Defaults to "Tab".
|
39
|
+
*/
|
40
|
+
appCapability?: string;
|
41
|
+
/**
|
42
|
+
* The application meta capabilities (e.g., ["copilotPlugins", "copilotExtensions"]).
|
43
|
+
* Defaults to "[]".
|
44
|
+
*/
|
45
|
+
appMetaCapabilities?: string[];
|
35
46
|
/**
|
36
|
-
*
|
47
|
+
* The installation scope (e.g., "Personal" | "Team").
|
48
|
+
* Defaults to "Personal".
|
37
49
|
*/
|
38
|
-
|
50
|
+
installationScope?: string;
|
51
|
+
/**
|
52
|
+
* A list of app IDs to be filtered out.
|
53
|
+
*/
|
54
|
+
filteredOutAppIds?: AppId[];
|
39
55
|
}
|
40
56
|
/**
|
41
57
|
* @beta
|
@@ -45,14 +61,14 @@ export interface OpenFullStoreAndICSParams {
|
|
45
61
|
* Limited to Microsoft-internal use
|
46
62
|
*/
|
47
63
|
export interface OpenAppDetailParams {
|
48
|
-
/**
|
49
|
-
* need to be app detail type, defined by {@link StoreDialogType}
|
50
|
-
*/
|
51
|
-
dialogType: StoreDialogType.AppDetail;
|
52
64
|
/**
|
53
65
|
* app id of the dialog to open
|
54
66
|
*/
|
55
67
|
appId: AppId;
|
68
|
+
/**
|
69
|
+
* the store dialog size, defined by {@link DialogSize}, if not present, the host will choose an appropriate size
|
70
|
+
*/
|
71
|
+
size?: DialogSize;
|
56
72
|
}
|
57
73
|
/**
|
58
74
|
* @beta
|
@@ -62,58 +78,47 @@ export interface OpenAppDetailParams {
|
|
62
78
|
* Limited to Microsoft-internal use
|
63
79
|
*/
|
64
80
|
export interface OpenSpecificStoreParams {
|
65
|
-
/**
|
66
|
-
* need to be specific store type, defined by {@link StoreDialogType}
|
67
|
-
*/
|
68
|
-
dialogType: StoreDialogType.SpecificStore;
|
69
81
|
/**
|
70
82
|
* collection id of the plugin store to open
|
71
83
|
*/
|
72
84
|
collectionId: string;
|
85
|
+
/**
|
86
|
+
* the store dialog size, defined by {@link DialogSize}, if not present, the host will choose an appropriate size
|
87
|
+
*/
|
88
|
+
size?: DialogSize;
|
73
89
|
}
|
74
90
|
/**
|
75
91
|
* @beta
|
76
92
|
* @hidden
|
77
|
-
*
|
93
|
+
* Api to open a full store without navigation
|
78
94
|
* @internal
|
79
95
|
* Limited to Microsoft-internal use
|
80
96
|
*/
|
81
|
-
export
|
97
|
+
export declare function openFullStore(params: OpenFullStoreParams | undefined): Promise<void>;
|
82
98
|
/**
|
83
99
|
* @beta
|
84
100
|
* @hidden
|
85
|
-
*
|
101
|
+
* Api to open an app detail dialog
|
86
102
|
* @internal
|
87
103
|
* Limited to Microsoft-internal use
|
88
104
|
*/
|
89
|
-
export declare
|
105
|
+
export declare function openAppDetail(params: OpenAppDetailParams): Promise<void>;
|
90
106
|
/**
|
91
107
|
* @beta
|
92
108
|
* @hidden
|
93
|
-
*
|
109
|
+
* Api to open an in-context-store dialog
|
94
110
|
* @internal
|
95
111
|
* Limited to Microsoft-internal use
|
96
112
|
*/
|
97
|
-
export declare
|
113
|
+
export declare function openInContextStore(params: OpenInContextStoreParams | undefined): Promise<void>;
|
98
114
|
/**
|
99
115
|
* @beta
|
100
116
|
* @hidden
|
101
|
-
*
|
102
|
-
* @internal
|
103
|
-
* Limited to Microsoft-internal use
|
104
|
-
*/
|
105
|
-
export declare const errorMissingCollectionId = "No Collection Id present, but CollectionId needed to open a store specific to a collection";
|
106
|
-
/**
|
107
|
-
* @beta
|
108
|
-
* @hidden
|
109
|
-
* Api to open a store
|
110
|
-
*
|
111
|
-
* @param openStoreParams - params to call openStoreExperience
|
112
|
-
*
|
117
|
+
* Api to open an store with navigation to a specific collection
|
113
118
|
* @internal
|
114
119
|
* Limited to Microsoft-internal use
|
115
120
|
*/
|
116
|
-
export declare function
|
121
|
+
export declare function openSpecificStore(params: OpenSpecificStoreParams): Promise<void>;
|
117
122
|
/**
|
118
123
|
* Checks if the store capability is supported by the host
|
119
124
|
* @returns boolean to represent whether the store capability is supported
|
@@ -1 +1 @@
|
|
1
|
-
import{__awaiter as
|
1
|
+
import{__awaiter as t}from"../../../../node_modules/.pnpm/@rollup_plugin-typescript@11.1.6_rollup@4.24.4_tslib@2.6.3_typescript@4.9.5/node_modules/tslib/tslib.es6.js";import{callFunctionInHost as o}from"../internal/communication.js";import{ensureInitialized as e}from"../internal/internalAPIs.js";import{getApiVersionTag as n}from"../internal/telemetry.js";import{AppId as i}from"../public/appId.js";import{FrameContexts as r,errorNotSupportedOnPlatform as p}from"../public/constants.js";import{runtime as s}from"../public/runtime.js";const l="v2",u="Invalid store dialog size";function c(e){return t(this,void 0,void 0,(function*(){v();const{size:t}=null!=e?e:{};return o("store.openFullStore",[b(t)],n(l,"store.openFullStore"))}))}function d(e){return t(this,void 0,void 0,(function*(){v();const{size:t,appId:r}=e;if(!(r instanceof i))throw new Error("No App Id present, but AppId needed to open AppDetail store");return o("store.openAppDetail",[b(t),r],n(l,"store.openAppDetail"))}))}function f(e){return t(this,void 0,void 0,(function*(){v();const{size:t,appCapability:i,appMetaCapabilities:r,installationScope:p,filteredOutAppIds:s}=null!=e?e:{};return o("store.openInContextStore",[b(t),i,r,p,null==s?void 0:s.map((t=>t.toString()))],n(l,"store.openInContextStore"))}))}function a(e){return t(this,void 0,void 0,(function*(){v();const{size:t,collectionId:i}=e;if(void 0===i)throw new Error("No Collection Id present, but CollectionId needed to open a store specific to a collection");return o("store.openSpecificStore",[b(t),i],n(l,"store.openSpecificStore"))}))}function m(){return e(s)&&!!s.supports.store}function v(){if(e(s,r.content,r.sidePanel,r.meetingStage),!m())throw p}function b(t){if(void 0===t)return;const{width:o,height:e}=t;if(void 0!==o&&"number"==typeof o&&o<0)throw new Error(u);if(void 0!==e&&"number"==typeof e&&e<0)throw new Error(u);return JSON.stringify(t)}export{m as isSupported,d as openAppDetail,c as openFullStore,f as openInContextStore,a as openSpecificStore};
|
@@ -1 +1 @@
|
|
1
|
-
const
|
1
|
+
const t="3.0.0-beta.1";export{t as version};
|
@@ -1607,12 +1607,11 @@ __webpack_require__.d(hostEntity_namespaceObject, {
|
|
1607
1607
|
var store_namespaceObject = {};
|
1608
1608
|
__webpack_require__.r(store_namespaceObject);
|
1609
1609
|
__webpack_require__.d(store_namespaceObject, {
|
1610
|
-
StoreDialogType: () => (StoreDialogType),
|
1611
|
-
errorInvalidDialogType: () => (errorInvalidDialogType),
|
1612
|
-
errorMissingAppId: () => (errorMissingAppId),
|
1613
|
-
errorMissingCollectionId: () => (errorMissingCollectionId),
|
1614
1610
|
isSupported: () => (store_isSupported),
|
1615
|
-
|
1611
|
+
openAppDetail: () => (openAppDetail),
|
1612
|
+
openFullStore: () => (openFullStore),
|
1613
|
+
openInContextStore: () => (openInContextStore),
|
1614
|
+
openSpecificStore: () => (openSpecificStore)
|
1616
1615
|
});
|
1617
1616
|
|
1618
1617
|
// NAMESPACE OBJECT: ./src/public/appInstallDialog.ts
|
@@ -4461,7 +4460,7 @@ function isSerializable(arg) {
|
|
4461
4460
|
* @hidden
|
4462
4461
|
* Package version.
|
4463
4462
|
*/
|
4464
|
-
const version = "
|
4463
|
+
const version = "3.0.0-beta.1";
|
4465
4464
|
|
4466
4465
|
;// ./src/internal/internalAPIs.ts
|
4467
4466
|
|
@@ -13023,95 +13022,76 @@ var store_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _ar
|
|
13023
13022
|
|
13024
13023
|
|
13025
13024
|
|
13026
|
-
/**
|
13027
|
-
* @beta
|
13028
|
-
* @hidden
|
13029
|
-
* @module
|
13030
|
-
* Namespace to open app store
|
13031
|
-
* @internal
|
13032
|
-
* Limited to Microsoft-internal use
|
13033
|
-
*/
|
13034
13025
|
const StoreVersionTagNum = "v2" /* ApiVersionNumber.V_2 */;
|
13026
|
+
const errorInvalidDialogSize = 'Invalid store dialog size';
|
13027
|
+
const errorMissingAppId = 'No App Id present, but AppId needed to open AppDetail store';
|
13028
|
+
const errorMissingCollectionId = 'No Collection Id present, but CollectionId needed to open a store specific to a collection';
|
13035
13029
|
/**
|
13036
13030
|
* @beta
|
13037
13031
|
* @hidden
|
13038
|
-
*
|
13039
|
-
* @internal
|
13040
|
-
* Limited to Microsoft-internal use
|
13041
|
-
*/
|
13042
|
-
var StoreDialogType;
|
13043
|
-
(function (StoreDialogType) {
|
13044
|
-
/**
|
13045
|
-
* open a store without navigation
|
13046
|
-
*/
|
13047
|
-
StoreDialogType["FullStore"] = "fullstore";
|
13048
|
-
/**
|
13049
|
-
* open a store with navigation to a specific collection
|
13050
|
-
*/
|
13051
|
-
StoreDialogType["SpecificStore"] = "specificstore";
|
13052
|
-
/**
|
13053
|
-
* open in-context-store
|
13054
|
-
*/
|
13055
|
-
StoreDialogType["InContextStore"] = "ics";
|
13056
|
-
/**
|
13057
|
-
* open detail dialog (DD)
|
13058
|
-
*/
|
13059
|
-
StoreDialogType["AppDetail"] = "appdetail";
|
13060
|
-
})(StoreDialogType || (StoreDialogType = {}));
|
13061
|
-
/**
|
13062
|
-
* @beta
|
13063
|
-
* @hidden
|
13064
|
-
* error message when getting invalid store dialog type
|
13032
|
+
* Api to open a full store without navigation
|
13065
13033
|
* @internal
|
13066
13034
|
* Limited to Microsoft-internal use
|
13067
13035
|
*/
|
13068
|
-
|
13036
|
+
function openFullStore(params) {
|
13037
|
+
return store_awaiter(this, void 0, void 0, function* () {
|
13038
|
+
ensureStoreReady();
|
13039
|
+
const { size } = params !== null && params !== void 0 ? params : {};
|
13040
|
+
return callFunctionInHost("store.openFullStore" /* ApiName.Store_OpenFullStore */, [serializeValidSize(size)], getApiVersionTag(StoreVersionTagNum, "store.openFullStore" /* ApiName.Store_OpenFullStore */));
|
13041
|
+
});
|
13042
|
+
}
|
13069
13043
|
/**
|
13070
13044
|
* @beta
|
13071
13045
|
* @hidden
|
13072
|
-
*
|
13046
|
+
* Api to open an app detail dialog
|
13073
13047
|
* @internal
|
13074
13048
|
* Limited to Microsoft-internal use
|
13075
13049
|
*/
|
13076
|
-
|
13050
|
+
function openAppDetail(params) {
|
13051
|
+
return store_awaiter(this, void 0, void 0, function* () {
|
13052
|
+
ensureStoreReady();
|
13053
|
+
const { size, appId } = params;
|
13054
|
+
if (!(appId instanceof AppId)) {
|
13055
|
+
throw new Error(errorMissingAppId);
|
13056
|
+
}
|
13057
|
+
return callFunctionInHost("store.openAppDetail" /* ApiName.Store_OpenAppDetail */, [serializeValidSize(size), appId], getApiVersionTag(StoreVersionTagNum, "store.openAppDetail" /* ApiName.Store_OpenAppDetail */));
|
13058
|
+
});
|
13059
|
+
}
|
13077
13060
|
/**
|
13078
13061
|
* @beta
|
13079
13062
|
* @hidden
|
13080
|
-
*
|
13063
|
+
* Api to open an in-context-store dialog
|
13081
13064
|
* @internal
|
13082
13065
|
* Limited to Microsoft-internal use
|
13083
13066
|
*/
|
13084
|
-
|
13067
|
+
function openInContextStore(params) {
|
13068
|
+
return store_awaiter(this, void 0, void 0, function* () {
|
13069
|
+
ensureStoreReady();
|
13070
|
+
const { size, appCapability, appMetaCapabilities, installationScope, filteredOutAppIds } = params !== null && params !== void 0 ? params : {};
|
13071
|
+
return callFunctionInHost("store.openInContextStore" /* ApiName.Store_OpenInContextStore */, [
|
13072
|
+
serializeValidSize(size),
|
13073
|
+
appCapability,
|
13074
|
+
appMetaCapabilities,
|
13075
|
+
installationScope,
|
13076
|
+
filteredOutAppIds === null || filteredOutAppIds === void 0 ? void 0 : filteredOutAppIds.map((id) => id.toString()),
|
13077
|
+
], getApiVersionTag(StoreVersionTagNum, "store.openInContextStore" /* ApiName.Store_OpenInContextStore */));
|
13078
|
+
});
|
13079
|
+
}
|
13085
13080
|
/**
|
13086
13081
|
* @beta
|
13087
13082
|
* @hidden
|
13088
|
-
* Api to open a
|
13089
|
-
*
|
13090
|
-
* @param openStoreParams - params to call openStoreExperience
|
13091
|
-
*
|
13083
|
+
* Api to open an store with navigation to a specific collection
|
13092
13084
|
* @internal
|
13093
13085
|
* Limited to Microsoft-internal use
|
13094
13086
|
*/
|
13095
|
-
function
|
13087
|
+
function openSpecificStore(params) {
|
13096
13088
|
return store_awaiter(this, void 0, void 0, function* () {
|
13097
|
-
|
13098
|
-
|
13099
|
-
|
13100
|
-
}
|
13101
|
-
if (openStoreParams === undefined || !Object.values(StoreDialogType).includes(openStoreParams.dialogType)) {
|
13102
|
-
throw new Error(errorInvalidDialogType);
|
13103
|
-
}
|
13104
|
-
if (openStoreParams.dialogType === StoreDialogType.AppDetail && !(openStoreParams.appId instanceof AppId)) {
|
13105
|
-
throw new Error(errorMissingAppId);
|
13106
|
-
}
|
13107
|
-
if (openStoreParams.dialogType === StoreDialogType.SpecificStore && !openStoreParams.collectionId) {
|
13089
|
+
ensureStoreReady();
|
13090
|
+
const { size, collectionId } = params;
|
13091
|
+
if (collectionId === undefined) {
|
13108
13092
|
throw new Error(errorMissingCollectionId);
|
13109
13093
|
}
|
13110
|
-
return callFunctionInHost("store.
|
13111
|
-
openStoreParams.dialogType,
|
13112
|
-
openStoreParams.appId,
|
13113
|
-
openStoreParams.collectionId,
|
13114
|
-
], getApiVersionTag(StoreVersionTagNum, "store.open" /* ApiName.Store_Open */));
|
13094
|
+
return callFunctionInHost("store.openSpecificStore" /* ApiName.Store_OpenSpecificStore */, [serializeValidSize(size), collectionId], getApiVersionTag(StoreVersionTagNum, "store.openSpecificStore" /* ApiName.Store_OpenSpecificStore */));
|
13115
13095
|
});
|
13116
13096
|
}
|
13117
13097
|
/**
|
@@ -13123,6 +13103,25 @@ function openStoreExperience(openStoreParams) {
|
|
13123
13103
|
function store_isSupported() {
|
13124
13104
|
return ensureInitialized(runtime) && !!runtime.supports.store;
|
13125
13105
|
}
|
13106
|
+
function ensureStoreReady() {
|
13107
|
+
ensureInitialized(runtime, FrameContexts.content, FrameContexts.sidePanel, FrameContexts.meetingStage);
|
13108
|
+
if (!store_isSupported()) {
|
13109
|
+
throw errorNotSupportedOnPlatform;
|
13110
|
+
}
|
13111
|
+
}
|
13112
|
+
function serializeValidSize(size) {
|
13113
|
+
if (size === undefined) {
|
13114
|
+
return undefined;
|
13115
|
+
}
|
13116
|
+
const { width, height } = size;
|
13117
|
+
if (width !== undefined && typeof width === 'number' && width < 0) {
|
13118
|
+
throw new Error(errorInvalidDialogSize);
|
13119
|
+
}
|
13120
|
+
if (height !== undefined && typeof height === 'number' && height < 0) {
|
13121
|
+
throw new Error(errorInvalidDialogSize);
|
13122
|
+
}
|
13123
|
+
return JSON.stringify(size);
|
13124
|
+
}
|
13126
13125
|
|
13127
13126
|
;// ./src/private/index.ts
|
13128
13127
|
|