@microsoft/teams-js 1.10.1-dev.0 → 1.10.1-dev.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/MicrosoftTeams.js +1 -1
- package/dist/MicrosoftTeams.js.map +1 -1
- package/dist/MicrosoftTeams.min.js +1 -1
- package/dist/microsoftteams.d.ts +2834 -0
- package/dts/index.d.ts +2 -0
- package/dts/internal/communication.d.ts +23 -0
- package/dts/internal/constants.d.ts +42 -0
- package/dts/internal/globalVars.d.ts +15 -0
- package/dts/internal/handlers.d.ts +10 -0
- package/dts/internal/interfaces.d.ts +44 -0
- package/dts/internal/internalAPIs.d.ts +12 -0
- package/dts/internal/mediaUtil.d.ts +31 -0
- package/dts/internal/utils.d.ts +22 -0
- package/dts/private/appEntity.d.ts +49 -0
- package/dts/private/bot.d.ts +77 -0
- package/dts/private/conversations.d.ts +20 -0
- package/dts/private/files.d.ts +169 -0
- package/dts/private/index.d.ts +10 -0
- package/dts/private/interfaces.d.ts +141 -0
- package/dts/private/logs.d.ts +17 -0
- package/dts/private/meetingRoom.d.ts +157 -0
- package/dts/private/menus.d.ts +117 -0
- package/dts/private/privateAPIs.d.ts +104 -0
- package/dts/private/remoteCamera.d.ts +196 -0
- package/dts/public/appInitialization.d.ts +44 -0
- package/dts/public/appWindow.d.ts +14 -0
- package/dts/public/authentication.d.ts +177 -0
- package/dts/public/constants.d.ts +53 -0
- package/dts/public/index.d.ts +13 -0
- package/dts/public/interfaces.d.ts +557 -0
- package/dts/public/location.d.ts +47 -0
- package/dts/public/media.d.ts +219 -0
- package/dts/public/meeting.d.ts +158 -0
- package/dts/public/navigation.d.ts +28 -0
- package/dts/public/people.d.ts +53 -0
- package/dts/public/publicAPIs.d.ts +117 -0
- package/dts/public/settings.d.ts +95 -0
- package/dts/public/tasks.d.ts +25 -0
- package/package.json +1 -1
- package/dist/MicrosoftTeams.d.ts +0 -5
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
import { TaskModuleDimension, HostClientType, TeamType, UserTeamRole, ChannelType } from './constants';
|
|
2
|
+
import { FrameContexts } from './constants';
|
|
3
|
+
/**
|
|
4
|
+
* Represents information about tabs for an app
|
|
5
|
+
*/
|
|
6
|
+
export interface TabInformation {
|
|
7
|
+
teamTabs: TabInstance[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Represents information about a tab instance
|
|
11
|
+
*/
|
|
12
|
+
export interface TabInstance {
|
|
13
|
+
/**
|
|
14
|
+
* The name of the tab
|
|
15
|
+
*/
|
|
16
|
+
tabName: string;
|
|
17
|
+
/**
|
|
18
|
+
* Internal: do not use
|
|
19
|
+
* @protected
|
|
20
|
+
*/
|
|
21
|
+
internalTabInstanceId?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Last viewed time of this tab. null means unknown
|
|
24
|
+
*/
|
|
25
|
+
lastViewUnixEpochTime?: string;
|
|
26
|
+
/**
|
|
27
|
+
* The developer-defined unique ID for the entity this content points to.
|
|
28
|
+
*/
|
|
29
|
+
entityId?: string;
|
|
30
|
+
/**
|
|
31
|
+
* The Microsoft Teams ID for the channel with which the content is associated.
|
|
32
|
+
*/
|
|
33
|
+
channelId?: string;
|
|
34
|
+
/**
|
|
35
|
+
* The name for the channel with which the content is associated.
|
|
36
|
+
*/
|
|
37
|
+
channelName?: string;
|
|
38
|
+
/**
|
|
39
|
+
* Is this tab in a favorite channel?
|
|
40
|
+
*/
|
|
41
|
+
channelIsFavorite?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* The Microsoft Teams ID for the team with which the content is associated.
|
|
44
|
+
*/
|
|
45
|
+
teamId?: string;
|
|
46
|
+
/**
|
|
47
|
+
* The name for the team with which the content is associated.
|
|
48
|
+
*/
|
|
49
|
+
teamName?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Is this tab in a favorite team?
|
|
52
|
+
*/
|
|
53
|
+
teamIsFavorite?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* The Office 365 group ID for the team with which the content is associated.
|
|
56
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
57
|
+
*/
|
|
58
|
+
groupId?: string;
|
|
59
|
+
/**
|
|
60
|
+
* Content URL of this tab
|
|
61
|
+
*/
|
|
62
|
+
url?: string;
|
|
63
|
+
/**
|
|
64
|
+
* Website URL of this tab
|
|
65
|
+
*/
|
|
66
|
+
websiteUrl?: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Indicates information about the tab instance for filtering purposes.
|
|
70
|
+
*/
|
|
71
|
+
export interface TabInstanceParameters {
|
|
72
|
+
/**
|
|
73
|
+
* Flag allowing to select favorite channels only
|
|
74
|
+
*/
|
|
75
|
+
favoriteChannelsOnly?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Flag allowing to select favorite teams only
|
|
78
|
+
*/
|
|
79
|
+
favoriteTeamsOnly?: boolean;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Represents Team Information
|
|
83
|
+
*/
|
|
84
|
+
export interface TeamInformation {
|
|
85
|
+
/**
|
|
86
|
+
* Id of the team
|
|
87
|
+
*/
|
|
88
|
+
teamId: string;
|
|
89
|
+
/**
|
|
90
|
+
* Team display name
|
|
91
|
+
*/
|
|
92
|
+
teamName: string;
|
|
93
|
+
/**
|
|
94
|
+
* Team description
|
|
95
|
+
*/
|
|
96
|
+
teamDescription?: string;
|
|
97
|
+
/**
|
|
98
|
+
* Thumbnail Uri
|
|
99
|
+
*/
|
|
100
|
+
thumbnailUri?: string;
|
|
101
|
+
/**
|
|
102
|
+
* The Office 365 group ID for the team with which the content is associated.
|
|
103
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
104
|
+
*/
|
|
105
|
+
groupId?: string;
|
|
106
|
+
/**
|
|
107
|
+
* Role of current user in the team
|
|
108
|
+
*/
|
|
109
|
+
userTeamRole?: UserTeamRole;
|
|
110
|
+
/**
|
|
111
|
+
* The type of the team.
|
|
112
|
+
*/
|
|
113
|
+
teamType?: TeamType;
|
|
114
|
+
/**
|
|
115
|
+
* The locked status of the team
|
|
116
|
+
*/
|
|
117
|
+
isTeamLocked?: boolean;
|
|
118
|
+
/**
|
|
119
|
+
* The archived status of the team
|
|
120
|
+
*/
|
|
121
|
+
isTeamArchived?: boolean;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Represents OS locale info used for formatting date and time data
|
|
125
|
+
*/
|
|
126
|
+
export interface LocaleInfo {
|
|
127
|
+
platform: 'windows' | 'macos';
|
|
128
|
+
regionalFormat: string;
|
|
129
|
+
shortDate: string;
|
|
130
|
+
longDate: string;
|
|
131
|
+
shortTime: string;
|
|
132
|
+
longTime: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Allowed user file open preferences
|
|
136
|
+
*/
|
|
137
|
+
export declare enum FileOpenPreference {
|
|
138
|
+
Inline = "inline",
|
|
139
|
+
Desktop = "desktop",
|
|
140
|
+
Web = "web"
|
|
141
|
+
}
|
|
142
|
+
export interface Context {
|
|
143
|
+
/**
|
|
144
|
+
* The Office 365 group ID for the team with which the content is associated.
|
|
145
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
146
|
+
*/
|
|
147
|
+
groupId?: string;
|
|
148
|
+
/**
|
|
149
|
+
* The Microsoft Teams ID for the team with which the content is associated.
|
|
150
|
+
*/
|
|
151
|
+
teamId?: string;
|
|
152
|
+
/**
|
|
153
|
+
* The name for the team with which the content is associated.
|
|
154
|
+
*/
|
|
155
|
+
teamName?: string;
|
|
156
|
+
/**
|
|
157
|
+
* The Microsoft Teams ID for the channel with which the content is associated.
|
|
158
|
+
*/
|
|
159
|
+
channelId?: string;
|
|
160
|
+
/**
|
|
161
|
+
* The name for the channel with which the content is associated.
|
|
162
|
+
*/
|
|
163
|
+
channelName?: string;
|
|
164
|
+
/**
|
|
165
|
+
* The type of the channel with which the content is associated.
|
|
166
|
+
*/
|
|
167
|
+
channelType?: ChannelType;
|
|
168
|
+
/**
|
|
169
|
+
* The developer-defined unique ID for the entity this content points to.
|
|
170
|
+
*/
|
|
171
|
+
entityId: string;
|
|
172
|
+
/**
|
|
173
|
+
* The developer-defined unique ID for the sub-entity this content points to.
|
|
174
|
+
* This field should be used to restore to a specific state within an entity,
|
|
175
|
+
* such as scrolling to or activating a specific piece of content.
|
|
176
|
+
*/
|
|
177
|
+
subEntityId?: string;
|
|
178
|
+
/**
|
|
179
|
+
* The current locale that the user has configured for the app formatted as
|
|
180
|
+
* languageId-countryId (for example, en-us).
|
|
181
|
+
*/
|
|
182
|
+
locale: string;
|
|
183
|
+
/**
|
|
184
|
+
* More detailed locale info from the user's OS if available. Can be used together with
|
|
185
|
+
* the @microsoft/globe NPM package to ensure your app respects the user's OS date and
|
|
186
|
+
* time format configuration
|
|
187
|
+
*/
|
|
188
|
+
osLocaleInfo?: LocaleInfo;
|
|
189
|
+
/**
|
|
190
|
+
* @deprecated Use loginHint or userPrincipalName.
|
|
191
|
+
* The UPN of the current user.
|
|
192
|
+
* Because a malicious party can run your content in a browser, this value should
|
|
193
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
194
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
195
|
+
*/
|
|
196
|
+
upn?: string;
|
|
197
|
+
/**
|
|
198
|
+
* The Azure AD tenant ID of the current user.
|
|
199
|
+
* Because a malicious party can run your content in a browser, this value should
|
|
200
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
201
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
202
|
+
*/
|
|
203
|
+
tid?: string;
|
|
204
|
+
/**
|
|
205
|
+
* The current UI theme.
|
|
206
|
+
*/
|
|
207
|
+
theme?: string;
|
|
208
|
+
/**
|
|
209
|
+
* Indication whether the tab is in full-screen mode.
|
|
210
|
+
*/
|
|
211
|
+
isFullScreen?: boolean;
|
|
212
|
+
/**
|
|
213
|
+
* The type of the team.
|
|
214
|
+
*/
|
|
215
|
+
teamType?: TeamType;
|
|
216
|
+
/**
|
|
217
|
+
* The root SharePoint site associated with the team.
|
|
218
|
+
*/
|
|
219
|
+
teamSiteUrl?: string;
|
|
220
|
+
/**
|
|
221
|
+
* The domain of the root SharePoint site associated with the team.
|
|
222
|
+
*/
|
|
223
|
+
teamSiteDomain?: string;
|
|
224
|
+
/**
|
|
225
|
+
* The relative path to the SharePoint site associated with the team.
|
|
226
|
+
*/
|
|
227
|
+
teamSitePath?: string;
|
|
228
|
+
/**
|
|
229
|
+
* The tenant ID of the host team.
|
|
230
|
+
*/
|
|
231
|
+
hostTeamTenantId?: string;
|
|
232
|
+
/**
|
|
233
|
+
* The AAD group ID of the host team.
|
|
234
|
+
*/
|
|
235
|
+
hostTeamGroupId?: string;
|
|
236
|
+
/**
|
|
237
|
+
* The relative path to the SharePoint folder associated with the channel.
|
|
238
|
+
*/
|
|
239
|
+
channelRelativeUrl?: string;
|
|
240
|
+
/**
|
|
241
|
+
* Unique ID for the current Teams session for use in correlating telemetry data.
|
|
242
|
+
*/
|
|
243
|
+
sessionId?: string;
|
|
244
|
+
/**
|
|
245
|
+
* The user's role in the team.
|
|
246
|
+
* Because a malicious party can run your content in a browser, this value should
|
|
247
|
+
* be used only as a hint as to the user's role, and never as proof of her role.
|
|
248
|
+
*/
|
|
249
|
+
userTeamRole?: UserTeamRole;
|
|
250
|
+
/**
|
|
251
|
+
* The Microsoft Teams ID for the chat with which the content is associated.
|
|
252
|
+
*/
|
|
253
|
+
chatId?: string;
|
|
254
|
+
/**
|
|
255
|
+
* A value suitable for use as a login_hint when authenticating with Azure AD.
|
|
256
|
+
* Because a malicious party can run your content in a browser, this value should
|
|
257
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
258
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
259
|
+
*/
|
|
260
|
+
loginHint?: string;
|
|
261
|
+
/**
|
|
262
|
+
* The UPN of the current user. This may be an externally-authenticated UPN (e.g., guest users).
|
|
263
|
+
* Because a malicious party run your content in a browser, this value should
|
|
264
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
265
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
266
|
+
*/
|
|
267
|
+
userPrincipalName?: string;
|
|
268
|
+
/**
|
|
269
|
+
* The Azure AD object id of the current user.
|
|
270
|
+
* Because a malicious party run your content in a browser, this value should
|
|
271
|
+
* be used only as a hint as to who the user is and never as proof of identity.
|
|
272
|
+
* This field is available only when the identity permission is requested in the manifest.
|
|
273
|
+
*/
|
|
274
|
+
userObjectId?: string;
|
|
275
|
+
/**
|
|
276
|
+
* Indicates whether team is archived.
|
|
277
|
+
* Apps should use this as a signal to prevent any changes to content associated with archived teams.
|
|
278
|
+
*/
|
|
279
|
+
isTeamArchived?: boolean;
|
|
280
|
+
/**
|
|
281
|
+
* The type of the host client. Possible values are : android, ios, web, desktop, rigel
|
|
282
|
+
*/
|
|
283
|
+
hostClientType?: HostClientType;
|
|
284
|
+
/**
|
|
285
|
+
* The context where tab url is loaded (content, task, setting, remove, sidePanel)
|
|
286
|
+
*/
|
|
287
|
+
frameContext?: FrameContexts;
|
|
288
|
+
/**
|
|
289
|
+
* SharePoint context. This is only available when hosted in SharePoint.
|
|
290
|
+
*/
|
|
291
|
+
sharepoint?: any;
|
|
292
|
+
/**
|
|
293
|
+
* The type of license for the current users tenant.
|
|
294
|
+
*/
|
|
295
|
+
tenantSKU?: string;
|
|
296
|
+
/**
|
|
297
|
+
* The license type for the current user.
|
|
298
|
+
*/
|
|
299
|
+
userLicenseType?: string;
|
|
300
|
+
/**
|
|
301
|
+
* The ID of the parent message from which this task module was launched.
|
|
302
|
+
* This is only available in task modules launched from bot cards.
|
|
303
|
+
*/
|
|
304
|
+
parentMessageId?: string;
|
|
305
|
+
/**
|
|
306
|
+
* Current ring ID
|
|
307
|
+
*/
|
|
308
|
+
ringId?: string;
|
|
309
|
+
/**
|
|
310
|
+
* Unique ID for the current session for use in correlating telemetry data.
|
|
311
|
+
*/
|
|
312
|
+
appSessionId?: string;
|
|
313
|
+
/**
|
|
314
|
+
* Represents whether calling is allowed for the current logged in User
|
|
315
|
+
*/
|
|
316
|
+
isCallingAllowed?: boolean;
|
|
317
|
+
/**
|
|
318
|
+
* Represents whether PSTN calling is allowed for the current logged in User
|
|
319
|
+
*/
|
|
320
|
+
isPSTNCallingAllowed?: boolean;
|
|
321
|
+
/**
|
|
322
|
+
* Meeting Id used by tab when running in meeting context
|
|
323
|
+
*/
|
|
324
|
+
meetingId?: string;
|
|
325
|
+
/**
|
|
326
|
+
* The OneNote section ID that is linked to the channel.
|
|
327
|
+
*/
|
|
328
|
+
defaultOneNoteSectionId?: string;
|
|
329
|
+
/**
|
|
330
|
+
* Indication whether the tab is in a pop out window
|
|
331
|
+
*/
|
|
332
|
+
isMultiWindow?: boolean;
|
|
333
|
+
/**
|
|
334
|
+
* Personal app icon y coordinate position
|
|
335
|
+
*/
|
|
336
|
+
appIconPosition?: number;
|
|
337
|
+
/**
|
|
338
|
+
* Source origin from where the tab is opened
|
|
339
|
+
*/
|
|
340
|
+
sourceOrigin?: string;
|
|
341
|
+
/**
|
|
342
|
+
* Time when the user clicked on the tab
|
|
343
|
+
*/
|
|
344
|
+
userClickTime?: number;
|
|
345
|
+
/**
|
|
346
|
+
* Team Template ID if there was a Team Template associated with the creation of the team.
|
|
347
|
+
*/
|
|
348
|
+
teamTemplateId?: string;
|
|
349
|
+
/**
|
|
350
|
+
* Where the user prefers the file to be opened from by default during file open
|
|
351
|
+
*/
|
|
352
|
+
userFileOpenPreference?: FileOpenPreference;
|
|
353
|
+
}
|
|
354
|
+
export interface DeepLinkParameters {
|
|
355
|
+
/**
|
|
356
|
+
* The developer-defined unique ID for the sub-entity to which this deep link points in the current entity.
|
|
357
|
+
* This field should be used to restore to a specific state within an entity, such as scrolling to or activating a specific piece of content.
|
|
358
|
+
*/
|
|
359
|
+
subEntityId: string;
|
|
360
|
+
/**
|
|
361
|
+
* The label for the sub-entity that should be displayed when the deep link is rendered in a client.
|
|
362
|
+
*/
|
|
363
|
+
subEntityLabel: string;
|
|
364
|
+
/**
|
|
365
|
+
* The fallback URL to which to navigate the user if the client cannot render the page.
|
|
366
|
+
* This URL should lead directly to the sub-entity.
|
|
367
|
+
*/
|
|
368
|
+
subEntityWebUrl?: string;
|
|
369
|
+
}
|
|
370
|
+
export interface TaskInfo {
|
|
371
|
+
/**
|
|
372
|
+
* The url to be rendered in the webview/iframe.
|
|
373
|
+
*/
|
|
374
|
+
url?: string;
|
|
375
|
+
/**
|
|
376
|
+
* JSON defining an adaptive card.
|
|
377
|
+
*/
|
|
378
|
+
card?: string;
|
|
379
|
+
/**
|
|
380
|
+
* The requested height of the webview/iframe.
|
|
381
|
+
*/
|
|
382
|
+
height?: TaskModuleDimension | number;
|
|
383
|
+
/**
|
|
384
|
+
* The requested width of the webview/iframe.
|
|
385
|
+
*/
|
|
386
|
+
width?: TaskModuleDimension | number;
|
|
387
|
+
/**
|
|
388
|
+
* Title of the task module.
|
|
389
|
+
*/
|
|
390
|
+
title?: string;
|
|
391
|
+
/**
|
|
392
|
+
* If client doesnt support the URL, the URL that needs to be opened in the browser.
|
|
393
|
+
*/
|
|
394
|
+
fallbackUrl?: string;
|
|
395
|
+
/**
|
|
396
|
+
* Specifies a bot ID to send the result of the user's interaction with the task module.
|
|
397
|
+
* If specified, the bot will receive a task/complete invoke event with a JSON object
|
|
398
|
+
* in the event payload.
|
|
399
|
+
*/
|
|
400
|
+
completionBotId?: string;
|
|
401
|
+
}
|
|
402
|
+
/**
|
|
403
|
+
* @private
|
|
404
|
+
* Hide from docs.
|
|
405
|
+
* ------
|
|
406
|
+
*/
|
|
407
|
+
export interface OpenConversationRequest {
|
|
408
|
+
/**
|
|
409
|
+
* The Id of the subEntity where the conversation is taking place
|
|
410
|
+
*/
|
|
411
|
+
subEntityId: string;
|
|
412
|
+
/**
|
|
413
|
+
* The title of the conversation
|
|
414
|
+
*/
|
|
415
|
+
title: string;
|
|
416
|
+
/**
|
|
417
|
+
* The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
|
|
418
|
+
*/
|
|
419
|
+
conversationId?: string;
|
|
420
|
+
/**
|
|
421
|
+
* The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
|
|
422
|
+
*/
|
|
423
|
+
channelId?: string;
|
|
424
|
+
/**
|
|
425
|
+
* The entity Id of the tab
|
|
426
|
+
*/
|
|
427
|
+
entityId: string;
|
|
428
|
+
/**
|
|
429
|
+
* A function that is called once the conversation Id has been created
|
|
430
|
+
*/
|
|
431
|
+
onStartConversation?: (conversationResponse: ConversationResponse) => void;
|
|
432
|
+
/**
|
|
433
|
+
* A function that is called if the pane is closed
|
|
434
|
+
*/
|
|
435
|
+
onCloseConversation?: (conversationResponse: ConversationResponse) => void;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* @private
|
|
439
|
+
* Hide from docs.
|
|
440
|
+
* ------
|
|
441
|
+
*/
|
|
442
|
+
export interface ConversationResponse {
|
|
443
|
+
/**
|
|
444
|
+
* The Id of the subEntity where the conversation is taking place
|
|
445
|
+
*/
|
|
446
|
+
subEntityId: string;
|
|
447
|
+
/**
|
|
448
|
+
* The Id of the conversation. This is optional and should be specified whenever a previous conversation about a specific sub-entity has already been started before
|
|
449
|
+
*/
|
|
450
|
+
conversationId?: string;
|
|
451
|
+
/**
|
|
452
|
+
* The Id of the channel. This is optional and should be specified whenever a conversation is started or opened in a personal app scope
|
|
453
|
+
*/
|
|
454
|
+
channelId?: string;
|
|
455
|
+
/**
|
|
456
|
+
* The entity Id of the tab
|
|
457
|
+
*/
|
|
458
|
+
entityId?: string;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* @private
|
|
462
|
+
* Hide from docs.
|
|
463
|
+
*/
|
|
464
|
+
export interface LoadContext {
|
|
465
|
+
/**
|
|
466
|
+
* The enitity that is requested to be loaded
|
|
467
|
+
*/
|
|
468
|
+
entityId: string;
|
|
469
|
+
/**
|
|
470
|
+
* The content URL that is requested to be loaded
|
|
471
|
+
*/
|
|
472
|
+
contentUrl: string;
|
|
473
|
+
}
|
|
474
|
+
export interface FrameContext {
|
|
475
|
+
/**
|
|
476
|
+
* The current URL that needs to be used in the iframe if the tab is reloaded
|
|
477
|
+
*/
|
|
478
|
+
contentUrl: string;
|
|
479
|
+
/**
|
|
480
|
+
* The current URL that needs to be used for opening the website when the user clicks on 'Go to website'
|
|
481
|
+
*/
|
|
482
|
+
websiteUrl: string;
|
|
483
|
+
}
|
|
484
|
+
export interface SdkError {
|
|
485
|
+
/**
|
|
486
|
+
error code
|
|
487
|
+
*/
|
|
488
|
+
errorCode: ErrorCode;
|
|
489
|
+
/**
|
|
490
|
+
Optional description for the error. This may contain useful information for web-app developers.
|
|
491
|
+
This string will not be localized and is not for end-user consumption.
|
|
492
|
+
App should not depend on the string content. The exact value may change. This is only for debugging purposes.
|
|
493
|
+
*/
|
|
494
|
+
message?: string;
|
|
495
|
+
}
|
|
496
|
+
export declare enum ErrorCode {
|
|
497
|
+
/**
|
|
498
|
+
* API not supported in the current platform.
|
|
499
|
+
*/
|
|
500
|
+
NOT_SUPPORTED_ON_PLATFORM = 100,
|
|
501
|
+
/**
|
|
502
|
+
* Internal error encountered while performing the required operation.
|
|
503
|
+
*/
|
|
504
|
+
INTERNAL_ERROR = 500,
|
|
505
|
+
/**
|
|
506
|
+
* API is not supported in the current context
|
|
507
|
+
*/
|
|
508
|
+
NOT_SUPPORTED_IN_CURRENT_CONTEXT = 501,
|
|
509
|
+
/**
|
|
510
|
+
Permissions denied by user
|
|
511
|
+
*/
|
|
512
|
+
PERMISSION_DENIED = 1000,
|
|
513
|
+
/**
|
|
514
|
+
* Network issue
|
|
515
|
+
*/
|
|
516
|
+
NETWORK_ERROR = 2000,
|
|
517
|
+
/**
|
|
518
|
+
* Underlying hardware doesn't support the capability
|
|
519
|
+
*/
|
|
520
|
+
NO_HW_SUPPORT = 3000,
|
|
521
|
+
/**
|
|
522
|
+
* One or more arguments are invalid
|
|
523
|
+
*/
|
|
524
|
+
INVALID_ARGUMENTS = 4000,
|
|
525
|
+
/**
|
|
526
|
+
* User is not authorized for this operation
|
|
527
|
+
*/
|
|
528
|
+
UNAUTHORIZED_USER_OPERATION = 5000,
|
|
529
|
+
/**
|
|
530
|
+
* Could not complete the operation due to insufficient resources
|
|
531
|
+
*/
|
|
532
|
+
INSUFFICIENT_RESOURCES = 6000,
|
|
533
|
+
/**
|
|
534
|
+
* Platform throttled the request because of API was invoked too frequently
|
|
535
|
+
*/
|
|
536
|
+
THROTTLE = 7000,
|
|
537
|
+
/**
|
|
538
|
+
* User aborted the operation
|
|
539
|
+
*/
|
|
540
|
+
USER_ABORT = 8000,
|
|
541
|
+
/**
|
|
542
|
+
* Could not complete the operation in the given time interval
|
|
543
|
+
*/
|
|
544
|
+
OPERATION_TIMED_OUT = 8001,
|
|
545
|
+
/**
|
|
546
|
+
* Platform code is old and doesn't implement this API
|
|
547
|
+
*/
|
|
548
|
+
OLD_PLATFORM = 9000,
|
|
549
|
+
/**
|
|
550
|
+
* The file specified was not found on the given location
|
|
551
|
+
*/
|
|
552
|
+
FILE_NOT_FOUND = 404,
|
|
553
|
+
/**
|
|
554
|
+
* The return value is too big and has exceeded our size boundries
|
|
555
|
+
*/
|
|
556
|
+
SIZE_EXCEEDED = 10000
|
|
557
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { SdkError } from './interfaces';
|
|
2
|
+
export declare namespace location {
|
|
3
|
+
interface LocationProps {
|
|
4
|
+
/**
|
|
5
|
+
whether user can alter location or not
|
|
6
|
+
if false, user will be shown current location
|
|
7
|
+
and wouldn't be allowed to alter it
|
|
8
|
+
*/
|
|
9
|
+
allowChooseLocation: boolean;
|
|
10
|
+
/**
|
|
11
|
+
whether selected location should be shown to user on map or not.
|
|
12
|
+
If allowChooseLocation is true, this parameter will be ignored by platform.
|
|
13
|
+
If allowChooseLocation is false, and this paramater is not provided, default
|
|
14
|
+
value will be false.
|
|
15
|
+
*/
|
|
16
|
+
showMap?: boolean;
|
|
17
|
+
}
|
|
18
|
+
interface Location {
|
|
19
|
+
/**
|
|
20
|
+
Latitude of the location
|
|
21
|
+
*/
|
|
22
|
+
latitude: number;
|
|
23
|
+
/**
|
|
24
|
+
Longitude of the location
|
|
25
|
+
*/
|
|
26
|
+
longitude: number;
|
|
27
|
+
/**
|
|
28
|
+
Accuracy of the coordinates captured
|
|
29
|
+
*/
|
|
30
|
+
accuracy?: number;
|
|
31
|
+
/**
|
|
32
|
+
Time stamp when the location was captured
|
|
33
|
+
*/
|
|
34
|
+
timestamp?: number;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Fetches current user coordinates or allows user to choose location on map
|
|
38
|
+
* @param callback Callback to invoke when current user location is fetched
|
|
39
|
+
*/
|
|
40
|
+
function getLocation(props: LocationProps, callback: (error: SdkError, location: Location) => void): void;
|
|
41
|
+
/**
|
|
42
|
+
* Shows the location on map corresponding to the given coordinates
|
|
43
|
+
* @param location {@link Location} which needs to be shown on map
|
|
44
|
+
* @param callback Callback to invoke when the location is opened on map
|
|
45
|
+
*/
|
|
46
|
+
function showLocation(location: Location, callback: (error: SdkError, status: boolean) => void): void;
|
|
47
|
+
}
|