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

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