matrix-js-sdk 15.2.1 → 15.4.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 (193) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/dist/browser-matrix.js +1647 -2481
  3. package/dist/browser-matrix.js.map +60 -64
  4. package/dist/browser-matrix.min.js +5 -5
  5. package/dist/browser-matrix.min.js.map +1 -1
  6. package/git-revision.txt +1 -1
  7. package/lib/@types/extensible_events.d.ts +3 -0
  8. package/lib/@types/extensible_events.d.ts.map +1 -0
  9. package/lib/{sync.api.js → @types/extensible_events.js} +6 -13
  10. package/lib/@types/location.d.ts +17 -0
  11. package/lib/@types/location.d.ts.map +1 -0
  12. package/lib/@types/location.js +53 -0
  13. package/lib/@types/partials.d.ts +4 -0
  14. package/lib/@types/partials.d.ts.map +1 -1
  15. package/lib/@types/polls.d.ts +39 -0
  16. package/lib/@types/polls.d.ts.map +1 -0
  17. package/lib/@types/polls.js +36 -0
  18. package/lib/@types/requests.d.ts +12 -1
  19. package/lib/@types/requests.d.ts.map +1 -1
  20. package/lib/@types/spaces.d.ts +0 -1
  21. package/lib/@types/spaces.d.ts.map +1 -1
  22. package/lib/autodiscovery.d.ts +0 -1
  23. package/lib/autodiscovery.d.ts.map +1 -1
  24. package/lib/autodiscovery.js +2 -2
  25. package/lib/browser-index.js +4 -4
  26. package/lib/client.d.ts +129 -69
  27. package/lib/client.d.ts.map +1 -1
  28. package/lib/client.js +251 -234
  29. package/lib/content-helpers.d.ts +19 -0
  30. package/lib/content-helpers.d.ts.map +1 -1
  31. package/lib/content-helpers.js +58 -0
  32. package/lib/content-repo.js +2 -2
  33. package/lib/crypto/CrossSigning.d.ts.map +1 -1
  34. package/lib/crypto/DeviceList.d.ts.map +1 -1
  35. package/lib/crypto/DeviceList.js +1 -2
  36. package/lib/crypto/EncryptionSetup.d.ts +1 -1
  37. package/lib/crypto/EncryptionSetup.d.ts.map +1 -1
  38. package/lib/crypto/EncryptionSetup.js +4 -4
  39. package/lib/crypto/OlmDevice.d.ts +2 -1
  40. package/lib/crypto/OlmDevice.d.ts.map +1 -1
  41. package/lib/crypto/OlmDevice.js +10 -1
  42. package/lib/crypto/SecretStorage.d.ts +6 -4
  43. package/lib/crypto/SecretStorage.d.ts.map +1 -1
  44. package/lib/crypto/aes.d.ts.map +1 -1
  45. package/lib/crypto/algorithms/base.d.ts +1 -1
  46. package/lib/crypto/algorithms/base.d.ts.map +1 -1
  47. package/lib/crypto/algorithms/megolm.d.ts.map +1 -1
  48. package/lib/crypto/algorithms/megolm.js +5 -3
  49. package/lib/crypto/backup.d.ts +4 -3
  50. package/lib/crypto/backup.d.ts.map +1 -1
  51. package/lib/crypto/backup.js +2 -3
  52. package/lib/crypto/dehydration.d.ts +3 -4
  53. package/lib/crypto/dehydration.d.ts.map +1 -1
  54. package/lib/crypto/dehydration.js +8 -5
  55. package/lib/crypto/index.d.ts +13 -5
  56. package/lib/crypto/index.d.ts.map +1 -1
  57. package/lib/crypto/index.js +46 -16
  58. package/lib/crypto/keybackup.d.ts +2 -2
  59. package/lib/crypto/keybackup.d.ts.map +1 -1
  60. package/lib/crypto/olmlib.d.ts +8 -3
  61. package/lib/crypto/olmlib.d.ts.map +1 -1
  62. package/lib/crypto/olmlib.js +2 -9
  63. package/lib/crypto/store/indexeddb-crypto-store-backend.js +8 -8
  64. package/lib/crypto/store/localStorage-crypto-store.d.ts.map +1 -1
  65. package/lib/crypto/verification/Base.d.ts +1 -1
  66. package/lib/crypto/verification/Base.d.ts.map +1 -1
  67. package/lib/crypto/verification/Base.js +2 -2
  68. package/lib/crypto/verification/SAS.d.ts +0 -4
  69. package/lib/crypto/verification/SAS.d.ts.map +1 -1
  70. package/lib/crypto/verification/SAS.js +2 -2
  71. package/lib/crypto/verification/request/Channel.d.ts +1 -0
  72. package/lib/crypto/verification/request/Channel.d.ts.map +1 -1
  73. package/lib/crypto/verification/request/InRoomChannel.d.ts +3 -2
  74. package/lib/crypto/verification/request/InRoomChannel.d.ts.map +1 -1
  75. package/lib/crypto/verification/request/ToDeviceChannel.d.ts +3 -3
  76. package/lib/crypto/verification/request/ToDeviceChannel.d.ts.map +1 -1
  77. package/lib/crypto/verification/request/VerificationRequest.d.ts.map +1 -1
  78. package/lib/crypto/verification/request/VerificationRequest.js +2 -2
  79. package/lib/filter-component.d.ts.map +1 -1
  80. package/lib/filter-component.js +5 -1
  81. package/lib/filter.d.ts +7 -0
  82. package/lib/filter.d.ts.map +1 -1
  83. package/lib/filter.js +9 -2
  84. package/lib/http-api.d.ts +370 -0
  85. package/lib/http-api.d.ts.map +1 -0
  86. package/lib/http-api.js +180 -156
  87. package/lib/index.d.ts +0 -5
  88. package/lib/index.d.ts.map +1 -1
  89. package/lib/index.js +2 -72
  90. package/lib/interactive-auth.d.ts +4 -2
  91. package/lib/interactive-auth.d.ts.map +1 -1
  92. package/lib/interactive-auth.js +3 -7
  93. package/lib/matrix.d.ts +6 -1
  94. package/lib/matrix.d.ts.map +1 -1
  95. package/lib/matrix.js +70 -0
  96. package/lib/models/MSC3089Branch.d.ts +2 -3
  97. package/lib/models/MSC3089Branch.d.ts.map +1 -1
  98. package/lib/models/MSC3089Branch.js +21 -2
  99. package/lib/models/MSC3089TreeSpace.d.ts +6 -7
  100. package/lib/models/MSC3089TreeSpace.d.ts.map +1 -1
  101. package/lib/models/MSC3089TreeSpace.js +25 -11
  102. package/lib/models/event-timeline-set.d.ts +1 -1
  103. package/lib/models/event-timeline-set.d.ts.map +1 -1
  104. package/lib/models/event-timeline.d.ts +2 -2
  105. package/lib/models/event-timeline.d.ts.map +1 -1
  106. package/lib/models/event.d.ts +4 -2
  107. package/lib/models/event.d.ts.map +1 -1
  108. package/lib/models/event.js +8 -8
  109. package/lib/models/group.js +2 -2
  110. package/lib/models/room.d.ts +47 -22
  111. package/lib/models/room.d.ts.map +1 -1
  112. package/lib/models/room.js +124 -81
  113. package/lib/models/thread.d.ts +4 -1
  114. package/lib/models/thread.d.ts.map +1 -1
  115. package/lib/models/thread.js +11 -0
  116. package/lib/room-hierarchy.js +1 -1
  117. package/lib/scheduler.js +1 -1
  118. package/lib/store/index.d.ts +9 -9
  119. package/lib/store/index.d.ts.map +1 -1
  120. package/lib/store/session/webstorage.js +2 -2
  121. package/lib/sync.d.ts +11 -3
  122. package/lib/sync.d.ts.map +1 -1
  123. package/lib/sync.js +48 -24
  124. package/lib/utils.d.ts +3 -16
  125. package/lib/utils.d.ts.map +1 -1
  126. package/lib/utils.js +12 -37
  127. package/lib/webrtc/call.d.ts +4 -0
  128. package/lib/webrtc/call.d.ts.map +1 -1
  129. package/lib/webrtc/call.js +2 -2
  130. package/lib/webrtc/callFeed.d.ts.map +1 -1
  131. package/package.json +8 -6
  132. package/release.sh +6 -0
  133. package/src/{sync.api.ts → @types/extensible_events.ts} +4 -9
  134. package/src/@types/global.d.ts +0 -6
  135. package/src/@types/location.ts +58 -0
  136. package/src/@types/partials.ts +9 -0
  137. package/src/@types/polls.ts +68 -0
  138. package/src/@types/requests.ts +15 -1
  139. package/src/@types/spaces.ts +0 -1
  140. package/src/ReEmitter.ts +1 -1
  141. package/src/autodiscovery.ts +2 -1
  142. package/src/browser-index.js +2 -1
  143. package/src/client.ts +491 -311
  144. package/src/content-helpers.ts +60 -0
  145. package/src/content-repo.ts +3 -3
  146. package/src/crypto/CrossSigning.ts +3 -2
  147. package/src/crypto/DeviceList.ts +21 -13
  148. package/src/crypto/EncryptionSetup.ts +6 -11
  149. package/src/crypto/OlmDevice.ts +16 -3
  150. package/src/crypto/SecretStorage.ts +30 -20
  151. package/src/crypto/aes.ts +0 -1
  152. package/src/crypto/algorithms/base.ts +1 -1
  153. package/src/crypto/algorithms/megolm.ts +27 -21
  154. package/src/crypto/algorithms/olm.ts +1 -1
  155. package/src/crypto/backup.ts +8 -10
  156. package/src/crypto/dehydration.ts +11 -10
  157. package/src/crypto/index.ts +72 -53
  158. package/src/crypto/keybackup.ts +1 -1
  159. package/src/crypto/olmlib.ts +20 -17
  160. package/src/crypto/store/indexeddb-crypto-store-backend.ts +16 -16
  161. package/src/crypto/store/localStorage-crypto-store.ts +6 -4
  162. package/src/crypto/verification/Base.ts +2 -1
  163. package/src/crypto/verification/SAS.ts +3 -2
  164. package/src/crypto/verification/request/Channel.ts +1 -0
  165. package/src/crypto/verification/request/InRoomChannel.ts +4 -3
  166. package/src/crypto/verification/request/ToDeviceChannel.ts +4 -3
  167. package/src/crypto/verification/request/VerificationRequest.ts +5 -2
  168. package/src/filter-component.ts +3 -0
  169. package/src/filter.ts +18 -0
  170. package/src/{http-api.js → http-api.ts} +331 -205
  171. package/src/index.ts +2 -6
  172. package/src/interactive-auth.ts +6 -6
  173. package/src/logger.ts +1 -1
  174. package/src/matrix.ts +6 -1
  175. package/src/models/MSC3089Branch.ts +21 -5
  176. package/src/models/MSC3089TreeSpace.ts +28 -15
  177. package/src/models/event-timeline-set.ts +2 -2
  178. package/src/models/event-timeline.ts +2 -2
  179. package/src/models/event.ts +18 -29
  180. package/src/models/group.js +2 -1
  181. package/src/models/room.ts +149 -108
  182. package/src/models/thread.ts +17 -0
  183. package/src/room-hierarchy.ts +1 -1
  184. package/src/scheduler.ts +2 -2
  185. package/src/store/index.ts +9 -9
  186. package/src/store/indexeddb-local-backend.ts +3 -3
  187. package/src/store/session/webstorage.js +2 -2
  188. package/src/sync.ts +38 -20
  189. package/src/utils.ts +14 -34
  190. package/src/webrtc/call.ts +2 -1
  191. package/src/webrtc/callFeed.ts +1 -0
  192. package/lib/sync.api.d.ts +0 -9
  193. package/lib/sync.api.d.ts.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,59 @@
1
+ Changes in [15.4.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v15.4.0) (2022-01-17)
2
+ ==================================================================================================
3
+
4
+ ## ✨ Features
5
+ * Don't consider alt_aliases when calculating room name ([\#2094](https://github.com/matrix-org/matrix-js-sdk/pull/2094)). Fixes vector-im/element-web#13887.
6
+ * Load room history if necessary when searching for MSC3089 getFileEvent() ([\#2066](https://github.com/matrix-org/matrix-js-sdk/pull/2066)).
7
+ * Add support for MSC3030 `/timestamp_to_event` ([\#2072](https://github.com/matrix-org/matrix-js-sdk/pull/2072)).
8
+
9
+ ## 🐛 Bug Fixes
10
+ * Stop encrypting redactions as it isn't spec compliant ([\#2098](https://github.com/matrix-org/matrix-js-sdk/pull/2098)). Fixes vector-im/element-web#20460.
11
+ * Fix more function typings relating to key backup ([\#2086](https://github.com/matrix-org/matrix-js-sdk/pull/2086)).
12
+ * Fix timeline search in MSC3089 getFileEvent() ([\#2085](https://github.com/matrix-org/matrix-js-sdk/pull/2085)).
13
+ * Set a `deviceId` for VoIP example and use `const`/`let` ([\#2090](https://github.com/matrix-org/matrix-js-sdk/pull/2090)). Fixes #2083. Contributed by @SimonBrandner.
14
+ * Fix incorrect TS return type for secret storage and key backup functions ([\#2082](https://github.com/matrix-org/matrix-js-sdk/pull/2082)).
15
+
16
+ Changes in [15.4.0-rc.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v15.4.0-rc.1) (2022-01-11)
17
+ ============================================================================================================
18
+
19
+ ## ✨ Features
20
+ * Don't consider alt_aliases when calculating room name ([\#2094](https://github.com/matrix-org/matrix-js-sdk/pull/2094)). Fixes vector-im/element-web#13887.
21
+ * Load room history if necessary when searching for MSC3089 getFileEvent() ([\#2066](https://github.com/matrix-org/matrix-js-sdk/pull/2066)).
22
+ * Add support for MSC3030 `/timestamp_to_event` ([\#2072](https://github.com/matrix-org/matrix-js-sdk/pull/2072)).
23
+
24
+ ## 🐛 Bug Fixes
25
+ * Stop encrypting redactions as it isn't spec compliant ([\#2098](https://github.com/matrix-org/matrix-js-sdk/pull/2098)). Fixes vector-im/element-web#20460.
26
+ * Fix more function typings relating to key backup ([\#2086](https://github.com/matrix-org/matrix-js-sdk/pull/2086)).
27
+ * Fix timeline search in MSC3089 getFileEvent() ([\#2085](https://github.com/matrix-org/matrix-js-sdk/pull/2085)).
28
+ * Set a `deviceId` for VoIP example and use `const`/`let` ([\#2090](https://github.com/matrix-org/matrix-js-sdk/pull/2090)). Fixes #2083. Contributed by @SimonBrandner.
29
+ * Fix incorrect TS return type for secret storage and key backup functions ([\#2082](https://github.com/matrix-org/matrix-js-sdk/pull/2082)).
30
+
31
+ Changes in [15.3.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v15.3.0) (2021-12-20)
32
+ ==================================================================================================
33
+
34
+ ## ✨ Features
35
+ * Improve fallback key behaviour ([\#2037](https://github.com/matrix-org/matrix-js-sdk/pull/2037)).
36
+ * Add new room event filter fields ([\#2051](https://github.com/matrix-org/matrix-js-sdk/pull/2051)).
37
+ * Add method to fetch /account/whoami ([\#2046](https://github.com/matrix-org/matrix-js-sdk/pull/2046)).
38
+
39
+ ## 🐛 Bug Fixes
40
+ * Filter out falsey opts in /relations API hits ([\#2059](https://github.com/matrix-org/matrix-js-sdk/pull/2059)). Fixes vector-im/element-web#20137.
41
+ * Fix paginateEventTimeline resolve to boolean ([\#2054](https://github.com/matrix-org/matrix-js-sdk/pull/2054)).
42
+ * Fix incorrect MSC3089 typings and add null checks ([\#2049](https://github.com/matrix-org/matrix-js-sdk/pull/2049)).
43
+
44
+ Changes in [15.3.0-rc.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v15.3.0-rc.1) (2021-12-14)
45
+ ============================================================================================================
46
+
47
+ ## ✨ Features
48
+ * Improve fallback key behaviour ([\#2037](https://github.com/matrix-org/matrix-js-sdk/pull/2037)).
49
+ * Add new room event filter fields ([\#2051](https://github.com/matrix-org/matrix-js-sdk/pull/2051)).
50
+ * Add method to fetch /account/whoami ([\#2046](https://github.com/matrix-org/matrix-js-sdk/pull/2046)).
51
+
52
+ ## 🐛 Bug Fixes
53
+ * Filter out falsey opts in /relations API hits ([\#2059](https://github.com/matrix-org/matrix-js-sdk/pull/2059)). Fixes vector-im/element-web#20137.
54
+ * Fix paginateEventTimeline resolve to boolean ([\#2054](https://github.com/matrix-org/matrix-js-sdk/pull/2054)).
55
+ * Fix incorrect MSC3089 typings and add null checks ([\#2049](https://github.com/matrix-org/matrix-js-sdk/pull/2049)).
56
+
1
57
  Changes in [15.2.1](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v15.2.1) (2021-12-13)
2
58
  ==================================================================================================
3
59