@microsoft/teams-js 2.30.0 → 2.31.0-beta.0

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.
Files changed (134) hide show
  1. package/dist/esm/_virtual/__polyfill-node.os.js +1 -0
  2. package/dist/esm/_virtual/_polyfill-node.os.js +1 -0
  3. package/dist/esm/node_modules/.pnpm/debug@4.3.5/node_modules/debug/src/node.js +1 -1
  4. package/dist/esm/node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js +1 -0
  5. package/dist/esm/node_modules/.pnpm/supports-color@7.2.0/node_modules/supports-color/index.js +1 -0
  6. package/dist/esm/packages/teams-js/dts/index.d.ts +2 -0
  7. package/dist/esm/packages/teams-js/dts/internal/VideoFrameTypes.d.ts +78 -0
  8. package/dist/esm/packages/teams-js/dts/internal/appHelpers.d.ts +8 -0
  9. package/dist/esm/packages/teams-js/dts/internal/appIdValidation.d.ts +16 -0
  10. package/dist/esm/packages/teams-js/dts/internal/communication.d.ts +162 -0
  11. package/dist/esm/packages/teams-js/dts/internal/constants.d.ts +146 -0
  12. package/dist/esm/packages/teams-js/dts/internal/deepLinkConstants.d.ts +26 -0
  13. package/dist/esm/packages/teams-js/dts/internal/deepLinkUtilities.d.ts +4 -0
  14. package/dist/esm/packages/teams-js/dts/internal/emailAddressValidation.d.ts +1 -0
  15. package/dist/esm/packages/teams-js/dts/internal/globalVars.d.ts +12 -0
  16. package/dist/esm/packages/teams-js/dts/internal/handlers.d.ts +80 -0
  17. package/dist/esm/packages/teams-js/dts/internal/interfaces.d.ts +47 -0
  18. package/dist/esm/packages/teams-js/dts/internal/internalAPIs.d.ts +61 -0
  19. package/dist/esm/packages/teams-js/dts/internal/marketplaceUtils.d.ts +94 -0
  20. package/dist/esm/packages/teams-js/dts/internal/mediaUtil.d.ts +95 -0
  21. package/dist/esm/packages/teams-js/dts/internal/messageObjects.d.ts +73 -0
  22. package/dist/esm/packages/teams-js/dts/internal/nestedAppAuthUtils.d.ts +105 -0
  23. package/dist/esm/packages/teams-js/dts/internal/profileUtil.d.ts +11 -0
  24. package/dist/esm/packages/teams-js/dts/internal/responseHandler.d.ts +30 -0
  25. package/dist/esm/packages/teams-js/dts/internal/telemetry.d.ts +344 -0
  26. package/dist/esm/packages/teams-js/dts/internal/typeCheckUtilities.d.ts +1 -0
  27. package/dist/esm/packages/teams-js/dts/internal/utils.d.ts +200 -0
  28. package/dist/esm/packages/teams-js/dts/internal/uuidObject.d.ts +11 -0
  29. package/dist/esm/packages/teams-js/dts/internal/validOrigins.d.ts +6 -0
  30. package/dist/esm/packages/teams-js/dts/internal/videoEffectsUtils.d.ts +31 -0
  31. package/dist/esm/packages/teams-js/dts/internal/videoFrameTick.d.ts +10 -0
  32. package/dist/esm/packages/teams-js/dts/internal/videoPerformanceMonitor.d.ts +54 -0
  33. package/dist/esm/packages/teams-js/dts/internal/videoPerformanceStatistics.d.ts +49 -0
  34. package/dist/esm/packages/teams-js/dts/private/appEntity.d.ts +89 -0
  35. package/dist/esm/packages/teams-js/dts/private/constants.d.ts +9 -0
  36. package/dist/esm/packages/teams-js/dts/private/conversations.d.ts +152 -0
  37. package/dist/esm/packages/teams-js/dts/private/copilot.d.ts +39 -0
  38. package/dist/esm/packages/teams-js/dts/private/externalAppAuthentication.d.ts +378 -0
  39. package/dist/esm/packages/teams-js/dts/private/externalAppAuthenticationForCEA.d.ts +75 -0
  40. package/dist/esm/packages/teams-js/dts/private/externalAppCardActions.d.ts +112 -0
  41. package/dist/esm/packages/teams-js/dts/private/externalAppCardActionsForCEA.d.ts +49 -0
  42. package/dist/esm/packages/teams-js/dts/private/externalAppCommands.d.ts +123 -0
  43. package/dist/esm/packages/teams-js/dts/private/files.d.ts +758 -0
  44. package/dist/esm/packages/teams-js/dts/private/hostEntity.d.ts +176 -0
  45. package/dist/esm/packages/teams-js/dts/private/index.d.ts +20 -0
  46. package/dist/esm/packages/teams-js/dts/private/interfaces.d.ts +250 -0
  47. package/dist/esm/packages/teams-js/dts/private/logs.d.ts +25 -0
  48. package/dist/esm/packages/teams-js/dts/private/meetingRoom.d.ts +203 -0
  49. package/dist/esm/packages/teams-js/dts/private/messageChannels.d.ts +107 -0
  50. package/dist/esm/packages/teams-js/dts/private/notifications.d.ts +26 -0
  51. package/dist/esm/packages/teams-js/dts/private/otherAppStateChange.d.ts +81 -0
  52. package/dist/esm/packages/teams-js/dts/private/privateAPIs.d.ts +60 -0
  53. package/dist/esm/packages/teams-js/dts/private/remoteCamera.d.ts +298 -0
  54. package/dist/esm/packages/teams-js/dts/private/teams.d.ts +116 -0
  55. package/dist/esm/packages/teams-js/dts/private/videoEffectsEx.d.ts +244 -0
  56. package/dist/esm/packages/teams-js/dts/public/adaptiveCards.d.ts +6 -0
  57. package/dist/esm/packages/teams-js/dts/public/app.d.ts +592 -0
  58. package/dist/esm/packages/teams-js/dts/public/appId.d.ts +33 -0
  59. package/dist/esm/packages/teams-js/dts/public/appInitialization.d.ts +57 -0
  60. package/dist/esm/packages/teams-js/dts/public/appInstallDialog.d.ts +18 -0
  61. package/dist/esm/packages/teams-js/dts/public/appWindow.d.ts +66 -0
  62. package/dist/esm/packages/teams-js/dts/public/authentication.d.ts +409 -0
  63. package/dist/esm/packages/teams-js/dts/public/barCode.d.ts +53 -0
  64. package/dist/esm/packages/teams-js/dts/public/calendar.d.ts +40 -0
  65. package/dist/esm/packages/teams-js/dts/public/call.d.ts +53 -0
  66. package/dist/esm/packages/teams-js/dts/public/chat.d.ts +66 -0
  67. package/dist/esm/packages/teams-js/dts/public/clipboard.d.ts +34 -0
  68. package/dist/esm/packages/teams-js/dts/public/constants.d.ts +179 -0
  69. package/dist/esm/packages/teams-js/dts/public/dialog.d.ts +286 -0
  70. package/dist/esm/packages/teams-js/dts/public/emailAddress.d.ts +12 -0
  71. package/dist/esm/packages/teams-js/dts/public/geoLocation.d.ts +100 -0
  72. package/dist/esm/packages/teams-js/dts/public/index.d.ts +44 -0
  73. package/dist/esm/packages/teams-js/dts/public/interfaces.d.ts +1133 -0
  74. package/dist/esm/packages/teams-js/dts/public/liveShareHost.d.ts +221 -0
  75. package/dist/esm/packages/teams-js/dts/public/location.d.ts +86 -0
  76. package/dist/esm/packages/teams-js/dts/public/mail.d.ts +95 -0
  77. package/dist/esm/packages/teams-js/dts/public/marketplace.d.ts +321 -0
  78. package/dist/esm/packages/teams-js/dts/public/media.d.ts +440 -0
  79. package/dist/esm/packages/teams-js/dts/public/meeting.d.ts +906 -0
  80. package/dist/esm/packages/teams-js/dts/public/menus.d.ts +188 -0
  81. package/dist/esm/packages/teams-js/dts/public/monetization.d.ts +58 -0
  82. package/dist/esm/packages/teams-js/dts/public/navigation.d.ts +45 -0
  83. package/dist/esm/packages/teams-js/dts/public/nestedAppAuth.d.ts +15 -0
  84. package/dist/esm/packages/teams-js/dts/public/pages.d.ts +574 -0
  85. package/dist/esm/packages/teams-js/dts/public/people.d.ts +75 -0
  86. package/dist/esm/packages/teams-js/dts/public/profile.d.ts +127 -0
  87. package/dist/esm/packages/teams-js/dts/public/publicAPIs.d.ts +218 -0
  88. package/dist/esm/packages/teams-js/dts/public/runtime.d.ts +207 -0
  89. package/dist/esm/packages/teams-js/dts/public/search.d.ts +91 -0
  90. package/dist/esm/packages/teams-js/dts/public/secondaryBrowser.d.ts +32 -0
  91. package/dist/esm/packages/teams-js/dts/public/serializable.interface.d.ts +17 -0
  92. package/dist/esm/packages/teams-js/dts/public/settings.d.ts +101 -0
  93. package/dist/esm/packages/teams-js/dts/public/sharing.d.ts +124 -0
  94. package/dist/esm/packages/teams-js/dts/public/stageView.d.ts +104 -0
  95. package/dist/esm/packages/teams-js/dts/public/tasks.d.ts +62 -0
  96. package/dist/esm/packages/teams-js/dts/public/teamsAPIs.d.ts +77 -0
  97. package/dist/esm/packages/teams-js/dts/public/thirdPartyCloudStorage.d.ts +119 -0
  98. package/dist/esm/packages/teams-js/dts/public/version.d.ts +5 -0
  99. package/dist/esm/packages/teams-js/dts/public/videoEffects.d.ts +213 -0
  100. package/dist/esm/packages/teams-js/dts/public/visualMedia.d.ts +192 -0
  101. package/dist/esm/packages/teams-js/dts/public/webStorage.d.ts +27 -0
  102. package/dist/esm/packages/teams-js/src/index.js +1 -1
  103. package/dist/esm/packages/teams-js/src/internal/appHelpers.js +1 -0
  104. package/dist/esm/packages/teams-js/src/internal/communication.js +1 -1
  105. package/dist/esm/packages/teams-js/src/internal/deepLinkUtilities.js +1 -1
  106. package/dist/esm/packages/teams-js/src/internal/responseHandler.js +1 -0
  107. package/dist/esm/packages/teams-js/src/private/externalAppAuthentication.js +1 -1
  108. package/dist/esm/packages/teams-js/src/private/externalAppAuthenticationForCEA.js +1 -1
  109. package/dist/esm/packages/teams-js/src/private/hostEntity.js +1 -1
  110. package/dist/esm/packages/teams-js/src/private/videoEffectsEx.js +1 -1
  111. package/dist/esm/packages/teams-js/src/public/app.js +1 -1
  112. package/dist/esm/packages/teams-js/src/public/appId.js +1 -1
  113. package/dist/esm/packages/teams-js/src/public/appInitialization.js +1 -1
  114. package/dist/esm/packages/teams-js/src/public/appInstallDialog.js +1 -1
  115. package/dist/esm/packages/teams-js/src/public/authentication.js +1 -1
  116. package/dist/esm/packages/teams-js/src/public/barCode.js +1 -1
  117. package/dist/esm/packages/teams-js/src/public/calendar.js +1 -1
  118. package/dist/esm/packages/teams-js/src/public/call.js +1 -1
  119. package/dist/esm/packages/teams-js/src/public/clipboard.js +1 -1
  120. package/dist/esm/packages/teams-js/src/public/constants.js +1 -1
  121. package/dist/esm/packages/teams-js/src/public/pages.js +1 -1
  122. package/dist/esm/packages/teams-js/src/public/publicAPIs.js +1 -1
  123. package/dist/esm/packages/teams-js/src/public/serializable.interface.js +1 -0
  124. package/dist/esm/packages/teams-js/src/public/settings.js +1 -1
  125. package/dist/esm/packages/teams-js/src/public/tasks.js +1 -1
  126. package/dist/esm/packages/teams-js/src/public/version.js +1 -1
  127. package/dist/esm/packages/teams-js/src/public/webStorage.js +1 -1
  128. package/dist/umd/MicrosoftTeams.d.ts +10740 -10768
  129. package/dist/umd/MicrosoftTeams.js +1571 -1359
  130. package/dist/umd/MicrosoftTeams.js.map +1 -1
  131. package/dist/umd/MicrosoftTeams.min.js +1 -1
  132. package/dist/umd/MicrosoftTeams.min.js.map +1 -1
  133. package/package.json +1 -51
  134. package/dist/esm/node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/browser.js +0 -1
@@ -0,0 +1,440 @@
1
+ import { SdkError } from './interfaces';
2
+ /**
3
+ * Interact with media, including capturing and viewing images.
4
+ */
5
+ export declare namespace media {
6
+ /**
7
+ * Function callback type used when calling {@link media.captureImage}.
8
+ *
9
+ * @param error - Error encountered during the API call, if any, {@link SdkError}
10
+ * @param files - Collection of File objects (images) captured by the user. Will be an empty array in the case of an error.
11
+ * */
12
+ export type captureImageCallbackFunctionType = (error: SdkError, files: File[]) => void;
13
+ /**
14
+ * Function callback type used when calling {@link media.selectMedia}.
15
+ *
16
+ * @param error - Error encountered during the API call, if any, {@link SdkError}
17
+ * @param attachments - Collection of {@link Media} objects selected by the user. Will be an empty array in the case of an error.
18
+ * */
19
+ export type selectMediaCallbackFunctionType = (error: SdkError, attachments: Media[]) => void;
20
+ /** Error callback function type. */
21
+ export type errorCallbackFunctionType = (error?: SdkError) => void;
22
+ /**
23
+ * Function callback type used when calling {@link media.scanBarCode}.
24
+ *
25
+ * @param error - Error encountered during the API call, if any, {@link SdkError}
26
+ * @param decodedText - Decoded text from the barcode, if any. In the case of an error, this will be the empty string.
27
+ * */
28
+ export type scanBarCodeCallbackFunctionType = (error: SdkError, decodedText: string) => void;
29
+ /**
30
+ * Function callback type used when calling {@link media.Media.getMedia}
31
+ *
32
+ * @param error - Error encountered during the API call, if any, {@link SdkError}
33
+ * @param blob - Blob of media returned. Will be a blob with no BlobParts, in the case of an error.
34
+ * */
35
+ export type getMediaCallbackFunctionType = (error: SdkError, blob: Blob) => void;
36
+ /**
37
+ * Enum for file formats supported
38
+ */
39
+ export enum FileFormat {
40
+ /** Base64 encoding */
41
+ Base64 = "base64",
42
+ /** File id */
43
+ ID = "id"
44
+ }
45
+ /**
46
+ * File object that can be used to represent image or video or audio
47
+ */
48
+ export class File {
49
+ /**
50
+ * Content of the file. When format is Base64, this is the base64 content
51
+ * When format is ID, this is id mapping to the URI
52
+ * When format is base64 and app needs to use this directly in HTML tags, it should convert this to dataUrl.
53
+ */
54
+ content: string;
55
+ /**
56
+ * Format of the content
57
+ */
58
+ format: FileFormat;
59
+ /**
60
+ * Size of the file in KB
61
+ */
62
+ size: number;
63
+ /**
64
+ * MIME type. This can be used for constructing a dataUrl, if needed.
65
+ */
66
+ mimeType: string;
67
+ /**
68
+ * Optional: Name of the file
69
+ */
70
+ name?: string;
71
+ }
72
+ /**
73
+ * Launch camera, capture image or choose image from gallery and return the images as a File[] object to the callback.
74
+ *
75
+ * @params callback - Callback will be called with an @see SdkError if there are any.
76
+ * If error is null or undefined, the callback will be called with a collection of @see File objects
77
+ * @remarks
78
+ * Note: Currently we support getting one File through this API, i.e. the file arrays size will be one.
79
+ * Note: For desktop, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
80
+ *
81
+ */
82
+ export function captureImage(callback: captureImageCallbackFunctionType): void;
83
+ /**
84
+ * Checks whether or not media has user permission
85
+ *
86
+ * @returns Promise that will resolve with true if the user had granted the app permission to media information, or with false otherwise,
87
+ * In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
88
+ *
89
+ * @beta
90
+ */
91
+ export function hasPermission(): Promise<boolean>;
92
+ /**
93
+ * Requests user permission for media
94
+ *
95
+ * @returns Promise that will resolve with true if the user consented permission for media, or with false otherwise,
96
+ * In case of an error, promise will reject with the error. Function can also throw a NOT_SUPPORTED_ON_PLATFORM error
97
+ *
98
+ * @beta
99
+ */
100
+ export function requestPermission(): Promise<boolean>;
101
+ /**
102
+ * Media object returned by the select Media API
103
+ */
104
+ export class Media extends File {
105
+ constructor(that?: Media);
106
+ /**
107
+ * A preview of the file which is a lightweight representation.
108
+ * In case of images this will be a thumbnail/compressed image in base64 encoding.
109
+ */
110
+ preview: string;
111
+ /**
112
+ * Gets the media in chunks irrespective of size, these chunks are assembled and sent back to the webapp as file/blob
113
+ * @param callback - callback is called with the @see SdkError if there is an error
114
+ * If error is null or undefined, the callback will be called with @see Blob.
115
+ */
116
+ getMedia(callback: getMediaCallbackFunctionType): void;
117
+ /** Function to retrieve media content, such as images or videos, via callback. */
118
+ private getMediaViaCallback;
119
+ /** Function to retrieve media content, such as images or videos, via handler. */
120
+ private getMediaViaHandler;
121
+ }
122
+ /**
123
+ * Input parameter supplied to the select Media API
124
+ */
125
+ export interface MediaInputs {
126
+ /**
127
+ * Only one media type can be selected at a time
128
+ */
129
+ mediaType: MediaType;
130
+ /**
131
+ * max limit of media allowed to be selected in one go, current max limit is 10 set by office lens.
132
+ */
133
+ maxMediaCount: number;
134
+ /**
135
+ * Additional properties for customization of select media - Image in mobile devices
136
+ */
137
+ imageProps?: ImageProps;
138
+ /**
139
+ * Additional properties for customization of select media - Video in mobile devices
140
+ */
141
+ videoProps?: VideoProps;
142
+ /**
143
+ * Additional properties for customization of select media - VideoAndImage in mobile devices
144
+ */
145
+ videoAndImageProps?: VideoAndImageProps;
146
+ /**
147
+ * Additional properties for audio capture flows.
148
+ */
149
+ audioProps?: AudioProps;
150
+ }
151
+ /**
152
+ * @hidden
153
+ * Hide from docs
154
+ * --------
155
+ * All properties common to Image and Video Props
156
+ */
157
+ interface MediaProps {
158
+ /**
159
+ * @hidden
160
+ * Optional; Lets the developer specify the media source, more than one can be specified.
161
+ * Default value is both camera and gallery
162
+ */
163
+ sources?: Source[];
164
+ /**
165
+ * @hidden
166
+ * Optional; Specify in which mode the camera will be opened.
167
+ * Default value is Photo
168
+ */
169
+ startMode?: CameraStartMode;
170
+ /**
171
+ * @hidden
172
+ * Optional; indicate if user is allowed to move between front and back camera
173
+ * Default value is true
174
+ */
175
+ cameraSwitcher?: boolean;
176
+ }
177
+ /**
178
+ * All properties in ImageProps are optional and have default values in the platform
179
+ */
180
+ export interface ImageProps extends MediaProps {
181
+ /**
182
+ * Optional; indicate if inking on the selected Image is allowed or not
183
+ * Default value is true
184
+ */
185
+ ink?: boolean;
186
+ /**
187
+ * Optional; indicate if putting text stickers on the selected Image is allowed or not
188
+ * Default value is true
189
+ */
190
+ textSticker?: boolean;
191
+ /**
192
+ * Optional; indicate if image filtering mode is enabled on the selected image
193
+ * Default value is false
194
+ */
195
+ enableFilter?: boolean;
196
+ /**
197
+ * Optional; Lets the developer specify the image output formats, more than one can be specified.
198
+ * Default value is Image.
199
+ */
200
+ imageOutputFormats?: ImageOutputFormats[];
201
+ }
202
+ /**
203
+ * All properties in VideoProps are optional and have default values in the platform
204
+ */
205
+ export interface VideoProps extends MediaProps {
206
+ /**
207
+ * Optional; the maximum duration in seconds after which the recording should terminate automatically.
208
+ * Default value is defined by the platform serving the API.
209
+ */
210
+ maxDuration?: number;
211
+ /**
212
+ * Optional; to determine if the video capturing flow needs to be launched
213
+ * in Full Screen Mode (Lens implementation) or PictureInPicture Mode (Native implementation).
214
+ * Default value is true, indicating video will always launch in Full Screen Mode via lens.
215
+ */
216
+ isFullScreenMode?: boolean;
217
+ /**
218
+ * Optional; controls the visibility of stop button in PictureInPicture Mode.
219
+ * Default value is true, indicating the user will be able to stop the video.
220
+ */
221
+ isStopButtonVisible?: boolean;
222
+ /**
223
+ * Optional; setting VideoController will register your app to listen to the lifecycle events during the video capture flow.
224
+ * Your app can also dynamically control the experience while capturing the video by notifying the host client.
225
+ */
226
+ videoController?: VideoController;
227
+ }
228
+ /**
229
+ * All properties in VideoAndImageProps are optional and have default values in the platform
230
+ */
231
+ export interface VideoAndImageProps extends ImageProps, VideoProps {
232
+ }
233
+ /**
234
+ * All properties in AudioProps are optional and have default values in the platform
235
+ */
236
+ export interface AudioProps {
237
+ /**
238
+ * Optional; the maximum duration in minutes after which the recording should terminate automatically
239
+ * Default value is defined by the platform serving the API.
240
+ */
241
+ maxDuration?: number;
242
+ }
243
+ /**
244
+ * @hidden
245
+ * Hide from docs
246
+ * --------
247
+ * Base class which holds the callback and notifies events to the host client
248
+ */
249
+ abstract class MediaController<T> {
250
+ /** Callback that can be registered to handle events related to the playback and control of video content. */
251
+ protected controllerCallback?: T;
252
+ constructor(controllerCallback?: T);
253
+ protected abstract getMediaType(): MediaType;
254
+ /**
255
+ * @hidden
256
+ * Hide from docs
257
+ * --------
258
+ * This function will be implemented by the respective media class which holds the logic
259
+ * of specific events that needs to be notified to the app.
260
+ * @param mediaEvent indicates the event signed by the host client to the app
261
+ */
262
+ protected abstract notifyEventToApp(mediaEvent: MediaControllerEvent): void;
263
+ /**
264
+ * @hidden
265
+ * Hide from docs
266
+ * --------
267
+ * Function to notify the host client to programatically control the experience
268
+ * @param mediaEvent indicates what the event that needs to be signaled to the host client
269
+ * Optional; @param callback is used to send app if host client has successfully handled the notification event or not
270
+ */
271
+ protected notifyEventToHost(mediaEvent: MediaControllerEvent, callback?: errorCallbackFunctionType): void;
272
+ /**
273
+ * Function to programatically stop the ongoing media event
274
+ * Optional; @param callback is used to send app if host client has successfully stopped the event or not
275
+ */
276
+ stop(callback?: errorCallbackFunctionType): void;
277
+ }
278
+ /**
279
+ * Callback which will register your app to listen to lifecycle events during the video capture flow
280
+ */
281
+ export interface VideoControllerCallback {
282
+ /** The event is a type of callback that can be enlisted to handle various events linked to `onRecordingStarted`, which helps with playback of video content. */
283
+ onRecordingStarted?(): void;
284
+ }
285
+ /**
286
+ * VideoController class is used to communicate between the app and the host client during the video capture flow
287
+ */
288
+ export class VideoController extends MediaController<VideoControllerCallback> {
289
+ /** Gets media type video. */
290
+ protected getMediaType(): MediaType;
291
+ /** Notify or send an event related to the playback and control of video content to a registered application. */
292
+ notifyEventToApp(mediaEvent: MediaControllerEvent): void;
293
+ }
294
+ /**
295
+ * @beta
296
+ * Events which are used to communicate between the app and the host client during the media recording flow
297
+ */
298
+ export enum MediaControllerEvent {
299
+ /** Start recording. */
300
+ StartRecording = 1,
301
+ /** Stop recording. */
302
+ StopRecording = 2
303
+ }
304
+ /**
305
+ * The modes in which camera can be launched in select Media API
306
+ */
307
+ export enum CameraStartMode {
308
+ /** Photo mode. */
309
+ Photo = 1,
310
+ /** Document mode. */
311
+ Document = 2,
312
+ /** Whiteboard mode. */
313
+ Whiteboard = 3,
314
+ /** Business card mode. */
315
+ BusinessCard = 4
316
+ }
317
+ /**
318
+ * Specifies the image source
319
+ */
320
+ export enum Source {
321
+ /** Image source is camera. */
322
+ Camera = 1,
323
+ /** Image source is gallery. */
324
+ Gallery = 2
325
+ }
326
+ /**
327
+ * Specifies the type of Media
328
+ */
329
+ export enum MediaType {
330
+ /** Media type photo or image */
331
+ Image = 1,
332
+ /** Media type video. */
333
+ Video = 2,
334
+ /** Media type video and image. */
335
+ VideoAndImage = 3,
336
+ /** Media type audio. */
337
+ Audio = 4
338
+ }
339
+ /**
340
+ * Input for view images API
341
+ */
342
+ export interface ImageUri {
343
+ /** Image location */
344
+ value: string;
345
+ /** Image Uri type */
346
+ type: ImageUriType;
347
+ }
348
+ /**
349
+ * ID contains a mapping for content uri on platform's side, URL is generic
350
+ */
351
+ export enum ImageUriType {
352
+ /** Image Id. */
353
+ ID = 1,
354
+ /** Image URL. */
355
+ URL = 2
356
+ }
357
+ /**
358
+ * Specifies the image output formats.
359
+ */
360
+ export enum ImageOutputFormats {
361
+ /** Outputs image. */
362
+ IMAGE = 1,
363
+ /** Outputs pdf. */
364
+ PDF = 2
365
+ }
366
+ /**
367
+ * Media chunks an output of getMedia API from platform
368
+ */
369
+ export interface MediaChunk {
370
+ /**
371
+ * Base 64 data for the requested uri
372
+ */
373
+ chunk: string;
374
+ /**
375
+ * chunk sequence number
376
+ */
377
+ chunkSequence: number;
378
+ }
379
+ /**
380
+ * Output of getMedia API from platform
381
+ */
382
+ export interface MediaResult {
383
+ /**
384
+ * error encountered in getMedia API
385
+ */
386
+ error: SdkError;
387
+ /**
388
+ * Media chunk which will be assemebled and converted into a blob
389
+ */
390
+ mediaChunk: MediaChunk;
391
+ }
392
+ /**
393
+ * Helper object to assembled media chunks
394
+ */
395
+ export interface AssembleAttachment {
396
+ /** A number representing the sequence of the attachment in the media chunks. */
397
+ sequence: number;
398
+ /** A Blob object representing the data of the media chunks. */
399
+ file: Blob;
400
+ }
401
+ /**
402
+ * Select an attachment using camera/gallery
403
+ *
404
+ * @param mediaInputs - The input params to customize the media to be selected
405
+ * @param callback - The callback to invoke after fetching the media
406
+ */
407
+ export function selectMedia(mediaInputs: MediaInputs, callback: selectMediaCallbackFunctionType): void;
408
+ /**
409
+ * View images using native image viewer
410
+ *
411
+ * @param uriList - list of URIs for images to be viewed - can be content URI or server URL. Supports up to 10 Images in a single call
412
+ * @param callback - returns back error if encountered, returns null in case of success
413
+ */
414
+ export function viewImages(uriList: ImageUri[], callback: errorCallbackFunctionType): void;
415
+ /**
416
+ * Barcode configuration supplied to scanBarCode API to customize barcode scanning experience in mobile
417
+ * All properties in BarCodeConfig are optional and have default values in the platform
418
+ */
419
+ export interface BarCodeConfig {
420
+ /**
421
+ * Optional; Lets the developer specify the scan timeout interval in seconds
422
+ * Default value is 30 seconds and max allowed value is 60 seconds
423
+ */
424
+ timeOutIntervalInSec?: number;
425
+ }
426
+ /**
427
+ * @deprecated
428
+ * As of 2.1.0, please use {@link barCode.scanBarCode barCode.scanBarCode(config?: BarCodeConfig): Promise\<string\>} instead.
429
+
430
+ * Scan Barcode/QRcode using camera
431
+ *
432
+ * @remarks
433
+ * Note: For desktop and web, this API is not supported. Callback will be resolved with ErrorCode.NotSupported.
434
+ *
435
+ * @param callback - callback to invoke after scanning the barcode
436
+ * @param config - optional input configuration to customize the barcode scanning experience
437
+ */
438
+ export function scanBarCode(callback: scanBarCodeCallbackFunctionType, config?: BarCodeConfig): void;
439
+ export {};
440
+ }