@wireapp/core 37.5.0 → 38.0.0-beta

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 (458) hide show
  1. package/package.json +9 -8
  2. package/LICENSE +0 -674
  3. package/lib/Account.d.ts +0 -213
  4. package/lib/Account.d.ts.map +0 -1
  5. package/lib/Account.js +0 -543
  6. package/lib/CoreError.d.ts +0 -10
  7. package/lib/CoreError.d.ts.map +0 -1
  8. package/lib/CoreError.js +0 -25
  9. package/lib/account/AccountService.d.ts +0 -8
  10. package/lib/account/AccountService.d.ts.map +0 -1
  11. package/lib/account/AccountService.js +0 -32
  12. package/lib/account/index.d.ts +0 -2
  13. package/lib/account/index.d.ts.map +0 -1
  14. package/lib/account/index.js +0 -35
  15. package/lib/auth/LoginSanitizer.d.ts +0 -6
  16. package/lib/auth/LoginSanitizer.d.ts.map +0 -1
  17. package/lib/auth/LoginSanitizer.js +0 -40
  18. package/lib/auth/index.d.ts +0 -2
  19. package/lib/auth/index.d.ts.map +0 -1
  20. package/lib/auth/index.js +0 -35
  21. package/lib/broadcast/AvailabilityType.d.ts +0 -3
  22. package/lib/broadcast/AvailabilityType.d.ts.map +0 -1
  23. package/lib/broadcast/AvailabilityType.js +0 -20
  24. package/lib/broadcast/BroadcastService.d.ts +0 -21
  25. package/lib/broadcast/BroadcastService.d.ts.map +0 -1
  26. package/lib/broadcast/BroadcastService.js +0 -77
  27. package/lib/broadcast/index.d.ts +0 -3
  28. package/lib/broadcast/index.d.ts.map +0 -1
  29. package/lib/broadcast/index.js +0 -36
  30. package/lib/client/ClientBackendRepository.d.ts +0 -12
  31. package/lib/client/ClientBackendRepository.d.ts.map +0 -1
  32. package/lib/client/ClientBackendRepository.js +0 -42
  33. package/lib/client/ClientDatabaseRepository.d.ts +0 -28
  34. package/lib/client/ClientDatabaseRepository.d.ts.map +0 -1
  35. package/lib/client/ClientDatabaseRepository.js +0 -84
  36. package/lib/client/ClientInfo.d.ts +0 -9
  37. package/lib/client/ClientInfo.d.ts.map +0 -1
  38. package/lib/client/ClientInfo.js +0 -20
  39. package/lib/client/ClientService.d.ts +0 -41
  40. package/lib/client/ClientService.d.ts.map +0 -1
  41. package/lib/client/ClientService.js +0 -102
  42. package/lib/client/index.d.ts +0 -5
  43. package/lib/client/index.d.ts.map +0 -1
  44. package/lib/client/index.js +0 -38
  45. package/lib/connection/ConnectionService.d.ts +0 -12
  46. package/lib/connection/ConnectionService.d.ts.map +0 -1
  47. package/lib/connection/ConnectionService.js +0 -44
  48. package/lib/connection/index.d.ts +0 -2
  49. package/lib/connection/index.d.ts.map +0 -1
  50. package/lib/connection/index.js +0 -35
  51. package/lib/conversation/AbortReason.d.ts +0 -3
  52. package/lib/conversation/AbortReason.d.ts.map +0 -1
  53. package/lib/conversation/AbortReason.js +0 -20
  54. package/lib/conversation/AssetService/AssetService.d.ts +0 -66
  55. package/lib/conversation/AssetService/AssetService.d.ts.map +0 -1
  56. package/lib/conversation/AssetService/AssetService.js +0 -87
  57. package/lib/conversation/AssetService/index.d.ts +0 -2
  58. package/lib/conversation/AssetService/index.d.ts.map +0 -1
  59. package/lib/conversation/AssetService/index.js +0 -35
  60. package/lib/conversation/AssetTransferState.d.ts +0 -5
  61. package/lib/conversation/AssetTransferState.d.ts.map +0 -1
  62. package/lib/conversation/AssetTransferState.js +0 -26
  63. package/lib/conversation/ClientActionType.d.ts +0 -2
  64. package/lib/conversation/ClientActionType.d.ts.map +0 -1
  65. package/lib/conversation/ClientActionType.js +0 -23
  66. package/lib/conversation/ConversationMapper/ConversationMapper.d.ts +0 -8
  67. package/lib/conversation/ConversationMapper/ConversationMapper.d.ts.map +0 -1
  68. package/lib/conversation/ConversationMapper/ConversationMapper.js +0 -57
  69. package/lib/conversation/ConversationService/ConversationService.d.ts +0 -98
  70. package/lib/conversation/ConversationService/ConversationService.d.ts.map +0 -1
  71. package/lib/conversation/ConversationService/ConversationService.js +0 -316
  72. package/lib/conversation/ConversationService/ConversationService.types.d.ts +0 -95
  73. package/lib/conversation/ConversationService/ConversationService.types.d.ts.map +0 -1
  74. package/lib/conversation/ConversationService/ConversationService.types.js +0 -27
  75. package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.d.ts +0 -9
  76. package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.d.ts.map +0 -1
  77. package/lib/conversation/ConversationService/Utility/getConversationQualifiedMembers.js +0 -34
  78. package/lib/conversation/ConversationService/index.d.ts +0 -3
  79. package/lib/conversation/ConversationService/index.d.ts.map +0 -1
  80. package/lib/conversation/ConversationService/index.js +0 -36
  81. package/lib/conversation/GenericMessageType.d.ts +0 -26
  82. package/lib/conversation/GenericMessageType.d.ts.map +0 -1
  83. package/lib/conversation/GenericMessageType.js +0 -48
  84. package/lib/conversation/MessageTimer/MessageTimer.d.ts +0 -11
  85. package/lib/conversation/MessageTimer/MessageTimer.d.ts.map +0 -1
  86. package/lib/conversation/MessageTimer/MessageTimer.js +0 -53
  87. package/lib/conversation/MessageTimer/index.d.ts +0 -2
  88. package/lib/conversation/MessageTimer/index.d.ts.map +0 -1
  89. package/lib/conversation/MessageTimer/index.js +0 -35
  90. package/lib/conversation/ReactionType.d.ts +0 -5
  91. package/lib/conversation/ReactionType.d.ts.map +0 -1
  92. package/lib/conversation/ReactionType.js +0 -26
  93. package/lib/conversation/content/AssetContent.d.ts +0 -43
  94. package/lib/conversation/content/AssetContent.d.ts.map +0 -1
  95. package/lib/conversation/content/AssetContent.js +0 -20
  96. package/lib/conversation/content/ButtonActionConfirmationContent.d.ts +0 -3
  97. package/lib/conversation/content/ButtonActionConfirmationContent.d.ts.map +0 -1
  98. package/lib/conversation/content/ButtonActionConfirmationContent.js +0 -20
  99. package/lib/conversation/content/ButtonActionContent.d.ts +0 -3
  100. package/lib/conversation/content/ButtonActionContent.d.ts.map +0 -1
  101. package/lib/conversation/content/ButtonActionContent.js +0 -20
  102. package/lib/conversation/content/CallingContent.d.ts +0 -2
  103. package/lib/conversation/content/CallingContent.d.ts.map +0 -1
  104. package/lib/conversation/content/CallingContent.js +0 -20
  105. package/lib/conversation/content/ClearedContent.d.ts +0 -3
  106. package/lib/conversation/content/ClearedContent.d.ts.map +0 -1
  107. package/lib/conversation/content/ClearedContent.js +0 -20
  108. package/lib/conversation/content/ClientActionContent.d.ts +0 -3
  109. package/lib/conversation/content/ClientActionContent.d.ts.map +0 -1
  110. package/lib/conversation/content/ClientActionContent.js +0 -20
  111. package/lib/conversation/content/ClientAddContent.d.ts +0 -5
  112. package/lib/conversation/content/ClientAddContent.d.ts.map +0 -1
  113. package/lib/conversation/content/ClientAddContent.js +0 -20
  114. package/lib/conversation/content/ClientRemoveContent.d.ts +0 -7
  115. package/lib/conversation/content/ClientRemoveContent.d.ts.map +0 -1
  116. package/lib/conversation/content/ClientRemoveContent.js +0 -20
  117. package/lib/conversation/content/CompositeContent.d.ts +0 -3
  118. package/lib/conversation/content/CompositeContent.d.ts.map +0 -1
  119. package/lib/conversation/content/CompositeContent.js +0 -20
  120. package/lib/conversation/content/ConfirmationContent.d.ts +0 -3
  121. package/lib/conversation/content/ConfirmationContent.d.ts.map +0 -1
  122. package/lib/conversation/content/ConfirmationContent.js +0 -20
  123. package/lib/conversation/content/ContentType.d.ts +0 -22
  124. package/lib/conversation/content/ContentType.d.ts.map +0 -1
  125. package/lib/conversation/content/ContentType.js +0 -93
  126. package/lib/conversation/content/ConversationContent.d.ts +0 -4
  127. package/lib/conversation/content/ConversationContent.d.ts.map +0 -1
  128. package/lib/conversation/content/ConversationContent.js +0 -20
  129. package/lib/conversation/content/DeletedContent.d.ts +0 -3
  130. package/lib/conversation/content/DeletedContent.d.ts.map +0 -1
  131. package/lib/conversation/content/DeletedContent.js +0 -20
  132. package/lib/conversation/content/EditedTextContent.d.ts +0 -12
  133. package/lib/conversation/content/EditedTextContent.d.ts.map +0 -1
  134. package/lib/conversation/content/EditedTextContent.js +0 -20
  135. package/lib/conversation/content/FileContent.d.ts +0 -14
  136. package/lib/conversation/content/FileContent.d.ts.map +0 -1
  137. package/lib/conversation/content/FileContent.js +0 -20
  138. package/lib/conversation/content/HiddenContent.d.ts +0 -3
  139. package/lib/conversation/content/HiddenContent.d.ts.map +0 -1
  140. package/lib/conversation/content/HiddenContent.js +0 -20
  141. package/lib/conversation/content/ImageContent.d.ts +0 -8
  142. package/lib/conversation/content/ImageContent.d.ts.map +0 -1
  143. package/lib/conversation/content/ImageContent.js +0 -20
  144. package/lib/conversation/content/KnockContent.d.ts +0 -3
  145. package/lib/conversation/content/KnockContent.d.ts.map +0 -1
  146. package/lib/conversation/content/KnockContent.js +0 -20
  147. package/lib/conversation/content/LinkPreviewContent.d.ts +0 -11
  148. package/lib/conversation/content/LinkPreviewContent.d.ts.map +0 -1
  149. package/lib/conversation/content/LinkPreviewContent.js +0 -20
  150. package/lib/conversation/content/LocationContent.d.ts +0 -10
  151. package/lib/conversation/content/LocationContent.d.ts.map +0 -1
  152. package/lib/conversation/content/LocationContent.js +0 -20
  153. package/lib/conversation/content/MentionContent.d.ts +0 -3
  154. package/lib/conversation/content/MentionContent.d.ts.map +0 -1
  155. package/lib/conversation/content/MentionContent.js +0 -20
  156. package/lib/conversation/content/QuoteContent.d.ts +0 -8
  157. package/lib/conversation/content/QuoteContent.d.ts.map +0 -1
  158. package/lib/conversation/content/QuoteContent.js +0 -20
  159. package/lib/conversation/content/ReactionContent.d.ts +0 -8
  160. package/lib/conversation/content/ReactionContent.d.ts.map +0 -1
  161. package/lib/conversation/content/ReactionContent.js +0 -20
  162. package/lib/conversation/content/TextContent.d.ts +0 -10
  163. package/lib/conversation/content/TextContent.d.ts.map +0 -1
  164. package/lib/conversation/content/TextContent.js +0 -20
  165. package/lib/conversation/content/TweetContent.d.ts +0 -3
  166. package/lib/conversation/content/TweetContent.d.ts.map +0 -1
  167. package/lib/conversation/content/TweetContent.js +0 -20
  168. package/lib/conversation/content/index.d.ts +0 -29
  169. package/lib/conversation/content/index.d.ts.map +0 -1
  170. package/lib/conversation/content/index.js +0 -75
  171. package/lib/conversation/index.d.ts +0 -11
  172. package/lib/conversation/index.d.ts.map +0 -1
  173. package/lib/conversation/index.js +0 -44
  174. package/lib/conversation/message/Message.d.ts +0 -5
  175. package/lib/conversation/message/Message.d.ts.map +0 -1
  176. package/lib/conversation/message/Message.js +0 -20
  177. package/lib/conversation/message/Message.types.d.ts +0 -7
  178. package/lib/conversation/message/Message.types.d.ts.map +0 -1
  179. package/lib/conversation/message/Message.types.js +0 -28
  180. package/lib/conversation/message/MessageBuilder.d.ts +0 -26
  181. package/lib/conversation/message/MessageBuilder.d.ts.map +0 -1
  182. package/lib/conversation/message/MessageBuilder.js +0 -291
  183. package/lib/conversation/message/MessageService.d.ts +0 -68
  184. package/lib/conversation/message/MessageService.d.ts.map +0 -1
  185. package/lib/conversation/message/MessageService.js +0 -291
  186. package/lib/conversation/message/MessageToProtoMapper.d.ts +0 -7
  187. package/lib/conversation/message/MessageToProtoMapper.d.ts.map +0 -1
  188. package/lib/conversation/message/MessageToProtoMapper.js +0 -98
  189. package/lib/conversation/message/OtrMessage.d.ts +0 -81
  190. package/lib/conversation/message/OtrMessage.d.ts.map +0 -1
  191. package/lib/conversation/message/OtrMessage.js +0 -20
  192. package/lib/conversation/message/PayloadBundle.d.ts +0 -68
  193. package/lib/conversation/message/PayloadBundle.d.ts.map +0 -1
  194. package/lib/conversation/message/PayloadBundle.js +0 -67
  195. package/lib/conversation/message/TeamMessage.d.ts +0 -32
  196. package/lib/conversation/message/TeamMessage.d.ts.map +0 -1
  197. package/lib/conversation/message/TeamMessage.js +0 -20
  198. package/lib/conversation/message/TextContentBuilder.d.ts +0 -12
  199. package/lib/conversation/message/TextContentBuilder.d.ts.map +0 -1
  200. package/lib/conversation/message/TextContentBuilder.js +0 -61
  201. package/lib/conversation/message/UserClientsUtil.d.ts +0 -23
  202. package/lib/conversation/message/UserClientsUtil.d.ts.map +0 -1
  203. package/lib/conversation/message/UserClientsUtil.js +0 -37
  204. package/lib/conversation/message/UserMessage.d.ts +0 -44
  205. package/lib/conversation/message/UserMessage.d.ts.map +0 -1
  206. package/lib/conversation/message/UserMessage.js +0 -20
  207. package/lib/conversation/message/index.d.ts +0 -2
  208. package/lib/conversation/message/index.d.ts.map +0 -1
  209. package/lib/conversation/message/index.js +0 -35
  210. package/lib/conversation/message/messageSender.d.ts +0 -7
  211. package/lib/conversation/message/messageSender.d.ts.map +0 -1
  212. package/lib/conversation/message/messageSender.js +0 -43
  213. package/lib/cryptography/AssetCryptography/EncryptedAsset.d.ts +0 -12
  214. package/lib/cryptography/AssetCryptography/EncryptedAsset.d.ts.map +0 -1
  215. package/lib/cryptography/AssetCryptography/EncryptedAsset.js +0 -20
  216. package/lib/cryptography/AssetCryptography/crypto.browser.d.ts +0 -3
  217. package/lib/cryptography/AssetCryptography/crypto.browser.d.ts.map +0 -1
  218. package/lib/cryptography/AssetCryptography/crypto.browser.js +0 -45
  219. package/lib/cryptography/AssetCryptography/crypto.node.d.ts +0 -3
  220. package/lib/cryptography/AssetCryptography/crypto.node.d.ts.map +0 -1
  221. package/lib/cryptography/AssetCryptography/crypto.node.js +0 -71
  222. package/lib/cryptography/AssetCryptography/index.d.ts +0 -9
  223. package/lib/cryptography/AssetCryptography/index.d.ts.map +0 -1
  224. package/lib/cryptography/AssetCryptography/index.js +0 -52
  225. package/lib/cryptography/AssetCryptography/interfaces.d.ts +0 -10
  226. package/lib/cryptography/AssetCryptography/interfaces.d.ts.map +0 -1
  227. package/lib/cryptography/AssetCryptography/interfaces.js +0 -20
  228. package/lib/cryptography/CryptographyDatabaseRepository.d.ts +0 -16
  229. package/lib/cryptography/CryptographyDatabaseRepository.d.ts.map +0 -1
  230. package/lib/cryptography/CryptographyDatabaseRepository.js +0 -42
  231. package/lib/cryptography/CryptographyService.d.ts +0 -77
  232. package/lib/cryptography/CryptographyService.d.ts.map +0 -1
  233. package/lib/cryptography/CryptographyService.js +0 -222
  234. package/lib/cryptography/GenericMessageMapper.d.ts +0 -8
  235. package/lib/cryptography/GenericMessageMapper.d.ts.map +0 -1
  236. package/lib/cryptography/GenericMessageMapper.js +0 -159
  237. package/lib/cryptography/MessageHashService.d.ts +0 -17
  238. package/lib/cryptography/MessageHashService.d.ts.map +0 -1
  239. package/lib/cryptography/MessageHashService.js +0 -117
  240. package/lib/cryptography/SessionPayloadBundle.d.ts +0 -5
  241. package/lib/cryptography/SessionPayloadBundle.d.ts.map +0 -1
  242. package/lib/cryptography/SessionPayloadBundle.js +0 -20
  243. package/lib/cryptography/Utlility/generateDecryptionError.d.ts +0 -6
  244. package/lib/cryptography/Utlility/generateDecryptionError.d.ts.map +0 -1
  245. package/lib/cryptography/Utlility/generateDecryptionError.js +0 -50
  246. package/lib/cryptography/index.d.ts +0 -5
  247. package/lib/cryptography/index.d.ts.map +0 -1
  248. package/lib/cryptography/index.js +0 -38
  249. package/lib/errors/DecryptionError.d.ts +0 -6
  250. package/lib/errors/DecryptionError.d.ts.map +0 -1
  251. package/lib/errors/DecryptionError.js +0 -29
  252. package/lib/giphy/GiphyService.d.ts +0 -10
  253. package/lib/giphy/GiphyService.d.ts.map +0 -1
  254. package/lib/giphy/GiphyService.js +0 -36
  255. package/lib/giphy/index.d.ts +0 -2
  256. package/lib/giphy/index.d.ts.map +0 -1
  257. package/lib/giphy/index.js +0 -35
  258. package/lib/index.d.ts +0 -8
  259. package/lib/index.d.ts.map +0 -1
  260. package/lib/index.js +0 -54
  261. package/lib/linkPreview/LinkPreviewService.d.ts +0 -8
  262. package/lib/linkPreview/LinkPreviewService.d.ts.map +0 -1
  263. package/lib/linkPreview/LinkPreviewService.js +0 -51
  264. package/lib/linkPreview/index.d.ts +0 -2
  265. package/lib/linkPreview/index.d.ts.map +0 -1
  266. package/lib/linkPreview/index.js +0 -35
  267. package/lib/messagingProtocols/common.types.d.ts +0 -3
  268. package/lib/messagingProtocols/common.types.d.ts.map +0 -1
  269. package/lib/messagingProtocols/common.types.js +0 -20
  270. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.d.ts +0 -5
  271. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.d.ts.map +0 -1
  272. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/ConversationEvent.js +0 -37
  273. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/index.d.ts +0 -3
  274. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/index.d.ts.map +0 -1
  275. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/index.js +0 -36
  276. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/index.d.ts +0 -2
  277. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/index.d.ts.map +0 -1
  278. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/index.js +0 -35
  279. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.d.ts +0 -12
  280. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.d.ts.map +0 -1
  281. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/messageAdd/messageAdd.js +0 -62
  282. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.d.ts +0 -2
  283. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.d.ts.map +0 -1
  284. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/index.js +0 -35
  285. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.d.ts +0 -10
  286. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.d.ts.map +0 -1
  287. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/events/welcomeMessage/welcomeMessage.js +0 -36
  288. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/index.d.ts +0 -2
  289. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/index.d.ts.map +0 -1
  290. package/lib/messagingProtocols/mls/EventHandler/ConversationEvent/index.js +0 -35
  291. package/lib/messagingProtocols/mls/EventHandler/EventHandler.d.ts +0 -5
  292. package/lib/messagingProtocols/mls/EventHandler/EventHandler.d.ts.map +0 -1
  293. package/lib/messagingProtocols/mls/EventHandler/EventHandler.js +0 -24
  294. package/lib/messagingProtocols/mls/EventHandler/EventHandler.types.d.ts +0 -11
  295. package/lib/messagingProtocols/mls/EventHandler/EventHandler.types.d.ts.map +0 -1
  296. package/lib/messagingProtocols/mls/EventHandler/EventHandler.types.js +0 -20
  297. package/lib/messagingProtocols/mls/EventHandler/index.d.ts +0 -3
  298. package/lib/messagingProtocols/mls/EventHandler/index.d.ts.map +0 -1
  299. package/lib/messagingProtocols/mls/EventHandler/index.js +0 -36
  300. package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts +0 -126
  301. package/lib/messagingProtocols/mls/MLSService/MLSService.d.ts.map +0 -1
  302. package/lib/messagingProtocols/mls/MLSService/MLSService.js +0 -428
  303. package/lib/messagingProtocols/mls/MLSService/MLSService.types.d.ts +0 -16
  304. package/lib/messagingProtocols/mls/MLSService/MLSService.types.d.ts.map +0 -1
  305. package/lib/messagingProtocols/mls/MLSService/MLSService.types.js +0 -20
  306. package/lib/messagingProtocols/mls/MLSService/commitBundleUtil.d.ts +0 -8
  307. package/lib/messagingProtocols/mls/MLSService/commitBundleUtil.d.ts.map +0 -1
  308. package/lib/messagingProtocols/mls/MLSService/commitBundleUtil.js +0 -50
  309. package/lib/messagingProtocols/mls/MLSService/index.d.ts +0 -2
  310. package/lib/messagingProtocols/mls/MLSService/index.d.ts.map +0 -1
  311. package/lib/messagingProtocols/mls/MLSService/index.js +0 -35
  312. package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/index.d.ts +0 -2
  313. package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/index.d.ts.map +0 -1
  314. package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/index.js +0 -35
  315. package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.d.ts +0 -11
  316. package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.d.ts.map +0 -1
  317. package/lib/messagingProtocols/mls/MLSService/stores/keyMaterialUpdatesStore/keyMaterialUpdatesStore.js +0 -50
  318. package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/index.d.ts +0 -2
  319. package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/index.d.ts.map +0 -1
  320. package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/index.js +0 -35
  321. package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.d.ts +0 -10
  322. package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.d.ts.map +0 -1
  323. package/lib/messagingProtocols/mls/MLSService/stores/pendingProposalsStore/pendingProposalsStore.js +0 -50
  324. package/lib/messagingProtocols/mls/MLSService/stores/stores.mock.d.ts +0 -9
  325. package/lib/messagingProtocols/mls/MLSService/stores/stores.mock.d.ts.map +0 -1
  326. package/lib/messagingProtocols/mls/MLSService/stores/stores.mock.js +0 -43
  327. package/lib/messagingProtocols/mls/index.d.ts +0 -2
  328. package/lib/messagingProtocols/mls/index.d.ts.map +0 -1
  329. package/lib/messagingProtocols/mls/index.js +0 -35
  330. package/lib/messagingProtocols/mls/types.d.ts +0 -55
  331. package/lib/messagingProtocols/mls/types.d.ts.map +0 -1
  332. package/lib/messagingProtocols/mls/types.js +0 -20
  333. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.d.ts +0 -5
  334. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.d.ts.map +0 -1
  335. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/ConversationEvent.js +0 -29
  336. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.d.ts +0 -2
  337. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.d.ts.map +0 -1
  338. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/index.js +0 -35
  339. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.d.ts +0 -2
  340. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.d.ts.map +0 -1
  341. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/index.js +0 -35
  342. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.d.ts +0 -10
  343. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.d.ts.map +0 -1
  344. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/events/otrMessageAdd/otrMessageAdd.js +0 -46
  345. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.d.ts +0 -2
  346. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.d.ts.map +0 -1
  347. package/lib/messagingProtocols/proteus/EventHandler/ConversationEvent/index.js +0 -35
  348. package/lib/messagingProtocols/proteus/EventHandler/EventHandler.d.ts +0 -5
  349. package/lib/messagingProtocols/proteus/EventHandler/EventHandler.d.ts.map +0 -1
  350. package/lib/messagingProtocols/proteus/EventHandler/EventHandler.js +0 -24
  351. package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.d.ts +0 -11
  352. package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.d.ts.map +0 -1
  353. package/lib/messagingProtocols/proteus/EventHandler/EventHandler.types.js +0 -20
  354. package/lib/messagingProtocols/proteus/EventHandler/index.d.ts +0 -3
  355. package/lib/messagingProtocols/proteus/EventHandler/index.d.ts.map +0 -1
  356. package/lib/messagingProtocols/proteus/EventHandler/index.js +0 -36
  357. package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts +0 -20
  358. package/lib/messagingProtocols/proteus/ProteusService/ProteusService.d.ts.map +0 -1
  359. package/lib/messagingProtocols/proteus/ProteusService/ProteusService.js +0 -93
  360. package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.d.ts +0 -25
  361. package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.d.ts.map +0 -1
  362. package/lib/messagingProtocols/proteus/ProteusService/ProteusService.types.js +0 -20
  363. package/lib/messagingProtocols/proteus/ProteusService/Utility/PreKeyBundle.d.ts +0 -24
  364. package/lib/messagingProtocols/proteus/ProteusService/Utility/PreKeyBundle.d.ts.map +0 -1
  365. package/lib/messagingProtocols/proteus/ProteusService/Utility/PreKeyBundle.js +0 -86
  366. package/lib/messagingProtocols/proteus/ProteusService/Utility/Recipients.d.ts +0 -17
  367. package/lib/messagingProtocols/proteus/ProteusService/Utility/Recipients.d.ts.map +0 -1
  368. package/lib/messagingProtocols/proteus/ProteusService/Utility/Recipients.js +0 -43
  369. package/lib/messagingProtocols/proteus/ProteusService/Utility/UserIds.d.ts +0 -12
  370. package/lib/messagingProtocols/proteus/ProteusService/Utility/UserIds.d.ts.map +0 -1
  371. package/lib/messagingProtocols/proteus/ProteusService/Utility/UserIds.js +0 -38
  372. package/lib/messagingProtocols/proteus/ProteusService/Utility/getGenericMessageParams.d.ts +0 -35
  373. package/lib/messagingProtocols/proteus/ProteusService/Utility/getGenericMessageParams.d.ts.map +0 -1
  374. package/lib/messagingProtocols/proteus/ProteusService/Utility/getGenericMessageParams.js +0 -87
  375. package/lib/messagingProtocols/proteus/ProteusService/Utility/index.d.ts +0 -6
  376. package/lib/messagingProtocols/proteus/ProteusService/Utility/index.d.ts.map +0 -1
  377. package/lib/messagingProtocols/proteus/ProteusService/Utility/index.js +0 -39
  378. package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.d.ts +0 -4
  379. package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.d.ts.map +0 -1
  380. package/lib/messagingProtocols/proteus/ProteusService/Utility/isClearFromMismatch.js +0 -29
  381. package/lib/messagingProtocols/proteus/ProteusService/index.d.ts +0 -4
  382. package/lib/messagingProtocols/proteus/ProteusService/index.d.ts.map +0 -1
  383. package/lib/messagingProtocols/proteus/ProteusService/index.js +0 -37
  384. package/lib/messagingProtocols/proteus/index.d.ts +0 -2
  385. package/lib/messagingProtocols/proteus/index.d.ts.map +0 -1
  386. package/lib/messagingProtocols/proteus/index.js +0 -35
  387. package/lib/notification/NotificationBackendRepository.d.ts +0 -12
  388. package/lib/notification/NotificationBackendRepository.d.ts.map +0 -1
  389. package/lib/notification/NotificationBackendRepository.js +0 -33
  390. package/lib/notification/NotificationDatabaseRepository.d.ts +0 -21
  391. package/lib/notification/NotificationDatabaseRepository.d.ts.map +0 -1
  392. package/lib/notification/NotificationDatabaseRepository.js +0 -67
  393. package/lib/notification/NotificationService.d.ts +0 -70
  394. package/lib/notification/NotificationService.d.ts.map +0 -1
  395. package/lib/notification/NotificationService.js +0 -224
  396. package/lib/notification/Notifications.types.d.ts +0 -6
  397. package/lib/notification/Notifications.types.d.ts.map +0 -1
  398. package/lib/notification/Notifications.types.js +0 -27
  399. package/lib/notification/index.d.ts +0 -3
  400. package/lib/notification/index.d.ts.map +0 -1
  401. package/lib/notification/index.js +0 -36
  402. package/lib/self/SelfService.d.ts +0 -14
  403. package/lib/self/SelfService.d.ts.map +0 -1
  404. package/lib/self/SelfService.js +0 -54
  405. package/lib/self/index.d.ts +0 -2
  406. package/lib/self/index.d.ts.map +0 -1
  407. package/lib/self/index.js +0 -35
  408. package/lib/team/TeamService.d.ts +0 -16
  409. package/lib/team/TeamService.d.ts.map +0 -1
  410. package/lib/team/TeamService.js +0 -54
  411. package/lib/team/index.d.ts +0 -2
  412. package/lib/team/index.d.ts.map +0 -1
  413. package/lib/team/index.js +0 -35
  414. package/lib/user/UserMapper.d.ts +0 -7
  415. package/lib/user/UserMapper.d.ts.map +0 -1
  416. package/lib/user/UserMapper.js +0 -87
  417. package/lib/user/UserService.d.ts +0 -24
  418. package/lib/user/UserService.d.ts.map +0 -1
  419. package/lib/user/UserService.js +0 -81
  420. package/lib/user/index.d.ts +0 -2
  421. package/lib/user/index.d.ts.map +0 -1
  422. package/lib/user/index.js +0 -35
  423. package/lib/util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler.d.ts +0 -22
  424. package/lib/util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler.d.ts.map +0 -1
  425. package/lib/util/LowPrecisionTaskScheduler/LowPrecisionTaskScheduler.js +0 -66
  426. package/lib/util/LowPrecisionTaskScheduler/index.d.ts +0 -2
  427. package/lib/util/LowPrecisionTaskScheduler/index.d.ts.map +0 -1
  428. package/lib/util/LowPrecisionTaskScheduler/index.js +0 -35
  429. package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.d.ts +0 -9
  430. package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.d.ts.map +0 -1
  431. package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.js +0 -52
  432. package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.store.d.ts +0 -4
  433. package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.store.d.ts.map +0 -1
  434. package/lib/util/RecurringTaskScheduler/RecurringTaskScheduler.store.js +0 -34
  435. package/lib/util/RecurringTaskScheduler/index.d.ts +0 -2
  436. package/lib/util/RecurringTaskScheduler/index.d.ts.map +0 -1
  437. package/lib/util/RecurringTaskScheduler/index.js +0 -35
  438. package/lib/util/TaskScheduler/TaskScheduler.d.ts +0 -11
  439. package/lib/util/TaskScheduler/TaskScheduler.d.ts.map +0 -1
  440. package/lib/util/TaskScheduler/TaskScheduler.js +0 -70
  441. package/lib/util/TaskScheduler/index.d.ts +0 -2
  442. package/lib/util/TaskScheduler/index.d.ts.map +0 -1
  443. package/lib/util/TaskScheduler/index.js +0 -35
  444. package/lib/util/TypePredicateUtil.d.ts +0 -10
  445. package/lib/util/TypePredicateUtil.d.ts.map +0 -1
  446. package/lib/util/TypePredicateUtil.js +0 -60
  447. package/lib/util/encryptedStore.d.ts +0 -46
  448. package/lib/util/encryptedStore.d.ts.map +0 -1
  449. package/lib/util/encryptedStore.js +0 -115
  450. package/lib/util/encryptedStore.test.node.d.ts +0 -2
  451. package/lib/util/encryptedStore.test.node.d.ts.map +0 -1
  452. package/lib/util/encryptedStore.test.node.js +0 -53
  453. package/lib/util/fullyQualifiedClientIdUtils.d.ts +0 -14
  454. package/lib/util/fullyQualifiedClientIdUtils.d.ts.map +0 -1
  455. package/lib/util/fullyQualifiedClientIdUtils.js +0 -41
  456. package/lib/util/index.d.ts +0 -2
  457. package/lib/util/index.d.ts.map +0 -1
  458. package/lib/util/index.js +0 -35
@@ -1,98 +0,0 @@
1
- import { Conversation, DefaultConversationRoleName, MutedStatus, NewConversation, QualifiedUserClients, UserClients } from '@wireapp/api-client/lib/conversation';
2
- import { ConversationMemberLeaveEvent } from '@wireapp/api-client/lib/event';
3
- import { QualifiedId } from '@wireapp/api-client/lib/user';
4
- import { XOR } from '@wireapp/commons/lib/util/TypeUtil';
5
- import { APIClient } from '@wireapp/api-client';
6
- import { AddUsersParams, MLSReturnType, SendMlsMessageParams, SendResult } from './ConversationService.types';
7
- import { MessageTimer, RemoveUsersParams } from '../../conversation/';
8
- import { CryptographyService } from '../../cryptography/';
9
- import { MLSService } from '../../messagingProtocols/mls';
10
- import { ProteusService } from '../../messagingProtocols/proteus';
11
- import { AddUsersToProteusConversationParams, SendProteusMessageParams } from '../../messagingProtocols/proteus/ProteusService/ProteusService.types';
12
- import { RemoteData } from '../content';
13
- export declare class ConversationService {
14
- private readonly apiClient;
15
- private readonly config;
16
- private readonly mlsService;
17
- private readonly proteusService;
18
- readonly messageTimer: MessageTimer;
19
- private readonly messageService;
20
- private readonly logger;
21
- constructor(apiClient: APIClient, cryptographyService: CryptographyService, config: {
22
- useQualifiedIds?: boolean;
23
- }, mlsService: MLSService, proteusService: ProteusService);
24
- /**
25
- * Get a fresh list from backend of clients for all the participants of the conversation.
26
- * This is a hacky way of getting all the clients for a conversation.
27
- * The idea is to send an empty message to the backend to absolutely no users and let backend reply with a mismatch error.
28
- * We then get the missing members in the mismatch, that is our fresh list of participants' clients.
29
- *
30
- * @deprecated
31
- * @param {string} conversationId
32
- * @param {string} conversationDomain? - If given will send the message to the new qualified endpoint
33
- */
34
- getAllParticipantsClients(conversationId: QualifiedId): Promise<UserClients | QualifiedUserClients>;
35
- /**
36
- * Get a fresh list from backend of clients for all the participants of the conversation.
37
- * @fixme there are some case where this method is not enough to detect removed devices
38
- * @param {string} conversationId
39
- * @param {string} conversationDomain? - If given will send the message to the new qualified endpoint
40
- */
41
- fetchAllParticipantsClients(conversationId: string, conversationDomain?: string): Promise<UserClients | QualifiedUserClients>;
42
- /**
43
- * Create a group conversation.
44
- *
45
- * @note Do not include yourself as the requestor
46
- * @see https://staging-nginz-https.zinfra.io/swagger-ui/#!/conversations/createGroupConversation
47
- *
48
- * @param conversationData Payload object for group creation
49
- * @returns Resolves when the conversation was created
50
- */
51
- createProteusConversation(conversationData: NewConversation): Promise<Conversation>;
52
- getConversations(conversationId: string): Promise<Conversation>;
53
- getConversations(conversationIds?: string[]): Promise<Conversation[]>;
54
- getAsset({ assetId, assetToken, otrKey, sha256 }: RemoteData): Promise<Uint8Array>;
55
- getUnencryptedAsset(assetId: string, assetToken?: string): Promise<ArrayBuffer>;
56
- addUsersToProteusConversation(params: AddUsersToProteusConversationParams): Promise<import("@wireapp/api-client/lib/event").ConversationMemberJoinEvent>;
57
- removeUserFromConversation(conversationId: QualifiedId, userId: QualifiedId): Promise<ConversationMemberLeaveEvent>;
58
- /**
59
- * Sends a message to a conversation
60
- * @return resolves with the sending status
61
- */
62
- send(params: XOR<SendMlsMessageParams, SendProteusMessageParams>): Promise<SendResult>;
63
- sendTypingStart(conversationId: QualifiedId): Promise<void>;
64
- sendTypingStop(conversationId: QualifiedId): Promise<void>;
65
- /**
66
- * returns the number of messages that are in the queue expecting to be sent
67
- */
68
- isSendingMessage(): boolean;
69
- setConversationMutedStatus(conversationId: string, status: MutedStatus, muteTimestamp: number | Date): Promise<void>;
70
- toggleArchiveConversation(conversationId: string, archived: boolean, archiveTimestamp?: number | Date): Promise<void>;
71
- setMemberConversationRole(conversationId: string, userId: string, conversationRole: DefaultConversationRoleName | string): Promise<void>;
72
- /**
73
- * ###############################################
74
- * ################ MLS Functions ################
75
- * ###############################################
76
- */
77
- /**
78
- * Will create a conversation on backend and register it to CoreCrypto once created
79
- * @param conversationData
80
- */
81
- createMLSConversation(conversationData: NewConversation): Promise<MLSReturnType>;
82
- private sendMLSMessage;
83
- addUsersToMLSConversation({ qualifiedUserIds, groupId, conversationId, }: Required<AddUsersParams>): Promise<MLSReturnType>;
84
- removeUsersFromMLSConversation({ groupId, conversationId, qualifiedUserIds, }: RemoveUsersParams): Promise<MLSReturnType>;
85
- joinByExternalCommit(conversationId: QualifiedId): Promise<import("@wireapp/api-client/lib/conversation").PostMlsMessageResponse | null>;
86
- /**
87
- * Will send an external proposal for the current device to join a specific conversation.
88
- * In order for the external proposal to be sent correctly, the underlying mls conversation needs to be in a non-established state
89
- * @param groupId The conversation to join
90
- * @param epoch The current epoch of the local conversation
91
- */
92
- sendExternalJoinProposal(groupId: string, epoch: number): Promise<void>;
93
- isMLSConversationEstablished(groupId: string): Promise<boolean>;
94
- wipeMLSConversation(groupId: Uint8Array): Promise<void>;
95
- private matchesEpoch;
96
- handleEpochMismatch(): Promise<void>;
97
- }
98
- //# sourceMappingURL=ConversationService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConversationService.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/ConversationService.ts"],"names":[],"mappings":"AAmBA,OAAO,EAEL,YAAY,EACZ,2BAA2B,EAC3B,WAAW,EACX,eAAe,EACf,oBAAoB,EACpB,WAAW,EAGZ,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAAC,4BAA4B,EAAC,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAC,GAAG,EAAC,MAAM,oCAAoC,CAAC;AAIvD,OAAO,EAAC,SAAS,EAAC,MAAM,qBAAqB,CAAC;AAI9C,OAAO,EAAC,cAAc,EAAE,aAAa,EAAE,oBAAoB,EAAE,UAAU,EAAC,MAAM,6BAA6B,CAAC;AAE5G,OAAO,EAAC,YAAY,EAAuB,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACzF,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAC,UAAU,EAAuB,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAkC,cAAc,EAAC,MAAM,kCAAkC,CAAC;AACjG,OAAO,EACL,mCAAmC,EACnC,wBAAwB,EACzB,MAAM,sEAAsE,CAAC;AAG9E,OAAO,EAAC,UAAU,EAAC,MAAM,YAAY,CAAC;AAItC,qBAAa,mBAAmB;IAM5B,OAAO,CAAC,QAAQ,CAAC,SAAS;IAE1B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,cAAc;IATjC,SAAgB,YAAY,EAAE,YAAY,CAAC;IAC3C,OAAO,CAAC,QAAQ,CAAC,cAAc,CAAiB;IAChD,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgD;gBAGpD,SAAS,EAAE,SAAS,EACrC,mBAAmB,EAAE,mBAAmB,EACvB,MAAM,EAAE;QAAC,eAAe,CAAC,EAAE,OAAO,CAAA;KAAC,EACnC,UAAU,EAAE,UAAU,EACtB,cAAc,EAAE,cAAc;IAMjD;;;;;;;;;OASG;IACI,yBAAyB,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,CAAC,WAAW,GAAG,oBAAoB,CAAC;IA0B1G;;;;;OAKG;IACU,2BAA2B,CACtC,cAAc,EAAE,MAAM,EACtB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC,WAAW,GAAG,oBAAoB,CAAC;IAkB9C;;;;;;;;OAQG;IACU,yBAAyB,CAAC,gBAAgB,EAAE,eAAe,GAAG,OAAO,CAAC,YAAY,CAAC;IAQnF,gBAAgB,CAAC,cAAc,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC;IAC/D,gBAAgB,CAAC,eAAe,CAAC,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC;IAWrE,QAAQ,CAAC,EAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAC,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IAWhF,mBAAmB,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC;IAK/E,6BAA6B,CAAC,MAAM,EAAE,mCAAmC;IAIzE,0BAA0B,CACrC,cAAc,EAAE,WAAW,EAC3B,MAAM,EAAE,WAAW,GAClB,OAAO,CAAC,4BAA4B,CAAC;IAIxC;;;OAGG;IACU,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,oBAAoB,EAAE,wBAAwB,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC;IAO5F,eAAe,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D,cAAc,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAIjE;;OAEG;IACH,gBAAgB,IAAI,OAAO;IAIpB,0BAA0B,CAC/B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,WAAW,EACnB,aAAa,EAAE,MAAM,GAAG,IAAI,GAC3B,OAAO,CAAC,IAAI,CAAC;IAaT,yBAAyB,CAC9B,cAAc,EAAE,MAAM,EACtB,QAAQ,EAAE,OAAO,EACjB,gBAAgB,GAAE,MAAM,GAAG,IAAiB,GAC3C,OAAO,CAAC,IAAI,CAAC;IAaT,yBAAyB,CAC9B,cAAc,EAAE,MAAM,EACtB,MAAM,EAAE,MAAM,EACd,gBAAgB,EAAE,2BAA2B,GAAG,MAAM,GACrD,OAAO,CAAC,IAAI,CAAC;IAMhB;;;;OAIG;IAEH;;;OAGG;IACU,qBAAqB,CAAC,gBAAgB,EAAE,eAAe,GAAG,OAAO,CAAC,aAAa,CAAC;YAmC/E,cAAc;IAqBf,yBAAyB,CAAC,EACrC,gBAAgB,EAChB,OAAO,EACP,cAAc,GACf,EAAE,QAAQ,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,aAAa,CAAC;IAcvC,8BAA8B,CAAC,EAC1C,OAAO,EACP,cAAc,EACd,gBAAgB,GACjB,EAAE,iBAAiB,GAAG,OAAO,CAAC,aAAa,CAAC;IAsBhC,oBAAoB,CAAC,cAAc,EAAE,WAAW;IAI7D;;;;;OAKG;IACU,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAiBvD,4BAA4B,CAAC,OAAO,EAAE,MAAM;IAK5C,mBAAmB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;YAItD,YAAY;IAYb,mBAAmB;CA2BjC"}
@@ -1,316 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2022 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
- var __importDefault = (this && this.__importDefault) || function (mod) {
21
- return (mod && mod.__esModule) ? mod : { "default": mod };
22
- };
23
- Object.defineProperty(exports, "__esModule", { value: true });
24
- exports.ConversationService = void 0;
25
- const conversation_1 = require("@wireapp/api-client/lib/conversation");
26
- const data_1 = require("@wireapp/api-client/lib/conversation/data");
27
- const bazinga64_1 = require("bazinga64");
28
- const logdown_1 = __importDefault(require("logdown"));
29
- const core_crypto_1 = require("@wireapp/core-crypto");
30
- const protocol_messaging_1 = require("@wireapp/protocol-messaging");
31
- const conversation_2 = require("../../conversation/");
32
- const AssetCryptography_1 = require("../../cryptography/AssetCryptography");
33
- const mls_1 = require("../../messagingProtocols/mls");
34
- const proteus_1 = require("../../messagingProtocols/proteus");
35
- const util_1 = require("../../util");
36
- const fullyQualifiedClientIdUtils_1 = require("../../util/fullyQualifiedClientIdUtils");
37
- const messageSender_1 = require("../message/messageSender");
38
- const MessageService_1 = require("../message/MessageService");
39
- class ConversationService {
40
- constructor(apiClient, cryptographyService, config, mlsService, proteusService) {
41
- this.apiClient = apiClient;
42
- this.config = config;
43
- this.mlsService = mlsService;
44
- this.proteusService = proteusService;
45
- this.logger = (0, logdown_1.default)('@wireapp/core/ConversationService');
46
- this.messageTimer = new conversation_2.MessageTimer();
47
- this.messageService = new MessageService_1.MessageService(this.apiClient, cryptographyService);
48
- }
49
- /**
50
- * Get a fresh list from backend of clients for all the participants of the conversation.
51
- * This is a hacky way of getting all the clients for a conversation.
52
- * The idea is to send an empty message to the backend to absolutely no users and let backend reply with a mismatch error.
53
- * We then get the missing members in the mismatch, that is our fresh list of participants' clients.
54
- *
55
- * @deprecated
56
- * @param {string} conversationId
57
- * @param {string} conversationDomain? - If given will send the message to the new qualified endpoint
58
- */
59
- getAllParticipantsClients(conversationId) {
60
- const sendingClientId = this.apiClient.validatedClientId;
61
- const recipients = {};
62
- const text = new Uint8Array();
63
- return new Promise(async (resolve) => {
64
- const onClientMismatch = (mismatch) => {
65
- resolve(mismatch.missing);
66
- // When the mismatch happens, we ask the messageService to cancel the sending
67
- return false;
68
- };
69
- if (conversationId.domain && this.config.useQualifiedIds) {
70
- await this.messageService.sendFederatedMessage(sendingClientId, recipients, text, {
71
- conversationId,
72
- onClientMismatch,
73
- reportMissing: true,
74
- });
75
- }
76
- else {
77
- await this.messageService.sendMessage(sendingClientId, recipients, text, {
78
- conversationId,
79
- onClientMismatch,
80
- });
81
- }
82
- });
83
- }
84
- /**
85
- * Get a fresh list from backend of clients for all the participants of the conversation.
86
- * @fixme there are some case where this method is not enough to detect removed devices
87
- * @param {string} conversationId
88
- * @param {string} conversationDomain? - If given will send the message to the new qualified endpoint
89
- */
90
- async fetchAllParticipantsClients(conversationId, conversationDomain) {
91
- const qualifiedMembers = await (0, proteus_1.getConversationQualifiedMembers)({
92
- apiClient: this.apiClient,
93
- conversationId: conversationDomain ? { id: conversationId, domain: conversationDomain } : conversationId,
94
- });
95
- const allClients = await this.apiClient.api.user.postListClients({ qualified_users: qualifiedMembers });
96
- const qualifiedUserClients = {};
97
- Object.entries(allClients.qualified_user_map).map(([domain, userClientMap]) => Object.entries(userClientMap).map(async ([userId, clients]) => {
98
- qualifiedUserClients[domain] || (qualifiedUserClients[domain] = {});
99
- qualifiedUserClients[domain][userId] = clients.map(client => client.id);
100
- }));
101
- return qualifiedUserClients;
102
- }
103
- async createProteusConversation(conversationData, otherUserIds) {
104
- return this.proteusService.createConversation({ conversationData, otherUserIds });
105
- }
106
- async getConversations(conversationIds) {
107
- if (!conversationIds || !conversationIds.length) {
108
- return this.apiClient.api.conversation.getAllConversations();
109
- }
110
- if (typeof conversationIds === 'string') {
111
- return this.apiClient.api.conversation.getConversation(conversationIds);
112
- }
113
- return this.apiClient.api.conversation.getConversationsByIds(conversationIds);
114
- }
115
- async getAsset({ assetId, assetToken, otrKey, sha256 }) {
116
- const request = this.apiClient.api.asset.getAssetV3(assetId, assetToken);
117
- const encryptedBuffer = (await request.response).buffer;
118
- return (0, AssetCryptography_1.decryptAsset)({
119
- cipherText: new Uint8Array(encryptedBuffer),
120
- keyBytes: otrKey,
121
- sha256: sha256,
122
- });
123
- }
124
- async getUnencryptedAsset(assetId, assetToken) {
125
- const request = await this.apiClient.api.asset.getAssetV3(assetId, assetToken);
126
- return (await request.response).buffer;
127
- }
128
- async addUsersToProteusConversation(params) {
129
- return this.proteusService.addUsersToConversation(params);
130
- }
131
- async removeUserFromConversation(conversationId, userId) {
132
- return this.apiClient.api.conversation.deleteMember(conversationId, userId);
133
- }
134
- /**
135
- * Sends a message to a conversation
136
- * @return resolves with the sending status
137
- */
138
- async send(params) {
139
- function isMLS(params) {
140
- return params.protocol === conversation_1.ConversationProtocol.MLS;
141
- }
142
- return (0, messageSender_1.sendMessage)(() => (isMLS(params) ? this.sendMLSMessage(params) : this.proteusService.sendMessage(params)));
143
- }
144
- sendTypingStart(conversationId) {
145
- return this.apiClient.api.conversation.postTyping(conversationId, { status: data_1.CONVERSATION_TYPING.STARTED });
146
- }
147
- sendTypingStop(conversationId) {
148
- return this.apiClient.api.conversation.postTyping(conversationId, { status: data_1.CONVERSATION_TYPING.STOPPED });
149
- }
150
- /**
151
- * returns the number of messages that are in the queue expecting to be sent
152
- */
153
- isSendingMessage() {
154
- return (0, messageSender_1.isSendingMessage)();
155
- }
156
- setConversationMutedStatus(conversationId, status, muteTimestamp) {
157
- if (typeof muteTimestamp === 'number') {
158
- muteTimestamp = new Date(muteTimestamp);
159
- }
160
- const payload = {
161
- otr_muted_ref: muteTimestamp.toISOString(),
162
- otr_muted_status: status,
163
- };
164
- return this.apiClient.api.conversation.putMembershipProperties(conversationId, payload);
165
- }
166
- toggleArchiveConversation(conversationId, archived, archiveTimestamp = new Date()) {
167
- if (typeof archiveTimestamp === 'number') {
168
- archiveTimestamp = new Date(archiveTimestamp);
169
- }
170
- const payload = {
171
- otr_archived: archived,
172
- otr_archived_ref: archiveTimestamp.toISOString(),
173
- };
174
- return this.apiClient.api.conversation.putMembershipProperties(conversationId, payload);
175
- }
176
- setMemberConversationRole(conversationId, userId, conversationRole) {
177
- return this.apiClient.api.conversation.putOtherMember(userId, conversationId, {
178
- conversation_role: conversationRole,
179
- });
180
- }
181
- /**
182
- * ###############################################
183
- * ################ MLS Functions ################
184
- * ###############################################
185
- */
186
- /**
187
- * Will create a conversation on backend and register it to CoreCrypto once created
188
- * @param conversationData
189
- */
190
- async createMLSConversation(conversationData) {
191
- var _a;
192
- const { selfUserId, qualified_users: qualifiedUsers = [] } = conversationData;
193
- if (!selfUserId) {
194
- throw new Error('You need to pass self user qualified id in order to create an MLS conversation');
195
- }
196
- /**
197
- * @note For creating MLS conversations the users & qualified_users
198
- * field must be empty as backend is not aware which users
199
- * are in a MLS conversation because of the MLS architecture.
200
- */
201
- const newConversation = await this.apiClient.api.conversation.postConversation(Object.assign(Object.assign({}, conversationData), { users: undefined, qualified_users: undefined }));
202
- const { group_id: groupId, qualified_id: qualifiedId } = newConversation;
203
- if (!groupId) {
204
- throw new Error('No group_id found in response which is required for creating MLS conversations.');
205
- }
206
- const response = await this.mlsService.registerConversation(groupId, qualifiedUsers.concat(selfUserId), {
207
- user: selfUserId,
208
- client: conversationData.creator_client,
209
- });
210
- // We fetch the fresh version of the conversation created on backend with the newly added users
211
- const conversation = await this.apiClient.api.conversation.getConversation(qualifiedId);
212
- return {
213
- events: (_a = response === null || response === void 0 ? void 0 : response.events) !== null && _a !== void 0 ? _a : [],
214
- conversation,
215
- };
216
- }
217
- async sendMLSMessage({ payload, groupId }) {
218
- const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
219
- // immediately execute pending commits before sending the message
220
- await this.mlsService.commitPendingProposals({ groupId });
221
- const encrypted = await this.mlsService.encryptMessage(groupIdBytes, protocol_messaging_1.GenericMessage.encode(payload).finish());
222
- let sentAt = '';
223
- try {
224
- const { time = '' } = await this.apiClient.api.conversation.postMlsMessage(encrypted);
225
- sentAt = (time === null || time === void 0 ? void 0 : time.length) > 0 ? time : new Date().toISOString();
226
- }
227
- catch (_a) { }
228
- return {
229
- id: payload.messageId,
230
- sentAt,
231
- state: sentAt ? conversation_2.MessageSendingState.OUTGOING_SENT : conversation_2.MessageSendingState.CANCELLED,
232
- };
233
- }
234
- async addUsersToMLSConversation({ qualifiedUserIds, groupId, conversationId, }) {
235
- const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
236
- const coreCryptoKeyPackagesPayload = await this.mlsService.getKeyPackagesPayload([...qualifiedUserIds]);
237
- const response = await this.mlsService.addUsersToExistingConversation(groupIdBytes, coreCryptoKeyPackagesPayload);
238
- const conversation = await this.getConversations(conversationId.id);
239
- //We store the info when user was added (and key material was created), so we will know when to renew it
240
- this.mlsService.resetKeyMaterialRenewal(groupId);
241
- return {
242
- events: (response === null || response === void 0 ? void 0 : response.events) || [],
243
- conversation,
244
- };
245
- }
246
- async removeUsersFromMLSConversation({ groupId, conversationId, qualifiedUserIds, }) {
247
- const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
248
- const clientsToRemove = await this.apiClient.api.user.postListClients({ qualified_users: qualifiedUserIds });
249
- const fullyQualifiedClientIds = (0, fullyQualifiedClientIdUtils_1.mapQualifiedUserClientIdsToFullyQualifiedClientIds)(clientsToRemove.qualified_user_map);
250
- const messageResponse = await this.mlsService.removeClientsFromConversation(groupIdBytes, fullyQualifiedClientIds);
251
- //key material gets updated after removing a user from the group, so we can reset last key update time value in the store
252
- this.mlsService.resetKeyMaterialRenewal(groupId);
253
- const conversation = await this.getConversations(conversationId.id);
254
- return {
255
- events: (messageResponse === null || messageResponse === void 0 ? void 0 : messageResponse.events) || [],
256
- conversation,
257
- };
258
- }
259
- async joinByExternalCommit(conversationId) {
260
- return this.mlsService.joinByExternalCommit(() => this.apiClient.api.conversation.getGroupInfo(conversationId));
261
- }
262
- /**
263
- * Will send an external proposal for the current device to join a specific conversation.
264
- * In order for the external proposal to be sent correctly, the underlying mls conversation needs to be in a non-established state
265
- * @param groupId The conversation to join
266
- * @param epoch The current epoch of the local conversation
267
- */
268
- async sendExternalJoinProposal(groupId, epoch) {
269
- return (0, messageSender_1.sendMessage)(async () => {
270
- const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
271
- const externalProposal = await this.mlsService.newExternalProposal(core_crypto_1.ExternalProposalType.Add, {
272
- epoch,
273
- conversationId: groupIdBytes,
274
- });
275
- await this.apiClient.api.conversation.postMlsMessage(
276
- //@todo: it's temporary - we wait for core-crypto fix to return the actual Uint8Array instead of regular array
277
- (0, mls_1.optionalToUint8Array)(externalProposal));
278
- //We store the info when user was added (and key material was created), so we will know when to renew it
279
- this.mlsService.resetKeyMaterialRenewal(groupId);
280
- });
281
- }
282
- async isMLSConversationEstablished(groupId) {
283
- const groupIdBytes = bazinga64_1.Decoder.fromBase64(groupId).asBytes;
284
- return this.mlsService.conversationExists(groupIdBytes);
285
- }
286
- async wipeMLSConversation(groupId) {
287
- return this.mlsService.wipeConversation(groupId);
288
- }
289
- async matchesEpoch(groupId, backendEpoch) {
290
- const localEpoch = await this.mlsService.getEpoch(groupId);
291
- this.logger.log(`Comparing conversation's (group_id: ${groupId}) local and backend epoch number: {local: ${String(localEpoch)}, backend: ${backendEpoch}}`);
292
- //corecrypto stores epoch number as BigInt, we're mapping both values to be sure comparison is valid
293
- return BigInt(localEpoch) === BigInt(backendEpoch);
294
- }
295
- async handleEpochMismatch() {
296
- this.logger.info(`There were some missed messages, handling possible epoch mismatch in MLS conversations.`);
297
- //fetch all the mls conversations from backend
298
- const conversations = await this.apiClient.api.conversation.getConversationList();
299
- const foundConversations = conversations.found || [];
300
- const mlsConversations = foundConversations.filter(util_1.isMLSConversation);
301
- //check all the established conversations' epoch with the core-crypto epoch
302
- for (const { qualified_id: qualifiedId, group_id: groupId, epoch } of mlsConversations) {
303
- try {
304
- //if conversation is not established or epoch does not match -> try to rejoin
305
- if (!(await this.isMLSConversationEstablished(groupId)) || !(await this.matchesEpoch(groupId, epoch))) {
306
- this.logger.log(`Conversation (id ${qualifiedId.id}) was not established or it's epoch number was out of date, joining via external commit`);
307
- await this.joinByExternalCommit(qualifiedId);
308
- }
309
- }
310
- catch (error) {
311
- this.logger.error(`There was an error while handling epoch mismatch in MLS conversation (id: ${qualifiedId.id}):`, error);
312
- }
313
- }
314
- }
315
- }
316
- exports.ConversationService = ConversationService;
@@ -1,95 +0,0 @@
1
- import { QualifiedUserClients, ClientMismatch, ConversationProtocol, MessageSendingStatus, UserClients, Conversation } from '@wireapp/api-client/lib/conversation';
2
- import { MlsEvent } from '@wireapp/api-client/lib/conversation/data/MlsEventData';
3
- import { QualifiedId } from '@wireapp/api-client/lib/user';
4
- import { GenericMessage } from '@wireapp/protocol-messaging';
5
- import { MessageSendingState } from '..';
6
- export declare enum MessageTargetMode {
7
- NONE = 0,
8
- USERS = 1,
9
- USERS_CLIENTS = 2
10
- }
11
- export interface MessageSendingOptions {
12
- /**
13
- * can be either a QualifiedId[] or QualfiedUserClients or undefined. The type has some effect on the behavior of the method.
14
- * When given undefined the method will fetch both the members of the conversations and their devices. No ClientMismatch can happen in that case
15
- * When given a QualifiedId[] the method will fetch the freshest list of devices for those users (since they are not given by the consumer). As a consequence no ClientMismatch error will trigger and we will ignore missing clients when sending
16
- * When given a QualifiedUserClients the method will only send to the clients listed in the userIds. This could lead to ClientMismatch (since the given list of devices might not be the freshest one and new clients could have been created)
17
- */
18
- userIds?: string[] | QualifiedId[] | UserClients | QualifiedUserClients;
19
- /**
20
- * Will send the message as a protobuf payload
21
- */
22
- sendAsProtobuf?: boolean;
23
- nativePush?: boolean;
24
- /**
25
- * Will be called whenever there is a clientmismatch returned from the server. Needs to be combined with a userIds of type QualifiedUserClients
26
- */
27
- onClientMismatch?: MessageSendingCallbacks['onClientMismatch'];
28
- /**
29
- * Defines the behavior to use when a mismatch happens on backend side:
30
- * - NONE -> Not a targetted message, we want to send to all the users/clients in the conversation. Will report all missing users and clients (default mode)
31
- * - USERS -> A message targetted to all the clients of the given users (according to params.userIds). Will ignore missing users and only report missing clients for the given params.userIds
32
- * - USERS_CLIENTS -> A message targetted at some specific clients of specific users (according to params.userIds). Will force sending the message even if users or clients are missing
33
- */
34
- targetMode?: MessageTargetMode;
35
- }
36
- export interface MessageSendingCallbacks {
37
- /**
38
- * Called whenever there is a clientmismatch returned from the server. Will also indicate the sending status of the message (if it was already sent or not)
39
- *
40
- * @param status The mismatch info
41
- * @param wasSent Indicate whether the message was already sent or if it can still be canceled
42
- * @return
43
- */
44
- onClientMismatch?: (status: ClientMismatch | MessageSendingStatus, wasSent: boolean) => void | boolean | Promise<boolean>;
45
- }
46
- /**
47
- * ######################################################################
48
- * ################ MLS and Proteus implementation types ################
49
- * ######################################################################
50
- */
51
- /**
52
- * The protocol to use to send the message (MLS or Proteus)
53
- */
54
- export type ProtocolParam = {
55
- protocol: ConversationProtocol;
56
- };
57
- /**
58
- * The message to send to the conversation
59
- */
60
- export type SendCommonParams = ProtocolParam & {
61
- payload: GenericMessage;
62
- };
63
- export type SendMlsMessageParams = SendCommonParams & {
64
- /**
65
- * The groupId of the conversation to send the message to (Needed only for MLS)
66
- */
67
- groupId: string;
68
- protocol: ConversationProtocol.MLS;
69
- };
70
- export type QualifiedUsers = QualifiedId & {
71
- skipOwn?: string;
72
- };
73
- export type AddUsersParams = {
74
- conversationId: QualifiedId;
75
- qualifiedUserIds: QualifiedId[];
76
- groupId?: string;
77
- };
78
- export type RemoveUsersParams = {
79
- conversationId: QualifiedId;
80
- qualifiedUserIds: QualifiedId[];
81
- groupId: string;
82
- };
83
- export type MLSReturnType = {
84
- events: MlsEvent[];
85
- conversation: Conversation;
86
- };
87
- export type SendResult = {
88
- /** The id of the message sent */
89
- id: string;
90
- /** the ISO formatted date at which the message was received by the backend */
91
- sentAt: string;
92
- /** The sending state of the payload (has the payload been succesfully sent or canceled) */
93
- state: MessageSendingState;
94
- };
95
- //# sourceMappingURL=ConversationService.types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConversationService.types.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/ConversationService.types.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,WAAW,EACX,YAAY,EACb,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAC,QAAQ,EAAC,MAAM,wDAAwD,CAAC;AAChF,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,OAAO,EAAC,cAAc,EAAC,MAAM,6BAA6B,CAAC;AAE3D,OAAO,EAAC,mBAAmB,EAAC,MAAM,IAAI,CAAC;AAEvC,oBAAY,iBAAiB;IAC3B,IAAI,IAAA;IACJ,KAAK,IAAA;IACL,aAAa,IAAA;CACd;AAED,MAAM,WAAW,qBAAqB;IACpC;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,WAAW,EAAE,GAAG,WAAW,GAAG,oBAAoB,CAAC;IAExE;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,gBAAgB,CAAC,EAAE,uBAAuB,CAAC,kBAAkB,CAAC,CAAC;IAE/D;;;;;OAKG;IACH,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE,CACjB,MAAM,EAAE,cAAc,GAAG,oBAAoB,EAC7C,OAAO,EAAE,OAAO,KACb,IAAI,GAAG,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACxC;AAED;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,oBAAoB,CAAC;CAChC,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,aAAa,GAAG;IAC7C,OAAO,EAAE,cAAc,CAAC;CACzB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG,gBAAgB,GAAG;IACpD;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,oBAAoB,CAAC,GAAG,CAAC;CACpC,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,WAAW,GAAG;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC;AAE9D,MAAM,MAAM,cAAc,GAAG;IAC3B,cAAc,EAAE,WAAW,CAAC;IAC5B,gBAAgB,EAAE,WAAW,EAAE,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,cAAc,EAAE,WAAW,CAAC;IAC5B,gBAAgB,EAAE,WAAW,EAAE,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAAC,MAAM,EAAE,QAAQ,EAAE,CAAC;IAAC,YAAY,EAAE,YAAY,CAAA;CAAC,CAAC;AAE7E,MAAM,MAAM,UAAU,GAAG;IACvB,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,8EAA8E;IAC9E,MAAM,EAAE,MAAM,CAAC;IACf,2FAA2F;IAC3F,KAAK,EAAE,mBAAmB,CAAC;CAC5B,CAAC"}
@@ -1,27 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2022 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.MessageTargetMode = void 0;
22
- var MessageTargetMode;
23
- (function (MessageTargetMode) {
24
- MessageTargetMode[MessageTargetMode["NONE"] = 0] = "NONE";
25
- MessageTargetMode[MessageTargetMode["USERS"] = 1] = "USERS";
26
- MessageTargetMode[MessageTargetMode["USERS_CLIENTS"] = 2] = "USERS_CLIENTS";
27
- })(MessageTargetMode = exports.MessageTargetMode || (exports.MessageTargetMode = {}));
@@ -1,9 +0,0 @@
1
- import { APIClient } from '@wireapp/api-client/lib/APIClient';
2
- import { QualifiedId } from '@wireapp/api-client/lib/user';
3
- interface Params {
4
- apiClient: APIClient;
5
- conversationId: string | QualifiedId;
6
- }
7
- declare const getConversationQualifiedMembers: ({ apiClient, conversationId }: Params) => Promise<QualifiedId[]>;
8
- export { getConversationQualifiedMembers };
9
- //# sourceMappingURL=getConversationQualifiedMembers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"getConversationQualifiedMembers.d.ts","sourceRoot":"","sources":["../../../../src/conversation/ConversationService/Utility/getConversationQualifiedMembers.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,SAAS,EAAC,MAAM,mCAAmC,CAAC;AAC5D,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,UAAU,MAAM;IACd,SAAS,EAAE,SAAS,CAAC;IACrB,cAAc,EAAE,MAAM,GAAG,WAAW,CAAC;CACtC;AACD,QAAA,MAAM,+BAA+B,kCAAuC,MAAM,KAAG,QAAQ,WAAW,EAAE,CAWzG,CAAC;AAEF,OAAO,EAAC,+BAA+B,EAAC,CAAC"}
@@ -1,34 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2022 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.getConversationQualifiedMembers = void 0;
22
- const getConversationQualifiedMembers = async ({ apiClient, conversationId }) => {
23
- const conversation = await apiClient.api.conversation.getConversation(conversationId);
24
- /*
25
- * If you are sending a message to a conversation, you have to include
26
- * yourself in the list of users if you want to sync a message also to your
27
- * other clients.
28
- */
29
- return conversation.members.others
30
- .filter(member => !!member.qualified_id)
31
- .map(member => member.qualified_id)
32
- .concat(conversation.members.self.qualified_id);
33
- };
34
- exports.getConversationQualifiedMembers = getConversationQualifiedMembers;
@@ -1,3 +0,0 @@
1
- export * from './ConversationService.types';
2
- export * from './ConversationService';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/conversation/ConversationService/index.ts"],"names":[],"mappings":"AAmBA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,uBAAuB,CAAC"}
@@ -1,36 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2022 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
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- var desc = Object.getOwnPropertyDescriptor(m, k);
23
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
24
- desc = { enumerable: true, get: function() { return m[k]; } };
25
- }
26
- Object.defineProperty(o, k2, desc);
27
- }) : (function(o, m, k, k2) {
28
- if (k2 === undefined) k2 = k;
29
- o[k2] = m[k];
30
- }));
31
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
32
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
33
- };
34
- Object.defineProperty(exports, "__esModule", { value: true });
35
- __exportStar(require("./ConversationService.types"), exports);
36
- __exportStar(require("./ConversationService"), exports);