@wireapp/core 17.30.0 → 17.31.3

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 (239) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/package.json +8 -8
  3. package/src/main/cryptography/GenericMessageMapper.d.ts +0 -1
  4. package/src/main/cryptography/GenericMessageMapper.js +23 -158
  5. package/src/main/Account.js.map +0 -1
  6. package/src/main/Account.test.browser.js +0 -114
  7. package/src/main/Account.test.node.d.ts +0 -1
  8. package/src/main/Account.test.node.js +0 -214
  9. package/src/main/Account.test.node.js.map +0 -1
  10. package/src/main/Account.test.node.ts +0 -236
  11. package/src/main/Account.ts +0 -401
  12. package/src/main/CoreError.js.map +0 -1
  13. package/src/main/CoreError.ts +0 -30
  14. package/src/main/auth/LoginSanitizer.js.map +0 -1
  15. package/src/main/auth/LoginSanitizer.test.node.d.ts +0 -1
  16. package/src/main/auth/LoginSanitizer.test.node.js +0 -56
  17. package/src/main/auth/LoginSanitizer.test.node.js.map +0 -1
  18. package/src/main/auth/LoginSanitizer.test.node.ts +0 -68
  19. package/src/main/auth/LoginSanitizer.ts +0 -44
  20. package/src/main/auth/index.js.map +0 -1
  21. package/src/main/auth/index.ts +0 -20
  22. package/src/main/broadcast/AvailabilityType.js.map +0 -1
  23. package/src/main/broadcast/AvailabilityType.ts +0 -22
  24. package/src/main/broadcast/BroadcastService.js.map +0 -1
  25. package/src/main/broadcast/BroadcastService.ts +0 -66
  26. package/src/main/broadcast/index.js.map +0 -1
  27. package/src/main/broadcast/index.ts +0 -21
  28. package/src/main/client/ClientBackendRepository.js.map +0 -1
  29. package/src/main/client/ClientBackendRepository.ts +0 -33
  30. package/src/main/client/ClientDatabaseRepository.js.map +0 -1
  31. package/src/main/client/ClientDatabaseRepository.ts +0 -130
  32. package/src/main/client/ClientInfo.js.map +0 -1
  33. package/src/main/client/ClientInfo.ts +0 -28
  34. package/src/main/client/ClientService.js.map +0 -1
  35. package/src/main/client/ClientService.ts +0 -116
  36. package/src/main/client/index.js.map +0 -1
  37. package/src/main/client/index.ts +0 -23
  38. package/src/main/connection/ConnectionService.js.map +0 -1
  39. package/src/main/connection/ConnectionService.ts +0 -49
  40. package/src/main/connection/index.js.map +0 -1
  41. package/src/main/connection/index.ts +0 -20
  42. package/src/main/conversation/AbortReason.js.map +0 -1
  43. package/src/main/conversation/AbortReason.ts +0 -22
  44. package/src/main/conversation/AssetService.js.map +0 -1
  45. package/src/main/conversation/AssetService.test.node.d.ts +0 -1
  46. package/src/main/conversation/AssetService.test.node.js +0 -61
  47. package/src/main/conversation/AssetService.test.node.js.map +0 -1
  48. package/src/main/conversation/AssetService.test.node.ts +0 -65
  49. package/src/main/conversation/AssetService.ts +0 -60
  50. package/src/main/conversation/AssetTransferState.js.map +0 -1
  51. package/src/main/conversation/AssetTransferState.ts +0 -23
  52. package/src/main/conversation/ClientActionType.js.map +0 -1
  53. package/src/main/conversation/ClientActionType.ts +0 -20
  54. package/src/main/conversation/ConversationMapper.js.map +0 -1
  55. package/src/main/conversation/ConversationMapper.test.node.d.ts +0 -1
  56. package/src/main/conversation/ConversationMapper.test.node.js +0 -111
  57. package/src/main/conversation/ConversationMapper.test.node.js.map +0 -1
  58. package/src/main/conversation/ConversationMapper.test.node.ts +0 -154
  59. package/src/main/conversation/ConversationMapper.ts +0 -56
  60. package/src/main/conversation/ConversationService.js.map +0 -1
  61. package/src/main/conversation/ConversationService.test.node.d.ts +0 -1
  62. package/src/main/conversation/ConversationService.test.node.js +0 -344
  63. package/src/main/conversation/ConversationService.test.node.js.map +0 -1
  64. package/src/main/conversation/ConversationService.test.node.ts +0 -416
  65. package/src/main/conversation/ConversationService.ts +0 -1024
  66. package/src/main/conversation/GenericMessageType.js.map +0 -1
  67. package/src/main/conversation/GenericMessageType.ts +0 -44
  68. package/src/main/conversation/MessageTimer.js.map +0 -1
  69. package/src/main/conversation/MessageTimer.test.node.d.ts +0 -1
  70. package/src/main/conversation/MessageTimer.test.node.js +0 -88
  71. package/src/main/conversation/MessageTimer.test.node.js.map +0 -1
  72. package/src/main/conversation/MessageTimer.test.node.ts +0 -103
  73. package/src/main/conversation/MessageTimer.ts +0 -56
  74. package/src/main/conversation/ReactionType.js.map +0 -1
  75. package/src/main/conversation/ReactionType.ts +0 -23
  76. package/src/main/conversation/content/AssetContent.js.map +0 -1
  77. package/src/main/conversation/content/AssetContent.ts +0 -71
  78. package/src/main/conversation/content/ButtonActionConfirmationContent.js.map +0 -1
  79. package/src/main/conversation/content/ButtonActionConfirmationContent.ts +0 -21
  80. package/src/main/conversation/content/ButtonActionContent.js.map +0 -1
  81. package/src/main/conversation/content/ButtonActionContent.ts +0 -21
  82. package/src/main/conversation/content/CallingContent.js.map +0 -1
  83. package/src/main/conversation/content/CallingContent.ts +0 -20
  84. package/src/main/conversation/content/ClearedContent.js.map +0 -1
  85. package/src/main/conversation/content/ClearedContent.ts +0 -21
  86. package/src/main/conversation/content/ClientActionContent.js.map +0 -1
  87. package/src/main/conversation/content/ClientActionContent.ts +0 -22
  88. package/src/main/conversation/content/ClientAddContent.js.map +0 -1
  89. package/src/main/conversation/content/ClientAddContent.ts +0 -24
  90. package/src/main/conversation/content/ClientRemoveContent.js.map +0 -1
  91. package/src/main/conversation/content/ClientRemoveContent.ts +0 -25
  92. package/src/main/conversation/content/CompositeContent.js.map +0 -1
  93. package/src/main/conversation/content/CompositeContent.ts +0 -21
  94. package/src/main/conversation/content/ConfirmationContent.js.map +0 -1
  95. package/src/main/conversation/content/ConfirmationContent.ts +0 -21
  96. package/src/main/conversation/content/ContentType.js.map +0 -1
  97. package/src/main/conversation/content/ContentType.ts +0 -112
  98. package/src/main/conversation/content/ConversationContent.js.map +0 -1
  99. package/src/main/conversation/content/ConversationContent.ts +0 -71
  100. package/src/main/conversation/content/DeletedContent.js.map +0 -1
  101. package/src/main/conversation/content/DeletedContent.ts +0 -21
  102. package/src/main/conversation/content/EditedTextContent.js.map +0 -1
  103. package/src/main/conversation/content/EditedTextContent.ts +0 -31
  104. package/src/main/conversation/content/FileContent.js.map +0 -1
  105. package/src/main/conversation/content/FileContent.ts +0 -32
  106. package/src/main/conversation/content/HiddenContent.js.map +0 -1
  107. package/src/main/conversation/content/HiddenContent.ts +0 -21
  108. package/src/main/conversation/content/ImageContent.js.map +0 -1
  109. package/src/main/conversation/content/ImageContent.ts +0 -25
  110. package/src/main/conversation/content/KnockContent.js.map +0 -1
  111. package/src/main/conversation/content/KnockContent.ts +0 -21
  112. package/src/main/conversation/content/LinkPreviewContent.js.map +0 -1
  113. package/src/main/conversation/content/LinkPreviewContent.ts +0 -32
  114. package/src/main/conversation/content/LocationContent.js.map +0 -1
  115. package/src/main/conversation/content/LocationContent.ts +0 -29
  116. package/src/main/conversation/content/MentionContent.js.map +0 -1
  117. package/src/main/conversation/content/MentionContent.ts +0 -21
  118. package/src/main/conversation/content/QuoteContent.js.map +0 -1
  119. package/src/main/conversation/content/QuoteContent.ts +0 -29
  120. package/src/main/conversation/content/ReactionContent.js.map +0 -1
  121. package/src/main/conversation/content/ReactionContent.ts +0 -27
  122. package/src/main/conversation/content/TextContent.js.map +0 -1
  123. package/src/main/conversation/content/TextContent.ts +0 -29
  124. package/src/main/conversation/content/TweetContent.js.map +0 -1
  125. package/src/main/conversation/content/TweetContent.ts +0 -21
  126. package/src/main/conversation/content/index.js.map +0 -1
  127. package/src/main/conversation/content/index.ts +0 -49
  128. package/src/main/conversation/index.js.map +0 -1
  129. package/src/main/conversation/index.ts +0 -28
  130. package/src/main/conversation/message/CompositeContentBuilder.js.map +0 -1
  131. package/src/main/conversation/message/CompositeContentBuilder.ts +0 -60
  132. package/src/main/conversation/message/Message.js.map +0 -1
  133. package/src/main/conversation/message/Message.ts +0 -24
  134. package/src/main/conversation/message/MessageBuilder.js.map +0 -1
  135. package/src/main/conversation/message/MessageBuilder.test.browser.js +0 -27
  136. package/src/main/conversation/message/MessageBuilder.ts +0 -488
  137. package/src/main/conversation/message/MessageService.js.map +0 -1
  138. package/src/main/conversation/message/MessageService.test.node.d.ts +0 -1
  139. package/src/main/conversation/message/MessageService.test.node.js +0 -308
  140. package/src/main/conversation/message/MessageService.test.node.js.map +0 -1
  141. package/src/main/conversation/message/MessageService.test.node.ts +0 -398
  142. package/src/main/conversation/message/MessageService.ts +0 -383
  143. package/src/main/conversation/message/MessageToProtoMapper.js.map +0 -1
  144. package/src/main/conversation/message/MessageToProtoMapper.ts +0 -114
  145. package/src/main/conversation/message/OtrMessage.js.map +0 -1
  146. package/src/main/conversation/message/OtrMessage.ts +0 -160
  147. package/src/main/conversation/message/PayloadBundle.js.map +0 -1
  148. package/src/main/conversation/message/PayloadBundle.ts +0 -101
  149. package/src/main/conversation/message/TeamMessage.js.map +0 -1
  150. package/src/main/conversation/message/TeamMessage.ts +0 -72
  151. package/src/main/conversation/message/TextContentBuilder.js.map +0 -1
  152. package/src/main/conversation/message/TextContentBuilder.ts +0 -88
  153. package/src/main/conversation/message/UserClientsUtil.js.map +0 -1
  154. package/src/main/conversation/message/UserClientsUtil.ts +0 -44
  155. package/src/main/conversation/message/UserClientsUtils.test.node.d.ts +0 -1
  156. package/src/main/conversation/message/UserClientsUtils.test.node.js +0 -42
  157. package/src/main/conversation/message/UserClientsUtils.test.node.js.map +0 -1
  158. package/src/main/conversation/message/UserClientsUtils.test.node.ts +0 -44
  159. package/src/main/conversation/message/UserMessage.js.map +0 -1
  160. package/src/main/conversation/message/UserMessage.ts +0 -95
  161. package/src/main/cryptography/AssetCryptography.browser.js.map +0 -1
  162. package/src/main/cryptography/AssetCryptography.browser.ts +0 -76
  163. package/src/main/cryptography/AssetCryptography.node.js.map +0 -1
  164. package/src/main/cryptography/AssetCryptography.node.ts +0 -85
  165. package/src/main/cryptography/CryptographyDatabaseRepository.js.map +0 -1
  166. package/src/main/cryptography/CryptographyDatabaseRepository.ts +0 -44
  167. package/src/main/cryptography/CryptographyService.js.map +0 -1
  168. package/src/main/cryptography/CryptographyService.test.browser.js +0 -195
  169. package/src/main/cryptography/CryptographyService.test.node.d.ts +0 -1
  170. package/src/main/cryptography/CryptographyService.test.node.js +0 -228
  171. package/src/main/cryptography/CryptographyService.test.node.js.map +0 -1
  172. package/src/main/cryptography/CryptographyService.test.node.ts +0 -246
  173. package/src/main/cryptography/CryptographyService.ts +0 -246
  174. package/src/main/cryptography/EncryptedAsset.js.map +0 -1
  175. package/src/main/cryptography/EncryptedAsset.ts +0 -30
  176. package/src/main/cryptography/GenericMessageMapper.js.map +0 -1
  177. package/src/main/cryptography/GenericMessageMapper.ts +0 -364
  178. package/src/main/cryptography/MessageHashService.js.map +0 -1
  179. package/src/main/cryptography/MessageHashService.test.browser.js +0 -176
  180. package/src/main/cryptography/MessageHashService.test.node.d.ts +0 -1
  181. package/src/main/cryptography/MessageHashService.test.node.js +0 -138
  182. package/src/main/cryptography/MessageHashService.test.node.js.map +0 -1
  183. package/src/main/cryptography/MessageHashService.test.node.ts +0 -176
  184. package/src/main/cryptography/MessageHashService.ts +0 -109
  185. package/src/main/cryptography/SessionPayloadBundle.js.map +0 -1
  186. package/src/main/cryptography/SessionPayloadBundle.ts +0 -23
  187. package/src/main/cryptography/index.js.map +0 -1
  188. package/src/main/cryptography/index.ts +0 -23
  189. package/src/main/giphy/GiphyService.js.map +0 -1
  190. package/src/main/giphy/GiphyService.ts +0 -37
  191. package/src/main/giphy/index.js.map +0 -1
  192. package/src/main/giphy/index.ts +0 -20
  193. package/src/main/index.js.map +0 -1
  194. package/src/main/index.test.browser.js +0 -22
  195. package/src/main/index.ts +0 -34
  196. package/src/main/notification/NotificationBackendRepository.js.map +0 -1
  197. package/src/main/notification/NotificationBackendRepository.ts +0 -33
  198. package/src/main/notification/NotificationDatabaseRepository.js.map +0 -1
  199. package/src/main/notification/NotificationDatabaseRepository.ts +0 -74
  200. package/src/main/notification/NotificationService.js.map +0 -1
  201. package/src/main/notification/NotificationService.test.browser.js +0 -179
  202. package/src/main/notification/NotificationService.test.node.d.ts +0 -1
  203. package/src/main/notification/NotificationService.test.node.js +0 -99
  204. package/src/main/notification/NotificationService.test.node.js.map +0 -1
  205. package/src/main/notification/NotificationService.test.node.ts +0 -124
  206. package/src/main/notification/NotificationService.ts +0 -260
  207. package/src/main/notification/index.js.map +0 -1
  208. package/src/main/notification/index.ts +0 -20
  209. package/src/main/self/SelfService.js.map +0 -1
  210. package/src/main/self/SelfService.ts +0 -59
  211. package/src/main/self/index.js.map +0 -1
  212. package/src/main/self/index.ts +0 -20
  213. package/src/main/team/TeamService.js.map +0 -1
  214. package/src/main/team/TeamService.ts +0 -68
  215. package/src/main/team/index.js.map +0 -1
  216. package/src/main/team/index.ts +0 -20
  217. package/src/main/test/CryptographyHelper.js.map +0 -1
  218. package/src/main/test/CryptographyHelper.ts +0 -57
  219. package/src/main/test/PayloadHelper.js.map +0 -1
  220. package/src/main/test/PayloadHelper.ts +0 -60
  221. package/src/main/user/UserMapper.js.map +0 -1
  222. package/src/main/user/UserMapper.test.node.d.ts +0 -1
  223. package/src/main/user/UserMapper.test.node.js +0 -55
  224. package/src/main/user/UserMapper.test.node.js.map +0 -1
  225. package/src/main/user/UserMapper.test.node.ts +0 -63
  226. package/src/main/user/UserMapper.ts +0 -92
  227. package/src/main/user/UserService.js.map +0 -1
  228. package/src/main/user/UserService.test.node.js +0 -141
  229. package/src/main/user/UserService.ts +0 -98
  230. package/src/main/user/index.js.map +0 -1
  231. package/src/main/user/index.ts +0 -20
  232. package/src/main/util/TypePredicateUtil.js.map +0 -1
  233. package/src/main/util/TypePredicateUtil.test.node.d.ts +0 -1
  234. package/src/main/util/TypePredicateUtil.test.node.js +0 -42
  235. package/src/main/util/TypePredicateUtil.test.node.js.map +0 -1
  236. package/src/main/util/TypePredicateUtil.test.node.ts +0 -44
  237. package/src/main/util/TypePredicateUtil.ts +0 -52
  238. package/src/main/util/index.js.map +0 -1
  239. package/src/main/util/index.ts +0 -20
@@ -1 +0,0 @@
1
- {"version":3,"file":"ContentType.js","sourceRoot":"","sources":["ContentType.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;AAwBH,SAAgB,qBAAqB,CAAC,OAA4B;IAChE,OAAO,CAAC,CAAE,OAAwB,CAAC,WAAW,CAAC;AACjD,CAAC;AAFD,sDAEC;AAED,SAAgB,cAAc,CAAC,OAA4B;IACzD,OAAO,CAAC,CAAC,CAAE,OAAwB,CAAC,QAAQ,IAAK,OAAwB,CAAC,OAAO,CAAC,CAAC;AACrF,CAAC;AAFD,wCAEC;AAED,SAAgB,gBAAgB,CAAC,OAA4B;IAC3D,OAAO,CAAC,CAAE,OAA0B,CAAC,gBAAgB,CAAC;AACxD,CAAC;AAFD,4CAEC;AAED,SAAgB,qBAAqB,CAAC,OAA4B;IAChE,OAAO,CAAC,CAAE,OAA+B,CAAC,YAAY,CAAC;AACzD,CAAC;AAFD,sDAEC;AAED,SAAgB,kBAAkB,CAAC,OAA4B;IAC7D,OAAO,OAAO,OAAO,KAAK,QAAQ,CAAC;AACrC,CAAC;AAFD,gDAEC;AAED,SAAgB,qBAAqB,CAAC,OAA4B;IAChE,OAAO,CAAC,CAAE,OAA+B,CAAC,cAAc,CAAC;AAC3D,CAAC;AAFD,sDAEC;AAED,SAAgB,YAAY,CAAC,OAA4B;IACvD,OAAO,CAAC,CAAE,OAAsB,CAAC,IAAI,IAAI,CAAC,CAAE,OAAsB,CAAC,EAAE,CAAC;AACxE,CAAC;AAFD,oCAEC;AAED,SAAgB,gBAAgB,CAAC,OAA4B;IAC3D,OAAO,CAAC,CAAE,OAA0B,CAAC,SAAS,IAAI,CAAE,OAAe,CAAC,IAAI,CAAC;AAC3E,CAAC;AAFD,4CAEC;AAED,SAAgB,mBAAmB,CAAC,OAA4B;IAC9D,OAAO,CAAC,CAAE,OAA6B,CAAC,IAAI,IAAI,CAAC,CAAE,OAA6B,CAAC,iBAAiB,CAAC;AACrG,CAAC;AAFD,kDAEC;AAED,SAAgB,uBAAuB,CAAC,OAA4B;IAClE,OAAO,CAAC,CAAE,OAAiC,CAAC,MAAM,CAAC;AACrD,CAAC;AAFD,0DAEC;AAED,SAAgB,kBAAkB,CAAC,OAA4B;IAC7D,OAAO,CAAC,CAAE,OAA4B,CAAC,KAAK,IAAI,CAAC,CAAE,OAA4B,CAAC,IAAI,CAAC;AACvF,CAAC;AAFD,gDAEC;AAED,SAAgB,0BAA0B,CAAC,OAA4B;IACrE,OAAO,CAAC,CAAE,OAAoC,CAAC,QAAQ,CAAC;AAC1D,CAAC;AAFD,gEAEC;AAED,SAAgB,eAAe,CAAC,OAA4B;IAC1D,OAAO,CAAC,CAAE,OAAyB,CAAC,cAAc,CAAC;AACrD,CAAC;AAFD,0CAEC;AAED,SAAgB,mBAAmB,CAAC,OAA4B;IAC9D,OAAO,CAAC,CAAE,OAA6B,CAAC,KAAK,IAAI,CAAC,CAAE,OAA6B,CAAC,KAAK,CAAC;AAC1F,CAAC;AAFD,kDAEC;AAED,SAAgB,cAAc,CAAC,OAA4B;IACzD,OAAO,CAAC,CAAE,OAAwB,CAAC,IAAI,IAAI,CAAC,CAAE,OAAwB,CAAC,IAAI,CAAC;AAC9E,CAAC;AAFD,wCAEC;AAED,SAAgB,iBAAiB,CAAC,OAA4B;IAC5D,OAAO,CAAC,CAAE,OAA2B,CAAC,QAAQ,IAAI,CAAC,CAAE,OAA2B,CAAC,SAAS,CAAC;AAC7F,CAAC;AAFD,8CAEC;AAED,SAAgB,iBAAiB,CAAC,OAA4B;IAC5D,OAAO,CAAC,CAAE,OAA2B,CAAC,IAAI,IAAI,CAAC,CAAE,OAA2B,CAAC,iBAAiB,CAAC;AACjG,CAAC;AAFD,8CAEC;AAED,SAAgB,aAAa,CAAC,OAA4B;IACxD,OAAO,CAAC,CAAE,OAAuB,CAAC,IAAI,CAAC;AACzC,CAAC;AAFD,sCAEC"}
@@ -1,112 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {Connection} from '@wireapp/api-client/src/connection/';
21
-
22
- import type {ClientActionType} from '../';
23
- import type {
24
- AssetContent,
25
- ClearedContent,
26
- ClientActionContent,
27
- ConfirmationContent,
28
- ConversationContent,
29
- DeletedContent,
30
- EditedTextContent,
31
- FileAssetAbortContent,
32
- FileAssetContent,
33
- FileAssetMetaDataContent,
34
- HiddenContent,
35
- ImageAssetContent,
36
- ImageContent,
37
- LocationContent,
38
- ReactionContent,
39
- TextContent,
40
- } from '../content/';
41
-
42
- export function isAbortedAssetContent(content: ConversationContent): content is AssetContent {
43
- return !!(content as AssetContent).abortReason;
44
- }
45
-
46
- export function isAssetContent(content: ConversationContent): content is AssetContent {
47
- return !!((content as AssetContent).uploaded || (content as AssetContent).preview);
48
- }
49
-
50
- export function isClearedContent(content: ConversationContent): content is ClearedContent {
51
- return !!(content as ClearedContent).clearedTimestamp;
52
- }
53
-
54
- export function isClientActionContent(content: ConversationContent): content is ClientActionContent {
55
- return !!(content as ClientActionContent).clientAction;
56
- }
57
-
58
- export function isClientActionType(content: ConversationContent): content is ClientActionType {
59
- return typeof content === 'number';
60
- }
61
-
62
- export function isConfirmationContent(content: ConversationContent): content is ConfirmationContent {
63
- return !!(content as ConfirmationContent).firstMessageId;
64
- }
65
-
66
- export function isConnection(content: ConversationContent): content is Connection {
67
- return !!(content as Connection).from && !!(content as Connection).to;
68
- }
69
-
70
- export function isDeletedContent(content: ConversationContent): content is DeletedContent {
71
- return !!(content as DeletedContent).messageId && !(content as any).text;
72
- }
73
-
74
- export function isEditedTextContent(content: ConversationContent): content is EditedTextContent {
75
- return !!(content as EditedTextContent).text && !!(content as EditedTextContent).originalMessageId;
76
- }
77
-
78
- export function isFileAssetAbortContent(content: ConversationContent): content is FileAssetAbortContent {
79
- return !!(content as FileAssetAbortContent).reason;
80
- }
81
-
82
- export function isFileAssetContent(content: ConversationContent): content is FileAssetContent {
83
- return !!(content as FileAssetContent).asset && !!(content as FileAssetContent).file;
84
- }
85
-
86
- export function isFileAssetMetaDataContent(content: ConversationContent): content is FileAssetMetaDataContent {
87
- return !!(content as FileAssetMetaDataContent).metaData;
88
- }
89
-
90
- export function isHiddenContent(content: ConversationContent): content is HiddenContent {
91
- return !!(content as HiddenContent).conversationId;
92
- }
93
-
94
- export function isImageAssetContent(content: ConversationContent): content is ImageAssetContent {
95
- return !!(content as ImageAssetContent).asset && !!(content as ImageAssetContent).image;
96
- }
97
-
98
- export function isImageContent(content: ConversationContent): content is ImageContent {
99
- return !!(content as ImageContent).data && !!(content as ImageContent).type;
100
- }
101
-
102
- export function isLocationContent(content: ConversationContent): content is LocationContent {
103
- return !!(content as LocationContent).latitude && !!(content as LocationContent).longitude;
104
- }
105
-
106
- export function isReactionContent(content: ConversationContent): content is ReactionContent {
107
- return !!(content as ReactionContent).type && !!(content as ReactionContent).originalMessageId;
108
- }
109
-
110
- export function isTextContent(content: ConversationContent): content is TextContent {
111
- return !!(content as TextContent).text;
112
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"ConversationContent.js","sourceRoot":"","sources":["ConversationContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,71 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {ClientActionType} from '../';
21
- import type {
22
- AssetContent,
23
- ButtonActionContent,
24
- ButtonActionConfirmationContent,
25
- CallingContent,
26
- ClearedContent,
27
- ClientActionContent,
28
- ClientAddContent,
29
- ClientRemoveContent,
30
- CompositeContent,
31
- ConfirmationContent,
32
- ConnectionContent,
33
- DeletedContent,
34
- EditedTextContent,
35
- FileAssetAbortContent,
36
- FileAssetContent,
37
- FileAssetMetaDataContent,
38
- HiddenContent,
39
- ImageAssetContent,
40
- ImageContent,
41
- KnockContent,
42
- LocationContent,
43
- ReactionContent,
44
- TextContent,
45
- } from './';
46
-
47
- export type ConversationContent =
48
- | AssetContent
49
- | ButtonActionContent
50
- | ButtonActionConfirmationContent
51
- | CallingContent
52
- | ClearedContent
53
- | ClientActionContent
54
- | ClientActionType
55
- | ClientAddContent
56
- | ClientRemoveContent
57
- | CompositeContent
58
- | ConfirmationContent
59
- | ConnectionContent
60
- | DeletedContent
61
- | EditedTextContent
62
- | FileAssetAbortContent
63
- | FileAssetContent
64
- | FileAssetMetaDataContent
65
- | HiddenContent
66
- | ImageAssetContent
67
- | ImageContent
68
- | KnockContent
69
- | LocationContent
70
- | ReactionContent
71
- | TextContent;
@@ -1 +0,0 @@
1
- {"version":3,"file":"DeletedContent.js","sourceRoot":"","sources":["DeletedContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,21 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {IMessageDelete} from '@wireapp/protocol-messaging';
21
- export {IMessageDelete as DeletedContent};
@@ -1 +0,0 @@
1
- {"version":3,"file":"EditedTextContent.js","sourceRoot":"","sources":["EditedTextContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,31 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {QuoteContent, TextContent} from '../content/';
21
-
22
- export interface EditedTextContent extends TextContent {
23
- originalMessageId: string;
24
- /**
25
- * While this field exists in the Protobuf spec, it should be
26
- * ignored on the receiver side in an edited message.
27
- *
28
- * See https://github.com/wireapp/generic-message-proto/blob/v1.22.1/proto/messages.proto#L54
29
- */
30
- quote?: QuoteContent;
31
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"FileContent.js","sourceRoot":"","sources":["FileContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,32 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {AudioMetaData, VideoMetaData} from './AssetContent';
21
-
22
- export interface FileContent {
23
- data: Buffer;
24
- }
25
-
26
- export interface FileMetaDataContent {
27
- audio?: AudioMetaData;
28
- length: number;
29
- name: string;
30
- type: string;
31
- video?: VideoMetaData;
32
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"HiddenContent.js","sourceRoot":"","sources":["HiddenContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,21 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {IMessageHide} from '@wireapp/protocol-messaging';
21
- export {IMessageHide as HiddenContent};
@@ -1 +0,0 @@
1
- {"version":3,"file":"ImageContent.js","sourceRoot":"","sources":["ImageContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,25 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- export interface ImageContent {
21
- data: Buffer;
22
- height: number;
23
- type: string;
24
- width: number;
25
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"KnockContent.js","sourceRoot":"","sources":["KnockContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,21 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {IKnock} from '@wireapp/protocol-messaging';
21
- export {IKnock as KnockContent};
@@ -1 +0,0 @@
1
- {"version":3,"file":"LinkPreviewContent.js","sourceRoot":"","sources":["LinkPreviewContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,32 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {ILinkPreview} from '@wireapp/protocol-messaging';
21
-
22
- import type {ImageAssetContent, ImageContent, LegalHoldStatus} from '../content/';
23
-
24
- export interface LinkPreviewContent extends Omit<ILinkPreview, 'image'> {
25
- expectsReadConfirmation?: boolean;
26
- image?: ImageContent;
27
- legalHoldStatus?: LegalHoldStatus;
28
- }
29
-
30
- export interface LinkPreviewUploadedContent extends LinkPreviewContent {
31
- imageUploaded?: ImageAssetContent;
32
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"LocationContent.js","sourceRoot":"","sources":["LocationContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,29 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {LegalHoldStatus} from './';
21
-
22
- export interface LocationContent {
23
- expectsReadConfirmation?: boolean;
24
- latitude: number;
25
- legalHoldStatus?: LegalHoldStatus;
26
- longitude: number;
27
- name?: string;
28
- zoom?: number;
29
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"MentionContent.js","sourceRoot":"","sources":["MentionContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,21 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {IMention} from '@wireapp/protocol-messaging';
21
- export {IMention as MentionContent};
@@ -1 +0,0 @@
1
- {"version":3,"file":"QuoteContent.js","sourceRoot":"","sources":["QuoteContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,29 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {IQuote} from '@wireapp/protocol-messaging';
21
-
22
- import type {AssetContent, LocationContent, TextContent} from '../content/';
23
-
24
- export {IQuote as QuoteContent};
25
-
26
- export interface QuoteMessageContent {
27
- content: AssetContent | LocationContent | TextContent;
28
- quotedMessageId: string;
29
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"ReactionContent.js","sourceRoot":"","sources":["ReactionContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,27 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {LegalHoldStatus} from '.';
21
- import type {ReactionType} from '../';
22
-
23
- export interface ReactionContent {
24
- legalHoldStatus?: LegalHoldStatus;
25
- originalMessageId: string;
26
- type: ReactionType;
27
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"TextContent.js","sourceRoot":"","sources":["TextContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,29 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {LegalHoldStatus, LinkPreviewUploadedContent, MentionContent, QuoteContent} from '../content/';
21
-
22
- export interface TextContent {
23
- expectsReadConfirmation?: boolean;
24
- legalHoldStatus?: LegalHoldStatus;
25
- linkPreviews?: LinkPreviewUploadedContent[];
26
- mentions?: MentionContent[];
27
- quote?: QuoteContent;
28
- text: string;
29
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"TweetContent.js","sourceRoot":"","sources":["TweetContent.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG"}
@@ -1,21 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- import type {ITweet} from '@wireapp/protocol-messaging';
21
- export {ITweet as TweetContent};
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,kEAA4D;AAApD,qHAAA,eAAe,OAAA;AAGvB,2DAA6C;AACrC,kCAAW;AAEnB,iDAA+B;AAC/B,wDAAsC;AACtC,oEAAkD;AAClD,mDAAiC;AACjC,mDAAiC;AACjC,wDAAsC;AACtC,qDAAmC;AACnC,wDAAsC;AACtC,qDAAmC;AACnC,wDAAsC;AACtC,wDAAsC;AACtC,mDAAiC;AACjC,sDAAoC;AACpC,gDAA8B;AAC9B,kDAAgC;AAChC,iDAA+B;AAC/B,iDAA+B;AAC/B,uDAAqC;AACrC,oDAAkC;AAClC,mDAAiC;AACjC,iDAA+B;AAC/B,oDAAkC;AAClC,gDAA8B;AAC9B,iDAA+B"}
@@ -1,49 +0,0 @@
1
- /*
2
- * Wire
3
- * Copyright (C) 2018 Wire Swiss GmbH
4
- *
5
- * This program is free software: you can redistribute it and/or modify
6
- * it under the terms of the GNU General Public License as published by
7
- * the Free Software Foundation, either version 3 of the License, or
8
- * (at your option) any later version.
9
- *
10
- * This program is distributed in the hope that it will be useful,
11
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- * GNU General Public License for more details.
14
- *
15
- * You should have received a copy of the GNU General Public License
16
- * along with this program. If not, see http://www.gnu.org/licenses/.
17
- *
18
- */
19
-
20
- export {LegalHoldStatus} from '@wireapp/protocol-messaging';
21
- export {Connection as ConnectionContent} from '@wireapp/api-client/src/connection/';
22
-
23
- import * as ContentType from './ContentType';
24
- export {ContentType};
25
-
26
- export * from './AssetContent';
27
- export * from './ButtonActionContent';
28
- export * from './ButtonActionConfirmationContent';
29
- export * from './CallingContent';
30
- export * from './ClearedContent';
31
- export * from './ClientActionContent';
32
- export * from './ClientAddContent';
33
- export * from './ClientRemoveContent';
34
- export * from './CompositeContent';
35
- export * from './ConfirmationContent';
36
- export * from './ConversationContent';
37
- export * from './DeletedContent';
38
- export * from './EditedTextContent';
39
- export * from './FileContent';
40
- export * from './HiddenContent';
41
- export * from './ImageContent';
42
- export * from './KnockContent';
43
- export * from './LinkPreviewContent';
44
- export * from './LocationContent';
45
- export * from './MentionContent';
46
- export * from './QuoteContent';
47
- export * from './ReactionContent';
48
- export * from './TextContent';
49
- export * from './TweetContent';
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;GAiBG;;;;;;;;;;;;AAEH,gDAA8B;AAC9B,iDAA+B;AAC/B,uDAAqC;AACrC,qDAAmC;AACnC,wDAAsC;AACtC,uDAAqC;AACrC,iDAA+B;AAC/B,0DAAwC;AACxC,iDAA+B"}