@wireapp/api-client 20.5.3 → 20.5.4

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 (856) hide show
  1. package/package.json +9 -8
  2. package/src/APIClient.d.ts +126 -0
  3. package/src/APIClient.js +269 -0
  4. package/src/APIClient.js.map +1 -0
  5. package/src/Config.d.ts +4 -0
  6. package/src/Config.js +21 -0
  7. package/src/Config.js.map +1 -0
  8. package/src/account/AccountAPI.d.ts +69 -0
  9. package/src/account/AccountAPI.js +202 -0
  10. package/src/account/AccountAPI.js.map +1 -0
  11. package/src/account/AccountError.d.ts +7 -0
  12. package/src/account/AccountError.js +39 -0
  13. package/src/account/AccountError.js.map +1 -0
  14. package/src/account/BackendConfigData.d.ts +11 -0
  15. package/src/account/BackendConfigData.js +21 -0
  16. package/src/account/BackendConfigData.js.map +1 -0
  17. package/src/account/CallConfigData.d.ts +9 -0
  18. package/src/account/CallConfigData.js +21 -0
  19. package/src/account/CallConfigData.js.map +1 -0
  20. package/src/account/DomainData.d.ts +6 -0
  21. package/src/account/DomainData.js +21 -0
  22. package/src/account/DomainData.js.map +1 -0
  23. package/src/account/SSOSettings.d.ts +3 -0
  24. package/src/account/SSOSettings.js +21 -0
  25. package/src/account/SSOSettings.js.map +1 -0
  26. package/src/account/index.d.ts +3 -0
  27. package/src/account/index.js +38 -0
  28. package/src/account/index.js.map +1 -0
  29. package/src/asset/AssetAPI.d.ts +48 -0
  30. package/src/asset/AssetAPI.js +254 -0
  31. package/src/asset/AssetAPI.js.map +1 -0
  32. package/src/asset/AssetRetentionPolicy.d.ts +11 -0
  33. package/src/asset/AssetRetentionPolicy.js +34 -0
  34. package/src/asset/AssetRetentionPolicy.js.map +1 -0
  35. package/src/asset/AssetUploadData.d.ts +7 -0
  36. package/src/asset/AssetUploadData.js +21 -0
  37. package/src/asset/AssetUploadData.js.map +1 -0
  38. package/src/asset/AssetUtil.d.ts +2 -0
  39. package/src/asset/AssetUtil.js +26 -0
  40. package/src/asset/AssetUtil.js.map +1 -0
  41. package/src/asset/index.d.ts +4 -0
  42. package/src/asset/index.js +39 -0
  43. package/src/asset/index.js.map +1 -0
  44. package/src/auth/AccessTokenData.d.ts +8 -0
  45. package/src/auth/AccessTokenData.js +21 -0
  46. package/src/auth/AccessTokenData.js.map +1 -0
  47. package/src/auth/AccessTokenStore.d.ts +23 -0
  48. package/src/auth/AccessTokenStore.js +56 -0
  49. package/src/auth/AccessTokenStore.js.map +1 -0
  50. package/src/auth/AuthAPI.d.ts +40 -0
  51. package/src/auth/AuthAPI.js +164 -0
  52. package/src/auth/AuthAPI.js.map +1 -0
  53. package/src/auth/AuthenticationError.d.ts +34 -0
  54. package/src/auth/AuthenticationError.js +111 -0
  55. package/src/auth/AuthenticationError.js.map +1 -0
  56. package/src/auth/ClientPreKey.d.ts +6 -0
  57. package/src/auth/ClientPreKey.js +21 -0
  58. package/src/auth/ClientPreKey.js.map +1 -0
  59. package/src/auth/Context.d.ts +7 -0
  60. package/src/auth/Context.js +21 -0
  61. package/src/auth/Context.js.map +1 -0
  62. package/src/auth/Cookie.d.ts +6 -0
  63. package/src/auth/Cookie.js +34 -0
  64. package/src/auth/Cookie.js.map +1 -0
  65. package/src/auth/CookieList.d.ts +15 -0
  66. package/src/auth/CookieList.js +21 -0
  67. package/src/auth/CookieList.js.map +1 -0
  68. package/src/auth/CookieStore.d.ts +16 -0
  69. package/src/auth/CookieStore.js +49 -0
  70. package/src/auth/CookieStore.js.map +1 -0
  71. package/src/auth/LoginCodeResponse.d.ts +4 -0
  72. package/src/auth/LoginCodeResponse.js +21 -0
  73. package/src/auth/LoginCodeResponse.js.map +1 -0
  74. package/src/auth/LoginData.d.ts +10 -0
  75. package/src/auth/LoginData.js +21 -0
  76. package/src/auth/LoginData.js.map +1 -0
  77. package/src/auth/PreKey.d.ts +6 -0
  78. package/src/auth/PreKey.js +21 -0
  79. package/src/auth/PreKey.js.map +1 -0
  80. package/src/auth/PreKeyBundle.d.ts +14 -0
  81. package/src/auth/PreKeyBundle.js +21 -0
  82. package/src/auth/PreKeyBundle.js.map +1 -0
  83. package/src/auth/RegisterData.d.ts +20 -0
  84. package/src/auth/RegisterData.js +21 -0
  85. package/src/auth/RegisterData.js.map +1 -0
  86. package/src/auth/SendLoginCode.d.ts +5 -0
  87. package/src/auth/SendLoginCode.js +21 -0
  88. package/src/auth/SendLoginCode.js.map +1 -0
  89. package/src/auth/VerificationActionType.d.ts +5 -0
  90. package/src/auth/VerificationActionType.js +28 -0
  91. package/src/auth/VerificationActionType.js.map +1 -0
  92. package/src/auth/index.d.ts +17 -0
  93. package/src/auth/index.js +53 -0
  94. package/src/auth/index.js.map +1 -0
  95. package/src/auth/parseAccessToken.d.ts +18 -0
  96. package/src/auth/parseAccessToken.js +57 -0
  97. package/src/auth/parseAccessToken.js.map +1 -0
  98. package/src/broadcast/BroadcastAPI.d.ts +44 -0
  99. package/src/broadcast/BroadcastAPI.js +122 -0
  100. package/src/broadcast/BroadcastAPI.js.map +1 -0
  101. package/src/broadcast/index.d.ts +1 -0
  102. package/src/broadcast/index.js +36 -0
  103. package/src/broadcast/index.js.map +1 -0
  104. package/src/client/ClientAPI.d.ts +58 -0
  105. package/src/client/ClientAPI.js +153 -0
  106. package/src/client/ClientAPI.js.map +1 -0
  107. package/src/client/ClientCapability.d.ts +3 -0
  108. package/src/client/ClientCapability.js +26 -0
  109. package/src/client/ClientCapability.js.map +1 -0
  110. package/src/client/ClientCapabilityData.d.ts +4 -0
  111. package/src/client/ClientCapabilityData.js +21 -0
  112. package/src/client/ClientCapabilityData.js.map +1 -0
  113. package/src/client/ClientClassification.d.ts +6 -0
  114. package/src/client/ClientClassification.js +29 -0
  115. package/src/client/ClientClassification.js.map +1 -0
  116. package/src/client/ClientError.d.ts +7 -0
  117. package/src/client/ClientError.js +39 -0
  118. package/src/client/ClientError.js.map +1 -0
  119. package/src/client/ClientType.d.ts +6 -0
  120. package/src/client/ClientType.js +29 -0
  121. package/src/client/ClientType.js.map +1 -0
  122. package/src/client/Location.d.ts +4 -0
  123. package/src/client/Location.js +21 -0
  124. package/src/client/Location.js.map +1 -0
  125. package/src/client/NewClient.d.ts +30 -0
  126. package/src/client/NewClient.js +21 -0
  127. package/src/client/NewClient.js.map +1 -0
  128. package/src/client/PublicClient.d.ts +5 -0
  129. package/src/client/PublicClient.js +21 -0
  130. package/src/client/PublicClient.js.map +1 -0
  131. package/src/client/QualifiedPublicClients.d.ts +9 -0
  132. package/src/client/QualifiedPublicClients.js +21 -0
  133. package/src/client/QualifiedPublicClients.js.map +1 -0
  134. package/src/client/RegisteredClient.d.ts +15 -0
  135. package/src/client/RegisteredClient.js +21 -0
  136. package/src/client/RegisteredClient.js.map +1 -0
  137. package/src/client/index.d.ts +11 -0
  138. package/src/client/index.js +46 -0
  139. package/src/client/index.js.map +1 -0
  140. package/src/connection/Connection.d.ts +12 -0
  141. package/src/connection/Connection.js +21 -0
  142. package/src/connection/Connection.js.map +1 -0
  143. package/src/connection/ConnectionAPI.d.ts +60 -0
  144. package/src/connection/ConnectionAPI.js +199 -0
  145. package/src/connection/ConnectionAPI.js.map +1 -0
  146. package/src/connection/ConnectionError.d.ts +7 -0
  147. package/src/connection/ConnectionError.js +39 -0
  148. package/src/connection/ConnectionError.js.map +1 -0
  149. package/src/connection/ConnectionRequest.d.ts +5 -0
  150. package/src/connection/ConnectionRequest.js +21 -0
  151. package/src/connection/ConnectionRequest.js.map +1 -0
  152. package/src/connection/ConnectionStatus.d.ts +10 -0
  153. package/src/connection/ConnectionStatus.js +33 -0
  154. package/src/connection/ConnectionStatus.js.map +1 -0
  155. package/src/connection/ConnectionUpdate.d.ts +4 -0
  156. package/src/connection/ConnectionUpdate.js +21 -0
  157. package/src/connection/ConnectionUpdate.js.map +1 -0
  158. package/src/connection/UserConnectionList.d.ts +5 -0
  159. package/src/connection/UserConnectionList.js +21 -0
  160. package/src/connection/UserConnectionList.js.map +1 -0
  161. package/src/connection/index.d.ts +7 -0
  162. package/src/connection/index.js +42 -0
  163. package/src/connection/index.js.map +1 -0
  164. package/src/conversation/ClientMismatch.d.ts +7 -0
  165. package/src/conversation/ClientMismatch.js +21 -0
  166. package/src/conversation/ClientMismatch.js.map +1 -0
  167. package/src/conversation/Conversation.d.ts +69 -0
  168. package/src/conversation/Conversation.js +50 -0
  169. package/src/conversation/Conversation.js.map +1 -0
  170. package/src/conversation/ConversationAPI/ConversationAPI.d.ts +344 -0
  171. package/src/conversation/ConversationAPI/ConversationAPI.js +865 -0
  172. package/src/conversation/ConversationAPI/ConversationAPI.js.map +1 -0
  173. package/src/conversation/ConversationAPI/index.d.ts +1 -0
  174. package/src/conversation/ConversationAPI/index.js +36 -0
  175. package/src/conversation/ConversationAPI/index.js.map +1 -0
  176. package/src/conversation/ConversationCode.d.ts +8 -0
  177. package/src/conversation/ConversationCode.js +21 -0
  178. package/src/conversation/ConversationCode.js.map +1 -0
  179. package/src/conversation/ConversationError.d.ts +19 -0
  180. package/src/conversation/ConversationError.js +71 -0
  181. package/src/conversation/ConversationError.js.map +1 -0
  182. package/src/conversation/ConversationIds.d.ts +4 -0
  183. package/src/conversation/ConversationIds.js +21 -0
  184. package/src/conversation/ConversationIds.js.map +1 -0
  185. package/src/conversation/ConversationMembers.d.ts +5 -0
  186. package/src/conversation/ConversationMembers.js +21 -0
  187. package/src/conversation/ConversationMembers.js.map +1 -0
  188. package/src/conversation/ConversationRole.d.ts +17 -0
  189. package/src/conversation/ConversationRole.js +27 -0
  190. package/src/conversation/ConversationRole.js.map +1 -0
  191. package/src/conversation/Conversations.d.ts +5 -0
  192. package/src/conversation/Conversations.js +21 -0
  193. package/src/conversation/Conversations.js.map +1 -0
  194. package/src/conversation/Invite.d.ts +3 -0
  195. package/src/conversation/Invite.js +21 -0
  196. package/src/conversation/Invite.js.map +1 -0
  197. package/src/conversation/Member.d.ts +25 -0
  198. package/src/conversation/Member.js +21 -0
  199. package/src/conversation/Member.js.map +1 -0
  200. package/src/conversation/MessageSendingStatus.d.ts +8 -0
  201. package/src/conversation/MessageSendingStatus.js +21 -0
  202. package/src/conversation/MessageSendingStatus.js.map +1 -0
  203. package/src/conversation/MutedStatus.d.ts +5 -0
  204. package/src/conversation/MutedStatus.js +28 -0
  205. package/src/conversation/MutedStatus.js.map +1 -0
  206. package/src/conversation/NewConversation.d.ts +19 -0
  207. package/src/conversation/NewConversation.js +27 -0
  208. package/src/conversation/NewConversation.js.map +1 -0
  209. package/src/conversation/NewOTRMessage.d.ts +17 -0
  210. package/src/conversation/NewOTRMessage.js +21 -0
  211. package/src/conversation/NewOTRMessage.js.map +1 -0
  212. package/src/conversation/OTRClientMap.d.ts +4 -0
  213. package/src/conversation/OTRClientMap.js +21 -0
  214. package/src/conversation/OTRClientMap.js.map +1 -0
  215. package/src/conversation/OTRRecipients.d.ts +7 -0
  216. package/src/conversation/OTRRecipients.js +21 -0
  217. package/src/conversation/OTRRecipients.js.map +1 -0
  218. package/src/conversation/OtherMember.d.ts +18 -0
  219. package/src/conversation/OtherMember.js +26 -0
  220. package/src/conversation/OtherMember.js.map +1 -0
  221. package/src/conversation/QualifiedConversationIds.d.ts +6 -0
  222. package/src/conversation/QualifiedConversationIds.js +21 -0
  223. package/src/conversation/QualifiedConversationIds.js.map +1 -0
  224. package/src/conversation/QualifiedUserClients.d.ts +4 -0
  225. package/src/conversation/QualifiedUserClients.js +21 -0
  226. package/src/conversation/QualifiedUserClients.js.map +1 -0
  227. package/src/conversation/RemoteConversations.d.ts +7 -0
  228. package/src/conversation/RemoteConversations.js +21 -0
  229. package/src/conversation/RemoteConversations.js.map +1 -0
  230. package/src/conversation/ServiceRef.d.ts +4 -0
  231. package/src/conversation/ServiceRef.js +21 -0
  232. package/src/conversation/ServiceRef.js.map +1 -0
  233. package/src/conversation/UserClients.d.ts +5 -0
  234. package/src/conversation/UserClients.js +21 -0
  235. package/src/conversation/UserClients.js.map +1 -0
  236. package/src/conversation/data/ConversationAccessUpdateData.d.ts +10 -0
  237. package/src/conversation/data/ConversationAccessUpdateData.js +21 -0
  238. package/src/conversation/data/ConversationAccessUpdateData.js.map +1 -0
  239. package/src/conversation/data/ConversationCodeUpdateData.d.ts +2 -0
  240. package/src/conversation/data/ConversationCodeUpdateData.js +21 -0
  241. package/src/conversation/data/ConversationCodeUpdateData.js.map +1 -0
  242. package/src/conversation/data/ConversationConnectRequestData.d.ts +6 -0
  243. package/src/conversation/data/ConversationConnectRequestData.js +21 -0
  244. package/src/conversation/data/ConversationConnectRequestData.js.map +1 -0
  245. package/src/conversation/data/ConversationCreateData.d.ts +7 -0
  246. package/src/conversation/data/ConversationCreateData.js +21 -0
  247. package/src/conversation/data/ConversationCreateData.js.map +1 -0
  248. package/src/conversation/data/ConversationJoinData.d.ts +4 -0
  249. package/src/conversation/data/ConversationJoinData.js +21 -0
  250. package/src/conversation/data/ConversationJoinData.js.map +1 -0
  251. package/src/conversation/data/ConversationMLSMessageAddData.d.ts +2 -0
  252. package/src/conversation/data/ConversationMLSMessageAddData.js +21 -0
  253. package/src/conversation/data/ConversationMLSMessageAddData.js.map +1 -0
  254. package/src/conversation/data/ConversationMLSWelcomeData.d.ts +2 -0
  255. package/src/conversation/data/ConversationMLSWelcomeData.js +21 -0
  256. package/src/conversation/data/ConversationMLSWelcomeData.js.map +1 -0
  257. package/src/conversation/data/ConversationMemberJoinData.d.ts +5 -0
  258. package/src/conversation/data/ConversationMemberJoinData.js +21 -0
  259. package/src/conversation/data/ConversationMemberJoinData.js.map +1 -0
  260. package/src/conversation/data/ConversationMemberLeaveData.d.ts +13 -0
  261. package/src/conversation/data/ConversationMemberLeaveData.js +26 -0
  262. package/src/conversation/data/ConversationMemberLeaveData.js.map +1 -0
  263. package/src/conversation/data/ConversationMemberUpdateData.d.ts +28 -0
  264. package/src/conversation/data/ConversationMemberUpdateData.js +21 -0
  265. package/src/conversation/data/ConversationMemberUpdateData.js.map +1 -0
  266. package/src/conversation/data/ConversationMessageTimerUpdateData.d.ts +3 -0
  267. package/src/conversation/data/ConversationMessageTimerUpdateData.js +21 -0
  268. package/src/conversation/data/ConversationMessageTimerUpdateData.js.map +1 -0
  269. package/src/conversation/data/ConversationNameUpdateData.d.ts +3 -0
  270. package/src/conversation/data/ConversationNameUpdateData.js +21 -0
  271. package/src/conversation/data/ConversationNameUpdateData.js.map +1 -0
  272. package/src/conversation/data/ConversationOtrMessageAddData.d.ts +6 -0
  273. package/src/conversation/data/ConversationOtrMessageAddData.js +21 -0
  274. package/src/conversation/data/ConversationOtrMessageAddData.js.map +1 -0
  275. package/src/conversation/data/ConversationReceiptModeUpdateData.d.ts +11 -0
  276. package/src/conversation/data/ConversationReceiptModeUpdateData.js +31 -0
  277. package/src/conversation/data/ConversationReceiptModeUpdateData.js.map +1 -0
  278. package/src/conversation/data/ConversationRenameData.d.ts +3 -0
  279. package/src/conversation/data/ConversationRenameData.js +21 -0
  280. package/src/conversation/data/ConversationRenameData.js.map +1 -0
  281. package/src/conversation/data/ConversationTypingData.d.ts +7 -0
  282. package/src/conversation/data/ConversationTypingData.js +27 -0
  283. package/src/conversation/data/ConversationTypingData.js.map +1 -0
  284. package/src/conversation/data/MlsEventData.d.ts +63 -0
  285. package/src/conversation/data/MlsEventData.js +21 -0
  286. package/src/conversation/data/MlsEventData.js.map +1 -0
  287. package/src/conversation/data/index.d.ts +16 -0
  288. package/src/conversation/data/index.js +51 -0
  289. package/src/conversation/data/index.js.map +1 -0
  290. package/src/conversation/index.d.ts +23 -0
  291. package/src/conversation/index.js +58 -0
  292. package/src/conversation/index.js.map +1 -0
  293. package/src/env/Backend.d.ts +9 -0
  294. package/src/env/Backend.js +36 -0
  295. package/src/env/Backend.js.map +1 -0
  296. package/src/env/index.d.ts +1 -0
  297. package/src/env/index.js +36 -0
  298. package/src/env/index.js.map +1 -0
  299. package/src/event/BackendEvent.d.ts +6 -0
  300. package/src/event/BackendEvent.js +21 -0
  301. package/src/event/BackendEvent.js.map +1 -0
  302. package/src/event/ConversationEvent.d.ts +96 -0
  303. package/src/event/ConversationEvent.js +41 -0
  304. package/src/event/ConversationEvent.js.map +1 -0
  305. package/src/event/TeamEvent.d.ts +57 -0
  306. package/src/event/TeamEvent.js +34 -0
  307. package/src/event/TeamEvent.js.map +1 -0
  308. package/src/event/UserEvent.d.ts +56 -0
  309. package/src/event/UserEvent.js +37 -0
  310. package/src/event/UserEvent.js.map +1 -0
  311. package/src/event/index.d.ts +4 -0
  312. package/src/event/index.js +39 -0
  313. package/src/event/index.js.map +1 -0
  314. package/src/giphy/GiphyAPI.d.ts +39 -0
  315. package/src/giphy/GiphyAPI.js +101 -0
  316. package/src/giphy/GiphyAPI.js.map +1 -0
  317. package/src/giphy/GiphyImage.d.ts +71 -0
  318. package/src/giphy/GiphyImage.js +21 -0
  319. package/src/giphy/GiphyImage.js.map +1 -0
  320. package/src/giphy/GiphyOptions.d.ts +45 -0
  321. package/src/giphy/GiphyOptions.js +30 -0
  322. package/src/giphy/GiphyOptions.js.map +1 -0
  323. package/src/giphy/GiphyResult.d.ts +17 -0
  324. package/src/giphy/GiphyResult.js +21 -0
  325. package/src/giphy/GiphyResult.js.map +1 -0
  326. package/src/giphy/index.d.ts +4 -0
  327. package/src/giphy/index.js +39 -0
  328. package/src/giphy/index.js.map +1 -0
  329. package/src/http/BackendError.d.ts +9 -0
  330. package/src/http/BackendError.js +33 -0
  331. package/src/http/BackendError.js.map +1 -0
  332. package/src/http/BackendErrorLabel.d.ts +96 -0
  333. package/src/http/BackendErrorLabel.js +131 -0
  334. package/src/http/BackendErrorLabel.js.map +1 -0
  335. package/src/http/BackendErrorMapper.d.ts +5 -0
  336. package/src/http/BackendErrorMapper.js +91 -0
  337. package/src/http/BackendErrorMapper.js.map +1 -0
  338. package/src/http/ConnectionState.d.ts +6 -0
  339. package/src/http/ConnectionState.js +29 -0
  340. package/src/http/ConnectionState.js.map +1 -0
  341. package/src/http/ContentType.d.ts +6 -0
  342. package/src/http/ContentType.js +29 -0
  343. package/src/http/ContentType.js.map +1 -0
  344. package/src/http/HttpClient.d.ts +46 -0
  345. package/src/http/HttpClient.js +229 -0
  346. package/src/http/HttpClient.js.map +1 -0
  347. package/src/http/NetworkError.d.ts +4 -0
  348. package/src/http/NetworkError.js +32 -0
  349. package/src/http/NetworkError.js.map +1 -0
  350. package/src/http/RequestCancelable.d.ts +4 -0
  351. package/src/http/RequestCancelable.js +21 -0
  352. package/src/http/RequestCancelable.js.map +1 -0
  353. package/src/http/RequestProgressHandler.d.ts +2 -0
  354. package/src/http/RequestProgressHandler.js +29 -0
  355. package/src/http/RequestProgressHandler.js.map +1 -0
  356. package/src/http/TraceState.d.ts +6 -0
  357. package/src/http/TraceState.js +21 -0
  358. package/src/http/TraceState.js.map +1 -0
  359. package/src/http/index.d.ts +11 -0
  360. package/src/http/index.js +48 -0
  361. package/src/http/index.js.map +1 -0
  362. package/src/notification/Notification.d.ts +12 -0
  363. package/src/notification/Notification.js +21 -0
  364. package/src/notification/Notification.js.map +1 -0
  365. package/src/notification/NotificationAPI.d.ts +41 -0
  366. package/src/notification/NotificationAPI.js +129 -0
  367. package/src/notification/NotificationAPI.js.map +1 -0
  368. package/src/notification/NotificationList.d.ts +7 -0
  369. package/src/notification/NotificationList.js +21 -0
  370. package/src/notification/NotificationList.js.map +1 -0
  371. package/src/notification/index.d.ts +3 -0
  372. package/src/notification/index.js +38 -0
  373. package/src/notification/index.js.map +1 -0
  374. package/src/obfuscation/ObfuscationUtil.d.ts +6 -0
  375. package/src/obfuscation/ObfuscationUtil.js +41 -0
  376. package/src/obfuscation/ObfuscationUtil.js.map +1 -0
  377. package/src/obfuscation/index.d.ts +1 -0
  378. package/src/obfuscation/index.js +36 -0
  379. package/src/obfuscation/index.js.map +1 -0
  380. package/src/self/ChangePassword.d.ts +4 -0
  381. package/src/self/ChangePassword.js +21 -0
  382. package/src/self/ChangePassword.js.map +1 -0
  383. package/src/self/Consent.d.ts +6 -0
  384. package/src/self/Consent.js +21 -0
  385. package/src/self/Consent.js.map +1 -0
  386. package/src/self/ConsentResults.d.ts +4 -0
  387. package/src/self/ConsentResults.js +21 -0
  388. package/src/self/ConsentResults.js.map +1 -0
  389. package/src/self/ConsentType.d.ts +4 -0
  390. package/src/self/ConsentType.js +27 -0
  391. package/src/self/ConsentType.js.map +1 -0
  392. package/src/self/Delete.d.ts +3 -0
  393. package/src/self/Delete.js +21 -0
  394. package/src/self/Delete.js.map +1 -0
  395. package/src/self/Name.d.ts +2 -0
  396. package/src/self/Name.js +21 -0
  397. package/src/self/Name.js.map +1 -0
  398. package/src/self/Picture.d.ts +17 -0
  399. package/src/self/Picture.js +21 -0
  400. package/src/self/Picture.js.map +1 -0
  401. package/src/self/SSOSignature.d.ts +4 -0
  402. package/src/self/SSOSignature.js +21 -0
  403. package/src/self/SSOSignature.js.map +1 -0
  404. package/src/self/Self.d.ts +13 -0
  405. package/src/self/Self.js +21 -0
  406. package/src/self/Self.js.map +1 -0
  407. package/src/self/SelfAPI.d.ts +93 -0
  408. package/src/self/SelfAPI.js +199 -0
  409. package/src/self/SelfAPI.js.map +1 -0
  410. package/src/self/index.d.ts +10 -0
  411. package/src/self/index.js +45 -0
  412. package/src/self/index.js.map +1 -0
  413. package/src/serviceProvider/LoginServiceProviderData.d.ts +2 -0
  414. package/src/serviceProvider/LoginServiceProviderData.js +21 -0
  415. package/src/serviceProvider/LoginServiceProviderData.js.map +1 -0
  416. package/src/serviceProvider/NewServiceProvider.d.ts +5 -0
  417. package/src/serviceProvider/NewServiceProvider.js +21 -0
  418. package/src/serviceProvider/NewServiceProvider.js.map +1 -0
  419. package/src/serviceProvider/RegisteredServiceProvider.d.ts +5 -0
  420. package/src/serviceProvider/RegisteredServiceProvider.js +21 -0
  421. package/src/serviceProvider/RegisteredServiceProvider.js.map +1 -0
  422. package/src/serviceProvider/ServiceProviderAPI.d.ts +28 -0
  423. package/src/serviceProvider/ServiceProviderAPI.js +93 -0
  424. package/src/serviceProvider/ServiceProviderAPI.js.map +1 -0
  425. package/src/serviceProvider/UpdateServiceProviderData.d.ts +2 -0
  426. package/src/serviceProvider/UpdateServiceProviderData.js +21 -0
  427. package/src/serviceProvider/UpdateServiceProviderData.js.map +1 -0
  428. package/src/serviceProvider/index.d.ts +5 -0
  429. package/src/serviceProvider/index.js +40 -0
  430. package/src/serviceProvider/index.js.map +1 -0
  431. package/src/services/Service.d.ts +80 -0
  432. package/src/services/Service.js +21 -0
  433. package/src/services/Service.js.map +1 -0
  434. package/src/services/ServicesAPI.d.ts +79 -0
  435. package/src/services/ServicesAPI.js +182 -0
  436. package/src/services/ServicesAPI.js.map +1 -0
  437. package/src/services/index.d.ts +1 -0
  438. package/src/services/index.js +36 -0
  439. package/src/services/index.js.map +1 -0
  440. package/src/shims/browser/buffer.d.ts +3 -0
  441. package/src/shims/browser/buffer.js +60 -0
  442. package/src/shims/browser/buffer.js.map +1 -0
  443. package/src/shims/browser/cookie.d.ts +5 -0
  444. package/src/shims/browser/cookie.js +26 -0
  445. package/src/shims/browser/cookie.js.map +1 -0
  446. package/src/shims/browser/websocket.d.ts +2 -0
  447. package/src/shims/browser/websocket.js +21 -0
  448. package/src/shims/browser/websocket.js.map +1 -0
  449. package/src/shims/node/buffer.d.ts +4 -0
  450. package/src/shims/node/buffer.js +31 -0
  451. package/src/shims/node/buffer.js.map +1 -0
  452. package/src/shims/node/cookie.d.ts +7 -0
  453. package/src/shims/node/cookie.js +59 -0
  454. package/src/shims/node/cookie.js.map +1 -0
  455. package/src/shims/node/random.d.ts +1 -0
  456. package/src/shims/node/random.js +28 -0
  457. package/src/shims/node/random.js.map +1 -0
  458. package/src/tcp/ReconnectingWebsocket.d.ts +50 -0
  459. package/src/tcp/ReconnectingWebsocket.js +199 -0
  460. package/src/tcp/ReconnectingWebsocket.js.map +1 -0
  461. package/src/tcp/WebSocketClient.d.ts +77 -0
  462. package/src/tcp/WebSocketClient.js +209 -0
  463. package/src/tcp/WebSocketClient.js.map +1 -0
  464. package/src/tcp/index.d.ts +1 -0
  465. package/src/tcp/index.js +36 -0
  466. package/src/tcp/index.js.map +1 -0
  467. package/src/team/TeamError.d.ts +13 -0
  468. package/src/team/TeamError.js +55 -0
  469. package/src/team/TeamError.js.map +1 -0
  470. package/src/team/billing/BillingAPI.d.ts +42 -0
  471. package/src/team/billing/BillingAPI.js +161 -0
  472. package/src/team/billing/BillingAPI.js.map +1 -0
  473. package/src/team/billing/BillingInfo.d.ts +10 -0
  474. package/src/team/billing/BillingInfo.js +21 -0
  475. package/src/team/billing/BillingInfo.js.map +1 -0
  476. package/src/team/billing/BillingTeamData.d.ts +23 -0
  477. package/src/team/billing/BillingTeamData.js +31 -0
  478. package/src/team/billing/BillingTeamData.js.map +1 -0
  479. package/src/team/billing/CardData.d.ts +6 -0
  480. package/src/team/billing/CardData.js +21 -0
  481. package/src/team/billing/CardData.js.map +1 -0
  482. package/src/team/billing/InvoiceData.d.ts +11 -0
  483. package/src/team/billing/InvoiceData.js +21 -0
  484. package/src/team/billing/InvoiceData.js.map +1 -0
  485. package/src/team/billing/InvoiceListData.d.ts +5 -0
  486. package/src/team/billing/InvoiceListData.js +21 -0
  487. package/src/team/billing/InvoiceListData.js.map +1 -0
  488. package/src/team/billing/InvoiceUpcomingData.d.ts +21 -0
  489. package/src/team/billing/InvoiceUpcomingData.js +21 -0
  490. package/src/team/billing/InvoiceUpcomingData.js.map +1 -0
  491. package/src/team/billing/PlanData.d.ts +14 -0
  492. package/src/team/billing/PlanData.js +27 -0
  493. package/src/team/billing/PlanData.js.map +1 -0
  494. package/src/team/billing/SupportedCurrency.d.ts +5 -0
  495. package/src/team/billing/SupportedCurrency.js +28 -0
  496. package/src/team/billing/SupportedCurrency.js.map +1 -0
  497. package/src/team/billing/index.d.ts +6 -0
  498. package/src/team/billing/index.js +41 -0
  499. package/src/team/billing/index.js.map +1 -0
  500. package/src/team/conversation/TeamConversation.d.ts +9 -0
  501. package/src/team/conversation/TeamConversation.js +21 -0
  502. package/src/team/conversation/TeamConversation.js.map +1 -0
  503. package/src/team/conversation/TeamConversationAPI.d.ts +38 -0
  504. package/src/team/conversation/TeamConversationAPI.js +86 -0
  505. package/src/team/conversation/TeamConversationAPI.js.map +1 -0
  506. package/src/team/conversation/index.d.ts +2 -0
  507. package/src/team/conversation/index.js +37 -0
  508. package/src/team/conversation/index.js.map +1 -0
  509. package/src/team/data/TeamConversationCreateData.d.ts +3 -0
  510. package/src/team/data/TeamConversationCreateData.js +21 -0
  511. package/src/team/data/TeamConversationCreateData.js.map +1 -0
  512. package/src/team/data/TeamConversationDeleteData.d.ts +3 -0
  513. package/src/team/data/TeamConversationDeleteData.js +21 -0
  514. package/src/team/data/TeamConversationDeleteData.js.map +1 -0
  515. package/src/team/data/TeamFeatureConfigurationUpdateEventData.d.ts +2 -0
  516. package/src/team/data/TeamFeatureConfigurationUpdateEventData.js +21 -0
  517. package/src/team/data/TeamFeatureConfigurationUpdateEventData.js.map +1 -0
  518. package/src/team/data/TeamMemberJoinData.d.ts +3 -0
  519. package/src/team/data/TeamMemberJoinData.js +21 -0
  520. package/src/team/data/TeamMemberJoinData.js.map +1 -0
  521. package/src/team/data/TeamMemberLeaveData.d.ts +3 -0
  522. package/src/team/data/TeamMemberLeaveData.js +21 -0
  523. package/src/team/data/TeamMemberLeaveData.js.map +1 -0
  524. package/src/team/data/TeamMemberUpdateData.d.ts +5 -0
  525. package/src/team/data/TeamMemberUpdateData.js +21 -0
  526. package/src/team/data/TeamMemberUpdateData.js.map +1 -0
  527. package/src/team/data/TeamUpdateData.d.ts +5 -0
  528. package/src/team/data/TeamUpdateData.js +21 -0
  529. package/src/team/data/TeamUpdateData.js.map +1 -0
  530. package/src/team/data/index.d.ts +7 -0
  531. package/src/team/data/index.js +42 -0
  532. package/src/team/data/index.js.map +1 -0
  533. package/src/team/feature/Feature.d.ts +57 -0
  534. package/src/team/feature/Feature.js +42 -0
  535. package/src/team/feature/Feature.js.map +1 -0
  536. package/src/team/feature/FeatureAPI.d.ts +53 -0
  537. package/src/team/feature/FeatureAPI.js +286 -0
  538. package/src/team/feature/FeatureAPI.js.map +1 -0
  539. package/src/team/feature/FeatureError.d.ts +10 -0
  540. package/src/team/feature/FeatureError.js +47 -0
  541. package/src/team/feature/FeatureError.js.map +1 -0
  542. package/src/team/feature/FeatureList.d.ts +34 -0
  543. package/src/team/feature/FeatureList.js +39 -0
  544. package/src/team/feature/FeatureList.js.map +1 -0
  545. package/src/team/feature/index.d.ts +4 -0
  546. package/src/team/feature/index.js +39 -0
  547. package/src/team/feature/index.js.map +1 -0
  548. package/src/team/identityprovider/IdentityProvider.d.ts +10 -0
  549. package/src/team/identityprovider/IdentityProvider.js +21 -0
  550. package/src/team/identityprovider/IdentityProvider.js.map +1 -0
  551. package/src/team/identityprovider/IdentityProviderAPI.d.ts +18 -0
  552. package/src/team/identityprovider/IdentityProviderAPI.js +88 -0
  553. package/src/team/identityprovider/IdentityProviderAPI.js.map +1 -0
  554. package/src/team/identityprovider/IdentityProviders.d.ts +4 -0
  555. package/src/team/identityprovider/IdentityProviders.js +21 -0
  556. package/src/team/identityprovider/IdentityProviders.js.map +1 -0
  557. package/src/team/identityprovider/index.d.ts +3 -0
  558. package/src/team/identityprovider/index.js +38 -0
  559. package/src/team/identityprovider/index.js.map +1 -0
  560. package/src/team/index.d.ts +12 -0
  561. package/src/team/index.js +60 -0
  562. package/src/team/index.js.map +1 -0
  563. package/src/team/invitation/InvitationError.d.ts +22 -0
  564. package/src/team/invitation/InvitationError.js +79 -0
  565. package/src/team/invitation/InvitationError.js.map +1 -0
  566. package/src/team/invitation/NewTeamInvitation.d.ts +9 -0
  567. package/src/team/invitation/NewTeamInvitation.js +21 -0
  568. package/src/team/invitation/NewTeamInvitation.js.map +1 -0
  569. package/src/team/invitation/TeamInvitation.d.ts +11 -0
  570. package/src/team/invitation/TeamInvitation.js +21 -0
  571. package/src/team/invitation/TeamInvitation.js.map +1 -0
  572. package/src/team/invitation/TeamInvitationAPI.d.ts +19 -0
  573. package/src/team/invitation/TeamInvitationAPI.js +143 -0
  574. package/src/team/invitation/TeamInvitationAPI.js.map +1 -0
  575. package/src/team/invitation/TeamInvitationChunk.d.ts +5 -0
  576. package/src/team/invitation/TeamInvitationChunk.js +21 -0
  577. package/src/team/invitation/TeamInvitationChunk.js.map +1 -0
  578. package/src/team/invitation/index.d.ts +5 -0
  579. package/src/team/invitation/index.js +40 -0
  580. package/src/team/invitation/index.js.map +1 -0
  581. package/src/team/legalhold/LegalHoldAPI.d.ts +20 -0
  582. package/src/team/legalhold/LegalHoldAPI.js +96 -0
  583. package/src/team/legalhold/LegalHoldAPI.js.map +1 -0
  584. package/src/team/legalhold/LegalHoldData.d.ts +20 -0
  585. package/src/team/legalhold/LegalHoldData.js +28 -0
  586. package/src/team/legalhold/LegalHoldData.js.map +1 -0
  587. package/src/team/legalhold/LegalHoldMemberStatus.d.ts +18 -0
  588. package/src/team/legalhold/LegalHoldMemberStatus.js +29 -0
  589. package/src/team/legalhold/LegalHoldMemberStatus.js.map +1 -0
  590. package/src/team/legalhold/NewLegalHoldData.d.ts +5 -0
  591. package/src/team/legalhold/NewLegalHoldData.js +21 -0
  592. package/src/team/legalhold/NewLegalHoldData.js.map +1 -0
  593. package/src/team/legalhold/index.d.ts +4 -0
  594. package/src/team/legalhold/index.js +39 -0
  595. package/src/team/legalhold/index.js.map +1 -0
  596. package/src/team/member/MemberAPI.d.ts +28 -0
  597. package/src/team/member/MemberAPI.js +144 -0
  598. package/src/team/member/MemberAPI.js.map +1 -0
  599. package/src/team/member/MemberCSVResponse.d.ts +4 -0
  600. package/src/team/member/MemberCSVResponse.js +21 -0
  601. package/src/team/member/MemberCSVResponse.js.map +1 -0
  602. package/src/team/member/MemberData.d.ts +11 -0
  603. package/src/team/member/MemberData.js +21 -0
  604. package/src/team/member/MemberData.js.map +1 -0
  605. package/src/team/member/Members.d.ts +5 -0
  606. package/src/team/member/Members.js +21 -0
  607. package/src/team/member/Members.js.map +1 -0
  608. package/src/team/member/Permissions.d.ts +17 -0
  609. package/src/team/member/Permissions.js +47 -0
  610. package/src/team/member/Permissions.js.map +1 -0
  611. package/src/team/member/PermissionsData.d.ts +7 -0
  612. package/src/team/member/PermissionsData.js +21 -0
  613. package/src/team/member/PermissionsData.js.map +1 -0
  614. package/src/team/member/Role.d.ts +18 -0
  615. package/src/team/member/Role.js +118 -0
  616. package/src/team/member/Role.js.map +1 -0
  617. package/src/team/member/UpdatedMemberData.d.ts +2 -0
  618. package/src/team/member/UpdatedMemberData.js +21 -0
  619. package/src/team/member/UpdatedMemberData.js.map +1 -0
  620. package/src/team/member/index.d.ts +7 -0
  621. package/src/team/member/index.js +42 -0
  622. package/src/team/member/index.js.map +1 -0
  623. package/src/team/payment/InvoiceData.d.ts +21 -0
  624. package/src/team/payment/InvoiceData.js +21 -0
  625. package/src/team/payment/InvoiceData.js.map +1 -0
  626. package/src/team/payment/PaymentAPI.d.ts +57 -0
  627. package/src/team/payment/PaymentAPI.js +156 -0
  628. package/src/team/payment/PaymentAPI.js.map +1 -0
  629. package/src/team/payment/PaymentBillingData.d.ts +12 -0
  630. package/src/team/payment/PaymentBillingData.js +21 -0
  631. package/src/team/payment/PaymentBillingData.js.map +1 -0
  632. package/src/team/payment/PaymentData.d.ts +34 -0
  633. package/src/team/payment/PaymentData.js +30 -0
  634. package/src/team/payment/PaymentData.js.map +1 -0
  635. package/src/team/payment/PaymentDataUpdate.d.ts +6 -0
  636. package/src/team/payment/PaymentDataUpdate.js +21 -0
  637. package/src/team/payment/PaymentDataUpdate.js.map +1 -0
  638. package/src/team/payment/PaymentInterval.d.ts +6 -0
  639. package/src/team/payment/PaymentInterval.js +29 -0
  640. package/src/team/payment/PaymentInterval.js.map +1 -0
  641. package/src/team/payment/PaymentPlan.d.ts +12 -0
  642. package/src/team/payment/PaymentPlan.js +27 -0
  643. package/src/team/payment/PaymentPlan.js.map +1 -0
  644. package/src/team/payment/PaymentStripeCharge.d.ts +19 -0
  645. package/src/team/payment/PaymentStripeCharge.js +27 -0
  646. package/src/team/payment/PaymentStripeCharge.js.map +1 -0
  647. package/src/team/payment/PaymentStripeInvoice.d.ts +11 -0
  648. package/src/team/payment/PaymentStripeInvoice.js +21 -0
  649. package/src/team/payment/PaymentStripeInvoice.js.map +1 -0
  650. package/src/team/payment/PaymentStripeInvoices.d.ts +5 -0
  651. package/src/team/payment/PaymentStripeInvoices.js +21 -0
  652. package/src/team/payment/PaymentStripeInvoices.js.map +1 -0
  653. package/src/team/payment/PaymentStripePlan.d.ts +9 -0
  654. package/src/team/payment/PaymentStripePlan.js +21 -0
  655. package/src/team/payment/PaymentStripePlan.js.map +1 -0
  656. package/src/team/payment/SupportedCurrency.d.ts +5 -0
  657. package/src/team/payment/SupportedCurrency.js +28 -0
  658. package/src/team/payment/SupportedCurrency.js.map +1 -0
  659. package/src/team/payment/index.d.ts +12 -0
  660. package/src/team/payment/index.js +47 -0
  661. package/src/team/payment/index.js.map +1 -0
  662. package/src/team/scim/NewScimToken.d.ts +5 -0
  663. package/src/team/scim/NewScimToken.js +21 -0
  664. package/src/team/scim/NewScimToken.js.map +1 -0
  665. package/src/team/scim/ScimAPI.d.ts +14 -0
  666. package/src/team/scim/ScimAPI.js +57 -0
  667. package/src/team/scim/ScimAPI.js.map +1 -0
  668. package/src/team/scim/ScimTokenInfo.d.ts +7 -0
  669. package/src/team/scim/ScimTokenInfo.js +21 -0
  670. package/src/team/scim/ScimTokenInfo.js.map +1 -0
  671. package/src/team/scim/ScimTokenInfoList.d.ts +4 -0
  672. package/src/team/scim/ScimTokenInfoList.js +21 -0
  673. package/src/team/scim/ScimTokenInfoList.js.map +1 -0
  674. package/src/team/scim/index.d.ts +3 -0
  675. package/src/team/scim/index.js +38 -0
  676. package/src/team/scim/index.js.map +1 -0
  677. package/src/team/search/TeamContact.d.ts +10 -0
  678. package/src/team/search/TeamContact.js +21 -0
  679. package/src/team/search/TeamContact.js.map +1 -0
  680. package/src/team/search/TeamSearchAPI.d.ts +16 -0
  681. package/src/team/search/TeamSearchAPI.js +69 -0
  682. package/src/team/search/TeamSearchAPI.js.map +1 -0
  683. package/src/team/search/TeamSearchOptions.d.ts +16 -0
  684. package/src/team/search/TeamSearchOptions.js +27 -0
  685. package/src/team/search/TeamSearchOptions.js.map +1 -0
  686. package/src/team/search/TeamSearchResult.d.ts +7 -0
  687. package/src/team/search/TeamSearchResult.js +21 -0
  688. package/src/team/search/TeamSearchResult.js.map +1 -0
  689. package/src/team/search/index.d.ts +4 -0
  690. package/src/team/search/index.js +39 -0
  691. package/src/team/search/index.js.map +1 -0
  692. package/src/team/service/Provider.d.ts +7 -0
  693. package/src/team/service/Provider.js +21 -0
  694. package/src/team/service/Provider.js.map +1 -0
  695. package/src/team/service/Service.d.ts +11 -0
  696. package/src/team/service/Service.js +21 -0
  697. package/src/team/service/Service.js.map +1 -0
  698. package/src/team/service/ServiceAPI.d.ts +19 -0
  699. package/src/team/service/ServiceAPI.js +94 -0
  700. package/src/team/service/ServiceAPI.js.map +1 -0
  701. package/src/team/service/ServiceWhitelistData.d.ts +5 -0
  702. package/src/team/service/ServiceWhitelistData.js +21 -0
  703. package/src/team/service/ServiceWhitelistData.js.map +1 -0
  704. package/src/team/service/Services.d.ts +5 -0
  705. package/src/team/service/Services.js +21 -0
  706. package/src/team/service/Services.js.map +1 -0
  707. package/src/team/service/index.d.ts +5 -0
  708. package/src/team/service/index.js +40 -0
  709. package/src/team/service/index.js.map +1 -0
  710. package/src/team/team/LeadData.d.ts +16 -0
  711. package/src/team/team/LeadData.js +21 -0
  712. package/src/team/team/LeadData.js.map +1 -0
  713. package/src/team/team/NewTeamData.d.ts +15 -0
  714. package/src/team/team/NewTeamData.js +21 -0
  715. package/src/team/team/NewTeamData.js.map +1 -0
  716. package/src/team/team/TeamAPI.d.ts +26 -0
  717. package/src/team/team/TeamAPI.js +126 -0
  718. package/src/team/team/TeamAPI.js.map +1 -0
  719. package/src/team/team/TeamChunkData.d.ts +5 -0
  720. package/src/team/team/TeamChunkData.js +21 -0
  721. package/src/team/team/TeamChunkData.js.map +1 -0
  722. package/src/team/team/TeamData.d.ts +17 -0
  723. package/src/team/team/TeamData.js +21 -0
  724. package/src/team/team/TeamData.js.map +1 -0
  725. package/src/team/team/TeamInfo.d.ts +5 -0
  726. package/src/team/team/TeamInfo.js +21 -0
  727. package/src/team/team/TeamInfo.js.map +1 -0
  728. package/src/team/team/TeamSizeData.d.ts +3 -0
  729. package/src/team/team/TeamSizeData.js +21 -0
  730. package/src/team/team/TeamSizeData.js.map +1 -0
  731. package/src/team/team/UpdateTeamData.d.ts +10 -0
  732. package/src/team/team/UpdateTeamData.js +21 -0
  733. package/src/team/team/UpdateTeamData.js.map +1 -0
  734. package/src/team/team/index.d.ts +7 -0
  735. package/src/team/team/index.js +42 -0
  736. package/src/team/team/index.js.map +1 -0
  737. package/src/user/Activate.d.ts +24 -0
  738. package/src/user/Activate.js +21 -0
  739. package/src/user/Activate.js.map +1 -0
  740. package/src/user/ActivationResponse.d.ts +5 -0
  741. package/src/user/ActivationResponse.js +21 -0
  742. package/src/user/ActivationResponse.js.map +1 -0
  743. package/src/user/CheckHandles.d.ts +4 -0
  744. package/src/user/CheckHandles.js +21 -0
  745. package/src/user/CheckHandles.js.map +1 -0
  746. package/src/user/CompletePasswordReset.d.ts +7 -0
  747. package/src/user/CompletePasswordReset.js +21 -0
  748. package/src/user/CompletePasswordReset.js.map +1 -0
  749. package/src/user/Contact.d.ts +2 -0
  750. package/src/user/Contact.js +21 -0
  751. package/src/user/Contact.js.map +1 -0
  752. package/src/user/HandleInfo.d.ts +5 -0
  753. package/src/user/HandleInfo.js +21 -0
  754. package/src/user/HandleInfo.js.map +1 -0
  755. package/src/user/LimitedQualifiedUserIdList.d.ts +4 -0
  756. package/src/user/LimitedQualifiedUserIdList.js +21 -0
  757. package/src/user/LimitedQualifiedUserIdList.js.map +1 -0
  758. package/src/user/ManagedSource.d.ts +4 -0
  759. package/src/user/ManagedSource.js +27 -0
  760. package/src/user/ManagedSource.js.map +1 -0
  761. package/src/user/NewPasswordReset.d.ts +4 -0
  762. package/src/user/NewPasswordReset.js +21 -0
  763. package/src/user/NewPasswordReset.js.map +1 -0
  764. package/src/user/QualifiedHandle.d.ts +4 -0
  765. package/src/user/QualifiedHandle.js +21 -0
  766. package/src/user/QualifiedHandle.js.map +1 -0
  767. package/src/user/QualifiedId.d.ts +4 -0
  768. package/src/user/QualifiedId.js +21 -0
  769. package/src/user/QualifiedId.js.map +1 -0
  770. package/src/user/RTCConfiguration.d.ts +5 -0
  771. package/src/user/RTCConfiguration.js +21 -0
  772. package/src/user/RTCConfiguration.js.map +1 -0
  773. package/src/user/RTCIceServer.d.ts +5 -0
  774. package/src/user/RTCIceServer.js +21 -0
  775. package/src/user/RTCIceServer.js.map +1 -0
  776. package/src/user/RichInfo.d.ts +8 -0
  777. package/src/user/RichInfo.js +21 -0
  778. package/src/user/RichInfo.js.map +1 -0
  779. package/src/user/SearchResult.d.ts +7 -0
  780. package/src/user/SearchResult.js +21 -0
  781. package/src/user/SearchResult.js.map +1 -0
  782. package/src/user/SendActivationCode.d.ts +10 -0
  783. package/src/user/SendActivationCode.js +21 -0
  784. package/src/user/SendActivationCode.js.map +1 -0
  785. package/src/user/User.d.ts +20 -0
  786. package/src/user/User.js +21 -0
  787. package/src/user/User.js.map +1 -0
  788. package/src/user/UserAPI.d.ts +235 -0
  789. package/src/user/UserAPI.js +585 -0
  790. package/src/user/UserAPI.js.map +1 -0
  791. package/src/user/UserAsset.d.ts +10 -0
  792. package/src/user/UserAsset.js +27 -0
  793. package/src/user/UserAsset.js.map +1 -0
  794. package/src/user/UserError.d.ts +13 -0
  795. package/src/user/UserError.js +55 -0
  796. package/src/user/UserError.js.map +1 -0
  797. package/src/user/UserPreKeyBundleMap.d.ts +9 -0
  798. package/src/user/UserPreKeyBundleMap.js +21 -0
  799. package/src/user/UserPreKeyBundleMap.js.map +1 -0
  800. package/src/user/UserUpdate.d.ts +2 -0
  801. package/src/user/UserUpdate.js +21 -0
  802. package/src/user/UserUpdate.js.map +1 -0
  803. package/src/user/VerifyDelete.d.ts +4 -0
  804. package/src/user/VerifyDelete.js +21 -0
  805. package/src/user/VerifyDelete.js.map +1 -0
  806. package/src/user/data/UserActivateData.d.ts +4 -0
  807. package/src/user/data/UserActivateData.js +21 -0
  808. package/src/user/data/UserActivateData.js.map +1 -0
  809. package/src/user/data/UserClientAddData.d.ts +4 -0
  810. package/src/user/data/UserClientAddData.js +21 -0
  811. package/src/user/data/UserClientAddData.js.map +1 -0
  812. package/src/user/data/UserClientRemoveData.d.ts +5 -0
  813. package/src/user/data/UserClientRemoveData.js +21 -0
  814. package/src/user/data/UserClientRemoveData.js.map +1 -0
  815. package/src/user/data/UserConnectionData.d.ts +8 -0
  816. package/src/user/data/UserConnectionData.js +21 -0
  817. package/src/user/data/UserConnectionData.js.map +1 -0
  818. package/src/user/data/UserDeleteData.d.ts +3 -0
  819. package/src/user/data/UserDeleteData.js +21 -0
  820. package/src/user/data/UserDeleteData.js.map +1 -0
  821. package/src/user/data/UserLegalHoldDisableData.d.ts +4 -0
  822. package/src/user/data/UserLegalHoldDisableData.js +21 -0
  823. package/src/user/data/UserLegalHoldDisableData.js.map +1 -0
  824. package/src/user/data/UserLegalHoldEnableData.d.ts +4 -0
  825. package/src/user/data/UserLegalHoldEnableData.js +21 -0
  826. package/src/user/data/UserLegalHoldEnableData.js.map +1 -0
  827. package/src/user/data/UserLegalHoldRequestData.d.ts +9 -0
  828. package/src/user/data/UserLegalHoldRequestData.js +21 -0
  829. package/src/user/data/UserLegalHoldRequestData.js.map +1 -0
  830. package/src/user/data/UserPropertiesDeleteData.d.ts +3 -0
  831. package/src/user/data/UserPropertiesDeleteData.js +21 -0
  832. package/src/user/data/UserPropertiesDeleteData.js.map +1 -0
  833. package/src/user/data/UserPropertiesSetData.d.ts +45 -0
  834. package/src/user/data/UserPropertiesSetData.js +35 -0
  835. package/src/user/data/UserPropertiesSetData.js.map +1 -0
  836. package/src/user/data/UserPushRemoveData.d.ts +9 -0
  837. package/src/user/data/UserPushRemoveData.js +21 -0
  838. package/src/user/data/UserPushRemoveData.js.map +1 -0
  839. package/src/user/data/UserPushTokenProvider.d.ts +8 -0
  840. package/src/user/data/UserPushTokenProvider.js +31 -0
  841. package/src/user/data/UserPushTokenProvider.js.map +1 -0
  842. package/src/user/data/UserUpdateData.d.ts +6 -0
  843. package/src/user/data/UserUpdateData.js +21 -0
  844. package/src/user/data/UserUpdateData.js.map +1 -0
  845. package/src/user/data/index.d.ts +12 -0
  846. package/src/user/data/index.js +47 -0
  847. package/src/user/data/index.js.map +1 -0
  848. package/src/user/index.d.ts +22 -0
  849. package/src/user/index.js +57 -0
  850. package/src/user/index.js.map +1 -0
  851. package/src/validation/ValidationError.d.ts +4 -0
  852. package/src/validation/ValidationError.js +30 -0
  853. package/src/validation/ValidationError.js.map +1 -0
  854. package/src/validation/index.d.ts +1 -0
  855. package/src/validation/index.js +36 -0
  856. package/src/validation/index.js.map +1 -0
@@ -0,0 +1,865 @@
1
+ "use strict";
2
+ /*
3
+ * Wire
4
+ * Copyright (C) 2018 Wire Swiss GmbH
5
+ *
6
+ * This program is free software: you can redistribute it and/or modify
7
+ * it under the terms of the GNU General Public License as published by
8
+ * the Free Software Foundation, either version 3 of the License, or
9
+ * (at your option) any later version.
10
+ *
11
+ * This program is distributed in the hope that it will be useful,
12
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ * GNU General Public License for more details.
15
+ *
16
+ * You should have received a copy of the GNU General Public License
17
+ * along with this program. If not, see http://www.gnu.org/licenses/.
18
+ *
19
+ */
20
+ Object.defineProperty(exports, "__esModule", { value: true });
21
+ exports.ConversationAPI = void 0;
22
+ const otr_1 = require("@wireapp/protocol-messaging/web/otr");
23
+ const validation_1 = require("../../validation");
24
+ const __1 = require("..");
25
+ const http_1 = require("../../http");
26
+ const ConversationError_1 = require("../ConversationError");
27
+ const ArrayUtil_1 = require("@wireapp/commons/src/main/util/ArrayUtil");
28
+ class ConversationAPI {
29
+ constructor(client, backendFeatures) {
30
+ this.client = client;
31
+ this.backendFeatures = backendFeatures;
32
+ }
33
+ /**
34
+ * Delete a conversation code.
35
+ * @param conversationId ID of conversation to delete the code for
36
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/deleteConversationCode
37
+ */
38
+ async deleteConversationCode(conversationId) {
39
+ const config = {
40
+ method: 'delete',
41
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.CODE}`,
42
+ };
43
+ const response = await this.client.sendJSON(config);
44
+ return response.data;
45
+ }
46
+ /**
47
+ * @deprecated Use `deleteService()` instead.
48
+ */
49
+ deleteBot(conversationId, serviceId) {
50
+ return this.deleteService(conversationId, serviceId);
51
+ }
52
+ /**
53
+ * Remove service from conversation.
54
+ * @param conversationId The conversation ID to remove the service from
55
+ * @param serviceId The ID of the service to be removed from the conversation
56
+ */
57
+ async deleteService(conversationId, serviceId) {
58
+ const config = {
59
+ method: 'delete',
60
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.BOTS}/${serviceId}`,
61
+ };
62
+ await this.client.sendJSON(config);
63
+ }
64
+ /**
65
+ * Remove member from conversation.
66
+ * @param conversationId The conversation ID to remove the user from
67
+ * @param userId The user to remove
68
+ * @see https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/delete_conversations__cnv_domain___cnv__members__usr_domain___usr_
69
+ */
70
+ async deleteMember(conversationId, userId) {
71
+ const url = `${ConversationAPI.URL.CONVERSATIONS}/${conversationId.domain}/${conversationId.id}/${ConversationAPI.URL.MEMBERS}/${userId.domain}/${userId.id}`;
72
+ const response = await this.client.sendJSON({
73
+ method: 'delete',
74
+ url,
75
+ });
76
+ return response.data;
77
+ }
78
+ /**
79
+ * Get all conversations.
80
+ * @deprecated - use getConversationList instead
81
+ */
82
+ getAllConversations() {
83
+ let allConversations = [];
84
+ const getConversationChunks = async (conversationId) => {
85
+ const { conversations, has_more } = await this.getConversations(conversationId, ConversationAPI.MAX_CHUNK_SIZE);
86
+ if (conversations.length) {
87
+ allConversations = allConversations.concat(conversations);
88
+ }
89
+ if (has_more) {
90
+ const lastConversation = conversations.pop();
91
+ if (lastConversation) {
92
+ return getConversationChunks(lastConversation.id);
93
+ }
94
+ }
95
+ return allConversations;
96
+ };
97
+ return getConversationChunks();
98
+ }
99
+ /**
100
+ * Get a conversation code.
101
+ * @param conversationId ID of conversation to get the code for
102
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/getConversationCode
103
+ */
104
+ async getConversationCode(conversationId) {
105
+ const config = {
106
+ method: 'GET',
107
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.CODE}`,
108
+ };
109
+ const response = await this.client.sendJSON(config);
110
+ return response.data;
111
+ }
112
+ /**
113
+ * @param conversationId
114
+ * @deprecated use feature.getAllFeatures instead
115
+ */
116
+ async getConversationGuestLinkFeature(conversationId) {
117
+ const config = {
118
+ method: 'get',
119
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/features/conversationGuestLinks`,
120
+ };
121
+ const response = await this.client.sendJSON(config);
122
+ return response.data;
123
+ }
124
+ async getConversation(conversationId) {
125
+ return this.backendFeatures.federationEndpoints && typeof conversationId !== 'string'
126
+ ? this.getConversation_v2(conversationId)
127
+ : this.getConversation_v1(typeof conversationId === 'string' ? conversationId : conversationId.id);
128
+ }
129
+ /**
130
+ * Get a conversation by ID.
131
+ * @param conversationId The conversation ID
132
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/conversation
133
+ */
134
+ async getConversation_v1(conversationId) {
135
+ const url = `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}`;
136
+ const config = {
137
+ method: 'get',
138
+ url,
139
+ };
140
+ const response = await this.client.sendJSON(config);
141
+ return response.data;
142
+ }
143
+ async getConversation_v2(conversationId) {
144
+ const { id, domain } = conversationId;
145
+ const url = `${ConversationAPI.URL.CONVERSATIONS}/${domain}/${id}`;
146
+ const config = {
147
+ method: 'get',
148
+ url,
149
+ };
150
+ const response = await this.client.sendJSON(config);
151
+ return response.data;
152
+ }
153
+ /**
154
+ * Get all qualified conversation IDs.
155
+ * @param limit Max. number of qualified IDs to return
156
+ */
157
+ async getQualifiedConversationIds(limit = 0) {
158
+ const config = {
159
+ data: {},
160
+ method: 'post',
161
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${ConversationAPI.URL.LIST_IDS}`,
162
+ };
163
+ if (limit > 0) {
164
+ config.data.size = limit;
165
+ }
166
+ const allConversations = [];
167
+ const getConversationChunks = async (pagingState) => {
168
+ if (pagingState) {
169
+ config.data.paging_state = pagingState;
170
+ }
171
+ const { data } = await this.client.sendJSON(config);
172
+ const { qualified_conversations, has_more, paging_state } = data;
173
+ allConversations.push(...qualified_conversations);
174
+ if (has_more) {
175
+ return getConversationChunks(paging_state);
176
+ }
177
+ return allConversations;
178
+ };
179
+ return getConversationChunks();
180
+ }
181
+ /**
182
+ * Get all conversation IDs.
183
+ * @param limit Max. number of IDs to return
184
+ * @param conversationId Conversation ID to start from (exclusive)
185
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/conversationIds
186
+ * @deprecated Use `getListConversations()` instead.
187
+ */
188
+ async getConversationIds(limit, conversationId) {
189
+ const config = {
190
+ method: 'get',
191
+ params: {
192
+ size: limit,
193
+ start: conversationId,
194
+ },
195
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${ConversationAPI.URL.IDS}`,
196
+ };
197
+ const response = await this.client.sendJSON(config);
198
+ return response.data;
199
+ }
200
+ /**
201
+ * Get conversations as chunks.
202
+ * Note: At most 500 conversations are returned per request.
203
+ * @param startConversationId Conversation ID to start from (exclusive). Mutually exclusive with `conversationIds`.
204
+ * @param limit Max. number of conversations to return
205
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/conversations
206
+ */
207
+ getConversations(startConversationId, limit = ConversationAPI.MAX_CHUNK_SIZE) {
208
+ return this._getConversations(startConversationId, undefined, limit);
209
+ }
210
+ /**
211
+ * Get conversation metadata for a list of conversation qualified ids
212
+ * @see https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_conversations_list_v2
213
+ */
214
+ async getConversationsByQualifiedIds(conversations) {
215
+ var _a, _b, _c, _d, _e, _f;
216
+ const chunks = (0, ArrayUtil_1.chunk)(conversations, ConversationAPI.MAX_CHUNK_SIZE);
217
+ let results = { found: [], failed: [], not_found: [] };
218
+ for (const chunk of chunks) {
219
+ const config = {
220
+ data: { qualified_ids: chunk },
221
+ method: 'post',
222
+ url: this.backendFeatures.version >= 2
223
+ ? `${ConversationAPI.URL.CONVERSATIONS}/${ConversationAPI.URL.LIST}`
224
+ : `${ConversationAPI.URL.CONVERSATIONS}/${ConversationAPI.URL.LIST}/${ConversationAPI.URL.V2}`,
225
+ };
226
+ const { data } = await this.client.sendJSON(config);
227
+ results = {
228
+ found: (_a = results.found) === null || _a === void 0 ? void 0 : _a.concat((_b = data.found) !== null && _b !== void 0 ? _b : []),
229
+ not_found: (_c = results.not_found) === null || _c === void 0 ? void 0 : _c.concat((_d = data.not_found) !== null && _d !== void 0 ? _d : []),
230
+ failed: (_e = results.failed) === null || _e === void 0 ? void 0 : _e.concat((_f = data.failed) !== null && _f !== void 0 ? _f : []),
231
+ };
232
+ }
233
+ return results;
234
+ }
235
+ /**
236
+ * Get all local & remote conversations from a federated backend.
237
+ */
238
+ async getConversationList() {
239
+ if (!this.backendFeatures.federationEndpoints) {
240
+ return { found: await this.getAllConversations() };
241
+ }
242
+ const allConversationIds = await this.getQualifiedConversationIds();
243
+ const conversations = await this.getConversationsByQualifiedIds(allConversationIds);
244
+ return conversations;
245
+ }
246
+ /**
247
+ * Get conversations.
248
+ * Note: At most 500 conversations are returned per request.
249
+ * @param conversationId Conversation ID to start from (exclusive). Mutually exclusive with `conversationIds`.
250
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/conversations
251
+ */
252
+ async getConversationsByIds(filteredConversationIds) {
253
+ let allConversations = [];
254
+ const getConversationChunk = async (chunkedConversationIds) => {
255
+ const { conversations } = await this._getConversations(undefined, chunkedConversationIds, ConversationAPI.MAX_CHUNK_SIZE);
256
+ return conversations;
257
+ };
258
+ for (let index = 0; index < filteredConversationIds.length; index += ConversationAPI.MAX_CHUNK_SIZE) {
259
+ const requestChunk = filteredConversationIds.slice(index, index + ConversationAPI.MAX_CHUNK_SIZE);
260
+ if (requestChunk.length) {
261
+ const conversationChunk = await getConversationChunk(requestChunk);
262
+ if (conversationChunk.length) {
263
+ allConversations = allConversations.concat(conversationChunk);
264
+ }
265
+ }
266
+ }
267
+ return allConversations;
268
+ }
269
+ /**
270
+ * Get conversations.
271
+ * Note: At most 500 conversations are returned per request.
272
+ * @param startConversationId Conversation ID to start from (exclusive). Mutually exclusive with `conversationIds`.
273
+ * @param filteredConversationIds Mutually exclusive with `startConversationId`. At most 32 IDs per request.
274
+ * @param limit Max. number of conversations to return
275
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/conversations
276
+ */
277
+ async _getConversations(startConversationId, filteredConversationIds, limit = ConversationAPI.MAX_CHUNK_SIZE) {
278
+ const config = {
279
+ method: 'get',
280
+ params: {
281
+ size: limit,
282
+ start: startConversationId,
283
+ },
284
+ url: ConversationAPI.URL.CONVERSATIONS,
285
+ };
286
+ if (filteredConversationIds) {
287
+ config.params.ids = filteredConversationIds.join(',');
288
+ }
289
+ const response = await this.client.sendJSON(config);
290
+ return response.data;
291
+ }
292
+ /**
293
+ * Get existing roles available for the given conversation.
294
+ * @param conversationId The Conversation ID to get roles for
295
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/getConversationsRoles
296
+ */
297
+ async getRoles(conversationId) {
298
+ const config = {
299
+ method: 'get',
300
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.ROLES}`,
301
+ };
302
+ const response = await this.client.sendJSON(config);
303
+ return response.data;
304
+ }
305
+ /**
306
+ * Get self membership properties.
307
+ * @param conversationId The Conversation ID to get properties for
308
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/getSelf
309
+ */
310
+ async getMembershipProperties(conversationId) {
311
+ const config = {
312
+ method: 'get',
313
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/self`,
314
+ };
315
+ const response = await this.client.sendJSON(config);
316
+ return response.data;
317
+ }
318
+ /**
319
+ * Create a 1:1-conversation.
320
+ * @param conversationData The new conversation
321
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/createOne2OneConversation
322
+ */
323
+ async post1to1(conversationData) {
324
+ const config = {
325
+ data: conversationData,
326
+ method: 'post',
327
+ url: `${ConversationAPI.URL.CONVERSATIONS}/one2one`,
328
+ };
329
+ await this.client.sendJSON(config);
330
+ }
331
+ /**
332
+ * Add users to an existing conversation.
333
+ * @param conversationId The conversation ID
334
+ * @param invitationData The new conversation
335
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/addMembers
336
+ */
337
+ async postAddMembers(conversationId, invitationData) {
338
+ const config = {
339
+ data: invitationData,
340
+ method: 'post',
341
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.MEMBERS}`,
342
+ };
343
+ try {
344
+ const response = await this.client.sendJSON(config);
345
+ return response.data;
346
+ }
347
+ catch (error) {
348
+ const backendError = error;
349
+ switch (backendError.label) {
350
+ case http_1.BackendErrorLabel.LEGAL_HOLD_MISSING_CONSENT: {
351
+ throw new ConversationError_1.ConversationLegalholdMissingConsentError(backendError.message);
352
+ }
353
+ }
354
+ throw error;
355
+ }
356
+ }
357
+ /**
358
+ * @deprecated Use `postService()` instead.
359
+ */
360
+ postBot(conversationId, providerId, serviceId) {
361
+ return this.postService(conversationId, providerId, serviceId);
362
+ }
363
+ /**
364
+ * Add a service to an existing conversation.
365
+ * @param conversationId ID of the conversation to add services to
366
+ * @param providerId ID of the service provider
367
+ * @param serviceId ID of the service provider
368
+ */
369
+ async postService(conversationId, providerId, serviceId) {
370
+ const config = {
371
+ data: {
372
+ provider: providerId,
373
+ service: serviceId,
374
+ },
375
+ method: 'post',
376
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.BOTS}`,
377
+ };
378
+ const response = await this.client.sendJSON(config);
379
+ return response.data;
380
+ }
381
+ /**
382
+ * Create a new conversation
383
+ * @param conversationData The new conversation
384
+ * @see https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_conversations
385
+ */
386
+ async postConversation(conversationData) {
387
+ const config = {
388
+ data: conversationData,
389
+ method: 'post',
390
+ url: ConversationAPI.URL.CONVERSATIONS,
391
+ };
392
+ try {
393
+ const response = await this.client.sendJSON(config);
394
+ return response.data;
395
+ }
396
+ catch (error) {
397
+ const backendError = error;
398
+ switch (backendError.label) {
399
+ case http_1.BackendErrorLabel.LEGAL_HOLD_MISSING_CONSENT: {
400
+ throw new ConversationError_1.ConversationLegalholdMissingConsentError(backendError.message);
401
+ }
402
+ }
403
+ throw error;
404
+ }
405
+ }
406
+ /**
407
+ * Create or recreate a conversation code.
408
+ * @param conversationId ID of conversation to request the code for
409
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/createConversationCode
410
+ */
411
+ async postConversationCodeRequest(conversationId) {
412
+ const config = {
413
+ method: 'post',
414
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.CODE}`,
415
+ };
416
+ const response = await this.client.sendJSON(config);
417
+ return response.data;
418
+ }
419
+ /**
420
+ * Validate a conversation code.
421
+ * @param conversationCode The conversation code
422
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/checkConversationCode
423
+ */
424
+ async postConversationCodeCheck(conversationCode) {
425
+ const config = {
426
+ data: conversationCode,
427
+ method: 'post',
428
+ url: `${ConversationAPI.URL.CONVERSATIONS}${ConversationAPI.URL.CODE_CHECK}`,
429
+ };
430
+ try {
431
+ await this.client.sendJSON(config);
432
+ }
433
+ catch (error) {
434
+ const backendError = error;
435
+ switch (backendError.label) {
436
+ case http_1.BackendErrorLabel.NO_CONVERSATION_CODE: {
437
+ throw new ConversationError_1.ConversationCodeNotFoundError(backendError.message);
438
+ }
439
+ }
440
+ throw error;
441
+ }
442
+ }
443
+ /**
444
+ * Join a conversation by conversation code.
445
+ * @param conversationCode The conversation code
446
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/joinConversationByCode
447
+ */
448
+ async postJoinByCode(conversationCode) {
449
+ const config = {
450
+ data: conversationCode,
451
+ method: 'post',
452
+ url: `${ConversationAPI.URL.CONVERSATIONS}${ConversationAPI.URL.JOIN}`,
453
+ };
454
+ try {
455
+ const response = await this.client.sendJSON(config);
456
+ return response.data;
457
+ }
458
+ catch (error) {
459
+ const backendError = error;
460
+ switch (backendError.label) {
461
+ case http_1.BackendErrorLabel.NO_CONVERSATION_CODE: {
462
+ throw new ConversationError_1.ConversationCodeNotFoundError(backendError.message);
463
+ }
464
+ case http_1.BackendErrorLabel.TOO_MANY_MEMBERS: {
465
+ throw new ConversationError_1.ConversationFullError(backendError.message);
466
+ }
467
+ }
468
+ throw error;
469
+ }
470
+ }
471
+ /**
472
+ * Get information about a conversation by conversation code.
473
+ * @param conversationCode The conversation code
474
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/joinConversationByCode
475
+ */
476
+ async getJoinByCode(conversationCode) {
477
+ const config = {
478
+ params: conversationCode,
479
+ method: 'get',
480
+ url: `${ConversationAPI.URL.CONVERSATIONS}${ConversationAPI.URL.JOIN}`,
481
+ };
482
+ try {
483
+ const response = await this.client.sendJSON(config);
484
+ return response.data;
485
+ }
486
+ catch (error) {
487
+ const backendError = error;
488
+ switch (backendError.label) {
489
+ case http_1.BackendErrorLabel.NO_CONVERSATION_CODE: {
490
+ throw new ConversationError_1.ConversationCodeNotFoundError(backendError.message);
491
+ }
492
+ }
493
+ throw error;
494
+ }
495
+ }
496
+ /**
497
+ * Join a conversation.
498
+ * @param conversationId The conversation ID
499
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/joinConversation
500
+ */
501
+ async postJoin(conversationId) {
502
+ const config = {
503
+ method: 'post',
504
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}`,
505
+ };
506
+ const response = await this.client.sendJSON(config);
507
+ return response.data;
508
+ }
509
+ /**
510
+ * Post an encrypted message to a conversation.
511
+ * @param sendingClientId The sender's client ID
512
+ * @param conversationId The conversation ID
513
+ * @param messageData The message content
514
+ * @param ignoreMissing Whether to report missing clients or not:
515
+ * `false`: Report about all missing clients
516
+ * `true`: Ignore all missing clients and force sending.
517
+ * Array: User IDs specifying which user IDs are allowed to have
518
+ * missing clients
519
+ * `undefined`: Default to setting of `report_missing` in `NewOTRMessage`
520
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/postOtrMessage
521
+ */
522
+ async postOTRMessage(sendingClientId, conversationId, messageData, ignoreMissing) {
523
+ if (!sendingClientId) {
524
+ throw new validation_1.ValidationError('Unable to send OTR message without client ID.');
525
+ }
526
+ messageData || (messageData = {
527
+ recipients: {},
528
+ sender: sendingClientId,
529
+ });
530
+ const config = {
531
+ data: messageData,
532
+ method: 'post',
533
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.OTR}/${ConversationAPI.URL.MESSAGES}`,
534
+ };
535
+ if (typeof ignoreMissing !== 'undefined') {
536
+ const ignore_missing = Array.isArray(ignoreMissing) ? ignoreMissing.join(',') : ignoreMissing;
537
+ config.params = { ignore_missing };
538
+ // `ignore_missing` takes precedence on the server so we can remove
539
+ // `report_missing` to save some bandwidth.
540
+ delete messageData.report_missing;
541
+ }
542
+ else if (typeof messageData.report_missing === 'undefined' || !messageData.report_missing.length) {
543
+ // both `ignore_missing` and `report_missing` are undefined
544
+ config.params = { ignore_missing: !!messageData.data };
545
+ }
546
+ const response = await this.client.sendJSON(config, true);
547
+ return response.data;
548
+ }
549
+ /**
550
+ * This endpoint ensures that the list of clients is correct and only sends the message if the list is correct.
551
+ * To override this, the endpoint accepts `client_mismatch_strategy` in the body. It can have these values:
552
+ *
553
+ * - `report_all`: When set, the message is not sent if any clients are missing. The missing clients are reported
554
+ * in the response.
555
+ * - `ignore_all`: When set, no checks about missing clients are carried out.
556
+ * - `report_only`: Takes a list of qualified UserIDs. If any clients of the listed users are missing, the message is
557
+ * not sent. The missing clients are reported in the response.
558
+ * - `ignore_only`: Takes a list of qualified UserIDs. If any clients of the non-listed users are missing, the message
559
+ * is not sent. The missing clients are reported in the response.
560
+ *
561
+ * The sending of messages in a federated conversation could theorectically fail partially. To make this case
562
+ * unlikely, the backend first gets a list of clients from all the involved backends and then tries to send a message.
563
+ * So, if any backend is down, the message is not propagated to anyone. But the actual message fan out to multiple
564
+ * backends could still fail partially. This type of failure is reported as a 201, the clients for which the message
565
+ * sending failed are part of the response body.
566
+ *
567
+ * This endpoint can lead to OtrMessageAdd event being sent to the recipients.
568
+ *
569
+ * @see https://nginz-https.anta.wire.link/api/swagger-ui/#/default/post_conversations__cnv_domain___cnv__proteus_messages
570
+ */
571
+ async postOTRMessageV2(conversationId, domain, messageData) {
572
+ const config = {
573
+ /*
574
+ * We need to slice the content of what protobuf has generated in order for Axios to send the correct data (see https://github.com/axios/axios/issues/4068)
575
+ * FIXME: The `slice` can be removed as soon as Axios publishes a version with the dataview issue fixed.
576
+ */
577
+ data: otr_1.proteus.QualifiedNewOtrMessage.encode(messageData).finish().slice(),
578
+ method: 'post',
579
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${domain}/${conversationId}/${ConversationAPI.URL.PROTEUS}/${ConversationAPI.URL.MESSAGES}`,
580
+ };
581
+ const response = await this.client.sendProtocolBuffer(config, true);
582
+ return response.data;
583
+ }
584
+ /**
585
+ * Post an encrypted message to a conversation.
586
+ * @param sendingClientId The sender's client ID
587
+ * @param conversationId The conversation ID
588
+ * @param messageData The message content
589
+ * @param ignoreMissing Whether to report missing clients or not:
590
+ * `false`: Report about all missing clients
591
+ * `true`: Ignore all missing clients and force sending.
592
+ * Array: User IDs specifying which user IDs are allowed to have
593
+ * missing clients
594
+ * `undefined`: Default to setting of `report_missing` in `NewOTRMessage`
595
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/postOtrMessage
596
+ */
597
+ async postOTRProtobufMessage(sendingClientId, conversationId, messageData, ignoreMissing) {
598
+ if (!sendingClientId) {
599
+ throw new validation_1.ValidationError('Unable to send OTR message without client ID.');
600
+ }
601
+ const config = {
602
+ /*
603
+ * We need to slice the content of what protobuf has generated in order for Axios to send the correct buffer (see https://github.com/axios/axios/issues/4068)
604
+ * FIXME: The `slice` can be removed as soon as Axios publishes a version with the dataview issue fixed.
605
+ */
606
+ data: otr_1.proteus.NewOtrMessage.encode(messageData).finish().slice(),
607
+ method: 'post',
608
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.OTR}/${ConversationAPI.URL.MESSAGES}`,
609
+ };
610
+ if (typeof ignoreMissing !== 'undefined') {
611
+ const ignore_missing = Array.isArray(ignoreMissing) ? ignoreMissing.join(',') : ignoreMissing;
612
+ config.params = { ignore_missing };
613
+ // `ignore_missing` takes precedence on the server so we can remove
614
+ // `report_missing` to save some bandwidth.
615
+ messageData.reportMissing = [];
616
+ }
617
+ else if (typeof messageData.reportMissing === 'undefined' || !messageData.reportMissing.length) {
618
+ // both `ignore_missing` and `report_missing` are undefined
619
+ config.params = { ignore_missing: !!messageData.blob };
620
+ }
621
+ const response = await this.client.sendProtocolBuffer(config, true);
622
+ return response.data;
623
+ }
624
+ /**
625
+ * Post an encrypted message to a conversation.
626
+ * @param messageData Mls message payload in TLS format. Please refer to the MLS specification for details.
627
+ * @see https://messaginglayersecurity.rocks/mls-protocol/draft-ietf-mls-protocol.html#name-message-framing
628
+ * @see https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_mls_messages
629
+ */
630
+ async postMlsMessage(messageData) {
631
+ const config = {
632
+ data: messageData,
633
+ method: 'post',
634
+ url: `${ConversationAPI.URL.MLS}/${ConversationAPI.URL.MESSAGES}`,
635
+ };
636
+ const response = await this.client.sendProtocolMls(config, true);
637
+ return response.data;
638
+ }
639
+ /**
640
+ * Post the welcome encrypted message to a conversation.
641
+ * @param messageData Mls welocome message payload in TLS format. Please refer to the MLS specification for details.
642
+ * @see https://messaginglayersecurity.rocks/mls-protocol/draft-ietf-mls-protocol.html#name-message-framing
643
+ * @see https://staging-nginz-https.zinfra.io/api/swagger-ui/#/default/post_mls_welcome
644
+ */
645
+ async postMlsWelcomeMessage(messageData) {
646
+ const config = {
647
+ data: messageData,
648
+ method: 'post',
649
+ url: `${ConversationAPI.URL.MLS}/welcome`,
650
+ };
651
+ await this.client.sendProtocolMls(config, true);
652
+ }
653
+ async postForClients(clientId, conversationId) {
654
+ try {
655
+ await this.postOTRMessage(clientId, conversationId);
656
+ throw new Error(`Expected backend to throw error.`);
657
+ }
658
+ catch (error) {
659
+ return error.response.data;
660
+ }
661
+ }
662
+ /**
663
+ * Create a self-conversation.
664
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/createSelfConversation
665
+ */
666
+ async postSelf() {
667
+ const config = {
668
+ method: 'post',
669
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${ConversationAPI.URL.SELF}`,
670
+ };
671
+ const response = await this.client.sendJSON(config);
672
+ return response.data;
673
+ }
674
+ /**
675
+ * Send typing notifications.
676
+ * @param conversationId The Conversation ID to send notifications in
677
+ * @param typingData The typing status
678
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/isTyping
679
+ */
680
+ async postTyping(conversationId, typingData) {
681
+ const config = {
682
+ data: typingData,
683
+ method: 'post',
684
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.TYPING}`,
685
+ };
686
+ await this.client.sendJSON(config);
687
+ }
688
+ /**
689
+ * Update access modes for a conversation.
690
+ * @param conversationId The conversation ID to update the access mode of
691
+ * @param accessData The new access data
692
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/updateConversationAccess
693
+ */
694
+ async putAccess(conversationId, accessData) {
695
+ const config = {
696
+ data: accessData,
697
+ method: 'put',
698
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.ACCESS}`,
699
+ };
700
+ const response = await this.client.sendJSON(config);
701
+ return response.data;
702
+ }
703
+ /**
704
+ * Update conversation properties.
705
+ * @param conversationId The conversation ID to update properties of
706
+ * @param conversationNameData The new conversation name
707
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/updateConversation
708
+ */
709
+ async putConversation(conversationId, conversationNameData) {
710
+ const config = {
711
+ data: conversationNameData,
712
+ method: 'put',
713
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.NAME}`,
714
+ };
715
+ const response = await this.client.sendJSON(config);
716
+ return response.data;
717
+ }
718
+ /**
719
+ * Update the message timer for a conversation.
720
+ * @param conversationId The conversation ID
721
+ * @param conversationData The new message timer
722
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/updateConversationMessageTimer
723
+ */
724
+ async putConversationMessageTimer(conversationId, messageTimerData) {
725
+ const config = {
726
+ data: messageTimerData,
727
+ method: 'put',
728
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.MESSAGE_TIMER}`,
729
+ };
730
+ const response = await this.client.sendJSON(config);
731
+ return response.data;
732
+ }
733
+ /**
734
+ * Update the receipt mode for a conversation.
735
+ * @param conversationId The conversation ID
736
+ * @param receiptModeData The new receipt mode
737
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/updateConversationReceiptMode
738
+ */
739
+ async putConversationReceiptMode(conversationId, receiptModeData) {
740
+ const config = {
741
+ data: receiptModeData,
742
+ method: 'put',
743
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.RECEIPT_MODE}`,
744
+ };
745
+ const response = await this.client.sendJSON(config);
746
+ return response.data;
747
+ }
748
+ /**
749
+ * Add users to an existing conversation.
750
+ * @param conversationId The conversation ID to add the users to
751
+ * @param users List of users to add to a conversation
752
+ */
753
+ async postMembersV0(conversationId, userIds) {
754
+ const config = {
755
+ data: {
756
+ conversation_role: __1.DefaultConversationRoleName.WIRE_MEMBER,
757
+ users: userIds,
758
+ },
759
+ method: 'post',
760
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.MEMBERS}`,
761
+ };
762
+ try {
763
+ const response = await this.client.sendJSON(config);
764
+ return response.data;
765
+ }
766
+ catch (error) {
767
+ const backendError = error;
768
+ switch (backendError.label) {
769
+ case http_1.BackendErrorLabel.LEGAL_HOLD_MISSING_CONSENT: {
770
+ throw new ConversationError_1.ConversationLegalholdMissingConsentError(backendError.message);
771
+ }
772
+ }
773
+ throw error;
774
+ }
775
+ }
776
+ /**
777
+ * Add qualified members to an existing Proteus conversation.
778
+ * @param conversationId The conversation ID to add the users to
779
+ * @param users List of users to add to a conversation
780
+ */
781
+ async postMembers(conversationId, users) {
782
+ if (!this.backendFeatures.federationEndpoints) {
783
+ return this.postMembersV0(conversationId.id, users.map(user => user.id));
784
+ }
785
+ const config = {
786
+ data: {
787
+ conversation_role: __1.DefaultConversationRoleName.WIRE_MEMBER,
788
+ qualified_users: users,
789
+ },
790
+ method: 'post',
791
+ url: this.backendFeatures.version >= 2
792
+ ? `${ConversationAPI.URL.CONVERSATIONS}/${conversationId.domain}/${conversationId.id}/${ConversationAPI.URL.MEMBERS}`
793
+ : `${ConversationAPI.URL.CONVERSATIONS}/${conversationId.id}/${ConversationAPI.URL.MEMBERS}/${ConversationAPI.URL.V2}`,
794
+ };
795
+ try {
796
+ const response = await this.client.sendJSON(config);
797
+ return response.data;
798
+ }
799
+ catch (error) {
800
+ const backendError = error;
801
+ switch (backendError.label) {
802
+ case http_1.BackendErrorLabel.LEGAL_HOLD_MISSING_CONSENT: {
803
+ throw new ConversationError_1.ConversationLegalholdMissingConsentError(backendError.message);
804
+ }
805
+ }
806
+ throw error;
807
+ }
808
+ }
809
+ /**
810
+ * Update membership of the specified user in a certain conversation
811
+ * @param userId The user ID
812
+ * @param conversationId The conversation ID to change the user's membership in
813
+ * @param memberUpdateData The new member data
814
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/updateOtherMember
815
+ */
816
+ async putOtherMember(userId, conversationId, memberUpdateData) {
817
+ const config = {
818
+ data: memberUpdateData,
819
+ method: 'put',
820
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.MEMBERS}/${userId}`,
821
+ };
822
+ await this.client.sendJSON(config);
823
+ }
824
+ /**
825
+ * Update self membership properties.
826
+ * @param conversationId The Conversation ID
827
+ * @param memberData The new conversation
828
+ * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/updateSelf
829
+ */
830
+ async putMembershipProperties(conversationId, memberData) {
831
+ const config = {
832
+ data: memberData,
833
+ method: 'put',
834
+ url: `${ConversationAPI.URL.CONVERSATIONS}/${conversationId}/${ConversationAPI.URL.SELF}`,
835
+ };
836
+ await this.client.sendJSON(config);
837
+ }
838
+ }
839
+ exports.ConversationAPI = ConversationAPI;
840
+ ConversationAPI.MAX_CHUNK_SIZE = 500;
841
+ ConversationAPI.URL = {
842
+ ACCESS: 'access',
843
+ BOTS: 'bots',
844
+ CLIENTS: '/clients',
845
+ CODE: 'code',
846
+ CODE_CHECK: '/code-check',
847
+ CONVERSATIONS: '/conversations',
848
+ MLS: '/mls',
849
+ IDS: 'ids',
850
+ JOIN: '/join',
851
+ LIST: 'list',
852
+ LIST_IDS: 'list-ids',
853
+ MEMBERS: 'members',
854
+ MESSAGE_TIMER: 'message-timer',
855
+ MESSAGES: 'messages',
856
+ NAME: 'name',
857
+ OTR: 'otr',
858
+ PROTEUS: 'proteus',
859
+ RECEIPT_MODE: 'receipt-mode',
860
+ ROLES: 'roles',
861
+ SELF: 'self',
862
+ TYPING: 'typing',
863
+ V2: 'v2',
864
+ };
865
+ //# sourceMappingURL=ConversationAPI.js.map