@microsoft/teams-js 2.31.0-beta.0 → 2.31.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/appHelpers.d.ts +1 -1
- package/dist/esm/packages/teams-js/dts/internal/dialogHelpers.d.ts +32 -0
- package/dist/esm/packages/teams-js/dts/internal/marketplaceUtils.d.ts +1 -1
- package/dist/esm/packages/teams-js/dts/internal/mediaUtil.d.ts +2 -2
- package/dist/esm/packages/teams-js/dts/public/{app.d.ts → app/app.d.ts} +13 -44
- package/dist/esm/packages/teams-js/dts/public/app/lifecycle.d.ts +40 -0
- package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +1 -1
- package/dist/esm/packages/teams-js/dts/public/chat.d.ts +26 -28
- package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/adaptiveCard.d.ts +30 -0
- package/dist/esm/packages/teams-js/dts/public/dialog/adaptiveCard/bot.d.ts +26 -0
- package/dist/esm/packages/teams-js/dts/public/dialog/dialog.d.ts +69 -0
- package/dist/esm/packages/teams-js/dts/public/dialog/update.d.ts +23 -0
- package/dist/esm/packages/teams-js/dts/public/dialog/url/bot.d.ts +29 -0
- package/dist/esm/packages/teams-js/dts/public/dialog/url/parentCommunication.d.ts +49 -0
- package/dist/esm/packages/teams-js/dts/public/dialog/url/url.d.ts +60 -0
- package/dist/esm/packages/teams-js/dts/public/geoLocation/geoLocation.d.ts +67 -0
- package/dist/esm/packages/teams-js/dts/public/geoLocation/map.d.ts +27 -0
- package/dist/esm/packages/teams-js/dts/public/index.d.ts +20 -18
- package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +12 -1
- package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +134 -136
- package/dist/esm/packages/teams-js/dts/public/location.d.ts +72 -74
- package/dist/esm/packages/teams-js/dts/public/mail.d.ts +79 -81
- package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +314 -316
- package/dist/esm/packages/teams-js/dts/public/media.d.ts +425 -427
- package/dist/esm/packages/teams-js/dts/public/menus.d.ts +164 -166
- package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +48 -50
- package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +9 -11
- package/dist/esm/packages/teams-js/dts/public/people.d.ts +61 -63
- package/dist/esm/packages/teams-js/dts/public/search.d.ts +76 -86
- package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +25 -27
- package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +52 -54
- package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +74 -76
- package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +96 -98
- package/dist/esm/packages/teams-js/src/index.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/deepLinkUtilities.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/dialogHelpers.js +1 -0
- package/dist/esm/packages/teams-js/src/internal/marketplaceUtils.js +1 -1
- package/dist/esm/packages/teams-js/src/internal/mediaUtil.js +1 -1
- package/dist/esm/packages/teams-js/src/public/app/app.js +1 -0
- package/dist/esm/packages/teams-js/src/public/app/lifecycle.js +1 -0
- package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
- package/dist/esm/packages/teams-js/src/public/chat.js +1 -1
- package/dist/esm/packages/teams-js/src/public/dialog/adaptiveCard/adaptiveCard.js +1 -0
- package/dist/esm/packages/teams-js/src/public/dialog/adaptiveCard/bot.js +1 -0
- package/dist/esm/packages/teams-js/src/public/dialog/dialog.js +1 -0
- package/dist/esm/packages/teams-js/src/public/dialog/update.js +1 -0
- package/dist/esm/packages/teams-js/src/public/dialog/url/bot.js +1 -0
- package/dist/esm/packages/teams-js/src/public/dialog/url/parentCommunication.js +1 -0
- package/dist/esm/packages/teams-js/src/public/dialog/url/url.js +1 -0
- package/dist/esm/packages/teams-js/src/public/geoLocation/geoLocation.js +1 -0
- package/dist/esm/packages/teams-js/src/public/geoLocation/map.js +1 -0
- package/dist/esm/packages/teams-js/src/public/liveShareHost.js +1 -1
- package/dist/esm/packages/teams-js/src/public/location.js +1 -1
- package/dist/esm/packages/teams-js/src/public/mail.js +1 -1
- package/dist/esm/packages/teams-js/src/public/marketplace.js +1 -1
- package/dist/esm/packages/teams-js/src/public/media.js +1 -1
- package/dist/esm/packages/teams-js/src/public/menus.js +1 -1
- package/dist/esm/packages/teams-js/src/public/monetization.js +1 -1
- package/dist/esm/packages/teams-js/src/public/nestedAppAuth.js +1 -1
- package/dist/esm/packages/teams-js/src/public/people.js +1 -1
- package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
- package/dist/esm/packages/teams-js/src/public/search.js +1 -1
- package/dist/esm/packages/teams-js/src/public/secondaryBrowser.js +1 -1
- package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
- package/dist/esm/packages/teams-js/src/public/teamsAPIs.js +1 -1
- package/dist/esm/packages/teams-js/src/public/thirdPartyCloudStorage.js +1 -1
- package/dist/esm/packages/teams-js/src/public/version.js +1 -1
- package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
- package/dist/umd/MicrosoftTeams.d.ts +2219 -2022
- package/dist/umd/MicrosoftTeams.js +2397 -2244
- 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 -1
- package/dist/esm/packages/teams-js/dts/public/dialog.d.ts +0 -286
- package/dist/esm/packages/teams-js/dts/public/geoLocation.d.ts +0 -100
- package/dist/esm/packages/teams-js/src/public/app.js +0 -1
- package/dist/esm/packages/teams-js/src/public/dialog.js +0 -1
- package/dist/esm/packages/teams-js/src/public/geoLocation.js +0 -1
@@ -1,321 +1,319 @@
|
|
1
1
|
/**
|
2
2
|
* @hidden
|
3
|
-
*
|
3
|
+
* Module for an app to support a checkout flow by interacting with the marketplace cart in the host.
|
4
4
|
* @beta
|
5
5
|
*/
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
TeamsEndUser = "TeamsEndUser"
|
185
|
-
}
|
186
|
-
/**
|
187
|
-
* @hidden
|
188
|
-
* Represents the status of the cart.
|
189
|
-
* @beta
|
190
|
-
*/
|
191
|
-
export enum CartStatus {
|
192
|
-
/**
|
193
|
-
* @hidden
|
194
|
-
* Cart is created but not checked out yet.
|
195
|
-
*/
|
196
|
-
Open = "Open",
|
197
|
-
/**
|
198
|
-
* @hidden
|
199
|
-
* Cart is checked out but not completed yet.
|
200
|
-
*/
|
201
|
-
Processing = "Processing",
|
202
|
-
/**
|
203
|
-
* @hidden
|
204
|
-
* Indicate checking out is completed and the host should
|
205
|
-
* return a new cart in the next getCart call.
|
206
|
-
*/
|
207
|
-
Processed = "Processed",
|
208
|
-
/**
|
209
|
-
* @hidden
|
210
|
-
* Indicate checking out process is manually cancelled by the user
|
211
|
-
*/
|
212
|
-
Closed = "Closed",
|
213
|
-
/**
|
214
|
-
* @hidden
|
215
|
-
* Indicate checking out is failed and the host should
|
216
|
-
* return a new cart in the next getCart call.
|
217
|
-
*/
|
218
|
-
Error = "Error"
|
219
|
-
}
|
220
|
-
/**
|
221
|
-
* @hidden
|
222
|
-
* Represents the parameters to update the cart items.
|
223
|
-
* @beta
|
224
|
-
*/
|
225
|
-
export interface AddOrUpdateCartItemsParams {
|
226
|
-
/**
|
227
|
-
* @hidden
|
228
|
-
* The uuid of the cart to be updated, target on the cart
|
229
|
-
* being checked out if cartId is not provided.
|
230
|
-
*/
|
231
|
-
cartId?: string;
|
232
|
-
/**
|
233
|
-
* @hidden
|
234
|
-
* A list of cart items object, for each item,
|
235
|
-
* if item id exists in the cart, overwrite the item price and quantity,
|
236
|
-
* otherwise add new items to cart.
|
237
|
-
*/
|
238
|
-
cartItems: CartItem[];
|
239
|
-
}
|
240
|
-
/**
|
241
|
-
* @hidden
|
242
|
-
* Represents the parameters to remove the cart items.
|
243
|
-
* @beta
|
244
|
-
*/
|
245
|
-
export interface RemoveCartItemsParams {
|
246
|
-
/**
|
247
|
-
* @hidden
|
248
|
-
* The uuid of the cart to be updated, target on the cart
|
249
|
-
* being checked out if cartId is not provided.
|
250
|
-
*/
|
251
|
-
cartId?: string;
|
252
|
-
/**
|
253
|
-
* @hidden
|
254
|
-
* A list of cart id, delete the cart item accordingly.
|
255
|
-
*/
|
256
|
-
cartItemIds: string[];
|
257
|
-
}
|
258
|
-
/**
|
259
|
-
* @hidden
|
260
|
-
* Represents the parameters to update the cart status.
|
261
|
-
* @beta
|
262
|
-
*/
|
263
|
-
export interface UpdateCartStatusParams {
|
264
|
-
/**
|
265
|
-
* @hidden
|
266
|
-
* The uuid of the cart to be updated, target on the cart
|
267
|
-
* being checked out if cartId is not provided.
|
268
|
-
*/
|
269
|
-
cartId?: string;
|
270
|
-
/**
|
271
|
-
* @hidden
|
272
|
-
* Status of the cart.
|
273
|
-
*/
|
274
|
-
cartStatus: CartStatus;
|
275
|
-
/**
|
276
|
-
* @hidden
|
277
|
-
* Extra info to the status.
|
278
|
-
*/
|
279
|
-
statusInfo?: string;
|
280
|
-
}
|
281
|
-
/**
|
282
|
-
* @hidden
|
283
|
-
* Get the cart object owned by the host to checkout.
|
284
|
-
* @returns A promise of the cart object in the cartVersion.
|
285
|
-
* @beta
|
286
|
-
*/
|
287
|
-
export function getCart(): Promise<Cart>;
|
288
|
-
/**
|
289
|
-
* @hidden
|
290
|
-
* Add or update cart items in the cart owned by the host.
|
291
|
-
* @param addOrUpdateCartItemsParams Represents the parameters to update the cart items.
|
292
|
-
* @returns A promise of the updated cart object in the cartVersion.
|
293
|
-
* @beta
|
294
|
-
*/
|
295
|
-
export function addOrUpdateCartItems(addOrUpdateCartItemsParams: AddOrUpdateCartItemsParams): Promise<Cart>;
|
296
|
-
/**
|
297
|
-
* @hidden
|
298
|
-
* Remove cart items from the cart owned by the host.
|
299
|
-
* @param removeCartItemsParams The parameters to remove the cart items.
|
300
|
-
* @returns A promise of the updated cart object in the cartVersion.
|
301
|
-
* @beta
|
302
|
-
*/
|
303
|
-
export function removeCartItems(removeCartItemsParams: RemoveCartItemsParams): Promise<Cart>;
|
304
|
-
/**
|
305
|
-
* @hidden
|
306
|
-
* Update cart status in the cart owned by the host.
|
307
|
-
* @param updateCartStatusParams The parameters to update the cart status.
|
308
|
-
* @returns A promise of the updated cart object in the cartVersion.
|
309
|
-
* @beta
|
310
|
-
*/
|
311
|
-
export function updateCartStatus(updateCartStatusParams: UpdateCartStatusParams): Promise<Cart>;
|
312
|
-
/**
|
313
|
-
* @hidden
|
314
|
-
* Checks if the marketplace capability is supported by the host.
|
315
|
-
* @returns Boolean to represent whether the marketplace capability is supported.
|
316
|
-
* @throws Error if {@linkcode app.initialize} has not successfully completed.
|
317
|
-
* @beta
|
318
|
-
*/
|
319
|
-
export function isSupported(): boolean;
|
320
|
-
export {};
|
6
|
+
/**
|
7
|
+
* @hidden
|
8
|
+
* the version of the current cart interface
|
9
|
+
* which is forced to send to the host in the calls.
|
10
|
+
* @internal
|
11
|
+
* Limited to Microsoft-internal use
|
12
|
+
* @beta
|
13
|
+
*/
|
14
|
+
export declare const cartVersion: CartVersion;
|
15
|
+
/**
|
16
|
+
* @hidden
|
17
|
+
* Represents the cart object for the app checkout flow.
|
18
|
+
* @beta
|
19
|
+
*/
|
20
|
+
export interface Cart {
|
21
|
+
/**
|
22
|
+
* @hidden
|
23
|
+
* Version of the cart.
|
24
|
+
*/
|
25
|
+
readonly version: CartVersion;
|
26
|
+
/**
|
27
|
+
* @hidden
|
28
|
+
* The uuid of the cart.
|
29
|
+
*/
|
30
|
+
readonly id: string;
|
31
|
+
/**
|
32
|
+
* @hidden
|
33
|
+
* The cart info.
|
34
|
+
*/
|
35
|
+
readonly cartInfo: CartInfo;
|
36
|
+
/**
|
37
|
+
* @hidden
|
38
|
+
* The cart items.
|
39
|
+
*/
|
40
|
+
readonly cartItems: CartItem[];
|
41
|
+
}
|
42
|
+
/**
|
43
|
+
* @hidden
|
44
|
+
* Version of the cart that is used by the app.
|
45
|
+
* @internal
|
46
|
+
* Limited to Microsoft-internal use
|
47
|
+
* @beta
|
48
|
+
*/
|
49
|
+
interface CartVersion {
|
50
|
+
/**
|
51
|
+
* @hidden
|
52
|
+
* Represents the major version of a cart, it
|
53
|
+
* not compatible with the previous major version.
|
54
|
+
*/
|
55
|
+
readonly majorVersion: number;
|
56
|
+
/**
|
57
|
+
* @hidden
|
58
|
+
* The minor version of a cart, which is compatible
|
59
|
+
* with the previous minor version in the same major version.
|
60
|
+
*/
|
61
|
+
readonly minorVersion: number;
|
62
|
+
}
|
63
|
+
/**
|
64
|
+
* @hidden
|
65
|
+
* Represents the cart information
|
66
|
+
* @beta
|
67
|
+
*/
|
68
|
+
interface CartInfo {
|
69
|
+
/**
|
70
|
+
* @hidden
|
71
|
+
* The country market where the products are selling.
|
72
|
+
* Should be country code in ISO 3166-1 alpha-2 format, e.g. CA for Canada.
|
73
|
+
* https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
|
74
|
+
*/
|
75
|
+
readonly market: string;
|
76
|
+
/**
|
77
|
+
* @hidden
|
78
|
+
* The identifier to tell the cart is checked out by admin or end user.
|
79
|
+
*/
|
80
|
+
readonly intent: Intent;
|
81
|
+
/**
|
82
|
+
* @hidden
|
83
|
+
* Locale the app should render for the user
|
84
|
+
* Should be a BCP 47 language tag, e.g. en-US ([primary tag]-[ISO 3166-1 alpha-2 code]).
|
85
|
+
* https://en.wikipedia.org/wiki/IETF_language_tag
|
86
|
+
*/
|
87
|
+
readonly locale: string;
|
88
|
+
/**
|
89
|
+
* @hidden
|
90
|
+
* The status of the cart.
|
91
|
+
*/
|
92
|
+
readonly status: CartStatus;
|
93
|
+
/**
|
94
|
+
* @hidden
|
95
|
+
* ISO 4217 currency code for the cart item price, e.g. USD for US Dollar.
|
96
|
+
* https://en.wikipedia.org/wiki/ISO_4217
|
97
|
+
*/
|
98
|
+
readonly currency: string;
|
99
|
+
/**
|
100
|
+
* @hidden
|
101
|
+
* ISO 8601 timestamp string in UTC, indicates when the cart is created.
|
102
|
+
* e.g. 2023-06-19T22:06:59Z
|
103
|
+
* https://en.wikipedia.org/wiki/ISO_8601
|
104
|
+
*/
|
105
|
+
readonly createdAt: string;
|
106
|
+
/**
|
107
|
+
* @hidden
|
108
|
+
* ISO 8601 timestamp string in UTC, indicates when the cart is updated.
|
109
|
+
* e.g. 2023-06-19T22:06:59Z
|
110
|
+
* https://en.wikipedia.org/wiki/ISO_8601
|
111
|
+
*/
|
112
|
+
readonly updatedAt: string;
|
113
|
+
}
|
114
|
+
/**
|
115
|
+
* @hidden
|
116
|
+
* Represents the basic cart item information.
|
117
|
+
* @beta
|
118
|
+
*/
|
119
|
+
export interface Item {
|
120
|
+
/**
|
121
|
+
* @hidden
|
122
|
+
* The id of the cart item.
|
123
|
+
*/
|
124
|
+
readonly id: string;
|
125
|
+
/**
|
126
|
+
* @hidden
|
127
|
+
* The display name of the cart item.
|
128
|
+
*/
|
129
|
+
readonly name: string;
|
130
|
+
/**
|
131
|
+
* @hidden
|
132
|
+
* The quantity of the cart item.
|
133
|
+
*/
|
134
|
+
readonly quantity: number;
|
135
|
+
/**
|
136
|
+
* @hidden
|
137
|
+
* The price of the single cart item.
|
138
|
+
*/
|
139
|
+
readonly price: number;
|
140
|
+
/**
|
141
|
+
* @hidden
|
142
|
+
* The thumbnail imageURL of the cart item.
|
143
|
+
*/
|
144
|
+
readonly imageURL?: URL;
|
145
|
+
}
|
146
|
+
/**
|
147
|
+
* @hidden
|
148
|
+
* Represents the cart item that could have accessories
|
149
|
+
* @beta
|
150
|
+
*/
|
151
|
+
export interface CartItem extends Item {
|
152
|
+
/**
|
153
|
+
* @hidden
|
154
|
+
* Accessories to the item if existing.
|
155
|
+
*/
|
156
|
+
readonly accessories?: Item[];
|
157
|
+
/**
|
158
|
+
* @hidden
|
159
|
+
* The thumbnail imageURL of the cart item.
|
160
|
+
*/
|
161
|
+
readonly imageURL?: URL;
|
162
|
+
}
|
163
|
+
/**
|
164
|
+
* @hidden
|
165
|
+
* Represents the persona creating the cart.
|
166
|
+
* @beta
|
167
|
+
*/
|
168
|
+
export declare enum Intent {
|
169
|
+
/**
|
170
|
+
* @hidden
|
171
|
+
* The cart is created by admin of an organization in Teams Admin Center.
|
172
|
+
*/
|
173
|
+
TACAdminUser = "TACAdminUser",
|
174
|
+
/**
|
175
|
+
* @hidden
|
176
|
+
* The cart is created by admin of an organization in Teams.
|
177
|
+
*/
|
178
|
+
TeamsAdminUser = "TeamsAdminUser",
|
179
|
+
/**
|
180
|
+
* @hidden
|
181
|
+
* The cart is created by end user of an organization in Teams.
|
182
|
+
*/
|
183
|
+
TeamsEndUser = "TeamsEndUser"
|
321
184
|
}
|
185
|
+
/**
|
186
|
+
* @hidden
|
187
|
+
* Represents the status of the cart.
|
188
|
+
* @beta
|
189
|
+
*/
|
190
|
+
export declare enum CartStatus {
|
191
|
+
/**
|
192
|
+
* @hidden
|
193
|
+
* Cart is created but not checked out yet.
|
194
|
+
*/
|
195
|
+
Open = "Open",
|
196
|
+
/**
|
197
|
+
* @hidden
|
198
|
+
* Cart is checked out but not completed yet.
|
199
|
+
*/
|
200
|
+
Processing = "Processing",
|
201
|
+
/**
|
202
|
+
* @hidden
|
203
|
+
* Indicate checking out is completed and the host should
|
204
|
+
* return a new cart in the next getCart call.
|
205
|
+
*/
|
206
|
+
Processed = "Processed",
|
207
|
+
/**
|
208
|
+
* @hidden
|
209
|
+
* Indicate checking out process is manually cancelled by the user
|
210
|
+
*/
|
211
|
+
Closed = "Closed",
|
212
|
+
/**
|
213
|
+
* @hidden
|
214
|
+
* Indicate checking out is failed and the host should
|
215
|
+
* return a new cart in the next getCart call.
|
216
|
+
*/
|
217
|
+
Error = "Error"
|
218
|
+
}
|
219
|
+
/**
|
220
|
+
* @hidden
|
221
|
+
* Represents the parameters to update the cart items.
|
222
|
+
* @beta
|
223
|
+
*/
|
224
|
+
export interface AddOrUpdateCartItemsParams {
|
225
|
+
/**
|
226
|
+
* @hidden
|
227
|
+
* The uuid of the cart to be updated, target on the cart
|
228
|
+
* being checked out if cartId is not provided.
|
229
|
+
*/
|
230
|
+
cartId?: string;
|
231
|
+
/**
|
232
|
+
* @hidden
|
233
|
+
* A list of cart items object, for each item,
|
234
|
+
* if item id exists in the cart, overwrite the item price and quantity,
|
235
|
+
* otherwise add new items to cart.
|
236
|
+
*/
|
237
|
+
cartItems: CartItem[];
|
238
|
+
}
|
239
|
+
/**
|
240
|
+
* @hidden
|
241
|
+
* Represents the parameters to remove the cart items.
|
242
|
+
* @beta
|
243
|
+
*/
|
244
|
+
export interface RemoveCartItemsParams {
|
245
|
+
/**
|
246
|
+
* @hidden
|
247
|
+
* The uuid of the cart to be updated, target on the cart
|
248
|
+
* being checked out if cartId is not provided.
|
249
|
+
*/
|
250
|
+
cartId?: string;
|
251
|
+
/**
|
252
|
+
* @hidden
|
253
|
+
* A list of cart id, delete the cart item accordingly.
|
254
|
+
*/
|
255
|
+
cartItemIds: string[];
|
256
|
+
}
|
257
|
+
/**
|
258
|
+
* @hidden
|
259
|
+
* Represents the parameters to update the cart status.
|
260
|
+
* @beta
|
261
|
+
*/
|
262
|
+
export interface UpdateCartStatusParams {
|
263
|
+
/**
|
264
|
+
* @hidden
|
265
|
+
* The uuid of the cart to be updated, target on the cart
|
266
|
+
* being checked out if cartId is not provided.
|
267
|
+
*/
|
268
|
+
cartId?: string;
|
269
|
+
/**
|
270
|
+
* @hidden
|
271
|
+
* Status of the cart.
|
272
|
+
*/
|
273
|
+
cartStatus: CartStatus;
|
274
|
+
/**
|
275
|
+
* @hidden
|
276
|
+
* Extra info to the status.
|
277
|
+
*/
|
278
|
+
statusInfo?: string;
|
279
|
+
}
|
280
|
+
/**
|
281
|
+
* @hidden
|
282
|
+
* Get the cart object owned by the host to checkout.
|
283
|
+
* @returns A promise of the cart object in the cartVersion.
|
284
|
+
* @beta
|
285
|
+
*/
|
286
|
+
export declare function getCart(): Promise<Cart>;
|
287
|
+
/**
|
288
|
+
* @hidden
|
289
|
+
* Add or update cart items in the cart owned by the host.
|
290
|
+
* @param addOrUpdateCartItemsParams Represents the parameters to update the cart items.
|
291
|
+
* @returns A promise of the updated cart object in the cartVersion.
|
292
|
+
* @beta
|
293
|
+
*/
|
294
|
+
export declare function addOrUpdateCartItems(addOrUpdateCartItemsParams: AddOrUpdateCartItemsParams): Promise<Cart>;
|
295
|
+
/**
|
296
|
+
* @hidden
|
297
|
+
* Remove cart items from the cart owned by the host.
|
298
|
+
* @param removeCartItemsParams The parameters to remove the cart items.
|
299
|
+
* @returns A promise of the updated cart object in the cartVersion.
|
300
|
+
* @beta
|
301
|
+
*/
|
302
|
+
export declare function removeCartItems(removeCartItemsParams: RemoveCartItemsParams): Promise<Cart>;
|
303
|
+
/**
|
304
|
+
* @hidden
|
305
|
+
* Update cart status in the cart owned by the host.
|
306
|
+
* @param updateCartStatusParams The parameters to update the cart status.
|
307
|
+
* @returns A promise of the updated cart object in the cartVersion.
|
308
|
+
* @beta
|
309
|
+
*/
|
310
|
+
export declare function updateCartStatus(updateCartStatusParams: UpdateCartStatusParams): Promise<Cart>;
|
311
|
+
/**
|
312
|
+
* @hidden
|
313
|
+
* Checks if the marketplace capability is supported by the host.
|
314
|
+
* @returns Boolean to represent whether the marketplace capability is supported.
|
315
|
+
* @throws Error if {@linkcode app.initialize} has not successfully completed.
|
316
|
+
* @beta
|
317
|
+
*/
|
318
|
+
export declare function isSupported(): boolean;
|
319
|
+
export {};
|