matrix-js-sdk 26.2.0 → 27.0.0-rc.2

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 (155) hide show
  1. package/CHANGELOG.md +37 -0
  2. package/README.md +2 -0
  3. package/dist/browser-matrix.js +5482 -900
  4. package/dist/browser-matrix.js.map +34 -20
  5. package/dist/browser-matrix.min.js +5 -5
  6. package/dist/browser-matrix.min.js.map +1 -1
  7. package/git-revision.txt +1 -1
  8. package/lib/@types/auth.d.ts +147 -10
  9. package/lib/@types/auth.d.ts.map +1 -1
  10. package/lib/@types/auth.js +36 -5
  11. package/lib/@types/auth.js.map +1 -1
  12. package/lib/@types/registration.d.ts +99 -0
  13. package/lib/@types/registration.d.ts.map +1 -0
  14. package/lib/@types/registration.js +6 -0
  15. package/lib/@types/registration.js.map +1 -0
  16. package/lib/@types/requests.d.ts +1 -1
  17. package/lib/@types/requests.d.ts.map +1 -1
  18. package/lib/@types/requests.js.map +1 -1
  19. package/lib/autodiscovery.d.ts +29 -2
  20. package/lib/autodiscovery.d.ts.map +1 -1
  21. package/lib/autodiscovery.js +45 -2
  22. package/lib/autodiscovery.js.map +1 -1
  23. package/lib/client.d.ts +67 -41
  24. package/lib/client.d.ts.map +1 -1
  25. package/lib/client.js +66 -43
  26. package/lib/client.js.map +1 -1
  27. package/lib/content-helpers.js +2 -2
  28. package/lib/content-helpers.js.map +1 -1
  29. package/lib/crypto/EncryptionSetup.js +1 -1
  30. package/lib/crypto/EncryptionSetup.js.map +1 -1
  31. package/lib/crypto/algorithms/megolm.js +4 -4
  32. package/lib/crypto/algorithms/megolm.js.map +1 -1
  33. package/lib/crypto/algorithms/olm.js +20 -8
  34. package/lib/crypto/algorithms/olm.js.map +1 -1
  35. package/lib/crypto/backup.d.ts +5 -0
  36. package/lib/crypto/backup.d.ts.map +1 -1
  37. package/lib/crypto/backup.js +18 -2
  38. package/lib/crypto/backup.js.map +1 -1
  39. package/lib/crypto/crypto.js +2 -2
  40. package/lib/crypto/crypto.js.map +1 -1
  41. package/lib/crypto/index.d.ts +15 -2
  42. package/lib/crypto/index.d.ts.map +1 -1
  43. package/lib/crypto/index.js +21 -9
  44. package/lib/crypto/index.js.map +1 -1
  45. package/lib/crypto/olmlib.js +2 -2
  46. package/lib/crypto/olmlib.js.map +1 -1
  47. package/lib/crypto/verification/QRCode.d.ts +0 -3
  48. package/lib/crypto/verification/QRCode.d.ts.map +1 -1
  49. package/lib/crypto/verification/QRCode.js +2 -1
  50. package/lib/crypto/verification/QRCode.js.map +1 -1
  51. package/lib/crypto/verification/SAS.d.ts.map +1 -1
  52. package/lib/crypto/verification/SAS.js +18 -12
  53. package/lib/crypto/verification/SAS.js.map +1 -1
  54. package/lib/crypto/verification/request/VerificationRequest.d.ts +12 -2
  55. package/lib/crypto/verification/request/VerificationRequest.d.ts.map +1 -1
  56. package/lib/crypto/verification/request/VerificationRequest.js +19 -1
  57. package/lib/crypto/verification/request/VerificationRequest.js.map +1 -1
  58. package/lib/crypto-api/verification.d.ts +19 -0
  59. package/lib/crypto-api/verification.d.ts.map +1 -1
  60. package/lib/crypto-api/verification.js.map +1 -1
  61. package/lib/filter.js +2 -2
  62. package/lib/filter.js.map +1 -1
  63. package/lib/http-api/fetch.js +1 -1
  64. package/lib/http-api/fetch.js.map +1 -1
  65. package/lib/interactive-auth.d.ts +66 -26
  66. package/lib/interactive-auth.d.ts.map +1 -1
  67. package/lib/interactive-auth.js +44 -28
  68. package/lib/interactive-auth.js.map +1 -1
  69. package/lib/models/event-timeline.js +3 -3
  70. package/lib/models/event-timeline.js.map +1 -1
  71. package/lib/models/event.d.ts +2 -0
  72. package/lib/models/event.d.ts.map +1 -1
  73. package/lib/models/event.js +33 -21
  74. package/lib/models/event.js.map +1 -1
  75. package/lib/models/read-receipt.js +1 -1
  76. package/lib/models/read-receipt.js.map +1 -1
  77. package/lib/models/relations-container.js +2 -2
  78. package/lib/models/relations-container.js.map +1 -1
  79. package/lib/models/room.js +4 -4
  80. package/lib/models/room.js.map +1 -1
  81. package/lib/models/thread.d.ts +3 -0
  82. package/lib/models/thread.d.ts.map +1 -1
  83. package/lib/models/thread.js +41 -14
  84. package/lib/models/thread.js.map +1 -1
  85. package/lib/models/typed-event-emitter.d.ts.map +1 -1
  86. package/lib/models/typed-event-emitter.js +4 -0
  87. package/lib/models/typed-event-emitter.js.map +1 -1
  88. package/lib/oidc/authorize.d.ts +26 -20
  89. package/lib/oidc/authorize.d.ts.map +1 -1
  90. package/lib/oidc/authorize.js +119 -48
  91. package/lib/oidc/authorize.js.map +1 -1
  92. package/lib/oidc/discovery.d.ts +20 -0
  93. package/lib/oidc/discovery.d.ts.map +1 -0
  94. package/lib/oidc/discovery.js +61 -0
  95. package/lib/oidc/discovery.js.map +1 -0
  96. package/lib/oidc/error.d.ts +3 -1
  97. package/lib/oidc/error.d.ts.map +1 -1
  98. package/lib/oidc/error.js +3 -1
  99. package/lib/oidc/error.js.map +1 -1
  100. package/lib/oidc/validate.d.ts +71 -3
  101. package/lib/oidc/validate.d.ts.map +1 -1
  102. package/lib/oidc/validate.js +136 -9
  103. package/lib/oidc/validate.js.map +1 -1
  104. package/lib/pushprocessor.js +1 -1
  105. package/lib/pushprocessor.js.map +1 -1
  106. package/lib/rust-crypto/index.d.ts +3 -1
  107. package/lib/rust-crypto/index.d.ts.map +1 -1
  108. package/lib/rust-crypto/index.js +5 -3
  109. package/lib/rust-crypto/index.js.map +1 -1
  110. package/lib/rust-crypto/rust-crypto.d.ts +19 -2
  111. package/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
  112. package/lib/rust-crypto/rust-crypto.js +37 -7
  113. package/lib/rust-crypto/rust-crypto.js.map +1 -1
  114. package/lib/rust-crypto/verification.d.ts +28 -4
  115. package/lib/rust-crypto/verification.d.ts.map +1 -1
  116. package/lib/rust-crypto/verification.js +85 -14
  117. package/lib/rust-crypto/verification.js.map +1 -1
  118. package/lib/sync-accumulator.js +3 -3
  119. package/lib/sync-accumulator.js.map +1 -1
  120. package/lib/sync.d.ts.map +1 -1
  121. package/lib/sync.js +7 -2
  122. package/lib/sync.js.map +1 -1
  123. package/lib/webrtc/call.js +1 -1
  124. package/lib/webrtc/call.js.map +1 -1
  125. package/lib/webrtc/callEventHandler.js +2 -2
  126. package/lib/webrtc/callEventHandler.js.map +1 -1
  127. package/lib/webrtc/mediaHandler.js +7 -7
  128. package/lib/webrtc/mediaHandler.js.map +1 -1
  129. package/lib/webrtc/stats/trackStatsBuilder.js +1 -1
  130. package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
  131. package/package.json +6 -4
  132. package/src/@types/auth.ts +154 -12
  133. package/src/@types/registration.ts +116 -0
  134. package/src/@types/requests.ts +2 -1
  135. package/src/autodiscovery.ts +70 -4
  136. package/src/client.ts +115 -76
  137. package/src/crypto/algorithms/olm.ts +21 -8
  138. package/src/crypto/backup.ts +18 -0
  139. package/src/crypto/index.ts +38 -15
  140. package/src/crypto/verification/QRCode.ts +2 -1
  141. package/src/crypto/verification/SAS.ts +17 -12
  142. package/src/crypto/verification/request/VerificationRequest.ts +21 -1
  143. package/src/crypto-api/verification.ts +21 -0
  144. package/src/interactive-auth.ts +104 -74
  145. package/src/models/event.ts +29 -10
  146. package/src/models/thread.ts +46 -9
  147. package/src/models/typed-event-emitter.ts +4 -0
  148. package/src/oidc/authorize.ts +130 -76
  149. package/src/oidc/discovery.ts +61 -0
  150. package/src/oidc/error.ts +3 -1
  151. package/src/oidc/validate.ts +198 -8
  152. package/src/rust-crypto/index.ts +9 -2
  153. package/src/rust-crypto/rust-crypto.ts +63 -9
  154. package/src/rust-crypto/verification.ts +98 -13
  155. package/src/sync.ts +15 -11
package/CHANGELOG.md CHANGED
@@ -1,3 +1,40 @@
1
+ Changes in [27.0.0-rc.2](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v27.0.0-rc.2) (2023-07-14)
2
+ ============================================================================================================
3
+
4
+ ## 🐛 Bug Fixes
5
+ * Fix read receipt sending behaviour around thread roots ([\#3600](https://github.com/matrix-org/matrix-js-sdk/pull/3600)).
6
+
7
+ Changes in [27.0.0-rc.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v27.0.0-rc.1) (2023-07-11)
8
+ ============================================================================================================
9
+
10
+ ## 🚨 BREAKING CHANGES
11
+ * Improve types around login, registration, UIA and identity servers ([\#3537](https://github.com/matrix-org/matrix-js-sdk/pull/3537)).
12
+
13
+ ## 🦖 Deprecations
14
+ * **The Browserify artifact is being deprecated, scheduled for removal in the October 10th release cycle. (#3189)**
15
+ * Simplify `MatrixClient::setPowerLevel` API ([\#3570](https://github.com/matrix-org/matrix-js-sdk/pull/3570)). Fixes vector-im/element-web#13900 and #1844.
16
+ * Deprecate `VerificationRequest.getQRCodeBytes` and replace it with the asynchronous `generateQRCode`. ([\#3562](https://github.com/matrix-org/matrix-js-sdk/pull/3562)).
17
+ * Drop support for Node 16 ([\#3533](https://github.com/matrix-org/matrix-js-sdk/pull/3533)).
18
+ * Deprecate `VerificationRequest.beginKeyVerification()` in favour of `VerificationRequest.startVerification()`. ([\#3528](https://github.com/matrix-org/matrix-js-sdk/pull/3528)).
19
+ * Deprecate `Crypto.VerificationRequest` application event, replacing it with `Crypto.VerificationRequestReceived`. ([\#3514](https://github.com/matrix-org/matrix-js-sdk/pull/3514)).
20
+
21
+ ## ✨ Features
22
+ * Throw saner error when peeking has its room pulled out from under it ([\#3577](https://github.com/matrix-org/matrix-js-sdk/pull/3577)). Fixes vector-im/element-web#18679.
23
+ * OIDC: Log in ([\#3554](https://github.com/matrix-org/matrix-js-sdk/pull/3554)). Contributed by @kerryarchibald.
24
+ * Prevent threads code from making identical simultaneous API hits ([\#3541](https://github.com/matrix-org/matrix-js-sdk/pull/3541)). Fixes vector-im/element-web#25395.
25
+ * Update IUnsigned type to be extensible ([\#3547](https://github.com/matrix-org/matrix-js-sdk/pull/3547)).
26
+ * add stop() api to BackupManager for clean shutdown ([\#3553](https://github.com/matrix-org/matrix-js-sdk/pull/3553)).
27
+ * Log the message ID of any undecryptable to-device messages ([\#3543](https://github.com/matrix-org/matrix-js-sdk/pull/3543)).
28
+ * Ignore thread relations on state events for consistency with edits ([\#3540](https://github.com/matrix-org/matrix-js-sdk/pull/3540)).
29
+ * OIDC: validate id token ([\#3531](https://github.com/matrix-org/matrix-js-sdk/pull/3531)). Contributed by @kerryarchibald.
30
+
31
+ ## 🐛 Bug Fixes
32
+ * Fix `TypedEventEmitter::removeAllListeners(void)` not working ([\#3561](https://github.com/matrix-org/matrix-js-sdk/pull/3561)).
33
+ * Don't allow Olm unwedging rate-limiting to race ([\#3549](https://github.com/matrix-org/matrix-js-sdk/pull/3549)). Fixes vector-im/element-web#25716.
34
+ * Fix an instance of failed to decrypt error when an in flight `/keys/query` fails. ([\#3486](https://github.com/matrix-org/matrix-js-sdk/pull/3486)).
35
+ * Use the right anchor emoji for SAS verification ([\#3534](https://github.com/matrix-org/matrix-js-sdk/pull/3534)).
36
+ * fix a bug which caused the wrong emoji to be shown during SAS device verification. ([\#3523](https://github.com/matrix-org/matrix-js-sdk/pull/3523)).
37
+
1
38
  Changes in [26.2.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v26.2.0) (2023-07-04)
2
39
  ==================================================================================================
3
40
 
package/README.md CHANGED
@@ -21,6 +21,8 @@ endpoints from before Matrix 1.1, for example.
21
21
 
22
22
  ## In a browser
23
23
 
24
+ ### Note, the browserify build has been deprecated. Please use a bundler like webpack or vite instead.
25
+
24
26
  Download the browser version from
25
27
  https://github.com/matrix-org/matrix-js-sdk/releases/latest and add that as a
26
28
  `<script>` to your page. There will be a global variable `matrixcs`