@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,32 +0,0 @@
1
- import { TeamConversationCreateData, TeamConversationDeleteData, TeamMemberJoinData, TeamMemberLeaveData, TeamUpdateData } from '@wireapp/api-client/lib/team/data';
2
- import { BasePayloadBundle, PayloadBundleType } from './PayloadBundle';
3
- export interface TeamConversationCreateMessage extends BasePayloadBundle {
4
- content: TeamConversationCreateData;
5
- type: PayloadBundleType.TEAM_CONVERSATION_CREATE;
6
- }
7
- export interface TeamMemberLeaveMessage extends BasePayloadBundle {
8
- content: TeamMemberLeaveData;
9
- type: PayloadBundleType.TEAM_MEMBER_LEAVE;
10
- }
11
- export interface TeamConversationDeleteMessage extends BasePayloadBundle {
12
- content: TeamConversationDeleteData;
13
- type: PayloadBundleType.TEAM_CONVERSATION_DELETE;
14
- }
15
- export interface TeamDeleteMessage extends BasePayloadBundle {
16
- content: null;
17
- type: PayloadBundleType.TEAM_DELETE;
18
- }
19
- export interface TeamMemberJoinMessage extends BasePayloadBundle {
20
- content: TeamMemberJoinData;
21
- type: PayloadBundleType.TEAM_MEMBER_JOIN;
22
- }
23
- export interface TeamMemberLeaveMesssage extends BasePayloadBundle {
24
- content: TeamMemberLeaveData;
25
- type: PayloadBundleType.TEAM_MEMBER_LEAVE;
26
- }
27
- export interface TeamUpdateMessage extends BasePayloadBundle {
28
- content: TeamUpdateData;
29
- type: PayloadBundleType.TEAM_UPDATE;
30
- }
31
- export type TeamMessage = TeamConversationCreateMessage | TeamMemberLeaveMessage | TeamConversationDeleteMessage | TeamDeleteMessage | TeamMemberJoinMessage | TeamMemberLeaveMesssage | TeamUpdateMessage;
32
- //# sourceMappingURL=TeamMessage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TeamMessage.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/TeamMessage.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,0BAA0B,EAC1B,0BAA0B,EAC1B,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,EACf,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACtE,OAAO,EAAE,0BAA0B,CAAC;IACpC,IAAI,EAAE,iBAAiB,CAAC,wBAAwB,CAAC;CAClD;AAED,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,OAAO,EAAE,mBAAmB,CAAC;IAC7B,IAAI,EAAE,iBAAiB,CAAC,iBAAiB,CAAC;CAC3C;AAED,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;IACtE,OAAO,EAAE,0BAA0B,CAAC;IACpC,IAAI,EAAE,iBAAiB,CAAC,wBAAwB,CAAC;CAClD;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,OAAO,EAAE,IAAI,CAAC;IACd,IAAI,EAAE,iBAAiB,CAAC,WAAW,CAAC;CACrC;AAED,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,OAAO,EAAE,kBAAkB,CAAC;IAC5B,IAAI,EAAE,iBAAiB,CAAC,gBAAgB,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,OAAO,EAAE,mBAAmB,CAAC;IAC7B,IAAI,EAAE,iBAAiB,CAAC,iBAAiB,CAAC;CAC3C;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,iBAAiB,CAAC,WAAW,CAAC;CACrC;AAED,MAAM,MAAM,WAAW,GACnB,6BAA6B,GAC7B,sBAAsB,GACtB,6BAA6B,GAC7B,iBAAiB,GACjB,qBAAqB,GACrB,uBAAuB,GACvB,iBAAiB,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2019 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 });
@@ -1,12 +0,0 @@
1
- import { EditedTextContent, LegalHoldStatus, LinkPreviewUploadedContent, MentionContent, QuoteContent, TextContent } from '../content';
2
- export declare class TextContentBuilder<T extends TextContent | EditedTextContent> {
3
- private readonly content;
4
- constructor(textContent: T);
5
- build(): T;
6
- withLinkPreviews(linkPreviews?: LinkPreviewUploadedContent[]): this;
7
- withMentions(mentions?: MentionContent[]): this;
8
- withQuote(quote?: QuoteContent): this;
9
- withReadConfirmation(expectsReadConfirmation?: boolean): this;
10
- withLegalHoldStatus(legalHoldStatus?: LegalHoldStatus): this;
11
- }
12
- //# sourceMappingURL=TextContentBuilder.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextContentBuilder.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/TextContentBuilder.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,iBAAiB,EACjB,eAAe,EACf,0BAA0B,EAC1B,cAAc,EACd,YAAY,EACZ,WAAW,EACZ,MAAM,YAAY,CAAC;AAEpB,qBAAa,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,iBAAiB;IACvE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAI;gBAEhB,WAAW,EAAE,CAAC;IAI1B,KAAK,IAAI,CAAC;IAIV,gBAAgB,CAAC,YAAY,CAAC,EAAE,0BAA0B,EAAE;IAQ5D,YAAY,CAAC,QAAQ,CAAC,EAAE,cAAc,EAAE;IAQxC,SAAS,CAAC,KAAK,CAAC,EAAE,YAAY;IAQ9B,oBAAoB,CAAC,uBAAuB,UAAQ;IAOpD,mBAAmB,CAAC,eAAe,kBAA0B;CAM9D"}
@@ -1,61 +0,0 @@
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.TextContentBuilder = void 0;
22
- const content_1 = require("../content");
23
- class TextContentBuilder {
24
- constructor(textContent) {
25
- this.content = textContent;
26
- }
27
- build() {
28
- return this.content;
29
- }
30
- withLinkPreviews(linkPreviews) {
31
- if (linkPreviews === null || linkPreviews === void 0 ? void 0 : linkPreviews.length) {
32
- this.content.linkPreviews = linkPreviews;
33
- }
34
- return this;
35
- }
36
- withMentions(mentions) {
37
- if (mentions === null || mentions === void 0 ? void 0 : mentions.length) {
38
- this.content.mentions = mentions;
39
- }
40
- return this;
41
- }
42
- withQuote(quote) {
43
- if (quote) {
44
- this.content.quote = quote;
45
- }
46
- return this;
47
- }
48
- withReadConfirmation(expectsReadConfirmation = false) {
49
- if (typeof expectsReadConfirmation !== 'undefined') {
50
- this.content.expectsReadConfirmation = expectsReadConfirmation;
51
- }
52
- return this;
53
- }
54
- withLegalHoldStatus(legalHoldStatus = content_1.LegalHoldStatus.UNKNOWN) {
55
- if (typeof legalHoldStatus !== 'undefined') {
56
- this.content.legalHoldStatus = legalHoldStatus;
57
- }
58
- return this;
59
- }
60
- }
61
- exports.TextContentBuilder = TextContentBuilder;
@@ -1,23 +0,0 @@
1
- import { QualifiedId } from '@wireapp/api-client/lib/user';
2
- type UserClientsContainer<T> = {
3
- [userId: string]: T;
4
- };
5
- type QualifiedUserClientsContainer<T> = {
6
- [domain: string]: UserClientsContainer<T>;
7
- };
8
- export declare function flattenUserClients<T>(userClients: UserClientsContainer<T>, domain?: string): {
9
- data: T;
10
- userId: QualifiedId;
11
- }[];
12
- /**
13
- * Will flatten a container of users=>clients infos to an array
14
- *
15
- * @param userClients The UserClients (qualified or not) to flatten
16
- * @return An array containing the qualified user Ids and the clients info
17
- */
18
- export declare function flattenQualifiedUserClients<T = unknown>(userClients: QualifiedUserClientsContainer<T>): {
19
- data: T;
20
- userId: QualifiedId;
21
- }[];
22
- export {};
23
- //# sourceMappingURL=UserClientsUtil.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserClientsUtil.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/UserClientsUtil.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,WAAW,EAAC,MAAM,8BAA8B,CAAC;AAEzD,KAAK,oBAAoB,CAAC,CAAC,IAAI;IAAC,CAAC,MAAM,EAAE,MAAM,GAAG,CAAC,CAAA;CAAC,CAAC;AACrD,KAAK,6BAA6B,CAAC,CAAC,IAAI;IAAC,CAAC,MAAM,EAAE,MAAM,GAAG,oBAAoB,CAAC,CAAC,CAAC,CAAA;CAAC,CAAC;AAEpF,wBAAgB,kBAAkB,CAAC,CAAC,EAClC,WAAW,EAAE,oBAAoB,CAAC,CAAC,CAAC,EACpC,MAAM,GAAE,MAAW,GAClB;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,EAAE,CAElC;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,GAAG,OAAO,EACrD,WAAW,EAAE,6BAA6B,CAAC,CAAC,CAAC,GAC5C;IAAC,IAAI,EAAE,CAAC,CAAC;IAAC,MAAM,EAAE,WAAW,CAAA;CAAC,EAAE,CAIlC"}
@@ -1,37 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2021 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.flattenQualifiedUserClients = exports.flattenUserClients = void 0;
22
- function flattenUserClients(userClients, domain = '') {
23
- return Object.entries(userClients).map(([id, data]) => ({ data, userId: { domain, id } }));
24
- }
25
- exports.flattenUserClients = flattenUserClients;
26
- /**
27
- * Will flatten a container of users=>clients infos to an array
28
- *
29
- * @param userClients The UserClients (qualified or not) to flatten
30
- * @return An array containing the qualified user Ids and the clients info
31
- */
32
- function flattenQualifiedUserClients(userClients) {
33
- return Object.entries(userClients).reduce((ids, [domain, userClients]) => {
34
- return [...ids, ...flattenUserClients(userClients, domain)];
35
- }, []);
36
- }
37
- exports.flattenQualifiedUserClients = flattenQualifiedUserClients;
@@ -1,44 +0,0 @@
1
- import { UserActivateData, UserClientAddData, UserClientRemoveData, UserConnectionData, UserDeleteData, UserLegalHoldDisableData, UserLegalHoldEnableData, UserLegalHoldRequestData, UserPropertiesSetData, UserUpdateData } from '@wireapp/api-client/lib/user/data';
2
- import { BasePayloadBundle, PayloadBundleType } from './PayloadBundle';
3
- export interface UserActivateMessage extends BasePayloadBundle {
4
- content: UserActivateData;
5
- type: PayloadBundleType.USER_ACTIVATE;
6
- }
7
- export interface UserClientAddMessage extends BasePayloadBundle {
8
- content: UserClientAddData;
9
- type: PayloadBundleType.USER_CLIENT_ADD;
10
- }
11
- export interface UserLegalHoldRequestMessage extends BasePayloadBundle {
12
- content: UserLegalHoldRequestData;
13
- type: PayloadBundleType.USER_LEGAL_HOLD_REQUEST;
14
- }
15
- export interface UserLegalHoldEnableMessage extends BasePayloadBundle {
16
- content: UserLegalHoldEnableData;
17
- type: PayloadBundleType.USER_LEGAL_HOLD_ENABLE;
18
- }
19
- export interface UserLegalHoldDisableMessage extends BasePayloadBundle {
20
- content: UserLegalHoldDisableData;
21
- type: PayloadBundleType.USER_LEGAL_HOLD_DISABLE;
22
- }
23
- export interface UserClientRemoveMessage extends BasePayloadBundle {
24
- content: UserClientRemoveData;
25
- type: PayloadBundleType.USER_CLIENT_REMOVE;
26
- }
27
- export interface UserConnectionMessage extends BasePayloadBundle {
28
- content: UserConnectionData;
29
- type: PayloadBundleType.USER_CONNECTION;
30
- }
31
- export interface UserDeleteMessage extends BasePayloadBundle {
32
- content: UserDeleteData;
33
- type: PayloadBundleType.USER_DELETE;
34
- }
35
- export interface UserPropertiesSetEvent extends BasePayloadBundle {
36
- content: UserPropertiesSetData;
37
- type: PayloadBundleType.USER_PROPERTIES_SET;
38
- }
39
- export interface UserUpdateMessage extends BasePayloadBundle {
40
- content: UserUpdateData;
41
- type: PayloadBundleType.USER_UPDATE;
42
- }
43
- export type UserMessage = UserActivateMessage | UserClientAddMessage | UserLegalHoldRequestMessage | UserLegalHoldEnableMessage | UserLegalHoldDisableMessage | UserClientRemoveMessage | UserConnectionMessage | UserDeleteMessage | UserPropertiesSetEvent | UserUpdateMessage;
44
- //# sourceMappingURL=UserMessage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"UserMessage.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/UserMessage.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,kBAAkB,EAClB,cAAc,EACd,wBAAwB,EACxB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,cAAc,EACf,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAC,iBAAiB,EAAE,iBAAiB,EAAC,MAAM,iBAAiB,CAAC;AAErE,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,OAAO,EAAE,gBAAgB,CAAC;IAC1B,IAAI,EAAE,iBAAiB,CAAC,aAAa,CAAC;CACvC;AAED,MAAM,WAAW,oBAAqB,SAAQ,iBAAiB;IAC7D,OAAO,EAAE,iBAAiB,CAAC;IAC3B,IAAI,EAAE,iBAAiB,CAAC,eAAe,CAAC;CACzC;AAED,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,OAAO,EAAE,wBAAwB,CAAC;IAClC,IAAI,EAAE,iBAAiB,CAAC,uBAAuB,CAAC;CACjD;AAED,MAAM,WAAW,0BAA2B,SAAQ,iBAAiB;IACnE,OAAO,EAAE,uBAAuB,CAAC;IACjC,IAAI,EAAE,iBAAiB,CAAC,sBAAsB,CAAC;CAChD;AAED,MAAM,WAAW,2BAA4B,SAAQ,iBAAiB;IACpE,OAAO,EAAE,wBAAwB,CAAC;IAClC,IAAI,EAAE,iBAAiB,CAAC,uBAAuB,CAAC;CACjD;AAED,MAAM,WAAW,uBAAwB,SAAQ,iBAAiB;IAChE,OAAO,EAAE,oBAAoB,CAAC;IAC9B,IAAI,EAAE,iBAAiB,CAAC,kBAAkB,CAAC;CAC5C;AAED,MAAM,WAAW,qBAAsB,SAAQ,iBAAiB;IAC9D,OAAO,EAAE,kBAAkB,CAAC;IAC5B,IAAI,EAAE,iBAAiB,CAAC,eAAe,CAAC;CACzC;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,iBAAiB,CAAC,WAAW,CAAC;CACrC;AAED,MAAM,WAAW,sBAAuB,SAAQ,iBAAiB;IAC/D,OAAO,EAAE,qBAAqB,CAAC;IAC/B,IAAI,EAAE,iBAAiB,CAAC,mBAAmB,CAAC;CAC7C;AAED,MAAM,WAAW,iBAAkB,SAAQ,iBAAiB;IAC1D,OAAO,EAAE,cAAc,CAAC;IACxB,IAAI,EAAE,iBAAiB,CAAC,WAAW,CAAC;CACrC;AAED,MAAM,MAAM,WAAW,GACnB,mBAAmB,GACnB,oBAAoB,GACpB,2BAA2B,GAC3B,0BAA0B,GAC1B,2BAA2B,GAC3B,uBAAuB,GACvB,qBAAqB,GACrB,iBAAiB,GACjB,sBAAsB,GACtB,iBAAiB,CAAC"}
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2019 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 });
@@ -1,2 +0,0 @@
1
- export * from './Message.types';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/index.ts"],"names":[],"mappings":"AAmBA,cAAc,iBAAiB,CAAC"}
@@ -1,35 +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("./Message.types"), exports);
@@ -1,7 +0,0 @@
1
- import { Task } from '@wireapp/promise-queue';
2
- export declare function sendMessage<T>(sendingFunction: Task<T>): Promise<T>;
3
- export declare function getQueueLength(): number;
4
- export declare function isSendingMessage(): boolean;
5
- export declare function resumeMessageSending(): void;
6
- export declare function pauseMessageSending(): void;
7
- //# sourceMappingURL=messageSender.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"messageSender.d.ts","sourceRoot":"","sources":["../../../src/conversation/message/messageSender.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,IAAI,EAAe,MAAM,wBAAwB,CAAC;AAI1D,wBAAgB,WAAW,CAAC,CAAC,EAAE,eAAe,EAAE,IAAI,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAEnE;AAED,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,gBAAgB,IAAI,OAAO,CAE1C;AAED,wBAAgB,oBAAoB,IAAI,IAAI,CAE3C;AAED,wBAAgB,mBAAmB,IAAI,IAAI,CAE1C"}
@@ -1,43 +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.pauseMessageSending = exports.resumeMessageSending = exports.isSendingMessage = exports.getQueueLength = exports.sendMessage = void 0;
22
- const promise_queue_1 = require("@wireapp/promise-queue");
23
- const sendingQueue = new promise_queue_1.PromiseQueue({ name: 'message-sender', paused: true });
24
- function sendMessage(sendingFunction) {
25
- return sendingQueue.push(sendingFunction);
26
- }
27
- exports.sendMessage = sendMessage;
28
- function getQueueLength() {
29
- return sendingQueue.getLength();
30
- }
31
- exports.getQueueLength = getQueueLength;
32
- function isSendingMessage() {
33
- return sendingQueue.hasRunningTasks();
34
- }
35
- exports.isSendingMessage = isSendingMessage;
36
- function resumeMessageSending() {
37
- sendingQueue.pause(false);
38
- }
39
- exports.resumeMessageSending = resumeMessageSending;
40
- function pauseMessageSending() {
41
- sendingQueue.pause(true);
42
- }
43
- exports.pauseMessageSending = pauseMessageSending;
@@ -1,12 +0,0 @@
1
- export interface EncryptedAsset {
2
- cipherText: Uint8Array;
3
- keyBytes: Uint8Array;
4
- /** The SHA-256 sum of `cipherText` */
5
- sha256: Uint8Array;
6
- }
7
- export interface EncryptedAssetUploaded extends EncryptedAsset {
8
- key: string;
9
- domain?: string;
10
- token: string;
11
- }
12
- //# sourceMappingURL=EncryptedAsset.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"EncryptedAsset.d.ts","sourceRoot":"","sources":["../../../src/cryptography/AssetCryptography/EncryptedAsset.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,UAAU,CAAC;IACrB,sCAAsC;IACtC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,MAAM,WAAW,sBAAuB,SAAQ,cAAc;IAC5D,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;CACf"}
@@ -1,20 +0,0 @@
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 });
@@ -1,3 +0,0 @@
1
- import { Crypto } from './interfaces';
2
- export declare const crypto: Crypto;
3
- //# sourceMappingURL=crypto.browser.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crypto.browser.d.ts","sourceRoot":"","sources":["../../../src/cryptography/AssetCryptography/crypto.browser.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAIpC,eAAO,MAAM,MAAM,EAAE,MA+BpB,CAAC"}
@@ -1,45 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2021 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.crypto = void 0;
22
- const cryptoLib = window.crypto;
23
- exports.crypto = {
24
- async digest(cipherText) {
25
- const checksum = await cryptoLib.subtle.digest('SHA-256', cipherText);
26
- return new Uint8Array(checksum);
27
- },
28
- async decrypt(cipherText, keyBytes) {
29
- const key = await cryptoLib.subtle.importKey('raw', keyBytes, 'AES-CBC', false, ['decrypt']);
30
- const initializationVector = cipherText.slice(0, 16);
31
- const assetCipherText = cipherText.slice(16);
32
- const decipher = await cryptoLib.subtle.decrypt({ iv: initializationVector, name: 'AES-CBC' }, key, assetCipherText);
33
- return new Uint8Array(decipher);
34
- },
35
- getRandomValues(size) {
36
- return cryptoLib.getRandomValues(new Uint8Array(size));
37
- },
38
- async encrypt(plainText, keyBytes, initializationVector) {
39
- const key = await cryptoLib.subtle.importKey('raw', keyBytes, 'AES-CBC', true, ['encrypt']);
40
- return {
41
- key: new Uint8Array(await cryptoLib.subtle.exportKey('raw', key)),
42
- cipher: await cryptoLib.subtle.encrypt({ iv: initializationVector, name: 'AES-CBC' }, key, plainText),
43
- };
44
- },
45
- };
@@ -1,3 +0,0 @@
1
- import { Crypto } from './interfaces';
2
- export declare const crypto: Crypto;
3
- //# sourceMappingURL=crypto.node.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"crypto.node.d.ts","sourceRoot":"","sources":["../../../src/cryptography/AssetCryptography/crypto.node.ts"],"names":[],"mappings":"AAqBA,OAAO,EAAC,MAAM,EAAC,MAAM,cAAc,CAAC;AAEpC,eAAO,MAAM,MAAM,EAAE,MAoCpB,CAAC"}
@@ -1,71 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2021 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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
32
- Object.defineProperty(o, "default", { enumerable: true, value: v });
33
- }) : function(o, v) {
34
- o["default"] = v;
35
- });
36
- var __importStar = (this && this.__importStar) || function (mod) {
37
- if (mod && mod.__esModule) return mod;
38
- var result = {};
39
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
40
- __setModuleDefault(result, mod);
41
- return result;
42
- };
43
- Object.defineProperty(exports, "__esModule", { value: true });
44
- exports.crypto = void 0;
45
- const cryptoLib = __importStar(require("crypto"));
46
- exports.crypto = {
47
- async digest(cipherText) {
48
- return cryptoLib.createHash('SHA256').update(cipherText).digest();
49
- },
50
- async decrypt(cipherText, keyBytes) {
51
- const initializationVector = cipherText.slice(0, 16);
52
- const assetCipherText = cipherText.slice(16);
53
- const decipher = cryptoLib.createDecipheriv('AES-256-CBC', keyBytes, initializationVector);
54
- const decipherUpdated = decipher.update(assetCipherText);
55
- const decipherFinal = decipher.final();
56
- return Buffer.concat([decipherUpdated, decipherFinal]);
57
- },
58
- getRandomValues(size) {
59
- return cryptoLib.randomBytes(size);
60
- },
61
- async encrypt(plainText, keyBytes, initializationVector, algorithm) {
62
- const cipher = cryptoLib.createCipheriv(algorithm, keyBytes, initializationVector);
63
- const cipherUpdated = cipher.update(plainText);
64
- const cipherFinal = cipher.final();
65
- const cipherText = Buffer.concat([cipherUpdated, cipherFinal]);
66
- return {
67
- key: keyBytes,
68
- cipher: cipherText,
69
- };
70
- },
71
- };
@@ -1,9 +0,0 @@
1
- import { CipherOptions } from '@wireapp/api-client/lib/asset';
2
- import { EncryptedAsset } from './EncryptedAsset';
3
- interface EncryptOptions extends CipherOptions {
4
- plainText: Uint8Array;
5
- }
6
- export declare const decryptAsset: ({ cipherText, keyBytes, sha256: referenceSha256, }: EncryptedAsset) => Promise<Uint8Array>;
7
- export declare const encryptAsset: ({ plainText, algorithm }: EncryptOptions) => Promise<EncryptedAsset>;
8
- export {};
9
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cryptography/AssetCryptography/index.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAC,aAAa,EAAC,MAAM,+BAA+B,CAAC;AAG5D,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAYhD,UAAU,cAAe,SAAQ,aAAa;IAC5C,SAAS,EAAE,UAAU,CAAC;CACvB;AAED,eAAO,MAAM,YAAY,uDAItB,cAAc,KAAG,QAAQ,UAAU,CAQrC,CAAC;AAEF,eAAO,MAAM,YAAY,6BAAkD,cAAc,KAAG,QAAQ,cAAc,CAiBjH,CAAC"}
@@ -1,52 +0,0 @@
1
- "use strict";
2
- /*
3
- * Wire
4
- * Copyright (C) 2021 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.encryptAsset = exports.decryptAsset = void 0;
22
- const crypto_node_1 = require("./crypto.node");
23
- const isEqual = (a, b) => {
24
- const arrayA = new Uint32Array(a);
25
- const arrayB = new Uint32Array(b);
26
- const hasSameLength = arrayA.length === arrayB.length;
27
- const hasSameValues = arrayA.every((value, index) => value === arrayB[index]);
28
- return hasSameLength && hasSameValues;
29
- };
30
- const decryptAsset = async ({ cipherText, keyBytes, sha256: referenceSha256, }) => {
31
- const computedSha256 = await crypto_node_1.crypto.digest(cipherText);
32
- if (!isEqual(computedSha256, referenceSha256)) {
33
- throw new Error('Encrypted asset does not match its SHA-256 hash');
34
- }
35
- return crypto_node_1.crypto.decrypt(cipherText, keyBytes);
36
- };
37
- exports.decryptAsset = decryptAsset;
38
- const encryptAsset = async ({ plainText, algorithm = 'AES-256-CBC' }) => {
39
- const initializationVector = crypto_node_1.crypto.getRandomValues(16);
40
- const rawKeyBytes = crypto_node_1.crypto.getRandomValues(32);
41
- const { key, cipher } = await crypto_node_1.crypto.encrypt(plainText, rawKeyBytes, initializationVector, algorithm);
42
- const ivCipherText = new Uint8Array(cipher.byteLength + initializationVector.byteLength);
43
- ivCipherText.set(initializationVector, 0);
44
- ivCipherText.set(new Uint8Array(cipher), initializationVector.byteLength);
45
- const sha256 = await crypto_node_1.crypto.digest(ivCipherText);
46
- return {
47
- cipherText: ivCipherText,
48
- keyBytes: key,
49
- sha256,
50
- };
51
- };
52
- exports.encryptAsset = encryptAsset;
@@ -1,10 +0,0 @@
1
- export interface Crypto {
2
- digest(cipherText: Uint8Array): Promise<Uint8Array>;
3
- decrypt(cipherText: Uint8Array, keyBytes: Uint8Array): Promise<Uint8Array>;
4
- getRandomValues(size: number): Uint8Array;
5
- encrypt(plainText: Uint8Array, keyBytes: Uint8Array, initializationVector: Uint8Array, algorithm: string): Promise<{
6
- key: Uint8Array;
7
- cipher: Uint8Array | ArrayBuffer;
8
- }>;
9
- }
10
- //# sourceMappingURL=interfaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"interfaces.d.ts","sourceRoot":"","sources":["../../../src/cryptography/AssetCryptography/interfaces.ts"],"names":[],"mappings":"AAmBA,MAAM,WAAW,MAAM;IACrB,MAAM,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAEpD,OAAO,CAAC,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;IAE3E,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,CAAC;IAE1C,OAAO,CACL,SAAS,EAAE,UAAU,EACrB,QAAQ,EAAE,UAAU,EACpB,oBAAoB,EAAE,UAAU,EAChC,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAC,GAAG,EAAE,UAAU,CAAC;QAAC,MAAM,EAAE,UAAU,GAAG,WAAW,CAAA;KAAC,CAAC,CAAC;CACjE"}