@wireapp/wire-apps-js-sdk 0.0.1-alpha

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 (639) hide show
  1. package/LICENSE +674 -0
  2. package/README.md +141 -0
  3. package/build/WireAppSdk.d.ts +31 -0
  4. package/build/WireAppSdk.d.ts.map +1 -0
  5. package/build/WireAppSdk.js +159 -0
  6. package/build/WireAppSdk.js.map +1 -0
  7. package/build/api/AssetsApiClient.d.ts +12 -0
  8. package/build/api/AssetsApiClient.d.ts.map +1 -0
  9. package/build/api/AssetsApiClient.js +67 -0
  10. package/build/api/AssetsApiClient.js.map +1 -0
  11. package/build/api/AssetsTransferService.d.ts +12 -0
  12. package/build/api/AssetsTransferService.d.ts.map +1 -0
  13. package/build/api/AssetsTransferService.js +80 -0
  14. package/build/api/AssetsTransferService.js.map +1 -0
  15. package/build/api/ClientsApiClient.d.ts +13 -0
  16. package/build/api/ClientsApiClient.d.ts.map +1 -0
  17. package/build/api/ClientsApiClient.js +59 -0
  18. package/build/api/ClientsApiClient.js.map +1 -0
  19. package/build/api/ClientsService.d.ts +10 -0
  20. package/build/api/ClientsService.d.ts.map +1 -0
  21. package/build/api/ClientsService.js +45 -0
  22. package/build/api/ClientsService.js.map +1 -0
  23. package/build/api/ConversationService.d.ts +83 -0
  24. package/build/api/ConversationService.d.ts.map +1 -0
  25. package/build/api/ConversationService.js +534 -0
  26. package/build/api/ConversationService.js.map +1 -0
  27. package/build/api/ConversationsApiClient.d.ts +23 -0
  28. package/build/api/ConversationsApiClient.d.ts.map +1 -0
  29. package/build/api/ConversationsApiClient.js +113 -0
  30. package/build/api/ConversationsApiClient.js.map +1 -0
  31. package/build/api/FeatureConfigsApiClient.d.ts +9 -0
  32. package/build/api/FeatureConfigsApiClient.d.ts.map +1 -0
  33. package/build/api/FeatureConfigsApiClient.js +43 -0
  34. package/build/api/FeatureConfigsApiClient.js.map +1 -0
  35. package/build/api/FeatureConfigsService.d.ts +8 -0
  36. package/build/api/FeatureConfigsService.d.ts.map +1 -0
  37. package/build/api/FeatureConfigsService.js +45 -0
  38. package/build/api/FeatureConfigsService.js.map +1 -0
  39. package/build/api/MlsApiClient.d.ts +23 -0
  40. package/build/api/MlsApiClient.d.ts.map +1 -0
  41. package/build/api/MlsApiClient.js +77 -0
  42. package/build/api/MlsApiClient.js.map +1 -0
  43. package/build/api/MlsService.d.ts +17 -0
  44. package/build/api/MlsService.d.ts.map +1 -0
  45. package/build/api/MlsService.js +87 -0
  46. package/build/api/MlsService.js.map +1 -0
  47. package/build/api/NotificationsApiClient.d.ts +17 -0
  48. package/build/api/NotificationsApiClient.d.ts.map +1 -0
  49. package/build/api/NotificationsApiClient.js +60 -0
  50. package/build/api/NotificationsApiClient.js.map +1 -0
  51. package/build/api/OneToOneConversationsApiClient.d.ts +11 -0
  52. package/build/api/OneToOneConversationsApiClient.d.ts.map +1 -0
  53. package/build/api/OneToOneConversationsApiClient.js +45 -0
  54. package/build/api/OneToOneConversationsApiClient.js.map +1 -0
  55. package/build/api/SearchApiClient.d.ts +9 -0
  56. package/build/api/SearchApiClient.d.ts.map +1 -0
  57. package/build/api/SearchApiClient.js +61 -0
  58. package/build/api/SearchApiClient.js.map +1 -0
  59. package/build/api/TeamsApiClient.d.ts +11 -0
  60. package/build/api/TeamsApiClient.d.ts.map +1 -0
  61. package/build/api/TeamsApiClient.js +47 -0
  62. package/build/api/TeamsApiClient.js.map +1 -0
  63. package/build/api/UserService.d.ts +28 -0
  64. package/build/api/UserService.d.ts.map +1 -0
  65. package/build/api/UserService.js +90 -0
  66. package/build/api/UserService.js.map +1 -0
  67. package/build/api/UsersApiClient.d.ts +12 -0
  68. package/build/api/UsersApiClient.d.ts.map +1 -0
  69. package/build/api/UsersApiClient.js +63 -0
  70. package/build/api/UsersApiClient.js.map +1 -0
  71. package/build/api/model/AddMembersToConversationResult.d.ts +6 -0
  72. package/build/api/model/AddMembersToConversationResult.d.ts.map +1 -0
  73. package/build/api/model/AddMembersToConversationResult.js +17 -0
  74. package/build/api/model/AddMembersToConversationResult.js.map +1 -0
  75. package/build/api/model/ConversationIdsPaginationConfig.d.ts +5 -0
  76. package/build/api/model/ConversationIdsPaginationConfig.d.ts.map +1 -0
  77. package/build/api/model/ConversationIdsPaginationConfig.js +17 -0
  78. package/build/api/model/ConversationIdsPaginationConfig.js.map +1 -0
  79. package/build/api/model/ConversationMemberOtherResponse.d.ts +7 -0
  80. package/build/api/model/ConversationMemberOtherResponse.d.ts.map +1 -0
  81. package/build/api/model/ConversationMemberOtherResponse.js +17 -0
  82. package/build/api/model/ConversationMemberOtherResponse.js.map +1 -0
  83. package/build/api/model/ConversationMemberSelfResponse.d.ts +7 -0
  84. package/build/api/model/ConversationMemberSelfResponse.d.ts.map +1 -0
  85. package/build/api/model/ConversationMemberSelfResponse.js +17 -0
  86. package/build/api/model/ConversationMemberSelfResponse.js.map +1 -0
  87. package/build/api/model/ConversationMembersResponse.d.ts +7 -0
  88. package/build/api/model/ConversationMembersResponse.d.ts.map +1 -0
  89. package/build/api/model/ConversationMembersResponse.js +17 -0
  90. package/build/api/model/ConversationMembersResponse.js.map +1 -0
  91. package/build/api/model/ConversationTeamInfo.d.ts +5 -0
  92. package/build/api/model/ConversationTeamInfo.d.ts.map +1 -0
  93. package/build/api/model/ConversationTeamInfo.js +17 -0
  94. package/build/api/model/ConversationTeamInfo.js.map +1 -0
  95. package/build/api/model/RemoveMembersFromConversationResult.d.ts +5 -0
  96. package/build/api/model/RemoveMembersFromConversationResult.d.ts.map +1 -0
  97. package/build/api/model/RemoveMembersFromConversationResult.js +17 -0
  98. package/build/api/model/RemoveMembersFromConversationResult.js.map +1 -0
  99. package/build/api/model/UserClientResponse.d.ts +4 -0
  100. package/build/api/model/UserClientResponse.d.ts.map +1 -0
  101. package/build/api/model/UserClientResponse.js +17 -0
  102. package/build/api/model/UserClientResponse.js.map +1 -0
  103. package/build/api/model/UserResponse.d.ts +12 -0
  104. package/build/api/model/UserResponse.d.ts.map +1 -0
  105. package/build/api/model/UserResponse.js +17 -0
  106. package/build/api/model/UserResponse.js.map +1 -0
  107. package/build/api/model/asset/AssetUploadData.d.ts +5 -0
  108. package/build/api/model/asset/AssetUploadData.d.ts.map +1 -0
  109. package/build/api/model/asset/AssetUploadData.js +17 -0
  110. package/build/api/model/asset/AssetUploadData.js.map +1 -0
  111. package/build/api/model/asset/AssetUploadResponse.d.ts +7 -0
  112. package/build/api/model/asset/AssetUploadResponse.d.ts.map +1 -0
  113. package/build/api/model/asset/AssetUploadResponse.js +17 -0
  114. package/build/api/model/asset/AssetUploadResponse.js.map +1 -0
  115. package/build/api/request/CapabilitiesRequest.d.ts +4 -0
  116. package/build/api/request/CapabilitiesRequest.d.ts.map +1 -0
  117. package/build/api/request/CapabilitiesRequest.js +20 -0
  118. package/build/api/request/CapabilitiesRequest.js.map +1 -0
  119. package/build/api/request/ClientUpdateRequest.d.ts +5 -0
  120. package/build/api/request/ClientUpdateRequest.d.ts.map +1 -0
  121. package/build/api/request/ClientUpdateRequest.js +17 -0
  122. package/build/api/request/ClientUpdateRequest.js.map +1 -0
  123. package/build/api/request/ConversationIdsRequest.d.ts +5 -0
  124. package/build/api/request/ConversationIdsRequest.d.ts.map +1 -0
  125. package/build/api/request/ConversationIdsRequest.js +17 -0
  126. package/build/api/request/ConversationIdsRequest.js.map +1 -0
  127. package/build/api/request/CreateConversationRequest.d.ts +30 -0
  128. package/build/api/request/CreateConversationRequest.d.ts.map +1 -0
  129. package/build/api/request/CreateConversationRequest.js +57 -0
  130. package/build/api/request/CreateConversationRequest.js.map +1 -0
  131. package/build/api/request/MlsKeyPackagesRequest.d.ts +4 -0
  132. package/build/api/request/MlsKeyPackagesRequest.d.ts.map +1 -0
  133. package/build/api/request/MlsKeyPackagesRequest.js +17 -0
  134. package/build/api/request/MlsKeyPackagesRequest.js.map +1 -0
  135. package/build/api/request/PreKeyRequest.d.ts +6 -0
  136. package/build/api/request/PreKeyRequest.d.ts.map +1 -0
  137. package/build/api/request/PreKeyRequest.js +24 -0
  138. package/build/api/request/PreKeyRequest.js.map +1 -0
  139. package/build/api/request/RegisterClientRequest.d.ts +14 -0
  140. package/build/api/request/RegisterClientRequest.d.ts.map +1 -0
  141. package/build/api/request/RegisterClientRequest.js +36 -0
  142. package/build/api/request/RegisterClientRequest.js.map +1 -0
  143. package/build/api/response/AccessResponse.d.ts +7 -0
  144. package/build/api/response/AccessResponse.d.ts.map +1 -0
  145. package/build/api/response/AccessResponse.js +17 -0
  146. package/build/api/response/AccessResponse.js.map +1 -0
  147. package/build/api/response/ClaimedKeyPackageList.d.ts +14 -0
  148. package/build/api/response/ClaimedKeyPackageList.d.ts.map +1 -0
  149. package/build/api/response/ClaimedKeyPackageList.js +17 -0
  150. package/build/api/response/ClaimedKeyPackageList.js.map +1 -0
  151. package/build/api/response/ConversationIdsResponse.d.ts +7 -0
  152. package/build/api/response/ConversationIdsResponse.d.ts.map +1 -0
  153. package/build/api/response/ConversationIdsResponse.js +17 -0
  154. package/build/api/response/ConversationIdsResponse.js.map +1 -0
  155. package/build/api/response/ConversationResponse.d.ts +16 -0
  156. package/build/api/response/ConversationResponse.d.ts.map +1 -0
  157. package/build/api/response/ConversationResponse.js +17 -0
  158. package/build/api/response/ConversationResponse.js.map +1 -0
  159. package/build/api/response/ConversationsResponse.d.ts +8 -0
  160. package/build/api/response/ConversationsResponse.d.ts.map +1 -0
  161. package/build/api/response/ConversationsResponse.js +17 -0
  162. package/build/api/response/ConversationsResponse.js.map +1 -0
  163. package/build/api/response/EventResponse.d.ts +7 -0
  164. package/build/api/response/EventResponse.d.ts.map +1 -0
  165. package/build/api/response/EventResponse.js +17 -0
  166. package/build/api/response/EventResponse.js.map +1 -0
  167. package/build/api/response/FeatureConfigsResponse.d.ts +19 -0
  168. package/build/api/response/FeatureConfigsResponse.d.ts.map +1 -0
  169. package/build/api/response/FeatureConfigsResponse.js +17 -0
  170. package/build/api/response/FeatureConfigsResponse.js.map +1 -0
  171. package/build/api/response/MlsPublicKeysResponse.d.ts +7 -0
  172. package/build/api/response/MlsPublicKeysResponse.d.ts.map +1 -0
  173. package/build/api/response/MlsPublicKeysResponse.js +42 -0
  174. package/build/api/response/MlsPublicKeysResponse.js.map +1 -0
  175. package/build/api/response/NotificationsResponse.d.ts +7 -0
  176. package/build/api/response/NotificationsResponse.d.ts.map +1 -0
  177. package/build/api/response/NotificationsResponse.js +17 -0
  178. package/build/api/response/NotificationsResponse.js.map +1 -0
  179. package/build/api/response/OneToOneConversationResponse.d.ts +7 -0
  180. package/build/api/response/OneToOneConversationResponse.d.ts.map +1 -0
  181. package/build/api/response/OneToOneConversationResponse.js +17 -0
  182. package/build/api/response/OneToOneConversationResponse.js.map +1 -0
  183. package/build/api/response/RegisterClientResponse.d.ts +4 -0
  184. package/build/api/response/RegisterClientResponse.d.ts.map +1 -0
  185. package/build/api/response/RegisterClientResponse.js +17 -0
  186. package/build/api/response/RegisterClientResponse.js.map +1 -0
  187. package/build/api/response/SearchContactsResponse.d.ts +15 -0
  188. package/build/api/response/SearchContactsResponse.d.ts.map +1 -0
  189. package/build/api/response/SearchContactsResponse.js +17 -0
  190. package/build/api/response/SearchContactsResponse.js.map +1 -0
  191. package/build/core/CoreCryptoClient.d.ts +48 -0
  192. package/build/core/CoreCryptoClient.d.ts.map +1 -0
  193. package/build/core/CoreCryptoClient.js +219 -0
  194. package/build/core/CoreCryptoClient.js.map +1 -0
  195. package/build/core/CoreCryptoMlsTransport.d.ts +19 -0
  196. package/build/core/CoreCryptoMlsTransport.d.ts.map +1 -0
  197. package/build/core/CoreCryptoMlsTransport.js +64 -0
  198. package/build/core/CoreCryptoMlsTransport.js.map +1 -0
  199. package/build/core/CoreCryptoService.d.ts +59 -0
  200. package/build/core/CoreCryptoService.d.ts.map +1 -0
  201. package/build/core/CoreCryptoService.js +233 -0
  202. package/build/core/CoreCryptoService.js.map +1 -0
  203. package/build/core/HttpClient.d.ts +47 -0
  204. package/build/core/HttpClient.d.ts.map +1 -0
  205. package/build/core/HttpClient.js +258 -0
  206. package/build/core/HttpClient.js.map +1 -0
  207. package/build/core/HttpRetryHelper.d.ts +16 -0
  208. package/build/core/HttpRetryHelper.d.ts.map +1 -0
  209. package/build/core/HttpRetryHelper.js +49 -0
  210. package/build/core/HttpRetryHelper.js.map +1 -0
  211. package/build/core/HttpRetryPolicy.d.ts +7 -0
  212. package/build/core/HttpRetryPolicy.d.ts.map +1 -0
  213. package/build/core/HttpRetryPolicy.js +29 -0
  214. package/build/core/HttpRetryPolicy.js.map +1 -0
  215. package/build/core/WebSocketClient.d.ts +37 -0
  216. package/build/core/WebSocketClient.d.ts.map +1 -0
  217. package/build/core/WebSocketClient.js +244 -0
  218. package/build/core/WebSocketClient.js.map +1 -0
  219. package/build/core/WireApplicationManager.d.ts +39 -0
  220. package/build/core/WireApplicationManager.d.ts.map +1 -0
  221. package/build/core/WireApplicationManager.js +142 -0
  222. package/build/core/WireApplicationManager.js.map +1 -0
  223. package/build/core/WireEventsHandler.d.ts +33 -0
  224. package/build/core/WireEventsHandler.d.ts.map +1 -0
  225. package/build/core/WireEventsHandler.js +78 -0
  226. package/build/core/WireEventsHandler.js.map +1 -0
  227. package/build/core/event/DeleteConversationEventProcessor.d.ts +13 -0
  228. package/build/core/event/DeleteConversationEventProcessor.d.ts.map +1 -0
  229. package/build/core/event/DeleteConversationEventProcessor.js +58 -0
  230. package/build/core/event/DeleteConversationEventProcessor.js.map +1 -0
  231. package/build/core/event/EventProcessor.d.ts +6 -0
  232. package/build/core/event/EventProcessor.d.ts.map +1 -0
  233. package/build/core/event/EventProcessor.js +17 -0
  234. package/build/core/event/EventProcessor.js.map +1 -0
  235. package/build/core/event/EventRouter.d.ts +10 -0
  236. package/build/core/event/EventRouter.d.ts.map +1 -0
  237. package/build/core/event/EventRouter.js +58 -0
  238. package/build/core/event/EventRouter.js.map +1 -0
  239. package/build/core/event/MemberJoinEventProcessor.d.ts +13 -0
  240. package/build/core/event/MemberJoinEventProcessor.d.ts.map +1 -0
  241. package/build/core/event/MemberJoinEventProcessor.js +63 -0
  242. package/build/core/event/MemberJoinEventProcessor.js.map +1 -0
  243. package/build/core/event/MemberLeaveEventProcessor.d.ts +13 -0
  244. package/build/core/event/MemberLeaveEventProcessor.d.ts.map +1 -0
  245. package/build/core/event/MemberLeaveEventProcessor.js +58 -0
  246. package/build/core/event/MemberLeaveEventProcessor.js.map +1 -0
  247. package/build/core/event/MemberUpdateEventProcessor.d.ts +11 -0
  248. package/build/core/event/MemberUpdateEventProcessor.d.ts.map +1 -0
  249. package/build/core/event/MemberUpdateEventProcessor.js +50 -0
  250. package/build/core/event/MemberUpdateEventProcessor.js.map +1 -0
  251. package/build/core/event/MlsMessageEventProcessor.d.ts +18 -0
  252. package/build/core/event/MlsMessageEventProcessor.d.ts.map +1 -0
  253. package/build/core/event/MlsMessageEventProcessor.js +134 -0
  254. package/build/core/event/MlsMessageEventProcessor.js.map +1 -0
  255. package/build/core/event/MlsResetEventProcessor.d.ts +11 -0
  256. package/build/core/event/MlsResetEventProcessor.d.ts.map +1 -0
  257. package/build/core/event/MlsResetEventProcessor.js +48 -0
  258. package/build/core/event/MlsResetEventProcessor.js.map +1 -0
  259. package/build/core/event/MlsWelcomeEventProcessor.d.ts +18 -0
  260. package/build/core/event/MlsWelcomeEventProcessor.d.ts.map +1 -0
  261. package/build/core/event/MlsWelcomeEventProcessor.js +77 -0
  262. package/build/core/event/MlsWelcomeEventProcessor.js.map +1 -0
  263. package/build/core/event/NewConversationEventProcessor.d.ts +11 -0
  264. package/build/core/event/NewConversationEventProcessor.d.ts.map +1 -0
  265. package/build/core/event/NewConversationEventProcessor.js +49 -0
  266. package/build/core/event/NewConversationEventProcessor.js.map +1 -0
  267. package/build/core/event/processors.index.d.ts +9 -0
  268. package/build/core/event/processors.index.d.ts.map +1 -0
  269. package/build/core/event/processors.index.js +24 -0
  270. package/build/core/event/processors.index.js.map +1 -0
  271. package/build/db/AppPropertiesRepository.d.ts +16 -0
  272. package/build/db/AppPropertiesRepository.d.ts.map +1 -0
  273. package/build/db/AppPropertiesRepository.js +64 -0
  274. package/build/db/AppPropertiesRepository.js.map +1 -0
  275. package/build/db/ConversationMemberRepository.d.ts +23 -0
  276. package/build/db/ConversationMemberRepository.d.ts.map +1 -0
  277. package/build/db/ConversationMemberRepository.js +125 -0
  278. package/build/db/ConversationMemberRepository.js.map +1 -0
  279. package/build/db/ConversationRepository.d.ts +17 -0
  280. package/build/db/ConversationRepository.d.ts.map +1 -0
  281. package/build/db/ConversationRepository.js +100 -0
  282. package/build/db/ConversationRepository.js.map +1 -0
  283. package/build/db/DatabaseService.d.ts +12 -0
  284. package/build/db/DatabaseService.d.ts.map +1 -0
  285. package/build/db/DatabaseService.js +73 -0
  286. package/build/db/DatabaseService.js.map +1 -0
  287. package/build/db/migrations/0000_pink_lord_tyger.sql +27 -0
  288. package/build/db/migrations/0001_steady_selene.sql +16 -0
  289. package/build/db/migrations/meta/0000_snapshot.json +194 -0
  290. package/build/db/migrations/meta/0001_snapshot.json +197 -0
  291. package/build/db/migrations/meta/_journal.json +20 -0
  292. package/build/db/model/AppEntity.d.ts +5 -0
  293. package/build/db/model/AppEntity.d.ts.map +1 -0
  294. package/build/db/model/AppEntity.js +17 -0
  295. package/build/db/model/AppEntity.js.map +1 -0
  296. package/build/db/model/ConversationEntity.d.ts +11 -0
  297. package/build/db/model/ConversationEntity.d.ts.map +1 -0
  298. package/build/db/model/ConversationEntity.js +17 -0
  299. package/build/db/model/ConversationEntity.js.map +1 -0
  300. package/build/db/model/ConversationMemberEntity.d.ts +9 -0
  301. package/build/db/model/ConversationMemberEntity.d.ts.map +1 -0
  302. package/build/db/model/ConversationMemberEntity.js +17 -0
  303. package/build/db/model/ConversationMemberEntity.js.map +1 -0
  304. package/build/db/relations.d.ts +7 -0
  305. package/build/db/relations.d.ts.map +1 -0
  306. package/build/db/relations.js +12 -0
  307. package/build/db/relations.js.map +1 -0
  308. package/build/db/schema.d.ts +324 -0
  309. package/build/db/schema.d.ts.map +1 -0
  310. package/build/db/schema.js +34 -0
  311. package/build/db/schema.js.map +1 -0
  312. package/build/generated/messages.d.ts +5517 -0
  313. package/build/generated/messages.d.ts.map +1 -0
  314. package/build/generated/messages.js +14470 -0
  315. package/build/generated/messages.js.map +1 -0
  316. package/build/generated/package.json +3 -0
  317. package/build/index.d.ts +14 -0
  318. package/build/index.d.ts.map +1 -0
  319. package/build/index.js +34 -0
  320. package/build/index.js.map +1 -0
  321. package/build/mappers/PreKeyMapper.d.ts +4 -0
  322. package/build/mappers/PreKeyMapper.d.ts.map +1 -0
  323. package/build/mappers/PreKeyMapper.js +22 -0
  324. package/build/mappers/PreKeyMapper.js.map +1 -0
  325. package/build/mappers/conversation/ConversationMapper.d.ts +6 -0
  326. package/build/mappers/conversation/ConversationMapper.d.ts.map +1 -0
  327. package/build/mappers/conversation/ConversationMapper.js +27 -0
  328. package/build/mappers/conversation/ConversationMapper.js.map +1 -0
  329. package/build/mappers/conversation/ConversationMemberMapper.d.ts +6 -0
  330. package/build/mappers/conversation/ConversationMemberMapper.d.ts.map +1 -0
  331. package/build/mappers/conversation/ConversationMemberMapper.js +25 -0
  332. package/build/mappers/conversation/ConversationMemberMapper.js.map +1 -0
  333. package/build/mappers/protobuf/EncryptionAlgorithmMapper.d.ts +7 -0
  334. package/build/mappers/protobuf/EncryptionAlgorithmMapper.d.ts.map +1 -0
  335. package/build/mappers/protobuf/EncryptionAlgorithmMapper.js +35 -0
  336. package/build/mappers/protobuf/EncryptionAlgorithmMapper.js.map +1 -0
  337. package/build/mappers/protobuf/MessageContentEncoder.d.ts +9 -0
  338. package/build/mappers/protobuf/MessageContentEncoder.d.ts.map +1 -0
  339. package/build/mappers/protobuf/MessageContentEncoder.js +85 -0
  340. package/build/mappers/protobuf/MessageContentEncoder.js.map +1 -0
  341. package/build/mappers/protobuf/MessageLinkPreviewMapper.d.ts +7 -0
  342. package/build/mappers/protobuf/MessageLinkPreviewMapper.d.ts.map +1 -0
  343. package/build/mappers/protobuf/MessageLinkPreviewMapper.js +79 -0
  344. package/build/mappers/protobuf/MessageLinkPreviewMapper.js.map +1 -0
  345. package/build/mappers/protobuf/MessageMentionMapper.d.ts +7 -0
  346. package/build/mappers/protobuf/MessageMentionMapper.d.ts.map +1 -0
  347. package/build/mappers/protobuf/MessageMentionMapper.js +39 -0
  348. package/build/mappers/protobuf/MessageMentionMapper.js.map +1 -0
  349. package/build/mappers/protobuf/ProtobufDeserializer.d.ts +12 -0
  350. package/build/mappers/protobuf/ProtobufDeserializer.d.ts.map +1 -0
  351. package/build/mappers/protobuf/ProtobufDeserializer.js +343 -0
  352. package/build/mappers/protobuf/ProtobufDeserializer.js.map +1 -0
  353. package/build/mappers/protobuf/ProtobufSerializer.d.ts +15 -0
  354. package/build/mappers/protobuf/ProtobufSerializer.d.ts.map +1 -0
  355. package/build/mappers/protobuf/ProtobufSerializer.js +331 -0
  356. package/build/mappers/protobuf/ProtobufSerializer.js.map +1 -0
  357. package/build/model/Asset.d.ts +9 -0
  358. package/build/model/Asset.d.ts.map +1 -0
  359. package/build/model/Asset.js +17 -0
  360. package/build/model/Asset.js.map +1 -0
  361. package/build/model/ClaimedKeyPackagesResult.d.ts +7 -0
  362. package/build/model/ClaimedKeyPackagesResult.d.ts.map +1 -0
  363. package/build/model/ClaimedKeyPackagesResult.js +17 -0
  364. package/build/model/ClaimedKeyPackagesResult.js.map +1 -0
  365. package/build/model/CryptoClientId.d.ts +8 -0
  366. package/build/model/CryptoClientId.d.ts.map +1 -0
  367. package/build/model/CryptoClientId.js +29 -0
  368. package/build/model/CryptoClientId.js.map +1 -0
  369. package/build/model/CryptoProtocol.d.ts +6 -0
  370. package/build/model/CryptoProtocol.d.ts.map +1 -0
  371. package/build/model/CryptoProtocol.js +22 -0
  372. package/build/model/CryptoProtocol.js.map +1 -0
  373. package/build/model/EventContentDTO.d.ts +84 -0
  374. package/build/model/EventContentDTO.d.ts.map +1 -0
  375. package/build/model/EventContentDTO.js +17 -0
  376. package/build/model/EventContentDTO.js.map +1 -0
  377. package/build/model/MlsPublicKeys.d.ts +7 -0
  378. package/build/model/MlsPublicKeys.d.ts.map +1 -0
  379. package/build/model/MlsPublicKeys.js +17 -0
  380. package/build/model/MlsPublicKeys.js.map +1 -0
  381. package/build/model/PreKeyCrypto.d.ts +6 -0
  382. package/build/model/PreKeyCrypto.d.ts.map +1 -0
  383. package/build/model/PreKeyCrypto.js +24 -0
  384. package/build/model/PreKeyCrypto.js.map +1 -0
  385. package/build/model/QualifiedId.d.ts +17 -0
  386. package/build/model/QualifiedId.d.ts.map +1 -0
  387. package/build/model/QualifiedId.js +43 -0
  388. package/build/model/QualifiedId.js.map +1 -0
  389. package/build/model/TeamId.d.ts +6 -0
  390. package/build/model/TeamId.d.ts.map +1 -0
  391. package/build/model/TeamId.js +26 -0
  392. package/build/model/TeamId.js.map +1 -0
  393. package/build/model/WireMessage.d.ts +336 -0
  394. package/build/model/WireMessage.d.ts.map +1 -0
  395. package/build/model/WireMessage.js +270 -0
  396. package/build/model/WireMessage.js.map +1 -0
  397. package/build/model/WireUser.d.ts +12 -0
  398. package/build/model/WireUser.d.ts.map +1 -0
  399. package/build/model/WireUser.js +32 -0
  400. package/build/model/WireUser.js.map +1 -0
  401. package/build/model/conversation/ChannelAddPermissionType.d.ts +7 -0
  402. package/build/model/conversation/ChannelAddPermissionType.d.ts.map +1 -0
  403. package/build/model/conversation/ChannelAddPermissionType.js +23 -0
  404. package/build/model/conversation/ChannelAddPermissionType.js.map +1 -0
  405. package/build/model/conversation/Conversation.d.ts +9 -0
  406. package/build/model/conversation/Conversation.d.ts.map +1 -0
  407. package/build/model/conversation/Conversation.js +17 -0
  408. package/build/model/conversation/Conversation.js.map +1 -0
  409. package/build/model/conversation/ConversationAccess.d.ts +8 -0
  410. package/build/model/conversation/ConversationAccess.d.ts.map +1 -0
  411. package/build/model/conversation/ConversationAccess.js +24 -0
  412. package/build/model/conversation/ConversationAccess.js.map +1 -0
  413. package/build/model/conversation/ConversationAccessRole.d.ts +8 -0
  414. package/build/model/conversation/ConversationAccessRole.d.ts.map +1 -0
  415. package/build/model/conversation/ConversationAccessRole.js +24 -0
  416. package/build/model/conversation/ConversationAccessRole.js.map +1 -0
  417. package/build/model/conversation/ConversationMember.d.ts +7 -0
  418. package/build/model/conversation/ConversationMember.d.ts.map +1 -0
  419. package/build/model/conversation/ConversationMember.js +17 -0
  420. package/build/model/conversation/ConversationMember.js.map +1 -0
  421. package/build/model/conversation/ConversationRole.d.ts +6 -0
  422. package/build/model/conversation/ConversationRole.d.ts.map +1 -0
  423. package/build/model/conversation/ConversationRole.js +29 -0
  424. package/build/model/conversation/ConversationRole.js.map +1 -0
  425. package/build/model/conversation/ConversationType.d.ts +6 -0
  426. package/build/model/conversation/ConversationType.d.ts.map +1 -0
  427. package/build/model/conversation/ConversationType.js +22 -0
  428. package/build/model/conversation/ConversationType.js.map +1 -0
  429. package/build/model/conversation/GroupConversationType.d.ts +5 -0
  430. package/build/model/conversation/GroupConversationType.d.ts.map +1 -0
  431. package/build/model/conversation/GroupConversationType.js +21 -0
  432. package/build/model/conversation/GroupConversationType.js.map +1 -0
  433. package/build/model/conversation/ReceiptMode.d.ts +5 -0
  434. package/build/model/conversation/ReceiptMode.d.ts.map +1 -0
  435. package/build/model/conversation/ReceiptMode.js +21 -0
  436. package/build/model/conversation/ReceiptMode.js.map +1 -0
  437. package/build/model/exception/CoreCryptoMlsException.d.ts +5 -0
  438. package/build/model/exception/CoreCryptoMlsException.d.ts.map +1 -0
  439. package/build/model/exception/CoreCryptoMlsException.js +25 -0
  440. package/build/model/exception/CoreCryptoMlsException.js.map +1 -0
  441. package/build/model/exception/MlsException.d.ts +5 -0
  442. package/build/model/exception/MlsException.d.ts.map +1 -0
  443. package/build/model/exception/MlsException.js +25 -0
  444. package/build/model/exception/MlsException.js.map +1 -0
  445. package/build/model/exception/WireApiError.d.ts +6 -0
  446. package/build/model/exception/WireApiError.d.ts.map +1 -0
  447. package/build/model/exception/WireApiError.js +17 -0
  448. package/build/model/exception/WireApiError.js.map +1 -0
  449. package/build/model/exception/WireApiException.d.ts +8 -0
  450. package/build/model/exception/WireApiException.d.ts.map +1 -0
  451. package/build/model/exception/WireApiException.js +29 -0
  452. package/build/model/exception/WireApiException.js.map +1 -0
  453. package/build/model/protobuf/MessageEncryptionAlgorithm.d.ts +5 -0
  454. package/build/model/protobuf/MessageEncryptionAlgorithm.d.ts.map +1 -0
  455. package/build/model/protobuf/MessageEncryptionAlgorithm.js +21 -0
  456. package/build/model/protobuf/MessageEncryptionAlgorithm.js.map +1 -0
  457. package/build/service/AppProperties.d.ts +25 -0
  458. package/build/service/AppProperties.d.ts.map +1 -0
  459. package/build/service/AppProperties.js +105 -0
  460. package/build/service/AppProperties.js.map +1 -0
  461. package/build/service/MlsFallbackStrategy.d.ts +11 -0
  462. package/build/service/MlsFallbackStrategy.d.ts.map +1 -0
  463. package/build/service/MlsFallbackStrategy.js +57 -0
  464. package/build/service/MlsFallbackStrategy.js.map +1 -0
  465. package/build/service/NotificationsService.d.ts +14 -0
  466. package/build/service/NotificationsService.d.ts.map +1 -0
  467. package/build/service/NotificationsService.js +71 -0
  468. package/build/service/NotificationsService.js.map +1 -0
  469. package/build/utils/AESUtils.d.ts +11 -0
  470. package/build/utils/AESUtils.d.ts.map +1 -0
  471. package/build/utils/AESUtils.js +47 -0
  472. package/build/utils/AESUtils.js.map +1 -0
  473. package/build/utils/BufferUtils.d.ts +2 -0
  474. package/build/utils/BufferUtils.d.ts.map +1 -0
  475. package/build/utils/BufferUtils.js +17 -0
  476. package/build/utils/BufferUtils.js.map +1 -0
  477. package/build/utils/DependencyInjectionTokens.d.ts +8 -0
  478. package/build/utils/DependencyInjectionTokens.d.ts.map +1 -0
  479. package/build/utils/DependencyInjectionTokens.js +23 -0
  480. package/build/utils/DependencyInjectionTokens.js.map +1 -0
  481. package/build/utils/HashUtils.d.ts +5 -0
  482. package/build/utils/HashUtils.d.ts.map +1 -0
  483. package/build/utils/HashUtils.js +25 -0
  484. package/build/utils/HashUtils.js.map +1 -0
  485. package/build/utils/ObfuscateUtil.d.ts +3 -0
  486. package/build/utils/ObfuscateUtil.d.ts.map +1 -0
  487. package/build/utils/ObfuscateUtil.js +30 -0
  488. package/build/utils/ObfuscateUtil.js.map +1 -0
  489. package/build/utils/StoragePaths.d.ts +4 -0
  490. package/build/utils/StoragePaths.d.ts.map +1 -0
  491. package/build/utils/StoragePaths.js +22 -0
  492. package/build/utils/StoragePaths.js.map +1 -0
  493. package/build/utils/logger/ConsoleLogger.d.ts +12 -0
  494. package/build/utils/logger/ConsoleLogger.d.ts.map +1 -0
  495. package/build/utils/logger/ConsoleLogger.js +31 -0
  496. package/build/utils/logger/ConsoleLogger.js.map +1 -0
  497. package/build/utils/logger/LogLevel.d.ts +7 -0
  498. package/build/utils/logger/LogLevel.d.ts.map +1 -0
  499. package/build/utils/logger/LogLevel.js +8 -0
  500. package/build/utils/logger/LogLevel.js.map +1 -0
  501. package/build/utils/logger/Logger.d.ts +27 -0
  502. package/build/utils/logger/Logger.d.ts.map +1 -0
  503. package/build/utils/logger/Logger.js +2 -0
  504. package/build/utils/logger/Logger.js.map +1 -0
  505. package/build/utils/logger/LoggerFactory.d.ts +7 -0
  506. package/build/utils/logger/LoggerFactory.d.ts.map +1 -0
  507. package/build/utils/logger/LoggerFactory.js +19 -0
  508. package/build/utils/logger/LoggerFactory.js.map +1 -0
  509. package/package.json +105 -0
  510. package/src/WireAppSdk.ts +224 -0
  511. package/src/api/AssetsApiClient.ts +77 -0
  512. package/src/api/AssetsTransferService.ts +96 -0
  513. package/src/api/ClientsApiClient.ts +71 -0
  514. package/src/api/ClientsService.ts +40 -0
  515. package/src/api/ConversationService.ts +654 -0
  516. package/src/api/ConversationsApiClient.ts +141 -0
  517. package/src/api/FeatureConfigsApiClient.ts +31 -0
  518. package/src/api/FeatureConfigsService.ts +33 -0
  519. package/src/api/MlsApiClient.ts +81 -0
  520. package/src/api/MlsService.ts +99 -0
  521. package/src/api/NotificationsApiClient.ts +58 -0
  522. package/src/api/OneToOneConversationsApiClient.ts +39 -0
  523. package/src/api/SearchApiClient.ts +58 -0
  524. package/src/api/TeamsApiClient.ts +40 -0
  525. package/src/api/UserService.ts +111 -0
  526. package/src/api/UsersApiClient.ts +61 -0
  527. package/src/api/model/AddMembersToConversationResult.ts +22 -0
  528. package/src/api/model/ConversationIdsPaginationConfig.ts +20 -0
  529. package/src/api/model/ConversationMemberOtherResponse.ts +23 -0
  530. package/src/api/model/ConversationMemberSelfResponse.ts +23 -0
  531. package/src/api/model/ConversationMembersResponse.ts +23 -0
  532. package/src/api/model/ConversationTeamInfo.ts +20 -0
  533. package/src/api/model/RemoveMembersFromConversationResult.ts +21 -0
  534. package/src/api/model/UserClientResponse.ts +19 -0
  535. package/src/api/model/UserResponse.ts +28 -0
  536. package/src/api/model/asset/AssetUploadData.ts +20 -0
  537. package/src/api/model/asset/AssetUploadResponse.ts +22 -0
  538. package/src/api/request/CapabilitiesRequest.ts +19 -0
  539. package/src/api/request/ClientUpdateRequest.ts +21 -0
  540. package/src/api/request/ConversationIdsRequest.ts +21 -0
  541. package/src/api/request/CreateConversationRequest.ts +86 -0
  542. package/src/api/request/MlsKeyPackagesRequest.ts +19 -0
  543. package/src/api/request/PreKeyRequest.ts +28 -0
  544. package/src/api/request/RegisterClientRequest.ts +46 -0
  545. package/src/api/response/AccessResponse.ts +22 -0
  546. package/src/api/response/ClaimedKeyPackageList.ts +30 -0
  547. package/src/api/response/ConversationIdsResponse.ts +23 -0
  548. package/src/api/response/ConversationResponse.ts +32 -0
  549. package/src/api/response/ConversationsResponse.ts +24 -0
  550. package/src/api/response/EventResponse.ts +23 -0
  551. package/src/api/response/FeatureConfigsResponse.ts +37 -0
  552. package/src/api/response/MlsPublicKeysResponse.ts +58 -0
  553. package/src/api/response/NotificationsResponse.ts +23 -0
  554. package/src/api/response/OneToOneConversationResponse.ts +24 -0
  555. package/src/api/response/RegisterClientResponse.ts +19 -0
  556. package/src/api/response/SearchContactsResponse.ts +32 -0
  557. package/src/core/CoreCryptoClient.ts +361 -0
  558. package/src/core/CoreCryptoMlsTransport.ts +58 -0
  559. package/src/core/CoreCryptoService.ts +276 -0
  560. package/src/core/HttpClient.ts +363 -0
  561. package/src/core/HttpRetryHelper.ts +57 -0
  562. package/src/core/HttpRetryPolicy.ts +40 -0
  563. package/src/core/WebSocketClient.ts +245 -0
  564. package/src/core/WireApplicationManager.ts +162 -0
  565. package/src/core/WireEventsHandler.ts +118 -0
  566. package/src/core/event/DeleteConversationEventProcessor.ts +47 -0
  567. package/src/core/event/EventProcessor.ts +22 -0
  568. package/src/core/event/EventRouter.ts +54 -0
  569. package/src/core/event/MemberJoinEventProcessor.ts +54 -0
  570. package/src/core/event/MemberLeaveEventProcessor.ts +47 -0
  571. package/src/core/event/MemberUpdateEventProcessor.ts +44 -0
  572. package/src/core/event/MlsMessageEventProcessor.ts +124 -0
  573. package/src/core/event/MlsResetEventProcessor.ts +42 -0
  574. package/src/core/event/MlsWelcomeEventProcessor.ts +68 -0
  575. package/src/core/event/NewConversationEventProcessor.ts +42 -0
  576. package/src/core/event/processors.index.ts +24 -0
  577. package/src/db/AppPropertiesRepository.ts +62 -0
  578. package/src/db/ConversationMemberRepository.ts +163 -0
  579. package/src/db/ConversationRepository.ts +119 -0
  580. package/src/db/DatabaseService.ts +69 -0
  581. package/src/db/migrations/0000_pink_lord_tyger.sql +27 -0
  582. package/src/db/migrations/0001_steady_selene.sql +16 -0
  583. package/src/db/migrations/meta/0000_snapshot.json +194 -0
  584. package/src/db/migrations/meta/0001_snapshot.json +197 -0
  585. package/src/db/migrations/meta/_journal.json +20 -0
  586. package/src/db/model/AppEntity.ts +20 -0
  587. package/src/db/model/ConversationEntity.ts +27 -0
  588. package/src/db/model/ConversationMemberEntity.ts +24 -0
  589. package/src/db/relations.ts +13 -0
  590. package/src/db/schema.ts +38 -0
  591. package/src/index.ts +67 -0
  592. package/src/mappers/PreKeyMapper.ts +25 -0
  593. package/src/mappers/conversation/ConversationMapper.ts +30 -0
  594. package/src/mappers/conversation/ConversationMemberMapper.ts +30 -0
  595. package/src/mappers/protobuf/EncryptionAlgorithmMapper.ts +39 -0
  596. package/src/mappers/protobuf/MessageContentEncoder.ts +121 -0
  597. package/src/mappers/protobuf/MessageLinkPreviewMapper.ts +89 -0
  598. package/src/mappers/protobuf/MessageMentionMapper.ts +43 -0
  599. package/src/mappers/protobuf/ProtobufDeserializer.ts +470 -0
  600. package/src/mappers/protobuf/ProtobufSerializer.ts +449 -0
  601. package/src/model/Asset.ts +26 -0
  602. package/src/model/ClaimedKeyPackagesResult.ts +23 -0
  603. package/src/model/CryptoClientId.ts +40 -0
  604. package/src/model/CryptoProtocol.ts +21 -0
  605. package/src/model/EventContentDTO.ts +123 -0
  606. package/src/model/MlsPublicKeys.ts +22 -0
  607. package/src/model/PreKeyCrypto.ts +25 -0
  608. package/src/model/QualifiedId.ts +45 -0
  609. package/src/model/TeamId.ts +25 -0
  610. package/src/model/WireMessage.ts +632 -0
  611. package/src/model/WireUser.ts +30 -0
  612. package/src/model/conversation/ChannelAddPermissionType.ts +23 -0
  613. package/src/model/conversation/Conversation.ts +25 -0
  614. package/src/model/conversation/ConversationAccess.ts +24 -0
  615. package/src/model/conversation/ConversationAccessRole.ts +24 -0
  616. package/src/model/conversation/ConversationMember.ts +23 -0
  617. package/src/model/conversation/ConversationRole.ts +30 -0
  618. package/src/model/conversation/ConversationType.ts +21 -0
  619. package/src/model/conversation/GroupConversationType.ts +21 -0
  620. package/src/model/conversation/ReceiptMode.ts +21 -0
  621. package/src/model/exception/CoreCryptoMlsException.ts +26 -0
  622. package/src/model/exception/MlsException.ts +26 -0
  623. package/src/model/exception/WireApiError.ts +21 -0
  624. package/src/model/exception/WireApiException.ts +33 -0
  625. package/src/model/protobuf/MessageEncryptionAlgorithm.ts +17 -0
  626. package/src/proto/messages.proto +383 -0
  627. package/src/service/AppProperties.ts +110 -0
  628. package/src/service/MlsFallbackStrategy.ts +52 -0
  629. package/src/service/NotificationsService.ts +65 -0
  630. package/src/utils/AESUtils.ts +62 -0
  631. package/src/utils/BufferUtils.ts +18 -0
  632. package/src/utils/DependencyInjectionTokens.ts +25 -0
  633. package/src/utils/HashUtils.ts +27 -0
  634. package/src/utils/ObfuscateUtil.ts +31 -0
  635. package/src/utils/StoragePaths.ts +23 -0
  636. package/src/utils/logger/ConsoleLogger.ts +35 -0
  637. package/src/utils/logger/LogLevel.ts +6 -0
  638. package/src/utils/logger/Logger.ts +29 -0
  639. package/src/utils/logger/LoggerFactory.ts +27 -0
@@ -0,0 +1,270 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2025 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ import { QualifiedId } from "./QualifiedId.js";
17
+ import { MessageEncryptionAlgorithm } from "./protobuf/MessageEncryptionAlgorithm.js";
18
+ import Long from "long";
19
+ import { MessageContentEncoder } from "../mappers/protobuf/MessageContentEncoder.js";
20
+ const appUserId = process.env['WIRE_SDK_USER_ID'];
21
+ const appUserDomain = process.env['WIRE_SDK_USER_DOMAIN'];
22
+ const appQualifiedId = new QualifiedId(appUserId, appUserDomain);
23
+ export const WireMessageType = {
24
+ UNKNOWN: 'unknown',
25
+ IGNORED: 'ignored',
26
+ TEXT: 'text',
27
+ TEXT_EDITED: 'text-edited',
28
+ ASSET: 'asset',
29
+ COMPOSITE_BUTTON: 'composite_button',
30
+ COMPOSITE_BUTTON_ACTION: 'composite_button_action',
31
+ COMPOSITE_BUTTON_ACTION_CONFIRMATION: 'composite_button_action_confirmation',
32
+ COMPOSITE: 'composite',
33
+ COMPOSITE_EDITED: 'composite-edited',
34
+ PING: 'ping',
35
+ LOCATION: 'location',
36
+ DELETED: 'deleted',
37
+ RECEIPT: 'receipt',
38
+ REACTION: 'reaction'
39
+ };
40
+ export class Unknown {
41
+ get id() {
42
+ throw new Error("Unknown message, no ID");
43
+ }
44
+ get conversationId() {
45
+ throw new Error("Unknown message, no conversation");
46
+ }
47
+ get sender() {
48
+ throw new Error("Unknown message, no sender");
49
+ }
50
+ get timestamp() {
51
+ throw new Error("Unknown message, no timestamp");
52
+ }
53
+ type = WireMessageType.UNKNOWN;
54
+ }
55
+ export class Ignored {
56
+ get id() {
57
+ throw new Error("Ignored message, no ID");
58
+ }
59
+ get conversationId() {
60
+ throw new Error("Ignored message, no conversation");
61
+ }
62
+ get sender() {
63
+ throw new Error("Ignored message, no sender");
64
+ }
65
+ get timestamp() {
66
+ throw new Error("Ignored message, no timestamp");
67
+ }
68
+ type = WireMessageType.IGNORED;
69
+ }
70
+ function isReplyable(message) {
71
+ return message.type === WireMessageType.TEXT
72
+ || message.type === WireMessageType.ASSET
73
+ || message.type === WireMessageType.LOCATION;
74
+ }
75
+ export const TextMessage = {
76
+ create(params) {
77
+ return {
78
+ type: WireMessageType.TEXT,
79
+ id: params.messageId ?? crypto.randomUUID(),
80
+ conversationId: params.conversationId,
81
+ sender: params.senderId ?? appQualifiedId,
82
+ text: params.text,
83
+ mentions: params.mentions ?? [],
84
+ linkPreviews: params.linkPreviews ?? [],
85
+ timestamp: params.timestamp ?? new Date(),
86
+ expiresAfterMillis: params.expiresAfterMillis ?? null
87
+ };
88
+ },
89
+ createReply(params) {
90
+ if (!isReplyable(params.originalMessage)) {
91
+ throw new Error(`Cannot reply to unreplyable WireMessage type: ${params.originalMessage.type}`);
92
+ }
93
+ if (params.originalMessage.expiresAfterMillis) {
94
+ throw new Error(`Cannot reply to an expiring message: ${params.originalMessage.type}`);
95
+ }
96
+ return {
97
+ type: WireMessageType.TEXT,
98
+ id: params.messageId ?? crypto.randomUUID(),
99
+ conversationId: params.originalMessage.conversationId,
100
+ sender: params.senderId ?? appQualifiedId,
101
+ text: params.text,
102
+ mentions: params.mentions ?? [],
103
+ quotedMessageId: params.originalMessage.id,
104
+ quotedMessageSha256: MessageContentEncoder.encodeMessageContent(params.originalMessage)?.sha256Digest ?? null,
105
+ linkPreviews: params.linkPreviews ?? [],
106
+ timestamp: params.timestamp ?? new Date(),
107
+ expiresAfterMillis: params.expiresAfterMillis ?? null
108
+ };
109
+ }
110
+ };
111
+ export const TextEditedMessage = {
112
+ create(params) {
113
+ return {
114
+ type: WireMessageType.TEXT_EDITED,
115
+ id: params.messageId ?? crypto.randomUUID(),
116
+ conversationId: params.conversationId,
117
+ sender: params.senderId ?? appQualifiedId,
118
+ replacingMessageId: params.replacingMessageId,
119
+ text: params.text,
120
+ mentions: params.mentions ?? [],
121
+ linkPreviews: params.linkPreviews ?? []
122
+ };
123
+ }
124
+ };
125
+ export const AssetMessage = {
126
+ create(params) {
127
+ return {
128
+ type: WireMessageType.ASSET,
129
+ id: params.messageId ?? crypto.randomUUID(),
130
+ conversationId: params.conversationId,
131
+ sender: params.senderId ?? appQualifiedId,
132
+ timestamp: params.timestamp ?? new Date(),
133
+ sizeInBytes: params.sizeInBytes,
134
+ name: params.name ?? null,
135
+ mimeType: params.mimeType,
136
+ metadata: params.metadata ?? null,
137
+ remoteData: params.remoteData ?? null,
138
+ expiresAfterMillis: params.expiresAfterMillis ?? null
139
+ };
140
+ }
141
+ };
142
+ export const CompositeButton = {
143
+ create(params) {
144
+ return {
145
+ type: WireMessageType.COMPOSITE_BUTTON,
146
+ id: params.id ?? crypto.randomUUID(),
147
+ text: params.text
148
+ };
149
+ }
150
+ };
151
+ export const CompositeButtonAction = {
152
+ create(params) {
153
+ return {
154
+ type: WireMessageType.COMPOSITE_BUTTON_ACTION,
155
+ id: params.messageId,
156
+ conversationId: params.conversationId,
157
+ buttonId: params.buttonId,
158
+ referenceMessageId: params.referenceMessageId,
159
+ sender: params.senderId ?? appQualifiedId
160
+ };
161
+ }
162
+ };
163
+ export const CompositeButtonActionConfirmation = {
164
+ create(params) {
165
+ return {
166
+ type: WireMessageType.COMPOSITE_BUTTON_ACTION_CONFIRMATION,
167
+ id: params.messageId,
168
+ conversationId: params.conversationId,
169
+ buttonId: params.buttonId,
170
+ referenceMessageId: params.referenceMessageId,
171
+ ...(params.senderId && { sender: params.senderId })
172
+ };
173
+ }
174
+ };
175
+ export const CompositeMessage = {
176
+ create(params) {
177
+ const textItem = params.text
178
+ ? TextMessage.create({
179
+ conversationId: params.conversationId,
180
+ text: params.text
181
+ })
182
+ : null;
183
+ return {
184
+ type: WireMessageType.COMPOSITE,
185
+ id: params.messageId ?? crypto.randomUUID(),
186
+ conversationId: params.conversationId,
187
+ items: [...(textItem ? [textItem] : []), ...params.itemList],
188
+ sender: params.senderId ?? appQualifiedId
189
+ };
190
+ }
191
+ };
192
+ export const CompositeEditedMessage = {
193
+ create(params) {
194
+ return {
195
+ type: WireMessageType.COMPOSITE_EDITED,
196
+ id: params.messageId ?? crypto.randomUUID(),
197
+ conversationId: params.conversationId,
198
+ items: params.itemList,
199
+ sender: params.senderId ?? appQualifiedId,
200
+ replacingMessageId: params.replacingMessageId
201
+ };
202
+ }
203
+ };
204
+ export const Ping = {
205
+ create(params) {
206
+ return {
207
+ type: WireMessageType.PING,
208
+ id: params.messageId ?? crypto.randomUUID(),
209
+ conversationId: params.conversationId,
210
+ ...(params.senderId && { sender: params.senderId }),
211
+ expiresAfterMillis: params.expiresAfterMillis ?? null
212
+ };
213
+ }
214
+ };
215
+ export const Location = {
216
+ create(params) {
217
+ return {
218
+ type: WireMessageType.LOCATION,
219
+ id: params.messageId ?? crypto.randomUUID(),
220
+ conversationId: params.conversationId,
221
+ latitude: params.latitude,
222
+ longitude: params.longitude,
223
+ name: params.name ?? null,
224
+ zoom: params.zoom ?? null,
225
+ sender: params.senderId ?? appQualifiedId,
226
+ timestamp: params.timestamp ?? new Date(),
227
+ expiresAfterMillis: params.expiresAfterMillis ?? null
228
+ };
229
+ }
230
+ };
231
+ export const DeletedMessage = {
232
+ create(params) {
233
+ return {
234
+ type: WireMessageType.DELETED,
235
+ id: params.id ?? crypto.randomUUID(),
236
+ conversationId: params.conversationId,
237
+ messageId: params.messageId,
238
+ ...(params.senderId && { sender: params.senderId })
239
+ };
240
+ }
241
+ };
242
+ export const ReceiptType = {
243
+ DELIVERED: "DELIVERED",
244
+ READ: "READ"
245
+ };
246
+ export const Receipt = {
247
+ create(params) {
248
+ return {
249
+ type: WireMessageType.RECEIPT,
250
+ id: params.id ?? crypto.randomUUID(),
251
+ conversationId: params.conversationId,
252
+ receiptType: params.receiptType,
253
+ messageIds: params.messageIds,
254
+ sender: params.senderId ?? appQualifiedId
255
+ };
256
+ }
257
+ };
258
+ export const Reaction = {
259
+ create(params) {
260
+ return {
261
+ type: WireMessageType.REACTION,
262
+ id: params.id ?? crypto.randomUUID(),
263
+ conversationId: params.conversationId,
264
+ messageId: params.messageId,
265
+ emojiSet: params.emojiSet,
266
+ ...(params.senderId && { sender: params.senderId })
267
+ };
268
+ }
269
+ };
270
+ //# sourceMappingURL=WireMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WireMessage.js","sourceRoot":"","sources":["../../src/model/WireMessage.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AAEF,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AACtF,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAC,qBAAqB,EAAC,MAAM,8CAA8C,CAAC;AAEnF,MAAM,SAAS,GAAG,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAE,CAAA;AAClD,MAAM,aAAa,GAAG,OAAO,CAAC,GAAG,CAAC,sBAAsB,CAAE,CAAA;AAC1D,MAAM,cAAc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C,QAAQ,EAAE,CAAC;SACpD,CAAA;IACH,CAAC;CACF,CAAA;AAED,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,SAAS,EAAE,WAAW;IACtB,IAAI,EAAE,MAAM;CACJ,CAAC;AAUX,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,MAAM,CACJ,MAMC;QAED,OAAO;YACL,IAAI,EAAE,eAAe,CAAC,OAAO;YAC7B,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE;YACpC,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,MAAM,EAAE,MAAM,CAAC,QAAQ,IAAI,cAAc;SAC1C,CAAA;IACH,CAAC;CACF,CAAA;AAQD,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,MAAM,CACJ,MAMC;QAED,OAAO;YACL,IAAI,EAAE,eAAe,CAAC,QAAQ;YAC9B,EAAE,EAAE,MAAM,CAAC,EAAE,IAAI,MAAM,CAAC,UAAU,EAAE;YACpC,cAAc,EAAE,MAAM,CAAC,cAAc;YACrC,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,QAAQ,EAAE,MAAM,CAAC,QAAQ;YACzB,GAAG,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;SACpD,CAAA;IACH,CAAC;CACF,CAAA"}
@@ -0,0 +1,12 @@
1
+ import type { QualifiedId } from "./QualifiedId.js";
2
+ import type { TeamId } from "./TeamId.js";
3
+ export declare class WireUser {
4
+ readonly id: QualifiedId;
5
+ readonly name: string;
6
+ readonly deleted: boolean;
7
+ readonly email?: string | undefined;
8
+ readonly handle?: string | undefined;
9
+ readonly teamId?: TeamId | undefined;
10
+ constructor(id: QualifiedId, name: string, deleted: boolean, email?: string | undefined, handle?: string | undefined, teamId?: TeamId | undefined);
11
+ }
12
+ //# sourceMappingURL=WireUser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WireUser.d.ts","sourceRoot":"","sources":["../../src/model/WireUser.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAC,MAAM,EAAC,MAAM,aAAa,CAAC;AAExC,qBAAa,QAAQ;IAEjB,QAAQ,CAAC,EAAE,EAAE,WAAW;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM;IACrB,QAAQ,CAAC,OAAO,EAAE,OAAO;IACzB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM;IACvB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM;gBALf,EAAE,EAAE,WAAW,EACf,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,OAAO,EAChB,KAAK,CAAC,EAAE,MAAM,YAAA,EACd,MAAM,CAAC,EAAE,MAAM,YAAA,EACf,MAAM,CAAC,EAAE,MAAM,YAAA;CAE3B"}
@@ -0,0 +1,32 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2026 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ export class WireUser {
17
+ id;
18
+ name;
19
+ deleted;
20
+ email;
21
+ handle;
22
+ teamId;
23
+ constructor(id, name, deleted, email, handle, teamId) {
24
+ this.id = id;
25
+ this.name = name;
26
+ this.deleted = deleted;
27
+ this.email = email;
28
+ this.handle = handle;
29
+ this.teamId = teamId;
30
+ }
31
+ }
32
+ //# sourceMappingURL=WireUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WireUser.js","sourceRoot":"","sources":["../../src/model/WireUser.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAKH,MAAM,OAAO,QAAQ;IAER;IACA;IACA;IACA;IACA;IACA;IANX,YACW,EAAe,EACf,IAAY,EACZ,OAAgB,EAChB,KAAc,EACd,MAAe,EACf,MAAe;QALf,OAAE,GAAF,EAAE,CAAa;QACf,SAAI,GAAJ,IAAI,CAAQ;QACZ,YAAO,GAAP,OAAO,CAAS;QAChB,UAAK,GAAL,KAAK,CAAS;QACd,WAAM,GAAN,MAAM,CAAS;QACf,WAAM,GAAN,MAAM,CAAS;IACvB,CAAC;CACL"}
@@ -0,0 +1,7 @@
1
+ export declare enum ChannelAddPermissionType {
2
+ /** Only Admins of the Channel (or Team) can join and add others */
3
+ ADMINS = "admins",
4
+ /** Everyone can join and add others */
5
+ EVERYONE = "everyone"
6
+ }
7
+ //# sourceMappingURL=ChannelAddPermissionType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChannelAddPermissionType.d.ts","sourceRoot":"","sources":["../../../src/model/conversation/ChannelAddPermissionType.ts"],"names":[],"mappings":"AAgBA,oBAAY,wBAAwB;IAClC,mEAAmE;IACnE,MAAM,WAAW;IACjB,uCAAuC;IACvC,QAAQ,aAAa;CACtB"}
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2026 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ export var ChannelAddPermissionType;
17
+ (function (ChannelAddPermissionType) {
18
+ /** Only Admins of the Channel (or Team) can join and add others */
19
+ ChannelAddPermissionType["ADMINS"] = "admins";
20
+ /** Everyone can join and add others */
21
+ ChannelAddPermissionType["EVERYONE"] = "everyone";
22
+ })(ChannelAddPermissionType || (ChannelAddPermissionType = {}));
23
+ //# sourceMappingURL=ChannelAddPermissionType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChannelAddPermissionType.js","sourceRoot":"","sources":["../../../src/model/conversation/ChannelAddPermissionType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,wBAKX;AALD,WAAY,wBAAwB;IAClC,mEAAmE;IACnE,6CAAiB,CAAA;IACjB,uCAAuC;IACvC,iDAAqB,CAAA;AACvB,CAAC,EALW,wBAAwB,KAAxB,wBAAwB,QAKnC"}
@@ -0,0 +1,9 @@
1
+ import { ConversationType } from "./ConversationType.js";
2
+ export interface Conversation {
3
+ id: string;
4
+ domain: string;
5
+ name: string | null;
6
+ type: ConversationType;
7
+ teamId: string | null;
8
+ }
9
+ //# sourceMappingURL=Conversation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Conversation.d.ts","sourceRoot":"","sources":["../../../src/model/conversation/Conversation.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAExD,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;IACnB,IAAI,EAAE,gBAAgB,CAAA;IACtB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;CACtB"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2025 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ import { ConversationType } from "./ConversationType.js";
17
+ //# sourceMappingURL=Conversation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Conversation.js","sourceRoot":"","sources":["../../../src/model/conversation/Conversation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AAEF,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA"}
@@ -0,0 +1,8 @@
1
+ export declare enum ConversationAccess {
2
+ PRIVATE = "private",
3
+ CODE = "code",
4
+ INVITE = "invite",
5
+ SELF_INVITE = "self_invite",
6
+ LINK = "link"
7
+ }
8
+ //# sourceMappingURL=ConversationAccess.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationAccess.d.ts","sourceRoot":"","sources":["../../../src/model/conversation/ConversationAccess.ts"],"names":[],"mappings":"AAgBA,oBAAY,kBAAkB;IAC5B,OAAO,YAAY;IACnB,IAAI,SAAS;IACb,MAAM,WAAW;IACjB,WAAW,gBAAgB;IAC3B,IAAI,SAAS;CACd"}
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2026 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ export var ConversationAccess;
17
+ (function (ConversationAccess) {
18
+ ConversationAccess["PRIVATE"] = "private";
19
+ ConversationAccess["CODE"] = "code";
20
+ ConversationAccess["INVITE"] = "invite";
21
+ ConversationAccess["SELF_INVITE"] = "self_invite";
22
+ ConversationAccess["LINK"] = "link";
23
+ })(ConversationAccess || (ConversationAccess = {}));
24
+ //# sourceMappingURL=ConversationAccess.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationAccess.js","sourceRoot":"","sources":["../../../src/model/conversation/ConversationAccess.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,kBAMX;AAND,WAAY,kBAAkB;IAC5B,yCAAmB,CAAA;IACnB,mCAAa,CAAA;IACb,uCAAiB,CAAA;IACjB,iDAA2B,CAAA;IAC3B,mCAAa,CAAA;AACf,CAAC,EANW,kBAAkB,KAAlB,kBAAkB,QAM7B"}
@@ -0,0 +1,8 @@
1
+ export declare enum ConversationAccessRole {
2
+ TEAM_MEMBER = "team_member",
3
+ NON_TEAM_MEMBER = "non_team_member",
4
+ GUEST = "guest",
5
+ SERVICE = "service",
6
+ EXTERNAL = "partner"
7
+ }
8
+ //# sourceMappingURL=ConversationAccessRole.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationAccessRole.d.ts","sourceRoot":"","sources":["../../../src/model/conversation/ConversationAccessRole.ts"],"names":[],"mappings":"AAgBA,oBAAY,sBAAsB;IAChC,WAAW,gBAAgB;IAC3B,eAAe,oBAAoB;IACnC,KAAK,UAAU;IACf,OAAO,YAAY;IACnB,QAAQ,YAAY;CACrB"}
@@ -0,0 +1,24 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2026 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ export var ConversationAccessRole;
17
+ (function (ConversationAccessRole) {
18
+ ConversationAccessRole["TEAM_MEMBER"] = "team_member";
19
+ ConversationAccessRole["NON_TEAM_MEMBER"] = "non_team_member";
20
+ ConversationAccessRole["GUEST"] = "guest";
21
+ ConversationAccessRole["SERVICE"] = "service";
22
+ ConversationAccessRole["EXTERNAL"] = "partner";
23
+ })(ConversationAccessRole || (ConversationAccessRole = {}));
24
+ //# sourceMappingURL=ConversationAccessRole.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationAccessRole.js","sourceRoot":"","sources":["../../../src/model/conversation/ConversationAccessRole.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,MAAM,CAAN,IAAY,sBAMX;AAND,WAAY,sBAAsB;IAChC,qDAA2B,CAAA;IAC3B,6DAAmC,CAAA;IACnC,yCAAe,CAAA;IACf,6CAAmB,CAAA;IACnB,8CAAoB,CAAA;AACtB,CAAC,EANW,sBAAsB,KAAtB,sBAAsB,QAMjC"}
@@ -0,0 +1,7 @@
1
+ import type { QualifiedId } from "../QualifiedId.js";
2
+ import type { ConversationRole } from "./ConversationRole.js";
3
+ export interface ConversationMember {
4
+ userId: QualifiedId;
5
+ role: ConversationRole;
6
+ }
7
+ //# sourceMappingURL=ConversationMember.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationMember.d.ts","sourceRoot":"","sources":["../../../src/model/conversation/ConversationMember.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,MAAM,WAAW,kBAAkB;IACjC,MAAM,EAAE,WAAW,CAAA;IACnB,IAAI,EAAE,gBAAgB,CAAA;CACvB"}
@@ -0,0 +1,17 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2025 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ export {};
17
+ //# sourceMappingURL=ConversationMember.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationMember.js","sourceRoot":"","sources":["../../../src/model/conversation/ConversationMember.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE"}
@@ -0,0 +1,6 @@
1
+ export declare enum ConversationRole {
2
+ MEMBER = "wire_member",
3
+ ADMIN = "wire_admin",
4
+ UNKNOWN = "unknown"
5
+ }
6
+ //# sourceMappingURL=ConversationRole.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationRole.d.ts","sourceRoot":"","sources":["../../../src/model/conversation/ConversationRole.ts"],"names":[],"mappings":"AAyBA,oBAAY,gBAAgB;IAC1B,MAAM,gBAAgB;IACtB,KAAK,eAAe;IACpB,OAAO,YAAY;CACpB"}
@@ -0,0 +1,29 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2025 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ // TODO: Baris: It will be good rename this class to MemberRole or ConversationMemberRole,
17
+ // because it is not a role of conversation but a role of member in conversation.
18
+ // It will be more clear to understand the code when we have ConversationMemberRole.MEMBER instead of ConversationRole.MEMBER.
19
+ // I prefer making this change in a separate PR.
20
+ // TODO: Baris: At the moment, this class is not used for the verification of the incoming values.
21
+ // Because TS types are erased at runtime, we need to add a function to verify the incoming values
22
+ // and convert them to ConversationRole type.
23
+ export var ConversationRole;
24
+ (function (ConversationRole) {
25
+ ConversationRole["MEMBER"] = "wire_member";
26
+ ConversationRole["ADMIN"] = "wire_admin";
27
+ ConversationRole["UNKNOWN"] = "unknown";
28
+ })(ConversationRole || (ConversationRole = {}));
29
+ //# sourceMappingURL=ConversationRole.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationRole.js","sourceRoot":"","sources":["../../../src/model/conversation/ConversationRole.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AAEF,0FAA0F;AAC1F,kFAAkF;AAClF,+HAA+H;AAC/H,iDAAiD;AAGjD,kGAAkG;AAClG,mGAAmG;AACnG,8CAA8C;AAC9C,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,0CAAsB,CAAA;IACtB,wCAAoB,CAAA;IACpB,uCAAmB,CAAA;AACrB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}
@@ -0,0 +1,6 @@
1
+ export declare enum ConversationType {
2
+ GROUP = 0,
3
+ SELF = 1,
4
+ ONE_TO_ONE = 2
5
+ }
6
+ //# sourceMappingURL=ConversationType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationType.d.ts","sourceRoot":"","sources":["../../../src/model/conversation/ConversationType.ts"],"names":[],"mappings":"AAgBA,oBAAY,gBAAgB;IAC1B,KAAK,IAAI;IACT,IAAI,IAAI;IACR,UAAU,IAAI;CACf"}
@@ -0,0 +1,22 @@
1
+ /*
2
+ * Wire
3
+ * Copyright (C) 2025 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
+ * This program is distributed in the hope that it will be useful,
10
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
+ * GNU General Public License for more details.
13
+ * You should have received a copy of the GNU General Public License
14
+ * along with this program. If not, see http://www.gnu.org/licenses/.
15
+ */
16
+ export var ConversationType;
17
+ (function (ConversationType) {
18
+ ConversationType[ConversationType["GROUP"] = 0] = "GROUP";
19
+ ConversationType[ConversationType["SELF"] = 1] = "SELF";
20
+ ConversationType[ConversationType["ONE_TO_ONE"] = 2] = "ONE_TO_ONE";
21
+ })(ConversationType || (ConversationType = {}));
22
+ //# sourceMappingURL=ConversationType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConversationType.js","sourceRoot":"","sources":["../../../src/model/conversation/ConversationType.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;EAcE;AAEF,MAAM,CAAN,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,yDAAS,CAAA;IACT,uDAAQ,CAAA;IACR,mEAAc,CAAA;AAChB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B"}
@@ -0,0 +1,5 @@
1
+ export declare enum GroupConversationType {
2
+ REGULAR_GROUP = "group_conversation",
3
+ CHANNEL = "channel"
4
+ }
5
+ //# sourceMappingURL=GroupConversationType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GroupConversationType.d.ts","sourceRoot":"","sources":["../../../src/model/conversation/GroupConversationType.ts"],"names":[],"mappings":"AAgBA,oBAAY,qBAAqB;IAC/B,aAAa,uBAAuB;IACpC,OAAO,YAAY;CACpB"}