matrix-js-sdk 41.8.0 → 41.9.0-rc.0

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 (457) hide show
  1. package/README.md +1 -1
  2. package/lib/@types/AESEncryptedSecretStoragePayload.js +3 -1
  3. package/lib/@types/IIdentityServerProvider.js +3 -1
  4. package/lib/@types/PushRules.js +7 -7
  5. package/lib/@types/PushRules.js.map +1 -1
  6. package/lib/@types/auth.js +4 -4
  7. package/lib/@types/auth.js.map +1 -1
  8. package/lib/@types/beacon.js +2 -2
  9. package/lib/@types/beacon.js.map +1 -1
  10. package/lib/@types/common.js +3 -1
  11. package/lib/@types/crypto.js +3 -1
  12. package/lib/@types/event.js +20 -20
  13. package/lib/@types/event.js.map +1 -1
  14. package/lib/@types/events.js +3 -1
  15. package/lib/@types/extensible_events.js +6 -6
  16. package/lib/@types/extensible_events.js.map +1 -1
  17. package/lib/@types/global.d.js.map +1 -1
  18. package/lib/@types/json.js +3 -1
  19. package/lib/@types/local_notifications.js +3 -1
  20. package/lib/@types/location.js +4 -4
  21. package/lib/@types/location.js.map +1 -1
  22. package/lib/@types/matrix-sdk-crypto-wasm.d.js +3 -1
  23. package/lib/@types/media.js +3 -1
  24. package/lib/@types/membership.js +1 -1
  25. package/lib/@types/membership.js.map +1 -1
  26. package/lib/@types/partials.js +6 -6
  27. package/lib/@types/partials.js.map +1 -1
  28. package/lib/@types/polls.js +5 -5
  29. package/lib/@types/polls.js.map +1 -1
  30. package/lib/@types/read_receipts.js +2 -2
  31. package/lib/@types/read_receipts.js.map +1 -1
  32. package/lib/@types/registration.js +3 -1
  33. package/lib/@types/requests.js +1 -1
  34. package/lib/@types/requests.js.map +1 -1
  35. package/lib/@types/retention.js +1 -1
  36. package/lib/@types/retention.js.map +1 -1
  37. package/lib/@types/search.js +1 -1
  38. package/lib/@types/search.js.map +1 -1
  39. package/lib/@types/signed.js +3 -1
  40. package/lib/@types/spaces.js +3 -1
  41. package/lib/@types/state_events.js +3 -1
  42. package/lib/@types/synapse.js +3 -1
  43. package/lib/@types/sync.js +1 -1
  44. package/lib/@types/sync.js.map +1 -1
  45. package/lib/@types/threepids.js +1 -1
  46. package/lib/@types/threepids.js.map +1 -1
  47. package/lib/@types/topic.js +1 -1
  48. package/lib/@types/topic.js.map +1 -1
  49. package/lib/@types/uia.js +3 -1
  50. package/lib/NamespacedValue.js +8 -8
  51. package/lib/NamespacedValue.js.map +1 -1
  52. package/lib/ReEmitter.js +9 -16
  53. package/lib/ReEmitter.js.map +1 -1
  54. package/lib/ToDeviceMessageQueue.js +49 -57
  55. package/lib/ToDeviceMessageQueue.js.map +1 -1
  56. package/lib/autodiscovery.js +232 -247
  57. package/lib/autodiscovery.js.map +1 -1
  58. package/lib/base64.js +1 -1
  59. package/lib/base64.js.map +1 -1
  60. package/lib/browser-index.d.ts +2 -2
  61. package/lib/browser-index.d.ts.map +1 -1
  62. package/lib/browser-index.js +5 -5
  63. package/lib/browser-index.js.map +1 -1
  64. package/lib/capabilityPoller.js +19 -22
  65. package/lib/capabilityPoller.js.map +1 -1
  66. package/lib/client.d.ts +2 -8
  67. package/lib/client.d.ts.map +1 -1
  68. package/lib/client.js +2043 -2487
  69. package/lib/client.js.map +1 -1
  70. package/lib/common-crypto/CryptoBackend.js +2 -2
  71. package/lib/common-crypto/CryptoBackend.js.map +1 -1
  72. package/lib/common-crypto/key-passphrase.js.map +1 -1
  73. package/lib/content-helpers.js +43 -48
  74. package/lib/content-helpers.js.map +1 -1
  75. package/lib/content-repo.js +14 -24
  76. package/lib/content-repo.js.map +1 -1
  77. package/lib/crypto/store/base.js +6 -6
  78. package/lib/crypto/store/base.js.map +1 -1
  79. package/lib/crypto/store/indexeddb-crypto-store-backend.js +190 -238
  80. package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
  81. package/lib/crypto/store/indexeddb-crypto-store.js +25 -30
  82. package/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
  83. package/lib/crypto/store/localStorage-crypto-store.js +113 -145
  84. package/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
  85. package/lib/crypto/store/memory-crypto-store.js +74 -105
  86. package/lib/crypto/store/memory-crypto-store.js.map +1 -1
  87. package/lib/crypto-api/CryptoEvent.js +1 -1
  88. package/lib/crypto-api/CryptoEvent.js.map +1 -1
  89. package/lib/crypto-api/CryptoEventHandlerMap.js +3 -1
  90. package/lib/crypto-api/index.d.ts +15 -6
  91. package/lib/crypto-api/index.d.ts.map +1 -1
  92. package/lib/crypto-api/index.js +22 -22
  93. package/lib/crypto-api/index.js.map +1 -1
  94. package/lib/crypto-api/key-passphrase.js +15 -23
  95. package/lib/crypto-api/key-passphrase.js.map +1 -1
  96. package/lib/crypto-api/keybackup.js +3 -1
  97. package/lib/crypto-api/recovery-key.js +11 -12
  98. package/lib/crypto-api/recovery-key.js.map +1 -1
  99. package/lib/crypto-api/verification.js +3 -3
  100. package/lib/crypto-api/verification.js.map +1 -1
  101. package/lib/digest.js +7 -14
  102. package/lib/digest.js.map +1 -1
  103. package/lib/embedded.d.ts.map +1 -1
  104. package/lib/embedded.js +380 -505
  105. package/lib/embedded.js.map +1 -1
  106. package/lib/errors.js +2 -2
  107. package/lib/errors.js.map +1 -1
  108. package/lib/event-mapper.js +10 -12
  109. package/lib/event-mapper.js.map +1 -1
  110. package/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -1
  111. package/lib/extensible_events_v1/InvalidEventError.js.map +1 -1
  112. package/lib/extensible_events_v1/MessageEvent.js +11 -13
  113. package/lib/extensible_events_v1/MessageEvent.js.map +1 -1
  114. package/lib/extensible_events_v1/PollEndEvent.js +3 -4
  115. package/lib/extensible_events_v1/PollEndEvent.js.map +1 -1
  116. package/lib/extensible_events_v1/PollResponseEvent.js +5 -6
  117. package/lib/extensible_events_v1/PollResponseEvent.js.map +1 -1
  118. package/lib/extensible_events_v1/PollStartEvent.js +8 -10
  119. package/lib/extensible_events_v1/PollStartEvent.js.map +1 -1
  120. package/lib/extensible_events_v1/utilities.js.map +1 -1
  121. package/lib/feature.js +18 -31
  122. package/lib/feature.js.map +1 -1
  123. package/lib/filter-component.d.ts.map +1 -1
  124. package/lib/filter-component.js +20 -26
  125. package/lib/filter-component.js.map +1 -1
  126. package/lib/filter.js +14 -17
  127. package/lib/filter.js.map +1 -1
  128. package/lib/http-api/errors.js +28 -43
  129. package/lib/http-api/errors.js.map +1 -1
  130. package/lib/http-api/fetch.js +141 -159
  131. package/lib/http-api/fetch.js.map +1 -1
  132. package/lib/http-api/index.js +17 -20
  133. package/lib/http-api/index.js.map +1 -1
  134. package/lib/http-api/interface.js +1 -1
  135. package/lib/http-api/interface.js.map +1 -1
  136. package/lib/http-api/method.js +1 -1
  137. package/lib/http-api/method.js.map +1 -1
  138. package/lib/http-api/prefix.js +3 -3
  139. package/lib/http-api/prefix.js.map +1 -1
  140. package/lib/http-api/refresh.js +74 -94
  141. package/lib/http-api/refresh.js.map +1 -1
  142. package/lib/http-api/utils.d.ts +1 -1
  143. package/lib/http-api/utils.d.ts.map +1 -1
  144. package/lib/http-api/utils.js +34 -42
  145. package/lib/http-api/utils.js.map +1 -1
  146. package/lib/index.js.map +1 -1
  147. package/lib/indexeddb-helpers.js +3 -3
  148. package/lib/indexeddb-helpers.js.map +1 -1
  149. package/lib/indexeddb-worker.js.map +1 -1
  150. package/lib/interactive-auth.d.ts +5 -5
  151. package/lib/interactive-auth.d.ts.map +1 -1
  152. package/lib/interactive-auth.js +172 -204
  153. package/lib/interactive-auth.js.map +1 -1
  154. package/lib/logger.js +21 -57
  155. package/lib/logger.js.map +1 -1
  156. package/lib/matrix.js +7 -11
  157. package/lib/matrix.js.map +1 -1
  158. package/lib/matrixrtc/CallMembership.js +80 -74
  159. package/lib/matrixrtc/CallMembership.js.map +1 -1
  160. package/lib/matrixrtc/EncryptionManager.js +1 -1
  161. package/lib/matrixrtc/EncryptionManager.js.map +1 -1
  162. package/lib/matrixrtc/IKeyTransport.js +1 -1
  163. package/lib/matrixrtc/IKeyTransport.js.map +1 -1
  164. package/lib/matrixrtc/IMembershipManager.js +1 -1
  165. package/lib/matrixrtc/IMembershipManager.js.map +1 -1
  166. package/lib/matrixrtc/LivekitTransport.d.ts +1 -1
  167. package/lib/matrixrtc/LivekitTransport.js +4 -4
  168. package/lib/matrixrtc/LivekitTransport.js.map +1 -1
  169. package/lib/matrixrtc/MatrixRTCSession.js +137 -187
  170. package/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
  171. package/lib/matrixrtc/MatrixRTCSessionManager.js +36 -41
  172. package/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
  173. package/lib/matrixrtc/MembershipManager.js +332 -378
  174. package/lib/matrixrtc/MembershipManager.js.map +1 -1
  175. package/lib/matrixrtc/MembershipManagerActionScheduler.js +54 -63
  176. package/lib/matrixrtc/MembershipManagerActionScheduler.js.map +1 -1
  177. package/lib/matrixrtc/RTCEncryptionManager.js +119 -143
  178. package/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
  179. package/lib/matrixrtc/ToDeviceKeyTransport.js +53 -58
  180. package/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
  181. package/lib/matrixrtc/index.js.map +1 -1
  182. package/lib/matrixrtc/membershipData/common.js +1 -1
  183. package/lib/matrixrtc/membershipData/common.js.map +1 -1
  184. package/lib/matrixrtc/membershipData/index.js.map +1 -1
  185. package/lib/matrixrtc/membershipData/rtc.js +15 -23
  186. package/lib/matrixrtc/membershipData/rtc.js.map +1 -1
  187. package/lib/matrixrtc/membershipData/session.js +4 -5
  188. package/lib/matrixrtc/membershipData/session.js.map +1 -1
  189. package/lib/matrixrtc/types.js +4 -6
  190. package/lib/matrixrtc/types.js.map +1 -1
  191. package/lib/matrixrtc/utils.js +4 -11
  192. package/lib/matrixrtc/utils.js.map +1 -1
  193. package/lib/models/MSC3089Branch.js +91 -116
  194. package/lib/models/MSC3089Branch.js.map +1 -1
  195. package/lib/models/MSC3089TreeSpace.js +209 -245
  196. package/lib/models/MSC3089TreeSpace.js.map +1 -1
  197. package/lib/models/ToDeviceMessage.js +3 -1
  198. package/lib/models/beacon.js +14 -13
  199. package/lib/models/beacon.js.map +1 -1
  200. package/lib/models/compare-event-ordering.js +13 -13
  201. package/lib/models/compare-event-ordering.js.map +1 -1
  202. package/lib/models/device.js +3 -3
  203. package/lib/models/device.js.map +1 -1
  204. package/lib/models/event-context.js +5 -8
  205. package/lib/models/event-context.js.map +1 -1
  206. package/lib/models/event-status.js +1 -1
  207. package/lib/models/event-status.js.map +1 -1
  208. package/lib/models/event-timeline-set.js +88 -94
  209. package/lib/models/event-timeline-set.js.map +1 -1
  210. package/lib/models/event-timeline.js +28 -30
  211. package/lib/models/event-timeline.js.map +1 -1
  212. package/lib/models/event.js +182 -226
  213. package/lib/models/event.js.map +1 -1
  214. package/lib/models/invites-ignorer-types.js +4 -4
  215. package/lib/models/invites-ignorer-types.js.map +1 -1
  216. package/lib/models/invites-ignorer.js +159 -179
  217. package/lib/models/invites-ignorer.js.map +1 -1
  218. package/lib/models/poll.js +71 -81
  219. package/lib/models/poll.js.map +1 -1
  220. package/lib/models/profile-keys.js +2 -2
  221. package/lib/models/profile-keys.js.map +1 -1
  222. package/lib/models/read-receipt.js +40 -56
  223. package/lib/models/read-receipt.js.map +1 -1
  224. package/lib/models/related-relations.js.map +1 -1
  225. package/lib/models/relations-container.js +22 -23
  226. package/lib/models/relations-container.js.map +1 -1
  227. package/lib/models/relations.js +133 -159
  228. package/lib/models/relations.js.map +1 -1
  229. package/lib/models/room-member.js +24 -29
  230. package/lib/models/room-member.js.map +1 -1
  231. package/lib/models/room-receipts.js +29 -43
  232. package/lib/models/room-receipts.js.map +1 -1
  233. package/lib/models/room-retention.js +74 -83
  234. package/lib/models/room-retention.js.map +1 -1
  235. package/lib/models/room-state.js +143 -172
  236. package/lib/models/room-state.js.map +1 -1
  237. package/lib/models/room-sticky-events.d.ts +1 -0
  238. package/lib/models/room-sticky-events.d.ts.map +1 -1
  239. package/lib/models/room-sticky-events.js +45 -65
  240. package/lib/models/room-sticky-events.js.map +1 -1
  241. package/lib/models/room-summary.js.map +1 -1
  242. package/lib/models/room.d.ts.map +1 -1
  243. package/lib/models/room.js +765 -909
  244. package/lib/models/room.js.map +1 -1
  245. package/lib/models/search-result.js +5 -5
  246. package/lib/models/search-result.js.map +1 -1
  247. package/lib/models/thread.js +225 -285
  248. package/lib/models/thread.js.map +1 -1
  249. package/lib/models/typed-event-emitter.js +7 -18
  250. package/lib/models/typed-event-emitter.js.map +1 -1
  251. package/lib/models/user.js +8 -8
  252. package/lib/models/user.js.map +1 -1
  253. package/lib/oidc/authorize.js +208 -241
  254. package/lib/oidc/authorize.js.map +1 -1
  255. package/lib/oidc/discovery.js +23 -36
  256. package/lib/oidc/discovery.js.map +1 -1
  257. package/lib/oidc/error.js +1 -1
  258. package/lib/oidc/error.js.map +1 -1
  259. package/lib/oidc/index.js +1 -0
  260. package/lib/oidc/index.js.map +1 -1
  261. package/lib/oidc/register.js +60 -66
  262. package/lib/oidc/register.js.map +1 -1
  263. package/lib/oidc/tokenRefresher.js +77 -91
  264. package/lib/oidc/tokenRefresher.js.map +1 -1
  265. package/lib/oidc/validate.js +18 -18
  266. package/lib/oidc/validate.js.map +1 -1
  267. package/lib/pushprocessor.js +71 -82
  268. package/lib/pushprocessor.js.map +1 -1
  269. package/lib/randomstring.js +9 -9
  270. package/lib/randomstring.js.map +1 -1
  271. package/lib/realtime-callbacks.js +25 -28
  272. package/lib/realtime-callbacks.js.map +1 -1
  273. package/lib/receipt-accumulator.d.ts +2 -0
  274. package/lib/receipt-accumulator.d.ts.map +1 -1
  275. package/lib/receipt-accumulator.js +14 -22
  276. package/lib/receipt-accumulator.js.map +1 -1
  277. package/lib/rendezvous/MSC4108SignInWithQR.js +271 -302
  278. package/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
  279. package/lib/rendezvous/RendezvousChannel.js +3 -1
  280. package/lib/rendezvous/RendezvousCode.js +3 -1
  281. package/lib/rendezvous/RendezvousError.js.map +1 -1
  282. package/lib/rendezvous/RendezvousFailureReason.js +2 -2
  283. package/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
  284. package/lib/rendezvous/RendezvousIntent.js +1 -1
  285. package/lib/rendezvous/RendezvousIntent.js.map +1 -1
  286. package/lib/rendezvous/RendezvousTransport.js +3 -1
  287. package/lib/rendezvous/channels/MSC4108SecureChannel.js +123 -147
  288. package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -1
  289. package/lib/rendezvous/index.js +44 -69
  290. package/lib/rendezvous/index.js.map +1 -1
  291. package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +1 -1
  292. package/lib/rendezvous/transports/MSC4108RendezvousSession.js +134 -152
  293. package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -1
  294. package/lib/retentionPolicy.js +6 -9
  295. package/lib/retentionPolicy.js.map +1 -1
  296. package/lib/room-hierarchy.js +52 -60
  297. package/lib/room-hierarchy.js.map +1 -1
  298. package/lib/rust-crypto/CrossSigningIdentity.js +94 -104
  299. package/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
  300. package/lib/rust-crypto/DehydratedDeviceManager.js +157 -190
  301. package/lib/rust-crypto/DehydratedDeviceManager.js.map +1 -1
  302. package/lib/rust-crypto/KeyClaimManager.js +18 -22
  303. package/lib/rust-crypto/KeyClaimManager.js.map +1 -1
  304. package/lib/rust-crypto/OutgoingRequestProcessor.js +109 -139
  305. package/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
  306. package/lib/rust-crypto/OutgoingRequestsManager.js +66 -80
  307. package/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -1
  308. package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +1 -1
  309. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +196 -224
  310. package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -1
  311. package/lib/rust-crypto/RoomEncryptor.js +127 -143
  312. package/lib/rust-crypto/RoomEncryptor.js.map +1 -1
  313. package/lib/rust-crypto/backup.js +453 -549
  314. package/lib/rust-crypto/backup.js.map +1 -1
  315. package/lib/rust-crypto/constants.js +1 -1
  316. package/lib/rust-crypto/constants.js.map +1 -1
  317. package/lib/rust-crypto/device-converter.js +15 -28
  318. package/lib/rust-crypto/device-converter.js.map +1 -1
  319. package/lib/rust-crypto/index.js +103 -116
  320. package/lib/rust-crypto/index.js.map +1 -1
  321. package/lib/rust-crypto/libolm_migration.js +303 -365
  322. package/lib/rust-crypto/libolm_migration.js.map +1 -1
  323. package/lib/rust-crypto/rust-crypto.d.ts +5 -1
  324. package/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
  325. package/lib/rust-crypto/rust-crypto.js +1067 -1332
  326. package/lib/rust-crypto/rust-crypto.js.map +1 -1
  327. package/lib/rust-crypto/secret-storage.js +12 -25
  328. package/lib/rust-crypto/secret-storage.js.map +1 -1
  329. package/lib/rust-crypto/verification.js +137 -189
  330. package/lib/rust-crypto/verification.js.map +1 -1
  331. package/lib/scheduler.js +44 -19
  332. package/lib/scheduler.js.map +1 -1
  333. package/lib/secret-storage.js +179 -213
  334. package/lib/secret-storage.js.map +1 -1
  335. package/lib/serverCapabilities.js +6 -9
  336. package/lib/serverCapabilities.js.map +1 -1
  337. package/lib/service-types.js +1 -1
  338. package/lib/service-types.js.map +1 -1
  339. package/lib/sliding-sync-sdk.d.ts.map +1 -1
  340. package/lib/sliding-sync-sdk.js +368 -424
  341. package/lib/sliding-sync-sdk.js.map +1 -1
  342. package/lib/sliding-sync.js +135 -171
  343. package/lib/sliding-sync.js.map +1 -1
  344. package/lib/store/index.js +3 -1
  345. package/lib/store/indexeddb-backend.js +3 -1
  346. package/lib/store/indexeddb-local-backend.js +194 -253
  347. package/lib/store/indexeddb-local-backend.js.map +1 -1
  348. package/lib/store/indexeddb-remote-backend.js +33 -63
  349. package/lib/store/indexeddb-remote-backend.js.map +1 -1
  350. package/lib/store/indexeddb-store-worker.js +22 -23
  351. package/lib/store/indexeddb-store-worker.js.map +1 -1
  352. package/lib/store/indexeddb.js +44 -71
  353. package/lib/store/indexeddb.js.map +1 -1
  354. package/lib/store/local-storage-events-emitter.js +2 -2
  355. package/lib/store/local-storage-events-emitter.js.map +1 -1
  356. package/lib/store/memory.js +34 -57
  357. package/lib/store/memory.js.map +1 -1
  358. package/lib/store/stub.js +22 -35
  359. package/lib/store/stub.js.map +1 -1
  360. package/lib/sync-accumulator.js +54 -66
  361. package/lib/sync-accumulator.js.map +1 -1
  362. package/lib/sync.d.ts.map +1 -1
  363. package/lib/sync.js +905 -998
  364. package/lib/sync.js.map +1 -1
  365. package/lib/testing.js +63 -105
  366. package/lib/testing.js.map +1 -1
  367. package/lib/thread-utils.js +1 -4
  368. package/lib/thread-utils.js.map +1 -1
  369. package/lib/timeline-window.js +89 -102
  370. package/lib/timeline-window.js.map +1 -1
  371. package/lib/types.js +1 -1
  372. package/lib/types.js.map +1 -1
  373. package/lib/utils/decryptAESSecretStorageItem.js +14 -25
  374. package/lib/utils/decryptAESSecretStorageItem.js.map +1 -1
  375. package/lib/utils/encryptAESSecretStorageItem.js +27 -38
  376. package/lib/utils/encryptAESSecretStorageItem.js.map +1 -1
  377. package/lib/utils/internal/deriveKeys.js +25 -32
  378. package/lib/utils/internal/deriveKeys.js.map +1 -1
  379. package/lib/utils/roomVersion.js +1 -1
  380. package/lib/utils/roomVersion.js.map +1 -1
  381. package/lib/utils.js +83 -135
  382. package/lib/utils.js.map +1 -1
  383. package/lib/version-support.js +3 -3
  384. package/lib/version-support.js.map +1 -1
  385. package/lib/webrtc/audioContext.js +5 -6
  386. package/lib/webrtc/audioContext.js.map +1 -1
  387. package/lib/webrtc/call.js +1081 -1250
  388. package/lib/webrtc/call.js.map +1 -1
  389. package/lib/webrtc/callEventHandler.js +202 -214
  390. package/lib/webrtc/callEventHandler.js.map +1 -1
  391. package/lib/webrtc/callEventTypes.js +2 -2
  392. package/lib/webrtc/callEventTypes.js.map +1 -1
  393. package/lib/webrtc/callFeed.js +18 -20
  394. package/lib/webrtc/callFeed.js.map +1 -1
  395. package/lib/webrtc/groupCall.js +513 -602
  396. package/lib/webrtc/groupCall.js.map +1 -1
  397. package/lib/webrtc/groupCallEventHandler.js +59 -62
  398. package/lib/webrtc/groupCallEventHandler.js.map +1 -1
  399. package/lib/webrtc/mediaHandler.js +198 -232
  400. package/lib/webrtc/mediaHandler.js.map +1 -1
  401. package/lib/webrtc/stats/callFeedStatsReporter.js +16 -20
  402. package/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
  403. package/lib/webrtc/stats/callStatsReportGatherer.js +67 -75
  404. package/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
  405. package/lib/webrtc/stats/callStatsReportSummary.js +3 -1
  406. package/lib/webrtc/stats/connectionStats.js.map +1 -1
  407. package/lib/webrtc/stats/connectionStatsBuilder.js +2 -2
  408. package/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
  409. package/lib/webrtc/stats/connectionStatsReportBuilder.js +20 -24
  410. package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
  411. package/lib/webrtc/stats/groupCallStats.js +6 -8
  412. package/lib/webrtc/stats/groupCallStats.js.map +1 -1
  413. package/lib/webrtc/stats/media/mediaSsrcHandler.js +7 -8
  414. package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
  415. package/lib/webrtc/stats/media/mediaTrackHandler.js +7 -9
  416. package/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
  417. package/lib/webrtc/stats/media/mediaTrackStats.js +3 -3
  418. package/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
  419. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +7 -7
  420. package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
  421. package/lib/webrtc/stats/statsReport.js +1 -1
  422. package/lib/webrtc/stats/statsReport.js.map +1 -1
  423. package/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
  424. package/lib/webrtc/stats/summaryStatsReportGatherer.js +14 -14
  425. package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +1 -1
  426. package/lib/webrtc/stats/trackStatsBuilder.js +32 -34
  427. package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
  428. package/lib/webrtc/stats/transportStats.js +3 -1
  429. package/lib/webrtc/stats/transportStatsBuilder.js +9 -9
  430. package/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
  431. package/lib/webrtc/stats/valueFormatter.js +1 -1
  432. package/lib/webrtc/stats/valueFormatter.js.map +1 -1
  433. package/package.json +18 -33
  434. package/src/@types/global.d.ts +2 -2
  435. package/src/ToDeviceMessageQueue.ts +2 -2
  436. package/src/browser-index.ts +4 -4
  437. package/src/client.ts +15 -20
  438. package/src/crypto-api/index.ts +17 -6
  439. package/src/embedded.ts +4 -6
  440. package/src/filter-component.ts +1 -0
  441. package/src/http-api/utils.ts +1 -1
  442. package/src/interactive-auth.ts +11 -5
  443. package/src/matrixrtc/LivekitTransport.ts +1 -1
  444. package/src/matrixrtc/MatrixRTCSession.ts +1 -1
  445. package/src/models/MSC3089Branch.ts +1 -1
  446. package/src/models/room-sticky-events.ts +1 -0
  447. package/src/models/room.ts +9 -11
  448. package/src/receipt-accumulator.ts +2 -0
  449. package/src/rendezvous/index.ts +1 -1
  450. package/src/rendezvous/transports/MSC4108RendezvousSession.ts +2 -2
  451. package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +1 -1
  452. package/src/rust-crypto/index.ts +6 -6
  453. package/src/rust-crypto/rust-crypto.ts +31 -7
  454. package/src/rust-crypto/verification.ts +1 -1
  455. package/src/sliding-sync-sdk.ts +5 -7
  456. package/src/store/indexeddb-local-backend.ts +3 -3
  457. package/src/sync.ts +6 -8
package/README.md CHANGED
@@ -340,7 +340,7 @@ await matrixClient.initRustCrypto();
340
340
 
341
341
  Note that by default it will attempt to use the Indexed DB provided by the browser as a crypto store. If running outside the browser, you will need to pass [an options object](https://matrix-org.github.io/matrix-js-sdk/classes/matrix.MatrixClient.html#initrustcrypto) which includes `useIndexedDB: false`, to use an ephemeral in-memory store instead. Note that without a persistent store, you'll need to create a new device on the server side (with [`MatrixClient.loginRequest`](https://matrix-org.github.io/matrix-js-sdk/classes/matrix.MatrixClient.html#loginrequest)) each time your application starts.
342
342
 
343
- After calling `initRustCrypto`, you can obtain a reference to the [`CryptoApi`](https://matrix-org.github.io/matrix-js-sdk/interfaces/crypto_api.CryptoApi.html) interface, which is the main entry point for end-to-end encryption, by calling [`MatrixClient.getCrypto`](https://matrix-org.github.io/matrix-js-sdk/classes/matrix.MatrixClient.html#getCrypto).
343
+ After calling `initRustCrypto`, you can obtain a reference to the [`CryptoApi`](https://matrix-org.github.io/matrix-js-sdk/interfaces/crypto-api.CryptoApi.html) interface, which is the main entry point for end-to-end encryption, by calling [`MatrixClient.getCrypto`](https://matrix-org.github.io/matrix-js-sdk/classes/matrix.MatrixClient.html#getCrypto).
344
344
 
345
345
  **WARNING**: the cryptography stack is not thread-safe. Having multiple `MatrixClient` instances connected to the same Indexed DB will cause data corruption and decryption failures. The application layer is responsible for ensuring that only one `MatrixClient` issue is instantiated at a time.
346
346
 
@@ -1 +1,3 @@
1
- export {};
1
+ export {};
2
+ export {};
3
+ //# sourceMappingURL=AESEncryptedSecretStoragePayload.js.map
@@ -1 +1,3 @@
1
- export {};
1
+ export {};
2
+ export {};
3
+ //# sourceMappingURL=IIdentityServerProvider.js.map
@@ -17,18 +17,18 @@ limitations under the License.
17
17
  // allow camelcase as these are things that go onto the wire
18
18
  /* eslint-disable camelcase */
19
19
 
20
- export var PushRuleActionName = /*#__PURE__*/function (PushRuleActionName) {
20
+ export let PushRuleActionName = /*#__PURE__*/function (PushRuleActionName) {
21
21
  PushRuleActionName["DontNotify"] = "dont_notify";
22
22
  PushRuleActionName["Notify"] = "notify";
23
23
  PushRuleActionName["Coalesce"] = "coalesce";
24
24
  return PushRuleActionName;
25
25
  }({});
26
- export var TweakName = /*#__PURE__*/function (TweakName) {
26
+ export let TweakName = /*#__PURE__*/function (TweakName) {
27
27
  TweakName["Highlight"] = "highlight";
28
28
  TweakName["Sound"] = "sound";
29
29
  return TweakName;
30
30
  }({});
31
- export var ConditionOperator = /*#__PURE__*/function (ConditionOperator) {
31
+ export let ConditionOperator = /*#__PURE__*/function (ConditionOperator) {
32
32
  ConditionOperator["ExactEquals"] = "==";
33
33
  ConditionOperator["LessThan"] = "<";
34
34
  ConditionOperator["GreaterThan"] = ">";
@@ -36,11 +36,11 @@ export var ConditionOperator = /*#__PURE__*/function (ConditionOperator) {
36
36
  ConditionOperator["LessThanOrEqual"] = "<=";
37
37
  return ConditionOperator;
38
38
  }({});
39
- export var DMMemberCountCondition = "2";
39
+ export const DMMemberCountCondition = "2";
40
40
  export function isDmMemberCountCondition(condition) {
41
41
  return condition === "==2" || condition === "2";
42
42
  }
43
- export var ConditionKind = /*#__PURE__*/function (ConditionKind) {
43
+ export let ConditionKind = /*#__PURE__*/function (ConditionKind) {
44
44
  ConditionKind["EventMatch"] = "event_match";
45
45
  ConditionKind["EventPropertyIs"] = "event_property_is";
46
46
  ConditionKind["EventPropertyContains"] = "event_property_contains";
@@ -55,7 +55,7 @@ export var ConditionKind = /*#__PURE__*/function (ConditionKind) {
55
55
  // XXX: custom conditions are possible but always fail, and break the typescript discriminated union so ignore them here
56
56
  // IPushRuleCondition<Exclude<string, ConditionKind>> unfortunately does not resolve this at the time of writing.
57
57
 
58
- export var PushRuleKind = /*#__PURE__*/function (PushRuleKind) {
58
+ export let PushRuleKind = /*#__PURE__*/function (PushRuleKind) {
59
59
  PushRuleKind["Override"] = "override";
60
60
  PushRuleKind["ContentSpecific"] = "content";
61
61
  PushRuleKind["RoomSpecific"] = "room";
@@ -63,7 +63,7 @@ export var PushRuleKind = /*#__PURE__*/function (PushRuleKind) {
63
63
  PushRuleKind["Underride"] = "underride";
64
64
  return PushRuleKind;
65
65
  }({});
66
- export var RuleId = /*#__PURE__*/function (RuleId) {
66
+ export let RuleId = /*#__PURE__*/function (RuleId) {
67
67
  RuleId["Master"] = ".m.rule.master";
68
68
  RuleId["IsUserMention"] = ".m.rule.is_user_mention";
69
69
  RuleId["IsRoomMention"] = ".m.rule.is_room_mention";
@@ -1 +1 @@
1
- {"version":3,"file":"PushRules.js","names":["PushRuleActionName","TweakName","ConditionOperator","DMMemberCountCondition","isDmMemberCountCondition","condition","ConditionKind","PushRuleKind","RuleId"],"sources":["../../src/@types/PushRules.ts"],"sourcesContent":["/*\nCopyright 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// allow camelcase as these are things that go onto the wire\n/* eslint-disable camelcase */\n\nexport enum PushRuleActionName {\n DontNotify = \"dont_notify\",\n Notify = \"notify\",\n Coalesce = \"coalesce\",\n}\n\nexport enum TweakName {\n Highlight = \"highlight\",\n Sound = \"sound\",\n}\n\nexport type Tweak<N extends TweakName, V> = {\n set_tweak: N;\n value?: V;\n};\n\nexport type TweakHighlight = Tweak<TweakName.Highlight, boolean>;\nexport type TweakSound = Tweak<TweakName.Sound, string>;\n\nexport type Tweaks = TweakHighlight | TweakSound;\n\nexport enum ConditionOperator {\n ExactEquals = \"==\",\n LessThan = \"<\",\n GreaterThan = \">\",\n GreaterThanOrEqual = \">=\",\n LessThanOrEqual = \"<=\",\n}\n\nexport type PushRuleAction = Tweaks | PushRuleActionName;\n\nexport type MemberCountCondition<N extends number, Op extends ConditionOperator = ConditionOperator.ExactEquals> =\n | `${Op}${N}`\n | (Op extends ConditionOperator.ExactEquals ? `${N}` : never);\n\nexport type AnyMemberCountCondition = MemberCountCondition<number, ConditionOperator>;\n\nexport const DMMemberCountCondition: MemberCountCondition<2> = \"2\";\n\nexport function isDmMemberCountCondition(condition: AnyMemberCountCondition): boolean {\n return condition === \"==2\" || condition === \"2\";\n}\n\nexport enum ConditionKind {\n EventMatch = \"event_match\",\n EventPropertyIs = \"event_property_is\",\n EventPropertyContains = \"event_property_contains\",\n ContainsDisplayName = \"contains_display_name\",\n RoomMemberCount = \"room_member_count\",\n SenderNotificationPermission = \"sender_notification_permission\",\n CallStarted = \"call_started\",\n CallStartedPrefix = \"org.matrix.msc3914.call_started\",\n}\n\nexport interface IPushRuleCondition<N extends ConditionKind | string> {\n [k: string]: any; // for custom conditions, there can be other fields here\n kind: N;\n}\n\nexport interface IEventMatchCondition extends IPushRuleCondition<ConditionKind.EventMatch> {\n key: string;\n pattern?: string;\n // Note that value property is an optimization for patterns which do not do\n // any globbing and when the key is not \"content.body\".\n value?: string;\n}\n\nexport interface IEventPropertyIsCondition extends IPushRuleCondition<ConditionKind.EventPropertyIs> {\n key: string;\n value: string | boolean | null | number;\n}\n\nexport interface IEventPropertyContainsCondition extends IPushRuleCondition<ConditionKind.EventPropertyContains> {\n key: string;\n value: string | boolean | null | number;\n}\n\nexport interface IContainsDisplayNameCondition extends IPushRuleCondition<ConditionKind.ContainsDisplayName> {\n // no additional fields\n}\n\nexport interface IRoomMemberCountCondition extends IPushRuleCondition<ConditionKind.RoomMemberCount> {\n is: AnyMemberCountCondition;\n}\n\nexport interface ISenderNotificationPermissionCondition extends IPushRuleCondition<ConditionKind.SenderNotificationPermission> {\n key: string;\n}\n\nexport interface ICallStartedCondition extends IPushRuleCondition<ConditionKind.CallStarted> {\n // no additional fields\n}\n\nexport interface ICallStartedPrefixCondition extends IPushRuleCondition<ConditionKind.CallStartedPrefix> {\n // no additional fields\n}\n\n// XXX: custom conditions are possible but always fail, and break the typescript discriminated union so ignore them here\n// IPushRuleCondition<Exclude<string, ConditionKind>> unfortunately does not resolve this at the time of writing.\nexport type PushRuleCondition =\n | IEventMatchCondition\n | IEventPropertyIsCondition\n | IEventPropertyContainsCondition\n | IContainsDisplayNameCondition\n | IRoomMemberCountCondition\n | ISenderNotificationPermissionCondition\n | ICallStartedCondition\n | ICallStartedPrefixCondition;\n\nexport enum PushRuleKind {\n Override = \"override\",\n ContentSpecific = \"content\",\n RoomSpecific = \"room\",\n SenderSpecific = \"sender\",\n Underride = \"underride\",\n}\n\nexport enum RuleId {\n Master = \".m.rule.master\",\n IsUserMention = \".m.rule.is_user_mention\",\n IsRoomMention = \".m.rule.is_room_mention\",\n ContainsDisplayName = \".m.rule.contains_display_name\",\n ContainsUserName = \".m.rule.contains_user_name\",\n AtRoomNotification = \".m.rule.roomnotif\",\n DM = \".m.rule.room_one_to_one\",\n EncryptedDM = \".m.rule.encrypted_room_one_to_one\",\n Message = \".m.rule.message\",\n EncryptedMessage = \".m.rule.encrypted\",\n InviteToSelf = \".m.rule.invite_for_me\",\n MemberEvent = \".m.rule.member_event\",\n IncomingCall = \".m.rule.call\",\n SuppressNotices = \".m.rule.suppress_notices\",\n Tombstone = \".m.rule.tombstone\",\n PollStart = \".m.rule.poll_start\",\n PollStartUnstable = \".org.matrix.msc3930.rule.poll_start\",\n PollEnd = \".m.rule.poll_end\",\n PollEndUnstable = \".org.matrix.msc3930.rule.poll_end\",\n PollStartOneToOne = \".m.rule.poll_start_one_to_one\",\n PollStartOneToOneUnstable = \".org.matrix.msc3930.rule.poll_start_one_to_one\",\n PollEndOneToOne = \".m.rule.poll_end_one_to_one\",\n PollEndOneToOneUnstable = \".org.matrix.msc3930.rule.poll_end_one_to_one\",\n}\n\nexport type PushRuleSet = {\n [k in PushRuleKind]?: IPushRule[];\n};\n\nexport interface IPushRule {\n actions: PushRuleAction[];\n conditions?: PushRuleCondition[];\n default: boolean;\n enabled: boolean;\n pattern?: string;\n rule_id: RuleId | string;\n}\n\nexport interface IAnnotatedPushRule extends IPushRule {\n kind: PushRuleKind;\n}\n\nexport interface IPushRules {\n global: PushRuleSet;\n device?: PushRuleSet;\n}\n\nexport interface IPusher {\n \"app_display_name\": string;\n \"app_id\": string;\n \"data\": {\n format?: string;\n url?: string; // TODO: Required if kind==http\n brand?: string; // TODO: For email notifications only? Unspecced field\n };\n \"device_display_name\": string;\n \"kind\": \"http\" | string;\n \"lang\": string;\n \"profile_tag\"?: string;\n \"pushkey\": string;\n \"enabled\"?: boolean | null;\n \"org.matrix.msc3881.enabled\"?: boolean | null;\n \"device_id\"?: string | null;\n \"org.matrix.msc3881.device_id\"?: string | null;\n}\n\nexport interface IPusherRequest extends Omit<IPusher, \"device_id\" | \"org.matrix.msc3881.device_id\"> {\n append?: boolean;\n}\n\n/* eslint-enable camelcase */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAM9B,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAerB,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAgB7B,OAAO,IAAMC,sBAA+C,GAAG,GAAG;AAElE,OAAO,SAASC,wBAAwBA,CAACC,SAAkC,EAAW;EAClF,OAAOA,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,GAAG;AACnD;AAEA,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;;AAsDzB;AACA;;AAWA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAQxB,WAAYC,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;;AAuElB","ignoreList":[]}
1
+ {"version":3,"file":"PushRules.js","names":[],"sources":["../../src/@types/PushRules.ts"],"sourcesContent":["/*\nCopyright 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// allow camelcase as these are things that go onto the wire\n/* eslint-disable camelcase */\n\nexport enum PushRuleActionName {\n DontNotify = \"dont_notify\",\n Notify = \"notify\",\n Coalesce = \"coalesce\",\n}\n\nexport enum TweakName {\n Highlight = \"highlight\",\n Sound = \"sound\",\n}\n\nexport type Tweak<N extends TweakName, V> = {\n set_tweak: N;\n value?: V;\n};\n\nexport type TweakHighlight = Tweak<TweakName.Highlight, boolean>;\nexport type TweakSound = Tweak<TweakName.Sound, string>;\n\nexport type Tweaks = TweakHighlight | TweakSound;\n\nexport enum ConditionOperator {\n ExactEquals = \"==\",\n LessThan = \"<\",\n GreaterThan = \">\",\n GreaterThanOrEqual = \">=\",\n LessThanOrEqual = \"<=\",\n}\n\nexport type PushRuleAction = Tweaks | PushRuleActionName;\n\nexport type MemberCountCondition<N extends number, Op extends ConditionOperator = ConditionOperator.ExactEquals> =\n | `${Op}${N}`\n | (Op extends ConditionOperator.ExactEquals ? `${N}` : never);\n\nexport type AnyMemberCountCondition = MemberCountCondition<number, ConditionOperator>;\n\nexport const DMMemberCountCondition: MemberCountCondition<2> = \"2\";\n\nexport function isDmMemberCountCondition(condition: AnyMemberCountCondition): boolean {\n return condition === \"==2\" || condition === \"2\";\n}\n\nexport enum ConditionKind {\n EventMatch = \"event_match\",\n EventPropertyIs = \"event_property_is\",\n EventPropertyContains = \"event_property_contains\",\n ContainsDisplayName = \"contains_display_name\",\n RoomMemberCount = \"room_member_count\",\n SenderNotificationPermission = \"sender_notification_permission\",\n CallStarted = \"call_started\",\n CallStartedPrefix = \"org.matrix.msc3914.call_started\",\n}\n\nexport interface IPushRuleCondition<N extends ConditionKind | string> {\n [k: string]: any; // for custom conditions, there can be other fields here\n kind: N;\n}\n\nexport interface IEventMatchCondition extends IPushRuleCondition<ConditionKind.EventMatch> {\n key: string;\n pattern?: string;\n // Note that value property is an optimization for patterns which do not do\n // any globbing and when the key is not \"content.body\".\n value?: string;\n}\n\nexport interface IEventPropertyIsCondition extends IPushRuleCondition<ConditionKind.EventPropertyIs> {\n key: string;\n value: string | boolean | null | number;\n}\n\nexport interface IEventPropertyContainsCondition extends IPushRuleCondition<ConditionKind.EventPropertyContains> {\n key: string;\n value: string | boolean | null | number;\n}\n\nexport interface IContainsDisplayNameCondition extends IPushRuleCondition<ConditionKind.ContainsDisplayName> {\n // no additional fields\n}\n\nexport interface IRoomMemberCountCondition extends IPushRuleCondition<ConditionKind.RoomMemberCount> {\n is: AnyMemberCountCondition;\n}\n\nexport interface ISenderNotificationPermissionCondition extends IPushRuleCondition<ConditionKind.SenderNotificationPermission> {\n key: string;\n}\n\nexport interface ICallStartedCondition extends IPushRuleCondition<ConditionKind.CallStarted> {\n // no additional fields\n}\n\nexport interface ICallStartedPrefixCondition extends IPushRuleCondition<ConditionKind.CallStartedPrefix> {\n // no additional fields\n}\n\n// XXX: custom conditions are possible but always fail, and break the typescript discriminated union so ignore them here\n// IPushRuleCondition<Exclude<string, ConditionKind>> unfortunately does not resolve this at the time of writing.\nexport type PushRuleCondition =\n | IEventMatchCondition\n | IEventPropertyIsCondition\n | IEventPropertyContainsCondition\n | IContainsDisplayNameCondition\n | IRoomMemberCountCondition\n | ISenderNotificationPermissionCondition\n | ICallStartedCondition\n | ICallStartedPrefixCondition;\n\nexport enum PushRuleKind {\n Override = \"override\",\n ContentSpecific = \"content\",\n RoomSpecific = \"room\",\n SenderSpecific = \"sender\",\n Underride = \"underride\",\n}\n\nexport enum RuleId {\n Master = \".m.rule.master\",\n IsUserMention = \".m.rule.is_user_mention\",\n IsRoomMention = \".m.rule.is_room_mention\",\n ContainsDisplayName = \".m.rule.contains_display_name\",\n ContainsUserName = \".m.rule.contains_user_name\",\n AtRoomNotification = \".m.rule.roomnotif\",\n DM = \".m.rule.room_one_to_one\",\n EncryptedDM = \".m.rule.encrypted_room_one_to_one\",\n Message = \".m.rule.message\",\n EncryptedMessage = \".m.rule.encrypted\",\n InviteToSelf = \".m.rule.invite_for_me\",\n MemberEvent = \".m.rule.member_event\",\n IncomingCall = \".m.rule.call\",\n SuppressNotices = \".m.rule.suppress_notices\",\n Tombstone = \".m.rule.tombstone\",\n PollStart = \".m.rule.poll_start\",\n PollStartUnstable = \".org.matrix.msc3930.rule.poll_start\",\n PollEnd = \".m.rule.poll_end\",\n PollEndUnstable = \".org.matrix.msc3930.rule.poll_end\",\n PollStartOneToOne = \".m.rule.poll_start_one_to_one\",\n PollStartOneToOneUnstable = \".org.matrix.msc3930.rule.poll_start_one_to_one\",\n PollEndOneToOne = \".m.rule.poll_end_one_to_one\",\n PollEndOneToOneUnstable = \".org.matrix.msc3930.rule.poll_end_one_to_one\",\n}\n\nexport type PushRuleSet = {\n [k in PushRuleKind]?: IPushRule[];\n};\n\nexport interface IPushRule {\n actions: PushRuleAction[];\n conditions?: PushRuleCondition[];\n default: boolean;\n enabled: boolean;\n pattern?: string;\n rule_id: RuleId | string;\n}\n\nexport interface IAnnotatedPushRule extends IPushRule {\n kind: PushRuleKind;\n}\n\nexport interface IPushRules {\n global: PushRuleSet;\n device?: PushRuleSet;\n}\n\nexport interface IPusher {\n \"app_display_name\": string;\n \"app_id\": string;\n \"data\": {\n format?: string;\n url?: string; // TODO: Required if kind==http\n brand?: string; // TODO: For email notifications only? Unspecced field\n };\n \"device_display_name\": string;\n \"kind\": \"http\" | string;\n \"lang\": string;\n \"profile_tag\"?: string;\n \"pushkey\": string;\n \"enabled\"?: boolean | null;\n \"org.matrix.msc3881.enabled\"?: boolean | null;\n \"device_id\"?: string | null;\n \"org.matrix.msc3881.device_id\"?: string | null;\n}\n\nexport interface IPusherRequest extends Omit<IPusher, \"device_id\" | \"org.matrix.msc3881.device_id\"> {\n append?: boolean;\n}\n\n/* eslint-enable camelcase */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,WAAY,kBAAkB,0BAAlB,kBAAkB;EAAlB,kBAAkB;EAAlB,kBAAkB;EAAlB,kBAAkB;EAAA,OAAlB,kBAAkB;AAAA;AAM9B,WAAY,SAAS,0BAAT,SAAS;EAAT,SAAS;EAAT,SAAS;EAAA,OAAT,SAAS;AAAA;AAerB,WAAY,iBAAiB,0BAAjB,iBAAiB;EAAjB,iBAAiB;EAAjB,iBAAiB;EAAjB,iBAAiB;EAAjB,iBAAiB;EAAjB,iBAAiB;EAAA,OAAjB,iBAAiB;AAAA;AAgB7B,OAAO,MAAM,sBAA+C,GAAG,GAAG;AAElE,OAAO,SAAS,wBAAwB,CAAC,SAAkC,EAAW;EAClF,OAAO,SAAS,KAAK,KAAK,IAAI,SAAS,KAAK,GAAG;AACnD;AAEA,WAAY,aAAa,0BAAb,aAAa;EAAb,aAAa;EAAb,aAAa;EAAb,aAAa;EAAb,aAAa;EAAb,aAAa;EAAb,aAAa;EAAb,aAAa;EAAb,aAAa;EAAA,OAAb,aAAa;AAAA;;AAsDzB;AACA;;AAWA,WAAY,YAAY,0BAAZ,YAAY;EAAZ,YAAY;EAAZ,YAAY;EAAZ,YAAY;EAAZ,YAAY;EAAZ,YAAY;EAAA,OAAZ,YAAY;AAAA;AAQxB,WAAY,MAAM,0BAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAA,OAAN,MAAM;AAAA;;AAuElB","ignoreList":[]}
@@ -29,19 +29,19 @@ import { UnstableValue } from "../NamespacedValue.js";
29
29
  * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login
30
30
  */
31
31
 
32
- export var OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue("oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility");
32
+ export const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue("oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility");
33
33
 
34
34
  /**
35
35
  * @alias
36
36
  * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.
37
37
  */
38
- export var DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;
38
+ export const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;
39
39
 
40
40
  /**
41
41
  * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso
42
42
  */
43
43
 
44
- export var IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand) {
44
+ export let IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand) {
45
45
  IdentityProviderBrand["Gitlab"] = "gitlab";
46
46
  IdentityProviderBrand["Github"] = "github";
47
47
  IdentityProviderBrand["Apple"] = "apple";
@@ -50,7 +50,7 @@ export var IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand)
50
50
  IdentityProviderBrand["Twitter"] = "twitter";
51
51
  return IdentityProviderBrand;
52
52
  }({});
53
- export var SSOAction = /*#__PURE__*/function (SSOAction) {
53
+ export let SSOAction = /*#__PURE__*/function (SSOAction) {
54
54
  /** The user intends to login to an existing account */
55
55
  SSOAction["LOGIN"] = "login";
56
56
  /** The user intends to register for a new account */
@@ -1 +1 @@
1
- {"version":3,"file":"auth.js","names":["UnstableValue","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type IClientWellKnown } from \"../client.ts\";\n\n// disable lint because these are wire responses\n/* eslint-disable camelcase */\n\n/**\n * Represents a response to the CSAPI `/refresh` endpoint.\n */\nexport interface IRefreshTokenResponse {\n access_token: string;\n expires_in_ms: number;\n refresh_token: string;\n}\n\n/* eslint-enable camelcase */\n\n/**\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\n */\nexport interface ILoginFlowsResponse {\n flows: LoginFlow[];\n}\n\nexport type LoginFlow = ISSOFlow | IPasswordFlow | ILoginFlow;\n\nexport interface ILoginFlow {\n type: string;\n}\n\nexport interface IPasswordFlow extends ILoginFlow {\n type: \"m.login.password\";\n}\n\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\n \"oauth_aware_preferred\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\n\n/**\n * @alias\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\n */\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\n\n/**\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\n */\nexport interface ISSOFlow extends ILoginFlow {\n type: \"m.login.sso\" | \"m.login.cas\";\n // eslint-disable-next-line camelcase\n identity_providers?: IIdentityProvider[];\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\n}\n\nexport enum IdentityProviderBrand {\n Gitlab = \"gitlab\",\n Github = \"github\",\n Apple = \"apple\",\n Google = \"google\",\n Facebook = \"facebook\",\n Twitter = \"twitter\",\n}\n\nexport interface IIdentityProvider {\n id: string;\n name: string;\n icon?: string;\n brand?: IdentityProviderBrand | string;\n}\n\nexport enum SSOAction {\n /** The user intends to login to an existing account */\n LOGIN = \"login\",\n\n /** The user intends to register for a new account */\n REGISTER = \"register\",\n}\n\n/**\n * A client can identify a user using their Matrix ID.\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\n */\ntype UserLoginIdentifier = {\n type: \"m.id.user\";\n user: string;\n};\n\n/**\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\n * where the 3PID was previously associated using the /account/3pid API.\n * See the 3PID Types Appendix for a list of Third-party ID media.\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\n */\ntype ThirdPartyLoginIdentifier = {\n type: \"m.id.thirdparty\";\n medium: string;\n address: string;\n};\n\n/**\n * A client can identify a user using a phone number associated with the user’s account,\n * where the phone number was previously associated using the /account/3pid API.\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\n * If the client wishes to canonicalise the phone number,\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\n *\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\n *\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\n */\ntype PhoneLoginIdentifier = {\n type: \"m.id.phone\";\n country: string;\n phone: string;\n};\n\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\n\n/**\n * User Identifiers usable for login & user-interactive authentication.\n *\n * Extensibly allows more than Matrix specified identifiers.\n */\nexport type UserIdentifier =\n | SpecUserIdentifier\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\n\n/**\n * Request body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginRequest {\n /**\n * The login type being used.\n */\n type: \"m.login.password\" | \"m.login.token\" | string;\n /**\n * ID of the client device.\n * If this does not correspond to a known client device, a new device will be created.\n * The given device ID must not be the same as a cross-signing key ID.\n * The server will auto-generate a device_id if this is not specified.\n */\n device_id?: string;\n /**\n * Identification information for a user\n */\n identifier?: UserIdentifier;\n /**\n * A display name to assign to the newly-created device.\n * Ignored if device_id corresponds to a known device.\n */\n initial_device_display_name?: string;\n /**\n * When logging in using a third-party identifier, the medium of the identifier.\n * Must be `email`.\n * @deprecated in favour of `identifier`.\n */\n medium?: \"email\";\n /**\n * Required when type is `m.login.password`. The user’s password.\n */\n password?: string;\n /**\n * If true, the client supports refresh tokens.\n */\n refresh_token?: boolean;\n /**\n * Required when type is `m.login.token`. Part of Token-based login.\n */\n token?: string;\n /**\n * The fully qualified user ID or just local part of the user ID, to log in.\n * @deprecated in favour of identifier.\n */\n user?: string;\n // Extensible\n [key: string]: any;\n}\n\n// Export for backwards compatibility\nexport type ILoginParams = LoginRequest;\n\n/**\n * Response body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginResponse {\n /**\n * An access token for the account.\n * This access token can then be used to authorize other requests.\n */\n access_token: string;\n /**\n * ID of the logged-in device.\n * Will be the same as the corresponding parameter in the request, if one was specified.\n */\n device_id: string;\n /**\n * The fully-qualified Matrix ID for the account.\n */\n user_id: string;\n /**\n * The lifetime of the access token, in milliseconds.\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\n * If not given, the client can assume that the access token will not expire.\n */\n expires_in_ms?: number;\n /**\n * A refresh token for the account.\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\n */\n refresh_token?: string;\n /**\n * Optional client configuration provided by the server.\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\n * This object takes the same form as the one returned from .well-known autodiscovery.\n */\n well_known?: IClientWellKnown;\n /**\n * The server_name of the homeserver on which the account has been registered.\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\n */\n home_server?: string;\n}\n\n/**\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\n */\nexport interface LoginTokenPostResponse {\n /**\n * The token to use with `m.login.token` to authenticate.\n */\n login_token: string;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAeA,OAAO,IAAMC,gCAAgC,GAAG,IAAID,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAME,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AAGA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"auth.js","names":[],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type IClientWellKnown } from \"../client.ts\";\n\n// disable lint because these are wire responses\n/* eslint-disable camelcase */\n\n/**\n * Represents a response to the CSAPI `/refresh` endpoint.\n */\nexport interface IRefreshTokenResponse {\n access_token: string;\n expires_in_ms: number;\n refresh_token: string;\n}\n\n/* eslint-enable camelcase */\n\n/**\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\n */\nexport interface ILoginFlowsResponse {\n flows: LoginFlow[];\n}\n\nexport type LoginFlow = ISSOFlow | IPasswordFlow | ILoginFlow;\n\nexport interface ILoginFlow {\n type: string;\n}\n\nexport interface IPasswordFlow extends ILoginFlow {\n type: \"m.login.password\";\n}\n\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\n \"oauth_aware_preferred\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\n\n/**\n * @alias\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\n */\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\n\n/**\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\n */\nexport interface ISSOFlow extends ILoginFlow {\n type: \"m.login.sso\" | \"m.login.cas\";\n // eslint-disable-next-line camelcase\n identity_providers?: IIdentityProvider[];\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\n}\n\nexport enum IdentityProviderBrand {\n Gitlab = \"gitlab\",\n Github = \"github\",\n Apple = \"apple\",\n Google = \"google\",\n Facebook = \"facebook\",\n Twitter = \"twitter\",\n}\n\nexport interface IIdentityProvider {\n id: string;\n name: string;\n icon?: string;\n brand?: IdentityProviderBrand | string;\n}\n\nexport enum SSOAction {\n /** The user intends to login to an existing account */\n LOGIN = \"login\",\n\n /** The user intends to register for a new account */\n REGISTER = \"register\",\n}\n\n/**\n * A client can identify a user using their Matrix ID.\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\n */\ntype UserLoginIdentifier = {\n type: \"m.id.user\";\n user: string;\n};\n\n/**\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\n * where the 3PID was previously associated using the /account/3pid API.\n * See the 3PID Types Appendix for a list of Third-party ID media.\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\n */\ntype ThirdPartyLoginIdentifier = {\n type: \"m.id.thirdparty\";\n medium: string;\n address: string;\n};\n\n/**\n * A client can identify a user using a phone number associated with the user’s account,\n * where the phone number was previously associated using the /account/3pid API.\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\n * If the client wishes to canonicalise the phone number,\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\n *\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\n *\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\n */\ntype PhoneLoginIdentifier = {\n type: \"m.id.phone\";\n country: string;\n phone: string;\n};\n\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\n\n/**\n * User Identifiers usable for login & user-interactive authentication.\n *\n * Extensibly allows more than Matrix specified identifiers.\n */\nexport type UserIdentifier =\n | SpecUserIdentifier\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\n\n/**\n * Request body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginRequest {\n /**\n * The login type being used.\n */\n type: \"m.login.password\" | \"m.login.token\" | string;\n /**\n * ID of the client device.\n * If this does not correspond to a known client device, a new device will be created.\n * The given device ID must not be the same as a cross-signing key ID.\n * The server will auto-generate a device_id if this is not specified.\n */\n device_id?: string;\n /**\n * Identification information for a user\n */\n identifier?: UserIdentifier;\n /**\n * A display name to assign to the newly-created device.\n * Ignored if device_id corresponds to a known device.\n */\n initial_device_display_name?: string;\n /**\n * When logging in using a third-party identifier, the medium of the identifier.\n * Must be `email`.\n * @deprecated in favour of `identifier`.\n */\n medium?: \"email\";\n /**\n * Required when type is `m.login.password`. The user’s password.\n */\n password?: string;\n /**\n * If true, the client supports refresh tokens.\n */\n refresh_token?: boolean;\n /**\n * Required when type is `m.login.token`. Part of Token-based login.\n */\n token?: string;\n /**\n * The fully qualified user ID or just local part of the user ID, to log in.\n * @deprecated in favour of identifier.\n */\n user?: string;\n // Extensible\n [key: string]: any;\n}\n\n// Export for backwards compatibility\nexport type ILoginParams = LoginRequest;\n\n/**\n * Response body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginResponse {\n /**\n * An access token for the account.\n * This access token can then be used to authorize other requests.\n */\n access_token: string;\n /**\n * ID of the logged-in device.\n * Will be the same as the corresponding parameter in the request, if one was specified.\n */\n device_id: string;\n /**\n * The fully-qualified Matrix ID for the account.\n */\n user_id: string;\n /**\n * The lifetime of the access token, in milliseconds.\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\n * If not given, the client can assume that the access token will not expire.\n */\n expires_in_ms?: number;\n /**\n * A refresh token for the account.\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\n */\n refresh_token?: string;\n /**\n * Optional client configuration provided by the server.\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\n * This object takes the same form as the one returned from .well-known autodiscovery.\n */\n well_known?: IClientWellKnown;\n /**\n * The server_name of the homeserver on which the account has been registered.\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\n */\n home_server?: string;\n}\n\n/**\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\n */\nexport interface LoginTokenPostResponse {\n /**\n * The token to use with `m.login.token` to authenticate.\n */\n login_token: string;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAeA,OAAO,MAAM,gCAAgC,GAAG,IAAI,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAM,4BAA4B,GAAG,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAY,qBAAqB,0BAArB,qBAAqB;EAArB,qBAAqB;EAArB,qBAAqB;EAArB,qBAAqB;EAArB,qBAAqB;EAArB,qBAAqB;EAArB,qBAAqB;EAAA,OAArB,qBAAqB;AAAA;AAgBjC,WAAY,SAAS,0BAAT,SAAS;EACjB;EADQ,SAAS;EAIjB;EAJQ,SAAS;EAAA,OAAT,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AAGA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
@@ -61,8 +61,8 @@ import { UnstableValue } from "../NamespacedValue.js";
61
61
  /**
62
62
  * Non-variable type for m.beacon_info event content
63
63
  */
64
- export var M_BEACON_INFO = new UnstableValue("m.beacon_info", "org.matrix.msc3672.beacon_info");
65
- export var M_BEACON = new UnstableValue("m.beacon", "org.matrix.msc3672.beacon");
64
+ export const M_BEACON_INFO = new UnstableValue("m.beacon_info", "org.matrix.msc3672.beacon_info");
65
+ export const M_BEACON = new UnstableValue("m.beacon", "org.matrix.msc3672.beacon");
66
66
 
67
67
  /**
68
68
  * m.beacon_info Event example from the spec
@@ -1 +1 @@
1
- {"version":3,"file":"beacon.js","names":["UnstableValue","M_BEACON_INFO","M_BEACON"],"sources":["../../src/@types/beacon.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type RelatesToRelationship, type REFERENCE_RELATION } from \"./extensible_events.ts\";\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type MAssetEvent, type MLocationEvent, type MTimestampEvent } from \"./location.ts\";\n\n/**\n * Beacon info and beacon event types as described in MSC3672\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n */\n\n/**\n * Beacon info events are state events.\n * We have two requirements for these events:\n * 1. they can only be written by their owner\n * 2. a user can have an arbitrary number of beacon_info events\n *\n * 1. is achieved by setting the state_key to the owners mxid.\n * Event keys in room state are a combination of `type` + `state_key`.\n * To achieve an arbitrary number of only owner-writable state events\n * we introduce a variable suffix to the event type\n *\n * @example\n * ```\n * {\n * \"type\": \"m.beacon_info.@matthew:matrix.org.1\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"The Matthew Tracker\",\n * \"timeout\": 86400000,\n * },\n * // more content as described below\n * }\n * },\n * {\n * \"type\": \"m.beacon_info.@matthew:matrix.org.2\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"Another different Matthew tracker\",\n * \"timeout\": 400000,\n * },\n * // more content as described below\n * }\n * }\n * ```\n */\n\n/**\n * Non-variable type for m.beacon_info event content\n */\nexport const M_BEACON_INFO = new UnstableValue(\"m.beacon_info\", \"org.matrix.msc3672.beacon_info\");\nexport const M_BEACON = new UnstableValue(\"m.beacon\", \"org.matrix.msc3672.beacon\");\n\nexport type MBeaconInfoContent = {\n description?: string;\n // how long from the last event until we consider the beacon inactive in milliseconds\n timeout: number;\n // true when this is a live location beacon\n // https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n live?: boolean;\n};\n\n/**\n * m.beacon_info Event example from the spec\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n * @example\n * ```\n * {\n * \"type\": \"m.beacon_info\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"The Matthew Tracker\", // same as an `m.location` description\n * \"timeout\": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds\n * },\n * \"m.ts\": 1436829458432, // creation timestamp of the beacon on the client\n * \"m.asset\": {\n * \"type\": \"m.self\" // the type of asset being tracked as per MSC3488\n * }\n * }\n * }\n * ```\n */\n\n/**\n * m.beacon_info.* event content\n */\nexport type MBeaconInfoEventContent = MBeaconInfoContent &\n // creation timestamp of the beacon on the client\n MTimestampEvent &\n // the type of asset being tracked as per MSC3488\n MAssetEvent;\n\n/**\n * m.beacon event example\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n * @example\n * ```\n * {\n * \"type\": \"m.beacon\",\n * \"sender\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.relates_to\": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674\n * \"rel_type\": \"m.reference\", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267\n * \"event_id\": \"$beacon_info\"\n * },\n * \"m.location\": {\n * \"uri\": \"geo:51.5008,0.1247;u=35\",\n * \"description\": \"Arbitrary beacon information\"\n * },\n * \"m.ts\": 1636829458432,\n * }\n * }\n * ```\n */\n\n/**\n * Content of an m.beacon event\n */\nexport type MBeaconEventContent = MLocationEvent &\n // timestamp when location was taken\n MTimestampEvent &\n // relates to a beacon_info event\n RelatesToRelationship<typeof REFERENCE_RELATION>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,uBAAuB;AAGrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,IAAMC,aAAa,GAAG,IAAID,aAAa,CAAC,eAAe,EAAE,gCAAgC,CAAC;AACjG,OAAO,IAAME,QAAQ,GAAG,IAAIF,aAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;;AAWlF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"file":"beacon.js","names":[],"sources":["../../src/@types/beacon.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type RelatesToRelationship, type REFERENCE_RELATION } from \"./extensible_events.ts\";\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type MAssetEvent, type MLocationEvent, type MTimestampEvent } from \"./location.ts\";\n\n/**\n * Beacon info and beacon event types as described in MSC3672\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n */\n\n/**\n * Beacon info events are state events.\n * We have two requirements for these events:\n * 1. they can only be written by their owner\n * 2. a user can have an arbitrary number of beacon_info events\n *\n * 1. is achieved by setting the state_key to the owners mxid.\n * Event keys in room state are a combination of `type` + `state_key`.\n * To achieve an arbitrary number of only owner-writable state events\n * we introduce a variable suffix to the event type\n *\n * @example\n * ```\n * {\n * \"type\": \"m.beacon_info.@matthew:matrix.org.1\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"The Matthew Tracker\",\n * \"timeout\": 86400000,\n * },\n * // more content as described below\n * }\n * },\n * {\n * \"type\": \"m.beacon_info.@matthew:matrix.org.2\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"Another different Matthew tracker\",\n * \"timeout\": 400000,\n * },\n * // more content as described below\n * }\n * }\n * ```\n */\n\n/**\n * Non-variable type for m.beacon_info event content\n */\nexport const M_BEACON_INFO = new UnstableValue(\"m.beacon_info\", \"org.matrix.msc3672.beacon_info\");\nexport const M_BEACON = new UnstableValue(\"m.beacon\", \"org.matrix.msc3672.beacon\");\n\nexport type MBeaconInfoContent = {\n description?: string;\n // how long from the last event until we consider the beacon inactive in milliseconds\n timeout: number;\n // true when this is a live location beacon\n // https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n live?: boolean;\n};\n\n/**\n * m.beacon_info Event example from the spec\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n * @example\n * ```\n * {\n * \"type\": \"m.beacon_info\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"The Matthew Tracker\", // same as an `m.location` description\n * \"timeout\": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds\n * },\n * \"m.ts\": 1436829458432, // creation timestamp of the beacon on the client\n * \"m.asset\": {\n * \"type\": \"m.self\" // the type of asset being tracked as per MSC3488\n * }\n * }\n * }\n * ```\n */\n\n/**\n * m.beacon_info.* event content\n */\nexport type MBeaconInfoEventContent = MBeaconInfoContent &\n // creation timestamp of the beacon on the client\n MTimestampEvent &\n // the type of asset being tracked as per MSC3488\n MAssetEvent;\n\n/**\n * m.beacon event example\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n * @example\n * ```\n * {\n * \"type\": \"m.beacon\",\n * \"sender\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.relates_to\": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674\n * \"rel_type\": \"m.reference\", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267\n * \"event_id\": \"$beacon_info\"\n * },\n * \"m.location\": {\n * \"uri\": \"geo:51.5008,0.1247;u=35\",\n * \"description\": \"Arbitrary beacon information\"\n * },\n * \"m.ts\": 1636829458432,\n * }\n * }\n * ```\n */\n\n/**\n * Content of an m.beacon event\n */\nexport type MBeaconEventContent = MLocationEvent &\n // timestamp when location was taken\n MTimestampEvent &\n // relates to a beacon_info event\n RelatesToRelationship<typeof REFERENCE_RELATION>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAAS,aAAa,QAAQ,uBAAuB;AAGrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,MAAM,aAAa,GAAG,IAAI,aAAa,CAAC,eAAe,EAAE,gCAAgC,CAAC;AACjG,OAAO,MAAM,QAAQ,GAAG,IAAI,aAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;;AAWlF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","ignoreList":[]}
@@ -1 +1,3 @@
1
- export {};
1
+ export {};
2
+ export {};
3
+ //# sourceMappingURL=common.js.map
@@ -1 +1,3 @@
1
- export {};
1
+ export {};
2
+ export {};
3
+ //# sourceMappingURL=crypto.js.map
@@ -15,7 +15,7 @@ limitations under the License.
15
15
  */
16
16
 
17
17
  import { NamespacedValue, UnstableValue } from "../NamespacedValue.js";
18
- export var EventType = /*#__PURE__*/function (EventType) {
18
+ export let EventType = /*#__PURE__*/function (EventType) {
19
19
  // Room state events
20
20
  EventType["RoomCanonicalAlias"] = "m.room.canonical_alias";
21
21
  EventType["RoomCreate"] = "m.room.create";
@@ -108,7 +108,7 @@ export var EventType = /*#__PURE__*/function (EventType) {
108
108
  EventType["RetentionPolicyUnstable"] = "org.matrix.msc1763.retention";
109
109
  return EventType;
110
110
  }({});
111
- export var RelationType = /*#__PURE__*/function (RelationType) {
111
+ export let RelationType = /*#__PURE__*/function (RelationType) {
112
112
  RelationType["Annotation"] = "m.annotation";
113
113
  RelationType["Replace"] = "m.replace";
114
114
  RelationType["Reference"] = "m.reference";
@@ -118,7 +118,7 @@ export var RelationType = /*#__PURE__*/function (RelationType) {
118
118
  RelationType["Thread"] = "m.thread";
119
119
  return RelationType;
120
120
  }({});
121
- export var MsgType = /*#__PURE__*/function (MsgType) {
121
+ export let MsgType = /*#__PURE__*/function (MsgType) {
122
122
  MsgType["Text"] = "m.text";
123
123
  MsgType["Emote"] = "m.emote";
124
124
  MsgType["Notice"] = "m.notice";
@@ -130,49 +130,49 @@ export var MsgType = /*#__PURE__*/function (MsgType) {
130
130
  MsgType["KeyVerificationRequest"] = "m.key.verification.request";
131
131
  return MsgType;
132
132
  }({});
133
- export var RoomCreateTypeField = "type";
134
- export var RoomType = /*#__PURE__*/function (RoomType) {
133
+ export const RoomCreateTypeField = "type";
134
+ export let RoomType = /*#__PURE__*/function (RoomType) {
135
135
  RoomType["Space"] = "m.space";
136
136
  RoomType["UnstableCall"] = "org.matrix.msc3417.call";
137
137
  RoomType["ElementVideo"] = "io.element.video";
138
138
  return RoomType;
139
139
  }({});
140
- export var ToDeviceMessageId = "org.matrix.msgid";
140
+ export const ToDeviceMessageId = "org.matrix.msgid";
141
141
 
142
142
  /**
143
143
  * Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)
144
144
  * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,
145
145
  * including its eventual removal.
146
146
  */
147
- export var UNSTABLE_MSC3088_PURPOSE = new UnstableValue("m.room.purpose", "org.matrix.msc3088.purpose");
147
+ export const UNSTABLE_MSC3088_PURPOSE = new UnstableValue("m.room.purpose", "org.matrix.msc3088.purpose");
148
148
 
149
149
  /**
150
150
  * Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)
151
151
  * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,
152
152
  * including its eventual removal.
153
153
  */
154
- export var UNSTABLE_MSC3088_ENABLED = new UnstableValue("m.enabled", "org.matrix.msc3088.enabled");
154
+ export const UNSTABLE_MSC3088_ENABLED = new UnstableValue("m.enabled", "org.matrix.msc3088.enabled");
155
155
 
156
156
  /**
157
157
  * Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.
158
158
  * Note that this reference is UNSTABLE and subject to breaking changes, including its
159
159
  * eventual removal.
160
160
  */
161
- export var UNSTABLE_MSC3089_TREE_SUBTYPE = new UnstableValue("m.data_tree", "org.matrix.msc3089.data_tree");
161
+ export const UNSTABLE_MSC3089_TREE_SUBTYPE = new UnstableValue("m.data_tree", "org.matrix.msc3089.data_tree");
162
162
 
163
163
  /**
164
164
  * Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.
165
165
  * Note that this reference is UNSTABLE and subject to breaking changes, including its
166
166
  * eventual removal.
167
167
  */
168
- export var UNSTABLE_MSC3089_LEAF = new UnstableValue("m.leaf", "org.matrix.msc3089.leaf");
168
+ export const UNSTABLE_MSC3089_LEAF = new UnstableValue("m.leaf", "org.matrix.msc3089.leaf");
169
169
 
170
170
  /**
171
171
  * Branch (Leaf Reference) type for the index approach in a
172
172
  * [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is
173
173
  * UNSTABLE and subject to breaking changes, including its eventual removal.
174
174
  */
175
- export var UNSTABLE_MSC3089_BRANCH = new UnstableValue("m.branch", "org.matrix.msc3089.branch");
175
+ export const UNSTABLE_MSC3089_BRANCH = new UnstableValue("m.branch", "org.matrix.msc3089.branch");
176
176
 
177
177
  /**
178
178
  * Marker event type to point back at imported historical content in a room. See
@@ -180,13 +180,13 @@ export var UNSTABLE_MSC3089_BRANCH = new UnstableValue("m.branch", "org.matrix.m
180
180
  * Note that this reference is UNSTABLE and subject to breaking changes,
181
181
  * including its eventual removal.
182
182
  */
183
- export var UNSTABLE_MSC2716_MARKER = new UnstableValue("m.room.marker", "org.matrix.msc2716.marker");
183
+ export const UNSTABLE_MSC2716_MARKER = new UnstableValue("m.room.marker", "org.matrix.msc2716.marker");
184
184
 
185
185
  /**
186
186
  * Name of the request property for relation based redactions.
187
187
  * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}
188
188
  */
189
- export var MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue("with_rel_types", "org.matrix.msc3912.with_relations");
189
+ export const MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue("with_rel_types", "org.matrix.msc3912.with_relations");
190
190
 
191
191
  /**
192
192
  * Functional members type for declaring a purpose of room members (e.g. helpful bots).
@@ -210,7 +210,7 @@ export var MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue("with_rel_
210
210
  * }
211
211
  * ```
212
212
  */
213
- export var UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue("io.element.functional_members", "io.element.functional_members");
213
+ export const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue("io.element.functional_members", "io.element.functional_members");
214
214
 
215
215
  /**
216
216
  * A type of message that affects visibility of a message,
@@ -218,42 +218,42 @@ export var UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue("io.element.fun
218
218
  *
219
219
  * @experimental
220
220
  */
221
- export var EVENT_VISIBILITY_CHANGE_TYPE = new UnstableValue("m.visibility", "org.matrix.msc3531.visibility");
221
+ export const EVENT_VISIBILITY_CHANGE_TYPE = new UnstableValue("m.visibility", "org.matrix.msc3531.visibility");
222
222
 
223
223
  /**
224
224
  * https://github.com/matrix-org/matrix-doc/pull/3881
225
225
  *
226
226
  * @experimental
227
227
  */
228
- export var PUSHER_ENABLED = new UnstableValue("enabled", "org.matrix.msc3881.enabled");
228
+ export const PUSHER_ENABLED = new UnstableValue("enabled", "org.matrix.msc3881.enabled");
229
229
 
230
230
  /**
231
231
  * https://github.com/matrix-org/matrix-doc/pull/3881
232
232
  *
233
233
  * @experimental
234
234
  */
235
- export var PUSHER_DEVICE_ID = new UnstableValue("device_id", "org.matrix.msc3881.device_id");
235
+ export const PUSHER_DEVICE_ID = new UnstableValue("device_id", "org.matrix.msc3881.device_id");
236
236
 
237
237
  /**
238
238
  * https://github.com/matrix-org/matrix-doc/pull/3890
239
239
  *
240
240
  * @experimental
241
241
  */
242
- export var LOCAL_NOTIFICATION_SETTINGS_PREFIX = new UnstableValue("m.local_notification_settings", "org.matrix.msc3890.local_notification_settings");
242
+ export const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new UnstableValue("m.local_notification_settings", "org.matrix.msc3890.local_notification_settings");
243
243
 
244
244
  /**
245
245
  * https://github.com/matrix-org/matrix-doc/pull/4023
246
246
  *
247
247
  * @experimental
248
248
  */
249
- export var UNSIGNED_THREAD_ID_FIELD = new UnstableValue("thread_id", "org.matrix.msc4023.thread_id");
249
+ export const UNSIGNED_THREAD_ID_FIELD = new UnstableValue("thread_id", "org.matrix.msc4023.thread_id");
250
250
 
251
251
  /**
252
252
  * https://github.com/matrix-org/matrix-spec-proposals/pull/4115
253
253
  *
254
254
  * @experimental
255
255
  */
256
- export var UNSIGNED_MEMBERSHIP_FIELD = new NamespacedValue("membership", "io.element.msc4115.membership");
256
+ export const UNSIGNED_MEMBERSHIP_FIELD = new NamespacedValue("membership", "io.element.msc4115.membership");
257
257
 
258
258
  /**
259
259
  * Mapped type from event type to content type for all specified non-state room events.
@@ -1 +1 @@
1
- {"version":3,"file":"event.js","names":["NamespacedValue","UnstableValue","EventType","RelationType","MsgType","RoomCreateTypeField","RoomType","ToDeviceMessageId","UNSTABLE_MSC3088_PURPOSE","UNSTABLE_MSC3088_ENABLED","UNSTABLE_MSC3089_TREE_SUBTYPE","UNSTABLE_MSC3089_LEAF","UNSTABLE_MSC3089_BRANCH","UNSTABLE_MSC2716_MARKER","MSC3912_RELATION_BASED_REDACTIONS_PROP","UNSTABLE_ELEMENT_FUNCTIONAL_USERS","EVENT_VISIBILITY_CHANGE_TYPE","PUSHER_ENABLED","PUSHER_DEVICE_ID","LOCAL_NOTIFICATION_SETTINGS_PREFIX","UNSIGNED_THREAD_ID_FIELD","UNSIGNED_MEMBERSHIP_FIELD"],"sources":["../../src/@types/event.ts"],"sourcesContent":["/*\nCopyright 2020-2026 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type EitherAnd } from \"matrix-events-sdk\";\n\nimport { NamespacedValue, UnstableValue } from \"../NamespacedValue.ts\";\nimport {\n type PolicyRuleEventContent,\n type RoomAvatarEventContent,\n type RoomCanonicalAliasEventContent,\n type RoomCreateEventContent,\n type RoomEncryptionEventContent,\n type RoomGuestAccessEventContent,\n type RoomHistoryVisibilityEventContent,\n type RoomJoinRulesEventContent,\n type RoomMemberEventContent,\n type RoomNameEventContent,\n type RoomPinnedEventsEventContent,\n type RoomPolicyContent,\n type RoomPowerLevelsEventContent,\n type RoomServerAclEventContent,\n type RoomThirdPartyInviteEventContent,\n type RoomTombstoneEventContent,\n type RoomTopicEventContent,\n type SpaceChildEventContent,\n type SpaceParentEventContent,\n} from \"./state_events.ts\";\nimport { type IGroupCallRoomMemberState, type IGroupCallRoomState } from \"../webrtc/groupCall.ts\";\nimport { type MSC3089EventContent } from \"../models/MSC3089Branch.ts\";\nimport { type M_BEACON, type M_BEACON_INFO, type MBeaconEventContent, type MBeaconInfoEventContent } from \"./beacon.ts\";\nimport { type EmptyObject } from \"./common.ts\";\nimport { type ReactionEventContent, type RoomMessageEventContent, type StickerEventContent } from \"./events.ts\";\nimport {\n type MCallAnswer,\n type MCallBase,\n type MCallCandidates,\n type MCallHangupReject,\n type MCallInviteNegotiate,\n type MCallReplacesEvent,\n type MCallSelectAnswer,\n type SDPStreamMetadata,\n} from \"../webrtc/callEventTypes.ts\";\nimport {\n type IRTCNotificationContent,\n type IRTCDeclineContent,\n type EncryptionKeysEventContent,\n type ICallNotifyContent,\n} from \"../matrixrtc/types.ts\";\nimport { type M_POLL_END, type M_POLL_START, type PollEndEventContent, type PollStartEventContent } from \"./polls.ts\";\nimport { type RtcMembershipData, type SessionMembershipData } from \"../matrixrtc/membershipData/index.ts\";\nimport { type LocalNotificationSettings } from \"./local_notifications.ts\";\nimport { type IPushRules } from \"./PushRules.ts\";\nimport { type SecretInfo, type SecretStorageKeyDescription } from \"../secret-storage.ts\";\nimport { type POLICIES_ACCOUNT_EVENT_TYPE } from \"../models/invites-ignorer-types.ts\";\nimport type { ROOM_RETENTION_TYPE, RoomRetentionContent } from \"./retention.ts\";\n\nexport enum EventType {\n // Room state events\n RoomCanonicalAlias = \"m.room.canonical_alias\",\n RoomCreate = \"m.room.create\",\n RoomJoinRules = \"m.room.join_rules\",\n RoomMember = \"m.room.member\",\n RoomThirdPartyInvite = \"m.room.third_party_invite\",\n RoomPowerLevels = \"m.room.power_levels\",\n RoomName = \"m.room.name\",\n RoomTopic = \"m.room.topic\",\n RoomAvatar = \"m.room.avatar\",\n RoomPinnedEvents = \"m.room.pinned_events\",\n RoomEncryption = \"m.room.encryption\",\n RoomHistoryVisibility = \"m.room.history_visibility\",\n RoomGuestAccess = \"m.room.guest_access\",\n RoomServerAcl = \"m.room.server_acl\",\n RoomTombstone = \"m.room.tombstone\",\n RoomPredecessor = \"org.matrix.msc3946.room_predecessor\",\n\n // Moderation policy lists\n PolicyRuleUser = \"m.policy.rule.user\",\n PolicyRuleRoom = \"m.policy.rule.room\",\n PolicyRuleServer = \"m.policy.rule.server\",\n\n SpaceChild = \"m.space.child\",\n SpaceParent = \"m.space.parent\",\n\n // Room timeline events\n RoomRedaction = \"m.room.redaction\",\n RoomMessage = \"m.room.message\",\n RoomMessageEncrypted = \"m.room.encrypted\",\n Sticker = \"m.sticker\",\n CallInvite = \"m.call.invite\",\n CallCandidates = \"m.call.candidates\",\n CallAnswer = \"m.call.answer\",\n CallHangup = \"m.call.hangup\",\n CallReject = \"m.call.reject\",\n CallSelectAnswer = \"m.call.select_answer\",\n CallNegotiate = \"m.call.negotiate\",\n CallSDPStreamMetadataChanged = \"m.call.sdp_stream_metadata_changed\",\n CallSDPStreamMetadataChangedPrefix = \"org.matrix.call.sdp_stream_metadata_changed\",\n CallReplaces = \"m.call.replaces\",\n CallAssertedIdentity = \"m.call.asserted_identity\",\n CallAssertedIdentityPrefix = \"org.matrix.call.asserted_identity\",\n CallEncryptionKeysPrefix = \"io.element.call.encryption_keys\",\n KeyVerificationRequest = \"m.key.verification.request\",\n KeyVerificationStart = \"m.key.verification.start\",\n KeyVerificationCancel = \"m.key.verification.cancel\",\n KeyVerificationMac = \"m.key.verification.mac\",\n KeyVerificationDone = \"m.key.verification.done\",\n KeyVerificationKey = \"m.key.verification.key\",\n KeyVerificationAccept = \"m.key.verification.accept\",\n // Not used directly - see READY_TYPE in VerificationRequest.\n KeyVerificationReady = \"m.key.verification.ready\",\n // use of this is discouraged https://matrix.org/docs/spec/client_server/r0.6.1#m-room-message-feedback\n RoomMessageFeedback = \"m.room.message.feedback\",\n Reaction = \"m.reaction\",\n PollStart = \"org.matrix.msc3381.poll.start\",\n\n // Room ephemeral events\n Typing = \"m.typing\",\n Receipt = \"m.receipt\",\n Presence = \"m.presence\",\n\n // Room account_data events\n FullyRead = \"m.fully_read\",\n Tag = \"m.tag\",\n SpaceOrder = \"org.matrix.msc3230.space_order\", // MSC3230\n MarkedUnread = \"m.marked_unread\",\n\n // User account_data events\n PushRules = \"m.push_rules\",\n Direct = \"m.direct\",\n IgnoredUserList = \"m.ignored_user_list\",\n InvitePermissionConfig = \"m.invite_permission_config\", // MSC4380\n\n // to_device events\n RoomKey = \"m.room_key\",\n RoomKeyRequest = \"m.room_key_request\",\n ForwardedRoomKey = \"m.forwarded_room_key\",\n Dummy = \"m.dummy\",\n SecretRequest = \"m.secret.request\",\n SecretSend = \"m.secret.send\",\n\n // Group call events\n GroupCallPrefix = \"org.matrix.msc3401.call\",\n GroupCallMemberPrefix = \"org.matrix.msc3401.call.member\",\n\n // MatrixRTC events\n RTCMembership = \"org.matrix.msc4143.rtc.member\",\n CallNotify = \"org.matrix.msc4075.call.notify\",\n RTCNotification = \"org.matrix.msc4075.rtc.notification\",\n RTCDecline = \"org.matrix.msc4310.rtc.decline\",\n\n // Policy servers\n RoomPolicy = \"org.matrix.msc4284.policy\",\n\n // Retention\n RetentionPolicy = \"m.room.retention\",\n RetentionPolicyUnstable = \"org.matrix.msc1763.retention\",\n}\n\nexport enum RelationType {\n Annotation = \"m.annotation\",\n Replace = \"m.replace\",\n Reference = \"m.reference\",\n\n // Don't use this yet: it's only the stable version. The code still assumes we support the unstable prefix and,\n // moreover, our tests currently use the unstable prefix. Use THREAD_RELATION_TYPE.name.\n // Once we support *only* the stable prefix, THREAD_RELATION_TYPE can die and we can switch to this.\n Thread = \"m.thread\",\n}\n\nexport enum MsgType {\n Text = \"m.text\",\n Emote = \"m.emote\",\n Notice = \"m.notice\",\n Image = \"m.image\",\n File = \"m.file\",\n Audio = \"m.audio\",\n Location = \"m.location\",\n Video = \"m.video\",\n KeyVerificationRequest = \"m.key.verification.request\",\n}\n\nexport const RoomCreateTypeField = \"type\";\n\nexport enum RoomType {\n Space = \"m.space\",\n UnstableCall = \"org.matrix.msc3417.call\",\n ElementVideo = \"io.element.video\",\n}\n\nexport const ToDeviceMessageId = \"org.matrix.msgid\";\n\n/**\n * Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_PURPOSE = new UnstableValue(\"m.room.purpose\", \"org.matrix.msc3088.purpose\");\n\n/**\n * Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_ENABLED = new UnstableValue(\"m.enabled\", \"org.matrix.msc3088.enabled\");\n\n/**\n * Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_TREE_SUBTYPE = new UnstableValue(\"m.data_tree\", \"org.matrix.msc3089.data_tree\");\n\n/**\n * Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_LEAF = new UnstableValue(\"m.leaf\", \"org.matrix.msc3089.leaf\");\n\n/**\n * Branch (Leaf Reference) type for the index approach in a\n * [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is\n * UNSTABLE and subject to breaking changes, including its eventual removal.\n */\nexport const UNSTABLE_MSC3089_BRANCH = new UnstableValue(\"m.branch\", \"org.matrix.msc3089.branch\");\n\n/**\n * Marker event type to point back at imported historical content in a room. See\n * [MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716).\n * Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC2716_MARKER = new UnstableValue(\"m.room.marker\", \"org.matrix.msc2716.marker\");\n\n/**\n * Name of the request property for relation based redactions.\n * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}\n */\nexport const MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue(\n \"with_rel_types\",\n \"org.matrix.msc3912.with_relations\",\n);\n\n/**\n * Functional members type for declaring a purpose of room members (e.g. helpful bots).\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n *\n * Schema (TypeScript):\n * ```\n * {\n * service_members?: string[]\n * }\n * ```\n *\n * @example\n * ```\n * {\n * \"service_members\": [\n * \"@helperbot:localhost\",\n * \"@reminderbot:alice.tdl\"\n * ]\n * }\n * ```\n */\nexport const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue(\n \"io.element.functional_members\",\n \"io.element.functional_members\",\n);\n\n/**\n * A type of message that affects visibility of a message,\n * as per https://github.com/matrix-org/matrix-doc/pull/3531\n *\n * @experimental\n */\nexport const EVENT_VISIBILITY_CHANGE_TYPE = new UnstableValue(\"m.visibility\", \"org.matrix.msc3531.visibility\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_ENABLED = new UnstableValue(\"enabled\", \"org.matrix.msc3881.enabled\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_DEVICE_ID = new UnstableValue(\"device_id\", \"org.matrix.msc3881.device_id\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3890\n *\n * @experimental\n */\nexport const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new UnstableValue(\n \"m.local_notification_settings\",\n \"org.matrix.msc3890.local_notification_settings\",\n);\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/4023\n *\n * @experimental\n */\nexport const UNSIGNED_THREAD_ID_FIELD = new UnstableValue(\"thread_id\", \"org.matrix.msc4023.thread_id\");\n\n/**\n * https://github.com/matrix-org/matrix-spec-proposals/pull/4115\n *\n * @experimental\n */\nexport const UNSIGNED_MEMBERSHIP_FIELD = new NamespacedValue(\"membership\", \"io.element.msc4115.membership\");\n\n/**\n * Mapped type from event type to content type for all specified non-state room events.\n */\nexport interface TimelineEvents {\n [EventType.RoomMessage]: RoomMessageEventContent;\n [EventType.Sticker]: StickerEventContent;\n [EventType.Reaction]: ReactionEventContent;\n [EventType.CallReplaces]: MCallReplacesEvent;\n [EventType.CallAnswer]: MCallAnswer;\n [EventType.CallSelectAnswer]: MCallSelectAnswer;\n [EventType.CallNegotiate]: Omit<MCallInviteNegotiate, \"offer\">;\n [EventType.CallInvite]: MCallInviteNegotiate;\n [EventType.CallCandidates]: MCallCandidates;\n [EventType.CallHangup]: MCallHangupReject;\n [EventType.CallReject]: MCallHangupReject;\n [EventType.CallSDPStreamMetadataChangedPrefix]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallSDPStreamMetadataChanged]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallEncryptionKeysPrefix]: EncryptionKeysEventContent;\n [EventType.CallNotify]: ICallNotifyContent;\n [EventType.RTCNotification]: IRTCNotificationContent;\n [EventType.RTCDecline]: IRTCDeclineContent;\n [M_BEACON.name]: MBeaconEventContent;\n [M_POLL_START.name]: PollStartEventContent;\n [M_POLL_END.name]: PollEndEventContent;\n [EventType.RTCMembership]: RtcMembershipData | { msc4354_sticky_key: string }; // An object containing just the sticky key is empty.\n}\n\n/**\n * Mapped type from event type to content type for all specified room state events.\n */\nexport interface StateEvents {\n [EventType.RoomCanonicalAlias]: RoomCanonicalAliasEventContent;\n [EventType.RoomCreate]: RoomCreateEventContent;\n [EventType.RoomJoinRules]: RoomJoinRulesEventContent;\n [EventType.RoomMember]: RoomMemberEventContent;\n // XXX: Spec says this event has 3 required fields but kicking such an invitation requires sending `{}`\n [EventType.RoomThirdPartyInvite]: RoomThirdPartyInviteEventContent | EmptyObject;\n [EventType.RoomPowerLevels]: RoomPowerLevelsEventContent;\n [EventType.RoomName]: RoomNameEventContent;\n [EventType.RoomTopic]: RoomTopicEventContent;\n [EventType.RoomAvatar]: RoomAvatarEventContent;\n [EventType.RoomPinnedEvents]: RoomPinnedEventsEventContent;\n [EventType.RoomEncryption]: RoomEncryptionEventContent;\n [EventType.RoomHistoryVisibility]: RoomHistoryVisibilityEventContent;\n [EventType.RoomGuestAccess]: RoomGuestAccessEventContent;\n [EventType.RoomServerAcl]: RoomServerAclEventContent;\n [EventType.RoomTombstone]: RoomTombstoneEventContent;\n [EventType.SpaceChild]: SpaceChildEventContent;\n [EventType.SpaceParent]: SpaceParentEventContent;\n\n [EventType.PolicyRuleUser]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleRoom]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleServer]: PolicyRuleEventContent | EmptyObject;\n\n // MSC4284: Policy servers\n [EventType.RoomPolicy]: RoomPolicyContent | EmptyObject;\n\n // MSC3401\n [EventType.GroupCallPrefix]: IGroupCallRoomState;\n [EventType.GroupCallMemberPrefix]: IGroupCallRoomMemberState | SessionMembershipData | EmptyObject;\n [EventType.RTCMembership]: RtcMembershipData | EmptyObject;\n // MSC3089\n [UNSTABLE_MSC3089_BRANCH.name]: MSC3089EventContent;\n\n // MSC3672\n [M_BEACON_INFO.name]: MBeaconInfoEventContent;\n\n // MSC1763\n [ROOM_RETENTION_TYPE.name]: RoomRetentionContent | EmptyObject;\n [ROOM_RETENTION_TYPE.altName]: RoomRetentionContent | EmptyObject;\n}\n\n/**\n * Mapped type from event type to content type for all specified room-specific account_data events.\n */\nexport interface RoomAccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.FullyRead]: { event_id: string };\n [EventType.Tag]: { tags: { [name: string]: { order?: number } } };\n [EventType.SpaceOrder]: { order: string };\n [EventType.MarkedUnread]: { unread: boolean };\n}\n\n/**\n * Mapped type from event type to content type for all specified global account_data events.\n */\nexport interface AccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.PushRules]: IPushRules;\n [EventType.Direct]: { [userId: string]: string[] };\n [EventType.IgnoredUserList]: { ignored_users: { [userId: string]: EmptyObject } };\n \"m.secret_storage.default_key\": { key: string };\n\n // MSC4287: Sharing key backup preference between clients - used to mark that the user opted out of key storage\n \"m.key_backup\": { enabled: boolean };\n // MSC4287 unstable prefix (note the boolean property has the opposite sense)\n \"m.org.matrix.custom.backup_disabled\": { disabled: boolean };\n\n \"m.identity_server\": { base_url: string | null };\n [key: `${typeof LOCAL_NOTIFICATION_SETTINGS_PREFIX.name}.${string}`]: LocalNotificationSettings;\n [key: `m.secret_storage.key.${string}`]: SecretStorageKeyDescription;\n\n // Invites-ignorer events\n [POLICIES_ACCOUNT_EVENT_TYPE.name]: { [key: string]: any };\n [POLICIES_ACCOUNT_EVENT_TYPE.altName]: { [key: string]: any };\n\n [EventType.InvitePermissionConfig]: { default_action?: string };\n\n // List of recently used reaction emojis\n // https://spec.matrix.org/v1.18/client-server-api/#mrecent_emoji\n \"m.recent_emoji\": {\n recent_emoji: Array<{\n emoji: string;\n total: number;\n }>;\n };\n}\n\n/**\n * Subset of AccountDataEvents, excluding events specified in https://spec.matrix.org/v1.17/client-server-api/#server-behaviour-12\n */\nexport type WritableAccountDataEvents = Exclude<AccountDataEvents, \"m.fully_read\" | \"m.push_rules\">;\n\n/**\n * Mapped type from event type to content type for all specified global events encrypted by secret storage.\n *\n * See https://spec.matrix.org/v1.13/client-server-api/#msecret_storagev1aes-hmac-sha2-1\n */\nexport interface SecretStorageAccountDataEvents {\n \"m.megolm_backup.v1\": SecretInfo;\n \"m.cross_signing.master\": SecretInfo;\n \"m.cross_signing.self_signing\": SecretInfo;\n \"m.cross_signing.user_signing\": SecretInfo;\n \"org.matrix.msc3814\": SecretInfo;\n}\n"],"mappings":"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","ignoreList":[]}
1
+ {"version":3,"file":"event.js","names":[],"sources":["../../src/@types/event.ts"],"sourcesContent":["/*\nCopyright 2020-2026 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type EitherAnd } from \"matrix-events-sdk\";\n\nimport { NamespacedValue, UnstableValue } from \"../NamespacedValue.ts\";\nimport {\n type PolicyRuleEventContent,\n type RoomAvatarEventContent,\n type RoomCanonicalAliasEventContent,\n type RoomCreateEventContent,\n type RoomEncryptionEventContent,\n type RoomGuestAccessEventContent,\n type RoomHistoryVisibilityEventContent,\n type RoomJoinRulesEventContent,\n type RoomMemberEventContent,\n type RoomNameEventContent,\n type RoomPinnedEventsEventContent,\n type RoomPolicyContent,\n type RoomPowerLevelsEventContent,\n type RoomServerAclEventContent,\n type RoomThirdPartyInviteEventContent,\n type RoomTombstoneEventContent,\n type RoomTopicEventContent,\n type SpaceChildEventContent,\n type SpaceParentEventContent,\n} from \"./state_events.ts\";\nimport { type IGroupCallRoomMemberState, type IGroupCallRoomState } from \"../webrtc/groupCall.ts\";\nimport { type MSC3089EventContent } from \"../models/MSC3089Branch.ts\";\nimport { type M_BEACON, type M_BEACON_INFO, type MBeaconEventContent, type MBeaconInfoEventContent } from \"./beacon.ts\";\nimport { type EmptyObject } from \"./common.ts\";\nimport { type ReactionEventContent, type RoomMessageEventContent, type StickerEventContent } from \"./events.ts\";\nimport {\n type MCallAnswer,\n type MCallBase,\n type MCallCandidates,\n type MCallHangupReject,\n type MCallInviteNegotiate,\n type MCallReplacesEvent,\n type MCallSelectAnswer,\n type SDPStreamMetadata,\n} from \"../webrtc/callEventTypes.ts\";\nimport {\n type IRTCNotificationContent,\n type IRTCDeclineContent,\n type EncryptionKeysEventContent,\n type ICallNotifyContent,\n} from \"../matrixrtc/types.ts\";\nimport { type M_POLL_END, type M_POLL_START, type PollEndEventContent, type PollStartEventContent } from \"./polls.ts\";\nimport { type RtcMembershipData, type SessionMembershipData } from \"../matrixrtc/membershipData/index.ts\";\nimport { type LocalNotificationSettings } from \"./local_notifications.ts\";\nimport { type IPushRules } from \"./PushRules.ts\";\nimport { type SecretInfo, type SecretStorageKeyDescription } from \"../secret-storage.ts\";\nimport { type POLICIES_ACCOUNT_EVENT_TYPE } from \"../models/invites-ignorer-types.ts\";\nimport type { ROOM_RETENTION_TYPE, RoomRetentionContent } from \"./retention.ts\";\n\nexport enum EventType {\n // Room state events\n RoomCanonicalAlias = \"m.room.canonical_alias\",\n RoomCreate = \"m.room.create\",\n RoomJoinRules = \"m.room.join_rules\",\n RoomMember = \"m.room.member\",\n RoomThirdPartyInvite = \"m.room.third_party_invite\",\n RoomPowerLevels = \"m.room.power_levels\",\n RoomName = \"m.room.name\",\n RoomTopic = \"m.room.topic\",\n RoomAvatar = \"m.room.avatar\",\n RoomPinnedEvents = \"m.room.pinned_events\",\n RoomEncryption = \"m.room.encryption\",\n RoomHistoryVisibility = \"m.room.history_visibility\",\n RoomGuestAccess = \"m.room.guest_access\",\n RoomServerAcl = \"m.room.server_acl\",\n RoomTombstone = \"m.room.tombstone\",\n RoomPredecessor = \"org.matrix.msc3946.room_predecessor\",\n\n // Moderation policy lists\n PolicyRuleUser = \"m.policy.rule.user\",\n PolicyRuleRoom = \"m.policy.rule.room\",\n PolicyRuleServer = \"m.policy.rule.server\",\n\n SpaceChild = \"m.space.child\",\n SpaceParent = \"m.space.parent\",\n\n // Room timeline events\n RoomRedaction = \"m.room.redaction\",\n RoomMessage = \"m.room.message\",\n RoomMessageEncrypted = \"m.room.encrypted\",\n Sticker = \"m.sticker\",\n CallInvite = \"m.call.invite\",\n CallCandidates = \"m.call.candidates\",\n CallAnswer = \"m.call.answer\",\n CallHangup = \"m.call.hangup\",\n CallReject = \"m.call.reject\",\n CallSelectAnswer = \"m.call.select_answer\",\n CallNegotiate = \"m.call.negotiate\",\n CallSDPStreamMetadataChanged = \"m.call.sdp_stream_metadata_changed\",\n CallSDPStreamMetadataChangedPrefix = \"org.matrix.call.sdp_stream_metadata_changed\",\n CallReplaces = \"m.call.replaces\",\n CallAssertedIdentity = \"m.call.asserted_identity\",\n CallAssertedIdentityPrefix = \"org.matrix.call.asserted_identity\",\n CallEncryptionKeysPrefix = \"io.element.call.encryption_keys\",\n KeyVerificationRequest = \"m.key.verification.request\",\n KeyVerificationStart = \"m.key.verification.start\",\n KeyVerificationCancel = \"m.key.verification.cancel\",\n KeyVerificationMac = \"m.key.verification.mac\",\n KeyVerificationDone = \"m.key.verification.done\",\n KeyVerificationKey = \"m.key.verification.key\",\n KeyVerificationAccept = \"m.key.verification.accept\",\n // Not used directly - see READY_TYPE in VerificationRequest.\n KeyVerificationReady = \"m.key.verification.ready\",\n // use of this is discouraged https://matrix.org/docs/spec/client_server/r0.6.1#m-room-message-feedback\n RoomMessageFeedback = \"m.room.message.feedback\",\n Reaction = \"m.reaction\",\n PollStart = \"org.matrix.msc3381.poll.start\",\n\n // Room ephemeral events\n Typing = \"m.typing\",\n Receipt = \"m.receipt\",\n Presence = \"m.presence\",\n\n // Room account_data events\n FullyRead = \"m.fully_read\",\n Tag = \"m.tag\",\n SpaceOrder = \"org.matrix.msc3230.space_order\", // MSC3230\n MarkedUnread = \"m.marked_unread\",\n\n // User account_data events\n PushRules = \"m.push_rules\",\n Direct = \"m.direct\",\n IgnoredUserList = \"m.ignored_user_list\",\n InvitePermissionConfig = \"m.invite_permission_config\", // MSC4380\n\n // to_device events\n RoomKey = \"m.room_key\",\n RoomKeyRequest = \"m.room_key_request\",\n ForwardedRoomKey = \"m.forwarded_room_key\",\n Dummy = \"m.dummy\",\n SecretRequest = \"m.secret.request\",\n SecretSend = \"m.secret.send\",\n\n // Group call events\n GroupCallPrefix = \"org.matrix.msc3401.call\",\n GroupCallMemberPrefix = \"org.matrix.msc3401.call.member\",\n\n // MatrixRTC events\n RTCMembership = \"org.matrix.msc4143.rtc.member\",\n CallNotify = \"org.matrix.msc4075.call.notify\",\n RTCNotification = \"org.matrix.msc4075.rtc.notification\",\n RTCDecline = \"org.matrix.msc4310.rtc.decline\",\n\n // Policy servers\n RoomPolicy = \"org.matrix.msc4284.policy\",\n\n // Retention\n RetentionPolicy = \"m.room.retention\",\n RetentionPolicyUnstable = \"org.matrix.msc1763.retention\",\n}\n\nexport enum RelationType {\n Annotation = \"m.annotation\",\n Replace = \"m.replace\",\n Reference = \"m.reference\",\n\n // Don't use this yet: it's only the stable version. The code still assumes we support the unstable prefix and,\n // moreover, our tests currently use the unstable prefix. Use THREAD_RELATION_TYPE.name.\n // Once we support *only* the stable prefix, THREAD_RELATION_TYPE can die and we can switch to this.\n Thread = \"m.thread\",\n}\n\nexport enum MsgType {\n Text = \"m.text\",\n Emote = \"m.emote\",\n Notice = \"m.notice\",\n Image = \"m.image\",\n File = \"m.file\",\n Audio = \"m.audio\",\n Location = \"m.location\",\n Video = \"m.video\",\n KeyVerificationRequest = \"m.key.verification.request\",\n}\n\nexport const RoomCreateTypeField = \"type\";\n\nexport enum RoomType {\n Space = \"m.space\",\n UnstableCall = \"org.matrix.msc3417.call\",\n ElementVideo = \"io.element.video\",\n}\n\nexport const ToDeviceMessageId = \"org.matrix.msgid\";\n\n/**\n * Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_PURPOSE = new UnstableValue(\"m.room.purpose\", \"org.matrix.msc3088.purpose\");\n\n/**\n * Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)\n * room purpose. Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC3088_ENABLED = new UnstableValue(\"m.enabled\", \"org.matrix.msc3088.enabled\");\n\n/**\n * Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_TREE_SUBTYPE = new UnstableValue(\"m.data_tree\", \"org.matrix.msc3089.data_tree\");\n\n/**\n * Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n */\nexport const UNSTABLE_MSC3089_LEAF = new UnstableValue(\"m.leaf\", \"org.matrix.msc3089.leaf\");\n\n/**\n * Branch (Leaf Reference) type for the index approach in a\n * [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is\n * UNSTABLE and subject to breaking changes, including its eventual removal.\n */\nexport const UNSTABLE_MSC3089_BRANCH = new UnstableValue(\"m.branch\", \"org.matrix.msc3089.branch\");\n\n/**\n * Marker event type to point back at imported historical content in a room. See\n * [MSC2716](https://github.com/matrix-org/matrix-spec-proposals/pull/2716).\n * Note that this reference is UNSTABLE and subject to breaking changes,\n * including its eventual removal.\n */\nexport const UNSTABLE_MSC2716_MARKER = new UnstableValue(\"m.room.marker\", \"org.matrix.msc2716.marker\");\n\n/**\n * Name of the request property for relation based redactions.\n * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}\n */\nexport const MSC3912_RELATION_BASED_REDACTIONS_PROP = new UnstableValue(\n \"with_rel_types\",\n \"org.matrix.msc3912.with_relations\",\n);\n\n/**\n * Functional members type for declaring a purpose of room members (e.g. helpful bots).\n * Note that this reference is UNSTABLE and subject to breaking changes, including its\n * eventual removal.\n *\n * Schema (TypeScript):\n * ```\n * {\n * service_members?: string[]\n * }\n * ```\n *\n * @example\n * ```\n * {\n * \"service_members\": [\n * \"@helperbot:localhost\",\n * \"@reminderbot:alice.tdl\"\n * ]\n * }\n * ```\n */\nexport const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new UnstableValue(\n \"io.element.functional_members\",\n \"io.element.functional_members\",\n);\n\n/**\n * A type of message that affects visibility of a message,\n * as per https://github.com/matrix-org/matrix-doc/pull/3531\n *\n * @experimental\n */\nexport const EVENT_VISIBILITY_CHANGE_TYPE = new UnstableValue(\"m.visibility\", \"org.matrix.msc3531.visibility\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_ENABLED = new UnstableValue(\"enabled\", \"org.matrix.msc3881.enabled\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3881\n *\n * @experimental\n */\nexport const PUSHER_DEVICE_ID = new UnstableValue(\"device_id\", \"org.matrix.msc3881.device_id\");\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3890\n *\n * @experimental\n */\nexport const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new UnstableValue(\n \"m.local_notification_settings\",\n \"org.matrix.msc3890.local_notification_settings\",\n);\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/4023\n *\n * @experimental\n */\nexport const UNSIGNED_THREAD_ID_FIELD = new UnstableValue(\"thread_id\", \"org.matrix.msc4023.thread_id\");\n\n/**\n * https://github.com/matrix-org/matrix-spec-proposals/pull/4115\n *\n * @experimental\n */\nexport const UNSIGNED_MEMBERSHIP_FIELD = new NamespacedValue(\"membership\", \"io.element.msc4115.membership\");\n\n/**\n * Mapped type from event type to content type for all specified non-state room events.\n */\nexport interface TimelineEvents {\n [EventType.RoomMessage]: RoomMessageEventContent;\n [EventType.Sticker]: StickerEventContent;\n [EventType.Reaction]: ReactionEventContent;\n [EventType.CallReplaces]: MCallReplacesEvent;\n [EventType.CallAnswer]: MCallAnswer;\n [EventType.CallSelectAnswer]: MCallSelectAnswer;\n [EventType.CallNegotiate]: Omit<MCallInviteNegotiate, \"offer\">;\n [EventType.CallInvite]: MCallInviteNegotiate;\n [EventType.CallCandidates]: MCallCandidates;\n [EventType.CallHangup]: MCallHangupReject;\n [EventType.CallReject]: MCallHangupReject;\n [EventType.CallSDPStreamMetadataChangedPrefix]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallSDPStreamMetadataChanged]: MCallBase &\n EitherAnd<\n { sdp_stream_metadata: SDPStreamMetadata },\n { \"org.matrix.msc3077.sdp_stream_metadata\": SDPStreamMetadata }\n >;\n [EventType.CallEncryptionKeysPrefix]: EncryptionKeysEventContent;\n [EventType.CallNotify]: ICallNotifyContent;\n [EventType.RTCNotification]: IRTCNotificationContent;\n [EventType.RTCDecline]: IRTCDeclineContent;\n [M_BEACON.name]: MBeaconEventContent;\n [M_POLL_START.name]: PollStartEventContent;\n [M_POLL_END.name]: PollEndEventContent;\n [EventType.RTCMembership]: RtcMembershipData | { msc4354_sticky_key: string }; // An object containing just the sticky key is empty.\n}\n\n/**\n * Mapped type from event type to content type for all specified room state events.\n */\nexport interface StateEvents {\n [EventType.RoomCanonicalAlias]: RoomCanonicalAliasEventContent;\n [EventType.RoomCreate]: RoomCreateEventContent;\n [EventType.RoomJoinRules]: RoomJoinRulesEventContent;\n [EventType.RoomMember]: RoomMemberEventContent;\n // XXX: Spec says this event has 3 required fields but kicking such an invitation requires sending `{}`\n [EventType.RoomThirdPartyInvite]: RoomThirdPartyInviteEventContent | EmptyObject;\n [EventType.RoomPowerLevels]: RoomPowerLevelsEventContent;\n [EventType.RoomName]: RoomNameEventContent;\n [EventType.RoomTopic]: RoomTopicEventContent;\n [EventType.RoomAvatar]: RoomAvatarEventContent;\n [EventType.RoomPinnedEvents]: RoomPinnedEventsEventContent;\n [EventType.RoomEncryption]: RoomEncryptionEventContent;\n [EventType.RoomHistoryVisibility]: RoomHistoryVisibilityEventContent;\n [EventType.RoomGuestAccess]: RoomGuestAccessEventContent;\n [EventType.RoomServerAcl]: RoomServerAclEventContent;\n [EventType.RoomTombstone]: RoomTombstoneEventContent;\n [EventType.SpaceChild]: SpaceChildEventContent;\n [EventType.SpaceParent]: SpaceParentEventContent;\n\n [EventType.PolicyRuleUser]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleRoom]: PolicyRuleEventContent | EmptyObject;\n [EventType.PolicyRuleServer]: PolicyRuleEventContent | EmptyObject;\n\n // MSC4284: Policy servers\n [EventType.RoomPolicy]: RoomPolicyContent | EmptyObject;\n\n // MSC3401\n [EventType.GroupCallPrefix]: IGroupCallRoomState;\n [EventType.GroupCallMemberPrefix]: IGroupCallRoomMemberState | SessionMembershipData | EmptyObject;\n [EventType.RTCMembership]: RtcMembershipData | EmptyObject;\n // MSC3089\n [UNSTABLE_MSC3089_BRANCH.name]: MSC3089EventContent;\n\n // MSC3672\n [M_BEACON_INFO.name]: MBeaconInfoEventContent;\n\n // MSC1763\n [ROOM_RETENTION_TYPE.name]: RoomRetentionContent | EmptyObject;\n [ROOM_RETENTION_TYPE.altName]: RoomRetentionContent | EmptyObject;\n}\n\n/**\n * Mapped type from event type to content type for all specified room-specific account_data events.\n */\nexport interface RoomAccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.FullyRead]: { event_id: string };\n [EventType.Tag]: { tags: { [name: string]: { order?: number } } };\n [EventType.SpaceOrder]: { order: string };\n [EventType.MarkedUnread]: { unread: boolean };\n}\n\n/**\n * Mapped type from event type to content type for all specified global account_data events.\n */\nexport interface AccountDataEvents extends SecretStorageAccountDataEvents {\n [EventType.PushRules]: IPushRules;\n [EventType.Direct]: { [userId: string]: string[] };\n [EventType.IgnoredUserList]: { ignored_users: { [userId: string]: EmptyObject } };\n \"m.secret_storage.default_key\": { key: string };\n\n // MSC4287: Sharing key backup preference between clients - used to mark that the user opted out of key storage\n \"m.key_backup\": { enabled: boolean };\n // MSC4287 unstable prefix (note the boolean property has the opposite sense)\n \"m.org.matrix.custom.backup_disabled\": { disabled: boolean };\n\n \"m.identity_server\": { base_url: string | null };\n [key: `${typeof LOCAL_NOTIFICATION_SETTINGS_PREFIX.name}.${string}`]: LocalNotificationSettings;\n [key: `m.secret_storage.key.${string}`]: SecretStorageKeyDescription;\n\n // Invites-ignorer events\n [POLICIES_ACCOUNT_EVENT_TYPE.name]: { [key: string]: any };\n [POLICIES_ACCOUNT_EVENT_TYPE.altName]: { [key: string]: any };\n\n [EventType.InvitePermissionConfig]: { default_action?: string };\n\n // List of recently used reaction emojis\n // https://spec.matrix.org/v1.18/client-server-api/#mrecent_emoji\n \"m.recent_emoji\": {\n recent_emoji: Array<{\n emoji: string;\n total: number;\n }>;\n };\n}\n\n/**\n * Subset of AccountDataEvents, excluding events specified in https://spec.matrix.org/v1.17/client-server-api/#server-behaviour-12\n */\nexport type WritableAccountDataEvents = Exclude<AccountDataEvents, \"m.fully_read\" | \"m.push_rules\">;\n\n/**\n * Mapped type from event type to content type for all specified global events encrypted by secret storage.\n *\n * See https://spec.matrix.org/v1.13/client-server-api/#msecret_storagev1aes-hmac-sha2-1\n */\nexport interface SecretStorageAccountDataEvents {\n \"m.megolm_backup.v1\": SecretInfo;\n \"m.cross_signing.master\": SecretInfo;\n \"m.cross_signing.self_signing\": SecretInfo;\n \"m.cross_signing.user_signing\": SecretInfo;\n \"org.matrix.msc3814\": SecretInfo;\n}\n"],"mappings":"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","ignoreList":[]}
@@ -1 +1,3 @@
1
- export {};
1
+ export {};
2
+ export {};
3
+ //# sourceMappingURL=events.js.map
@@ -36,7 +36,7 @@ import { isProvided } from "../extensible_events_v1/utilities.js";
36
36
  /**
37
37
  * The namespaced value for m.message
38
38
  */
39
- export var M_MESSAGE = new UnstableValue("m.message", "org.matrix.msc1767.message");
39
+ export const M_MESSAGE = new UnstableValue("m.message", "org.matrix.msc1767.message");
40
40
 
41
41
  /**
42
42
  * An m.message event rendering
@@ -49,7 +49,7 @@ export var M_MESSAGE = new UnstableValue("m.message", "org.matrix.msc1767.messag
49
49
  /**
50
50
  * The namespaced value for m.text
51
51
  */
52
- export var M_TEXT = new UnstableValue("m.text", "org.matrix.msc1767.text");
52
+ export const M_TEXT = new UnstableValue("m.text", "org.matrix.msc1767.text");
53
53
 
54
54
  /**
55
55
  * The content for an m.text event
@@ -58,7 +58,7 @@ export var M_TEXT = new UnstableValue("m.text", "org.matrix.msc1767.text");
58
58
  /**
59
59
  * The namespaced value for m.html
60
60
  */
61
- export var M_HTML = new UnstableValue("m.html", "org.matrix.msc1767.html");
61
+ export const M_HTML = new UnstableValue("m.html", "org.matrix.msc1767.html");
62
62
 
63
63
  /**
64
64
  * The content for an m.html event
@@ -71,7 +71,7 @@ export var M_HTML = new UnstableValue("m.html", "org.matrix.msc1767.html");
71
71
  /**
72
72
  * The namespaced value for an m.reference relation
73
73
  */
74
- export var REFERENCE_RELATION = new NamespacedValue("m.reference");
74
+ export const REFERENCE_RELATION = new NamespacedValue("m.reference");
75
75
 
76
76
  /**
77
77
  * Represents any relation type
@@ -107,8 +107,8 @@ export function isEventTypeSame(given, expected) {
107
107
  if (typeof expected === "string") {
108
108
  return given.matches(expected);
109
109
  } else {
110
- var expectedNs = expected;
111
- var givenNs = given;
110
+ const expectedNs = expected;
111
+ const givenNs = given;
112
112
  return expectedNs.matches(givenNs.name) || isProvided(givenNs.altName) && expectedNs.matches(givenNs.altName);
113
113
  }
114
114
  }