matrix-js-sdk 29.1.0 → 30.0.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.
- package/CHANGELOG.md +23 -0
- package/git-revision.txt +1 -1
- package/lib/@types/PushRules.js +7 -14
- package/lib/@types/PushRules.js.map +1 -1
- package/lib/@types/auth.js +3 -6
- package/lib/@types/auth.js.map +1 -1
- package/lib/@types/beacon.js +2 -4
- package/lib/@types/beacon.js.map +1 -1
- package/lib/@types/event.js +19 -38
- package/lib/@types/event.js.map +1 -1
- package/lib/@types/extensible_events.js +8 -8
- package/lib/@types/extensible_events.js.map +1 -1
- package/lib/@types/location.js +6 -8
- package/lib/@types/location.js.map +1 -1
- package/lib/@types/partials.js +6 -12
- package/lib/@types/partials.js.map +1 -1
- package/lib/@types/polls.js +8 -10
- package/lib/@types/polls.js.map +1 -1
- package/lib/@types/read_receipts.js +2 -4
- package/lib/@types/read_receipts.js.map +1 -1
- package/lib/@types/search.js +1 -2
- package/lib/@types/search.js.map +1 -1
- package/lib/@types/sync.js +1 -2
- package/lib/@types/sync.js.map +1 -1
- package/lib/@types/threepids.js +1 -2
- package/lib/@types/threepids.js.map +1 -1
- package/lib/@types/topic.js +1 -2
- package/lib/@types/topic.js.map +1 -1
- package/lib/autodiscovery.js +2 -4
- package/lib/autodiscovery.js.map +1 -1
- package/lib/{common-crypto/base64.d.ts → base64.d.ts} +1 -1
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +87 -0
- package/lib/base64.js.map +1 -0
- package/lib/browser-index.js +2 -2
- package/lib/browser-index.js.map +1 -1
- package/lib/client.d.ts +3 -3
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +38 -47
- package/lib/client.js.map +1 -1
- package/lib/common-crypto/CryptoBackend.d.ts +2 -2
- package/lib/common-crypto/CryptoBackend.js.map +1 -1
- package/lib/crypto/CrossSigning.d.ts.map +1 -1
- package/lib/crypto/CrossSigning.js +8 -8
- package/lib/crypto/CrossSigning.js.map +1 -1
- package/lib/crypto/DeviceList.js +3 -4
- package/lib/crypto/DeviceList.js.map +1 -1
- package/lib/crypto/OlmDevice.js +3 -4
- package/lib/crypto/OlmDevice.js.map +1 -1
- package/lib/crypto/OutgoingRoomKeyRequestManager.js +1 -2
- package/lib/crypto/OutgoingRoomKeyRequestManager.js.map +1 -1
- package/lib/crypto/SecretSharing.js +2 -2
- package/lib/crypto/SecretSharing.js.map +1 -1
- package/lib/crypto/aes.js +8 -8
- package/lib/crypto/aes.js.map +1 -1
- package/lib/crypto/algorithms/base.js +2 -4
- package/lib/crypto/algorithms/base.js.map +1 -1
- package/lib/crypto/algorithms/megolm.js +2 -2
- package/lib/crypto/algorithms/megolm.js.map +1 -1
- package/lib/crypto/algorithms/olm.js +2 -2
- package/lib/crypto/algorithms/olm.js.map +1 -1
- package/lib/crypto/backup.js +2 -4
- package/lib/crypto/backup.js.map +1 -1
- package/lib/crypto/crypto.js +3 -6
- package/lib/crypto/crypto.js.map +1 -1
- package/lib/crypto/dehydration.js +4 -5
- package/lib/crypto/dehydration.js.map +1 -1
- package/lib/crypto/index.d.ts +4 -0
- package/lib/crypto/index.d.ts.map +1 -1
- package/lib/crypto/index.js +23 -16
- package/lib/crypto/index.js.map +1 -1
- package/lib/crypto/olmlib.d.ts +0 -18
- package/lib/crypto/olmlib.d.ts.map +1 -1
- package/lib/crypto/olmlib.js +3 -36
- package/lib/crypto/olmlib.js.map +1 -1
- package/lib/crypto/recoverykey.js +2 -2
- package/lib/crypto/recoverykey.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store-backend.js +1 -2
- package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store.js +2 -2
- package/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
- package/lib/crypto/verification/Base.js +2 -2
- package/lib/crypto/verification/Base.js.map +1 -1
- package/lib/crypto/verification/Error.js +6 -12
- package/lib/crypto/verification/Error.js.map +1 -1
- package/lib/crypto/verification/QRCode.js +7 -9
- package/lib/crypto/verification/QRCode.js.map +1 -1
- package/lib/crypto/verification/SAS.js +1 -2
- package/lib/crypto/verification/SAS.js.map +1 -1
- package/lib/crypto/verification/request/VerificationRequest.js +12 -24
- package/lib/crypto/verification/request/VerificationRequest.js.map +1 -1
- package/lib/crypto-api/verification.js +3 -6
- package/lib/crypto-api/verification.js.map +1 -1
- package/lib/crypto-api.d.ts +6 -0
- package/lib/crypto-api.d.ts.map +1 -1
- package/lib/crypto-api.js +3 -6
- package/lib/crypto-api.js.map +1 -1
- package/lib/errors.js +2 -4
- package/lib/errors.js.map +1 -1
- package/lib/feature.js +2 -4
- package/lib/feature.js.map +1 -1
- package/lib/http-api/index.js +2 -2
- package/lib/http-api/index.js.map +1 -1
- package/lib/http-api/interface.js +1 -2
- package/lib/http-api/interface.js.map +1 -1
- package/lib/http-api/method.js +1 -2
- package/lib/http-api/method.js.map +1 -1
- package/lib/http-api/prefix.js +3 -6
- package/lib/http-api/prefix.js.map +1 -1
- package/lib/index.js +3 -4
- package/lib/index.js.map +1 -1
- package/lib/interactive-auth.js +1 -2
- package/lib/interactive-auth.js.map +1 -1
- package/lib/logger.js +1 -2
- package/lib/logger.js.map +1 -1
- package/lib/matrix.d.ts +1 -0
- package/lib/matrix.d.ts.map +1 -1
- package/lib/matrix.js +14 -2
- package/lib/matrix.js.map +1 -1
- package/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -1
- package/lib/matrixrtc/MatrixRTCSession.js +4 -3
- package/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.js +1 -2
- package/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
- package/lib/models/MSC3089TreeSpace.js +2 -4
- package/lib/models/MSC3089TreeSpace.js.map +1 -1
- package/lib/models/beacon.js +1 -2
- package/lib/models/beacon.js.map +1 -1
- package/lib/models/device.js +1 -2
- package/lib/models/device.js.map +1 -1
- package/lib/models/event-status.js +1 -2
- package/lib/models/event-status.js.map +1 -1
- package/lib/models/event-timeline-set.js +1 -2
- package/lib/models/event-timeline-set.js.map +1 -1
- package/lib/models/event-timeline.js +1 -2
- package/lib/models/event-timeline.js.map +1 -1
- package/lib/models/event.d.ts +15 -6
- package/lib/models/event.d.ts.map +1 -1
- package/lib/models/event.js +16 -8
- package/lib/models/event.js.map +1 -1
- package/lib/models/invites-ignorer.js +3 -6
- package/lib/models/invites-ignorer.js.map +1 -1
- package/lib/models/poll.js +1 -2
- package/lib/models/poll.js.map +1 -1
- package/lib/models/relations.js +1 -2
- package/lib/models/relations.js.map +1 -1
- package/lib/models/room-member.js +1 -2
- package/lib/models/room-member.js.map +1 -1
- package/lib/models/room-state.js +1 -2
- package/lib/models/room-state.js.map +1 -1
- package/lib/models/room.js +4 -8
- package/lib/models/room.js.map +1 -1
- package/lib/models/thread.d.ts.map +1 -1
- package/lib/models/thread.js +19 -26
- package/lib/models/thread.js.map +1 -1
- package/lib/models/typed-event-emitter.js +1 -2
- package/lib/models/typed-event-emitter.js.map +1 -1
- package/lib/models/user.d.ts +10 -0
- package/lib/models/user.d.ts.map +1 -1
- package/lib/models/user.js +15 -2
- package/lib/models/user.js.map +1 -1
- package/lib/oidc/authorize.d.ts +2 -1
- package/lib/oidc/authorize.d.ts.map +1 -1
- package/lib/oidc/authorize.js +2 -1
- package/lib/oidc/authorize.js.map +1 -1
- package/lib/oidc/error.d.ts +4 -0
- package/lib/oidc/error.d.ts.map +1 -1
- package/lib/oidc/error.js +5 -2
- package/lib/oidc/error.js.map +1 -1
- package/lib/oidc/index.d.ts +5 -0
- package/lib/oidc/index.d.ts.map +1 -1
- package/lib/oidc/index.js +55 -0
- package/lib/oidc/index.js.map +1 -1
- package/lib/oidc/register.d.ts.map +1 -1
- package/lib/oidc/register.js +2 -1
- package/lib/oidc/register.js.map +1 -1
- package/lib/rendezvous/RendezvousFailureReason.js +1 -2
- package/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
- package/lib/rendezvous/RendezvousIntent.js +1 -2
- package/lib/rendezvous/RendezvousIntent.js.map +1 -1
- package/lib/rendezvous/channels/MSC3903ECDHv2RendezvousChannel.js +12 -12
- package/lib/rendezvous/channels/MSC3903ECDHv2RendezvousChannel.js.map +1 -1
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts +9 -2
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +1 -1
- package/lib/rust-crypto/OutgoingRequestProcessor.js +25 -3
- package/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
- package/lib/rust-crypto/RoomEncryptor.d.ts +14 -3
- package/lib/rust-crypto/RoomEncryptor.d.ts.map +1 -1
- package/lib/rust-crypto/RoomEncryptor.js +45 -4
- package/lib/rust-crypto/RoomEncryptor.js.map +1 -1
- package/lib/rust-crypto/backup.d.ts +7 -0
- package/lib/rust-crypto/backup.d.ts.map +1 -1
- package/lib/rust-crypto/backup.js +61 -7
- package/lib/rust-crypto/backup.js.map +1 -1
- package/lib/rust-crypto/constants.js +1 -2
- package/lib/rust-crypto/constants.js.map +1 -1
- package/lib/rust-crypto/device-converter.js +2 -2
- package/lib/rust-crypto/device-converter.js.map +1 -1
- package/lib/rust-crypto/index.d.ts.map +1 -1
- package/lib/rust-crypto/index.js +13 -3
- package/lib/rust-crypto/index.js.map +1 -1
- package/lib/rust-crypto/rust-crypto.d.ts +43 -3
- package/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
- package/lib/rust-crypto/rust-crypto.js +129 -33
- package/lib/rust-crypto/rust-crypto.js.map +1 -1
- package/lib/rust-crypto/verification.js +2 -2
- package/lib/rust-crypto/verification.js.map +1 -1
- package/lib/secret-storage.js +2 -2
- package/lib/secret-storage.js.map +1 -1
- package/lib/service-types.js +1 -2
- package/lib/service-types.js.map +1 -1
- package/lib/sliding-sync.js +6 -12
- package/lib/sliding-sync.js.map +1 -1
- package/lib/store/index.d.ts +6 -0
- package/lib/store/index.d.ts.map +1 -1
- package/lib/store/index.js.map +1 -1
- package/lib/store/indexeddb-local-backend.d.ts.map +1 -1
- package/lib/store/indexeddb-local-backend.js +0 -1
- package/lib/store/indexeddb-local-backend.js.map +1 -1
- package/lib/store/indexeddb.d.ts.map +1 -1
- package/lib/store/indexeddb.js +4 -2
- package/lib/store/indexeddb.js.map +1 -1
- package/lib/store/local-storage-events-emitter.js +2 -4
- package/lib/store/local-storage-events-emitter.js.map +1 -1
- package/lib/store/memory.d.ts +3 -1
- package/lib/store/memory.d.ts.map +1 -1
- package/lib/store/memory.js +5 -2
- package/lib/store/memory.js.map +1 -1
- package/lib/store/stub.d.ts +5 -1
- package/lib/store/stub.d.ts.map +1 -1
- package/lib/store/stub.js +7 -0
- package/lib/store/stub.js.map +1 -1
- package/lib/sync-accumulator.js +1 -2
- package/lib/sync-accumulator.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +6 -13
- package/lib/sync.js.map +1 -1
- package/lib/utils.js +1 -2
- package/lib/utils.js.map +1 -1
- package/lib/version-support.js +1 -2
- package/lib/version-support.js.map +1 -1
- package/lib/webrtc/call.js +7 -14
- package/lib/webrtc/call.js.map +1 -1
- package/lib/webrtc/callEventHandler.js +1 -2
- package/lib/webrtc/callEventHandler.js.map +1 -1
- package/lib/webrtc/callEventTypes.js +2 -4
- package/lib/webrtc/callEventTypes.js.map +1 -1
- package/lib/webrtc/callFeed.js +2 -4
- package/lib/webrtc/callFeed.js.map +1 -1
- package/lib/webrtc/groupCall.js +7 -14
- package/lib/webrtc/groupCall.js.map +1 -1
- package/lib/webrtc/groupCallEventHandler.js +1 -2
- package/lib/webrtc/groupCallEventHandler.js.map +1 -1
- package/lib/webrtc/mediaHandler.js +1 -2
- package/lib/webrtc/mediaHandler.js.map +1 -1
- package/lib/webrtc/stats/statsReport.js +1 -2
- package/lib/webrtc/stats/statsReport.js.map +1 -1
- package/package.json +8 -6
- package/src/base64.ts +79 -0
- package/src/client.ts +5 -4
- package/src/common-crypto/CryptoBackend.ts +2 -2
- package/src/crypto/CrossSigning.ts +2 -1
- package/src/crypto/aes.ts +1 -1
- package/src/crypto/dehydration.ts +1 -1
- package/src/crypto/index.ts +19 -10
- package/src/crypto/olmlib.ts +0 -27
- package/src/crypto/verification/QRCode.ts +1 -1
- package/src/crypto-api.ts +7 -0
- package/src/matrix.ts +1 -0
- package/src/matrixrtc/MatrixRTCSession.ts +6 -4
- package/src/models/event.ts +15 -6
- package/src/models/thread.ts +13 -16
- package/src/models/user.ts +21 -0
- package/src/oidc/authorize.ts +2 -1
- package/src/oidc/error.ts +4 -0
- package/src/oidc/index.ts +5 -0
- package/src/oidc/register.ts +2 -1
- package/src/rendezvous/channels/MSC3903ECDHv2RendezvousChannel.ts +1 -1
- package/src/rust-crypto/OutgoingRequestProcessor.ts +37 -6
- package/src/rust-crypto/RoomEncryptor.ts +56 -6
- package/src/rust-crypto/backup.ts +68 -6
- package/src/rust-crypto/index.ts +12 -1
- package/src/rust-crypto/rust-crypto.ts +135 -37
- package/src/store/index.ts +8 -0
- package/src/store/indexeddb-local-backend.ts +0 -1
- package/src/store/indexeddb.ts +4 -2
- package/src/store/memory.ts +7 -2
- package/src/store/stub.ts +8 -1
- package/src/sync.ts +4 -16
- package/lib/common-crypto/base64.d.ts.map +0 -1
- package/lib/common-crypto/base64.js +0 -55
- package/lib/common-crypto/base64.js.map +0 -1
- package/src/common-crypto/base64.ts +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,26 @@
|
|
|
1
|
+
Changes in [30.0.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v30.0.0) (2023-11-07)
|
|
2
|
+
==================================================================================================
|
|
3
|
+
|
|
4
|
+
## 🚨 BREAKING CHANGES
|
|
5
|
+
* Refactor & make base64 functions browser-safe ([\#3818](https://github.com/matrix-org/matrix-js-sdk/pull/3818)).
|
|
6
|
+
|
|
7
|
+
## 🦖 Deprecations
|
|
8
|
+
* Deprecate `MatrixEvent.toJSON` ([\#3801](https://github.com/matrix-org/matrix-js-sdk/pull/3801)).
|
|
9
|
+
|
|
10
|
+
## ✨ Features
|
|
11
|
+
* Element-R: Add the git sha of the binding crate to `CryptoApi#getVersion` ([\#3838](https://github.com/matrix-org/matrix-js-sdk/pull/3838)). Contributed by @florianduros.
|
|
12
|
+
* Element-R: Wire up `globalBlacklistUnverifiedDevices` field to rust crypto encryption settings ([\#3790](https://github.com/matrix-org/matrix-js-sdk/pull/3790)). Fixes vector-im/element-web#26315. Contributed by @florianduros.
|
|
13
|
+
* Element-R: Wire up room rotation ([\#3807](https://github.com/matrix-org/matrix-js-sdk/pull/3807)). Fixes vector-im/element-web#26318. Contributed by @florianduros.
|
|
14
|
+
* Element-R: Add current version of the rust-sdk and vodozemac ([\#3825](https://github.com/matrix-org/matrix-js-sdk/pull/3825)). Contributed by @florianduros.
|
|
15
|
+
* Element-R: Wire up room history visibility ([\#3805](https://github.com/matrix-org/matrix-js-sdk/pull/3805)). Fixes vector-im/element-web#26319. Contributed by @florianduros.
|
|
16
|
+
* Element-R: log when we send to-device messages ([\#3810](https://github.com/matrix-org/matrix-js-sdk/pull/3810)).
|
|
17
|
+
|
|
18
|
+
## 🐛 Bug Fixes
|
|
19
|
+
* Fix reemitter not being correctly wired on user objects created in storage classes ([\#3796](https://github.com/matrix-org/matrix-js-sdk/pull/3796)). Contributed by @MidhunSureshR.
|
|
20
|
+
* Element-R: silence log errors when viewing a pending event ([\#3824](https://github.com/matrix-org/matrix-js-sdk/pull/3824)).
|
|
21
|
+
* Don't emit a closed event if the indexeddb is closed by Element ([\#3832](https://github.com/matrix-org/matrix-js-sdk/pull/3832)). Fixes vector-im/element-web#25941. Contributed by @dhenneke.
|
|
22
|
+
* Element-R: silence log errors when viewing a decryption failure ([\#3821](https://github.com/matrix-org/matrix-js-sdk/pull/3821)).
|
|
23
|
+
|
|
1
24
|
Changes in [29.1.0](https://github.com/matrix-org/matrix-js-sdk/releases/tag/v29.1.0) (2023-10-24)
|
|
2
25
|
==================================================================================================
|
|
3
26
|
|
package/git-revision.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
fe3f96969806a49841e68dc4d5661f1d89776d6a
|
package/lib/@types/PushRules.js
CHANGED
|
@@ -22,20 +22,18 @@ limitations under the License.
|
|
|
22
22
|
*/
|
|
23
23
|
// allow camelcase as these are things that go onto the wire
|
|
24
24
|
/* eslint-disable camelcase */
|
|
25
|
-
let PushRuleActionName = /*#__PURE__*/function (PushRuleActionName) {
|
|
25
|
+
let PushRuleActionName = exports.PushRuleActionName = /*#__PURE__*/function (PushRuleActionName) {
|
|
26
26
|
PushRuleActionName["DontNotify"] = "dont_notify";
|
|
27
27
|
PushRuleActionName["Notify"] = "notify";
|
|
28
28
|
PushRuleActionName["Coalesce"] = "coalesce";
|
|
29
29
|
return PushRuleActionName;
|
|
30
30
|
}({});
|
|
31
|
-
exports.
|
|
32
|
-
let TweakName = /*#__PURE__*/function (TweakName) {
|
|
31
|
+
let TweakName = exports.TweakName = /*#__PURE__*/function (TweakName) {
|
|
33
32
|
TweakName["Highlight"] = "highlight";
|
|
34
33
|
TweakName["Sound"] = "sound";
|
|
35
34
|
return TweakName;
|
|
36
35
|
}({});
|
|
37
|
-
exports.
|
|
38
|
-
let ConditionOperator = /*#__PURE__*/function (ConditionOperator) {
|
|
36
|
+
let ConditionOperator = exports.ConditionOperator = /*#__PURE__*/function (ConditionOperator) {
|
|
39
37
|
ConditionOperator["ExactEquals"] = "==";
|
|
40
38
|
ConditionOperator["LessThan"] = "<";
|
|
41
39
|
ConditionOperator["GreaterThan"] = ">";
|
|
@@ -43,13 +41,11 @@ let ConditionOperator = /*#__PURE__*/function (ConditionOperator) {
|
|
|
43
41
|
ConditionOperator["LessThanOrEqual"] = "<=";
|
|
44
42
|
return ConditionOperator;
|
|
45
43
|
}({});
|
|
46
|
-
exports.
|
|
47
|
-
const DMMemberCountCondition = "2";
|
|
48
|
-
exports.DMMemberCountCondition = DMMemberCountCondition;
|
|
44
|
+
const DMMemberCountCondition = exports.DMMemberCountCondition = "2";
|
|
49
45
|
function isDmMemberCountCondition(condition) {
|
|
50
46
|
return condition === "==2" || condition === "2";
|
|
51
47
|
}
|
|
52
|
-
let ConditionKind = /*#__PURE__*/function (ConditionKind) {
|
|
48
|
+
let ConditionKind = exports.ConditionKind = /*#__PURE__*/function (ConditionKind) {
|
|
53
49
|
ConditionKind["EventMatch"] = "event_match";
|
|
54
50
|
ConditionKind["EventPropertyIs"] = "event_property_is";
|
|
55
51
|
ConditionKind["EventPropertyContains"] = "event_property_contains";
|
|
@@ -61,8 +57,7 @@ let ConditionKind = /*#__PURE__*/function (ConditionKind) {
|
|
|
61
57
|
return ConditionKind;
|
|
62
58
|
}({}); // XXX: custom conditions are possible but always fail, and break the typescript discriminated union so ignore them here
|
|
63
59
|
// IPushRuleCondition<Exclude<string, ConditionKind>> unfortunately does not resolve this at the time of writing.
|
|
64
|
-
exports.
|
|
65
|
-
let PushRuleKind = /*#__PURE__*/function (PushRuleKind) {
|
|
60
|
+
let PushRuleKind = exports.PushRuleKind = /*#__PURE__*/function (PushRuleKind) {
|
|
66
61
|
PushRuleKind["Override"] = "override";
|
|
67
62
|
PushRuleKind["ContentSpecific"] = "content";
|
|
68
63
|
PushRuleKind["RoomSpecific"] = "room";
|
|
@@ -70,8 +65,7 @@ let PushRuleKind = /*#__PURE__*/function (PushRuleKind) {
|
|
|
70
65
|
PushRuleKind["Underride"] = "underride";
|
|
71
66
|
return PushRuleKind;
|
|
72
67
|
}({});
|
|
73
|
-
exports.
|
|
74
|
-
let RuleId = /*#__PURE__*/function (RuleId) {
|
|
68
|
+
let RuleId = exports.RuleId = /*#__PURE__*/function (RuleId) {
|
|
75
69
|
RuleId["Master"] = ".m.rule.master";
|
|
76
70
|
RuleId["IsUserMention"] = ".m.rule.is_user_mention";
|
|
77
71
|
RuleId["IsRoomMention"] = ".m.rule.is_room_mention";
|
|
@@ -98,5 +92,4 @@ let RuleId = /*#__PURE__*/function (RuleId) {
|
|
|
98
92
|
return RuleId;
|
|
99
93
|
}({});
|
|
100
94
|
/* eslint-enable camelcase */
|
|
101
|
-
exports.RuleId = RuleId;
|
|
102
95
|
//# sourceMappingURL=PushRules.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushRules.js","names":["PushRuleActionName","exports","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\n 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;AAAA,IAEYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;
|
|
1
|
+
{"version":3,"file":"PushRules.js","names":["PushRuleActionName","exports","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\n 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;AAAA,IAEYA,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAAA,IAMlBE,SAAS,GAAAD,OAAA,CAAAC,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAAA,IAeTC,iBAAiB,GAAAF,OAAA,CAAAE,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAgBtB,MAAMC,sBAA+C,GAAAH,OAAA,CAAAG,sBAAA,GAAG,GAAG;AAE3D,SAASC,wBAAwBA,CAACC,SAAkC,EAAW;EAClF,OAAOA,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,GAAG;AACnD;AAAC,IAEWC,aAAa,GAAAN,OAAA,CAAAM,aAAA,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA,OAuDzB;AACA;AAAA,IAWYC,YAAY,GAAAP,OAAA,CAAAO,YAAA,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAAA,IAQZC,MAAM,GAAAR,OAAA,CAAAQ,MAAA,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"}
|
package/lib/@types/auth.js
CHANGED
|
@@ -34,13 +34,12 @@ limitations under the License.
|
|
|
34
34
|
* Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login
|
|
35
35
|
*/
|
|
36
36
|
|
|
37
|
-
const DELEGATED_OIDC_COMPATIBILITY = new _NamespacedValue.UnstableValue("delegated_oidc_compatibility", "org.matrix.msc3824.delegated_oidc_compatibility");
|
|
37
|
+
const DELEGATED_OIDC_COMPATIBILITY = exports.DELEGATED_OIDC_COMPATIBILITY = new _NamespacedValue.UnstableValue("delegated_oidc_compatibility", "org.matrix.msc3824.delegated_oidc_compatibility");
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso
|
|
41
41
|
*/
|
|
42
|
-
exports.
|
|
43
|
-
let IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand) {
|
|
42
|
+
let IdentityProviderBrand = exports.IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand) {
|
|
44
43
|
IdentityProviderBrand["Gitlab"] = "gitlab";
|
|
45
44
|
IdentityProviderBrand["Github"] = "github";
|
|
46
45
|
IdentityProviderBrand["Apple"] = "apple";
|
|
@@ -49,8 +48,7 @@ let IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand) {
|
|
|
49
48
|
IdentityProviderBrand["Twitter"] = "twitter";
|
|
50
49
|
return IdentityProviderBrand;
|
|
51
50
|
}({});
|
|
52
|
-
exports.
|
|
53
|
-
let SSOAction = /*#__PURE__*/function (SSOAction) {
|
|
51
|
+
let SSOAction = exports.SSOAction = /*#__PURE__*/function (SSOAction) {
|
|
54
52
|
SSOAction["LOGIN"] = "login";
|
|
55
53
|
SSOAction["REGISTER"] = "register";
|
|
56
54
|
return SSOAction;
|
|
@@ -94,5 +92,4 @@ let SSOAction = /*#__PURE__*/function (SSOAction) {
|
|
|
94
92
|
/**
|
|
95
93
|
* The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token
|
|
96
94
|
*/
|
|
97
|
-
exports.SSOAction = SSOAction;
|
|
98
95
|
//# sourceMappingURL=auth.js.map
|
package/lib/@types/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","names":["_NamespacedValue","require","DELEGATED_OIDC_COMPATIBILITY","
|
|
1
|
+
{"version":3,"file":"auth.js","names":["_NamespacedValue","require","DELEGATED_OIDC_COMPATIBILITY","exports","UnstableValue","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\";\nimport { IClientWellKnown } from \"../client\";\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 DELEGATED_OIDC_COMPATIBILITY = new UnstableValue(\n \"delegated_oidc_compatibility\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\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 [DELEGATED_OIDC_COMPATIBILITY.name]?: boolean;\n [DELEGATED_OIDC_COMPATIBILITY.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 * Third-party identifier for the user.\n * @deprecated in favour of `identifier`.\n */\n address?: 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 seconds.\n *\n * @deprecated this is only provided for compatibility with original revision of [MSC3882](https://github.com/matrix-org/matrix-spec-proposals/pull/3882).\n */\n expires_in: number;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":";;;;;;AAgBA,IAAAA,gBAAA,GAAAC,OAAA;AAhBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAeO,MAAMC,4BAA4B,GAAAC,OAAA,CAAAD,4BAAA,GAAG,IAAIE,8BAAa,CACzD,8BAA8B,EAC9B,iDACJ,CAAC;;AAED;AACA;AACA;AAFA,IAWYC,qBAAqB,GAAAF,OAAA,CAAAE,qBAAA,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAAA,IAgBrBC,SAAS,GAAAH,OAAA,CAAAG,SAAA,0BAATA,SAAS;EAATA,SAAS;EAATA,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;AAsDA;AAGA;AACA;AACA;AACA;AAyCA;AACA;AACA"}
|
package/lib/@types/beacon.js
CHANGED
|
@@ -67,9 +67,8 @@ limitations under the License.
|
|
|
67
67
|
/**
|
|
68
68
|
* Non-variable type for m.beacon_info event content
|
|
69
69
|
*/
|
|
70
|
-
const M_BEACON_INFO = new _NamespacedValue.UnstableValue("m.beacon_info", "org.matrix.msc3672.beacon_info");
|
|
71
|
-
exports.
|
|
72
|
-
const M_BEACON = new _NamespacedValue.UnstableValue("m.beacon", "org.matrix.msc3672.beacon");
|
|
70
|
+
const M_BEACON_INFO = exports.M_BEACON_INFO = new _NamespacedValue.UnstableValue("m.beacon_info", "org.matrix.msc3672.beacon_info");
|
|
71
|
+
const M_BEACON = exports.M_BEACON = new _NamespacedValue.UnstableValue("m.beacon", "org.matrix.msc3672.beacon");
|
|
73
72
|
|
|
74
73
|
/**
|
|
75
74
|
* m.beacon_info Event example from the spec
|
|
@@ -123,5 +122,4 @@ const M_BEACON = new _NamespacedValue.UnstableValue("m.beacon", "org.matrix.msc3
|
|
|
123
122
|
/**
|
|
124
123
|
* Content of an m.beacon event
|
|
125
124
|
*/
|
|
126
|
-
exports.M_BEACON = M_BEACON;
|
|
127
125
|
//# sourceMappingURL=beacon.js.map
|
package/lib/@types/beacon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beacon.js","names":["_NamespacedValue","require","M_BEACON_INFO","
|
|
1
|
+
{"version":3,"file":"beacon.js","names":["_NamespacedValue","require","M_BEACON_INFO","exports","UnstableValue","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 { RelatesToRelationship, REFERENCE_RELATION } from \"./extensible_events\";\nimport { UnstableValue } from \"../NamespacedValue\";\nimport { MAssetEvent, MLocationEvent, MTimestampEvent } from \"./location\";\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":";;;;;;AAiBA,IAAAA,gBAAA,GAAAC,OAAA;AAjBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAMA;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;AACO,MAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,IAAIE,8BAAa,CAAC,eAAe,EAAE,gCAAgC,CAAC;AAC1F,MAAMC,QAAQ,GAAAF,OAAA,CAAAE,QAAA,GAAG,IAAID,8BAAa,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"}
|
package/lib/@types/event.js
CHANGED
|
@@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
20
20
|
See the License for the specific language governing permissions and
|
|
21
21
|
limitations under the License.
|
|
22
22
|
*/
|
|
23
|
-
let EventType = /*#__PURE__*/function (EventType) {
|
|
23
|
+
let EventType = exports.EventType = /*#__PURE__*/function (EventType) {
|
|
24
24
|
EventType["RoomCanonicalAlias"] = "m.room.canonical_alias";
|
|
25
25
|
EventType["RoomCreate"] = "m.room.create";
|
|
26
26
|
EventType["RoomJoinRules"] = "m.room.join_rules";
|
|
@@ -83,16 +83,14 @@ let EventType = /*#__PURE__*/function (EventType) {
|
|
|
83
83
|
EventType["GroupCallMemberPrefix"] = "org.matrix.msc3401.call.member";
|
|
84
84
|
return EventType;
|
|
85
85
|
}({});
|
|
86
|
-
exports.
|
|
87
|
-
let RelationType = /*#__PURE__*/function (RelationType) {
|
|
86
|
+
let RelationType = exports.RelationType = /*#__PURE__*/function (RelationType) {
|
|
88
87
|
RelationType["Annotation"] = "m.annotation";
|
|
89
88
|
RelationType["Replace"] = "m.replace";
|
|
90
89
|
RelationType["Reference"] = "m.reference";
|
|
91
90
|
RelationType["Thread"] = "m.thread";
|
|
92
91
|
return RelationType;
|
|
93
92
|
}({});
|
|
94
|
-
exports.
|
|
95
|
-
let MsgType = /*#__PURE__*/function (MsgType) {
|
|
93
|
+
let MsgType = exports.MsgType = /*#__PURE__*/function (MsgType) {
|
|
96
94
|
MsgType["Text"] = "m.text";
|
|
97
95
|
MsgType["Emote"] = "m.emote";
|
|
98
96
|
MsgType["Notice"] = "m.notice";
|
|
@@ -104,57 +102,49 @@ let MsgType = /*#__PURE__*/function (MsgType) {
|
|
|
104
102
|
MsgType["KeyVerificationRequest"] = "m.key.verification.request";
|
|
105
103
|
return MsgType;
|
|
106
104
|
}({});
|
|
107
|
-
exports.
|
|
108
|
-
|
|
109
|
-
exports.RoomCreateTypeField = RoomCreateTypeField;
|
|
110
|
-
let RoomType = /*#__PURE__*/function (RoomType) {
|
|
105
|
+
const RoomCreateTypeField = exports.RoomCreateTypeField = "type";
|
|
106
|
+
let RoomType = exports.RoomType = /*#__PURE__*/function (RoomType) {
|
|
111
107
|
RoomType["Space"] = "m.space";
|
|
112
108
|
RoomType["UnstableCall"] = "org.matrix.msc3417.call";
|
|
113
109
|
RoomType["ElementVideo"] = "io.element.video";
|
|
114
110
|
return RoomType;
|
|
115
111
|
}({});
|
|
116
|
-
exports.
|
|
117
|
-
const ToDeviceMessageId = "org.matrix.msgid";
|
|
112
|
+
const ToDeviceMessageId = exports.ToDeviceMessageId = "org.matrix.msgid";
|
|
118
113
|
|
|
119
114
|
/**
|
|
120
115
|
* Identifier for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)
|
|
121
116
|
* room purpose. Note that this reference is UNSTABLE and subject to breaking changes,
|
|
122
117
|
* including its eventual removal.
|
|
123
118
|
*/
|
|
124
|
-
exports.
|
|
125
|
-
const UNSTABLE_MSC3088_PURPOSE = new _NamespacedValue.UnstableValue("m.room.purpose", "org.matrix.msc3088.purpose");
|
|
119
|
+
const UNSTABLE_MSC3088_PURPOSE = exports.UNSTABLE_MSC3088_PURPOSE = new _NamespacedValue.UnstableValue("m.room.purpose", "org.matrix.msc3088.purpose");
|
|
126
120
|
|
|
127
121
|
/**
|
|
128
122
|
* Enabled flag for an [MSC3088](https://github.com/matrix-org/matrix-doc/pull/3088)
|
|
129
123
|
* room purpose. Note that this reference is UNSTABLE and subject to breaking changes,
|
|
130
124
|
* including its eventual removal.
|
|
131
125
|
*/
|
|
132
|
-
exports.
|
|
133
|
-
const UNSTABLE_MSC3088_ENABLED = new _NamespacedValue.UnstableValue("m.enabled", "org.matrix.msc3088.enabled");
|
|
126
|
+
const UNSTABLE_MSC3088_ENABLED = exports.UNSTABLE_MSC3088_ENABLED = new _NamespacedValue.UnstableValue("m.enabled", "org.matrix.msc3088.enabled");
|
|
134
127
|
|
|
135
128
|
/**
|
|
136
129
|
* Subtype for an [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.
|
|
137
130
|
* Note that this reference is UNSTABLE and subject to breaking changes, including its
|
|
138
131
|
* eventual removal.
|
|
139
132
|
*/
|
|
140
|
-
exports.
|
|
141
|
-
const UNSTABLE_MSC3089_TREE_SUBTYPE = new _NamespacedValue.UnstableValue("m.data_tree", "org.matrix.msc3089.data_tree");
|
|
133
|
+
const UNSTABLE_MSC3089_TREE_SUBTYPE = exports.UNSTABLE_MSC3089_TREE_SUBTYPE = new _NamespacedValue.UnstableValue("m.data_tree", "org.matrix.msc3089.data_tree");
|
|
142
134
|
|
|
143
135
|
/**
|
|
144
136
|
* Leaf type for an event in a [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room.
|
|
145
137
|
* Note that this reference is UNSTABLE and subject to breaking changes, including its
|
|
146
138
|
* eventual removal.
|
|
147
139
|
*/
|
|
148
|
-
exports.
|
|
149
|
-
const UNSTABLE_MSC3089_LEAF = new _NamespacedValue.UnstableValue("m.leaf", "org.matrix.msc3089.leaf");
|
|
140
|
+
const UNSTABLE_MSC3089_LEAF = exports.UNSTABLE_MSC3089_LEAF = new _NamespacedValue.UnstableValue("m.leaf", "org.matrix.msc3089.leaf");
|
|
150
141
|
|
|
151
142
|
/**
|
|
152
143
|
* Branch (Leaf Reference) type for the index approach in a
|
|
153
144
|
* [MSC3089](https://github.com/matrix-org/matrix-doc/pull/3089) space-room. Note that this reference is
|
|
154
145
|
* UNSTABLE and subject to breaking changes, including its eventual removal.
|
|
155
146
|
*/
|
|
156
|
-
exports.
|
|
157
|
-
const UNSTABLE_MSC3089_BRANCH = new _NamespacedValue.UnstableValue("m.branch", "org.matrix.msc3089.branch");
|
|
147
|
+
const UNSTABLE_MSC3089_BRANCH = exports.UNSTABLE_MSC3089_BRANCH = new _NamespacedValue.UnstableValue("m.branch", "org.matrix.msc3089.branch");
|
|
158
148
|
|
|
159
149
|
/**
|
|
160
150
|
* Marker event type to point back at imported historical content in a room. See
|
|
@@ -162,15 +152,13 @@ const UNSTABLE_MSC3089_BRANCH = new _NamespacedValue.UnstableValue("m.branch", "
|
|
|
162
152
|
* Note that this reference is UNSTABLE and subject to breaking changes,
|
|
163
153
|
* including its eventual removal.
|
|
164
154
|
*/
|
|
165
|
-
exports.
|
|
166
|
-
const UNSTABLE_MSC2716_MARKER = new _NamespacedValue.UnstableValue("m.room.marker", "org.matrix.msc2716.marker");
|
|
155
|
+
const UNSTABLE_MSC2716_MARKER = exports.UNSTABLE_MSC2716_MARKER = new _NamespacedValue.UnstableValue("m.room.marker", "org.matrix.msc2716.marker");
|
|
167
156
|
|
|
168
157
|
/**
|
|
169
158
|
* Name of the request property for relation based redactions.
|
|
170
159
|
* {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}
|
|
171
160
|
*/
|
|
172
|
-
exports.
|
|
173
|
-
const MSC3912_RELATION_BASED_REDACTIONS_PROP = new _NamespacedValue.UnstableValue("with_rel_types", "org.matrix.msc3912.with_relations");
|
|
161
|
+
const MSC3912_RELATION_BASED_REDACTIONS_PROP = exports.MSC3912_RELATION_BASED_REDACTIONS_PROP = new _NamespacedValue.UnstableValue("with_rel_types", "org.matrix.msc3912.with_relations");
|
|
174
162
|
|
|
175
163
|
/**
|
|
176
164
|
* Functional members type for declaring a purpose of room members (e.g. helpful bots).
|
|
@@ -194,8 +182,7 @@ const MSC3912_RELATION_BASED_REDACTIONS_PROP = new _NamespacedValue.UnstableValu
|
|
|
194
182
|
* }
|
|
195
183
|
* ```
|
|
196
184
|
*/
|
|
197
|
-
exports.
|
|
198
|
-
const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new _NamespacedValue.UnstableValue("io.element.functional_members", "io.element.functional_members");
|
|
185
|
+
const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = exports.UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new _NamespacedValue.UnstableValue("io.element.functional_members", "io.element.functional_members");
|
|
199
186
|
|
|
200
187
|
/**
|
|
201
188
|
* A type of message that affects visibility of a message,
|
|
@@ -203,39 +190,33 @@ const UNSTABLE_ELEMENT_FUNCTIONAL_USERS = new _NamespacedValue.UnstableValue("io
|
|
|
203
190
|
*
|
|
204
191
|
* @experimental
|
|
205
192
|
*/
|
|
206
|
-
exports.
|
|
207
|
-
const EVENT_VISIBILITY_CHANGE_TYPE = new _NamespacedValue.UnstableValue("m.visibility", "org.matrix.msc3531.visibility");
|
|
193
|
+
const EVENT_VISIBILITY_CHANGE_TYPE = exports.EVENT_VISIBILITY_CHANGE_TYPE = new _NamespacedValue.UnstableValue("m.visibility", "org.matrix.msc3531.visibility");
|
|
208
194
|
|
|
209
195
|
/**
|
|
210
196
|
* https://github.com/matrix-org/matrix-doc/pull/3881
|
|
211
197
|
*
|
|
212
198
|
* @experimental
|
|
213
199
|
*/
|
|
214
|
-
exports.
|
|
215
|
-
const PUSHER_ENABLED = new _NamespacedValue.UnstableValue("enabled", "org.matrix.msc3881.enabled");
|
|
200
|
+
const PUSHER_ENABLED = exports.PUSHER_ENABLED = new _NamespacedValue.UnstableValue("enabled", "org.matrix.msc3881.enabled");
|
|
216
201
|
|
|
217
202
|
/**
|
|
218
203
|
* https://github.com/matrix-org/matrix-doc/pull/3881
|
|
219
204
|
*
|
|
220
205
|
* @experimental
|
|
221
206
|
*/
|
|
222
|
-
exports.
|
|
223
|
-
const PUSHER_DEVICE_ID = new _NamespacedValue.UnstableValue("device_id", "org.matrix.msc3881.device_id");
|
|
207
|
+
const PUSHER_DEVICE_ID = exports.PUSHER_DEVICE_ID = new _NamespacedValue.UnstableValue("device_id", "org.matrix.msc3881.device_id");
|
|
224
208
|
|
|
225
209
|
/**
|
|
226
210
|
* https://github.com/matrix-org/matrix-doc/pull/3890
|
|
227
211
|
*
|
|
228
212
|
* @experimental
|
|
229
213
|
*/
|
|
230
|
-
exports.
|
|
231
|
-
const LOCAL_NOTIFICATION_SETTINGS_PREFIX = new _NamespacedValue.UnstableValue("m.local_notification_settings", "org.matrix.msc3890.local_notification_settings");
|
|
214
|
+
const LOCAL_NOTIFICATION_SETTINGS_PREFIX = exports.LOCAL_NOTIFICATION_SETTINGS_PREFIX = new _NamespacedValue.UnstableValue("m.local_notification_settings", "org.matrix.msc3890.local_notification_settings");
|
|
232
215
|
|
|
233
216
|
/**
|
|
234
217
|
* https://github.com/matrix-org/matrix-doc/pull/4023
|
|
235
218
|
*
|
|
236
219
|
* @experimental
|
|
237
220
|
*/
|
|
238
|
-
exports.
|
|
239
|
-
const UNSIGNED_THREAD_ID_FIELD = new _NamespacedValue.UnstableValue("thread_id", "org.matrix.msc4023.thread_id");
|
|
240
|
-
exports.UNSIGNED_THREAD_ID_FIELD = UNSIGNED_THREAD_ID_FIELD;
|
|
221
|
+
const UNSIGNED_THREAD_ID_FIELD = exports.UNSIGNED_THREAD_ID_FIELD = new _NamespacedValue.UnstableValue("thread_id", "org.matrix.msc4023.thread_id");
|
|
241
222
|
//# sourceMappingURL=event.js.map
|
package/lib/@types/event.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event.js","names":["_NamespacedValue","require","EventType","exports","RelationType","MsgType","RoomCreateTypeField","RoomType","ToDeviceMessageId","UNSTABLE_MSC3088_PURPOSE","UnstableValue","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"],"sources":["../../src/@types/event.ts"],"sourcesContent":["/*\nCopyright 2020 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\";\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 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 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\n // User account_data events\n PushRules = \"m.push_rules\",\n Direct = \"m.direct\",\n IgnoredUserList = \"m.ignored_user_list\",\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\n // Group call events\n GroupCallPrefix = \"org.matrix.msc3401.call\",\n GroupCallMemberPrefix = \"org.matrix.msc3401.call.member\",\n}\n\nexport enum RelationType {\n Annotation = \"m.annotation\",\n Replace = \"m.replace\",\n Reference = \"m.reference\",\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\nexport interface IEncryptedFile {\n url: string;\n mimetype?: string;\n key: {\n alg: string;\n key_ops: string[]; // eslint-disable-line camelcase\n kty: string;\n k: string;\n ext: boolean;\n };\n iv: string;\n hashes: { [alg: string]: string };\n v: string;\n}\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"event.js","names":["_NamespacedValue","require","EventType","exports","RelationType","MsgType","RoomCreateTypeField","RoomType","ToDeviceMessageId","UNSTABLE_MSC3088_PURPOSE","UnstableValue","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"],"sources":["../../src/@types/event.ts"],"sourcesContent":["/*\nCopyright 2020 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\";\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 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 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\n // User account_data events\n PushRules = \"m.push_rules\",\n Direct = \"m.direct\",\n IgnoredUserList = \"m.ignored_user_list\",\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\n // Group call events\n GroupCallPrefix = \"org.matrix.msc3401.call\",\n GroupCallMemberPrefix = \"org.matrix.msc3401.call.member\",\n}\n\nexport enum RelationType {\n Annotation = \"m.annotation\",\n Replace = \"m.replace\",\n Reference = \"m.reference\",\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\nexport interface IEncryptedFile {\n url: string;\n mimetype?: string;\n key: {\n alg: string;\n key_ops: string[]; // eslint-disable-line camelcase\n kty: string;\n k: string;\n ext: boolean;\n };\n iv: string;\n hashes: { [alg: string]: string };\n v: string;\n}\n"],"mappings":"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"}
|
|
@@ -42,7 +42,7 @@ limitations under the License.
|
|
|
42
42
|
/**
|
|
43
43
|
* The namespaced value for m.message
|
|
44
44
|
*/
|
|
45
|
-
const M_MESSAGE = new _matrixEventsSdk.UnstableValue("m.message", "org.matrix.msc1767.message");
|
|
45
|
+
const M_MESSAGE = exports.M_MESSAGE = new _matrixEventsSdk.UnstableValue("m.message", "org.matrix.msc1767.message");
|
|
46
46
|
|
|
47
47
|
/**
|
|
48
48
|
* An m.message event rendering
|
|
@@ -51,20 +51,20 @@ const M_MESSAGE = new _matrixEventsSdk.UnstableValue("m.message", "org.matrix.ms
|
|
|
51
51
|
/**
|
|
52
52
|
* The content for an m.message event
|
|
53
53
|
*/
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
/**
|
|
56
56
|
* The namespaced value for m.text
|
|
57
57
|
*/
|
|
58
|
-
const M_TEXT = new _matrixEventsSdk.UnstableValue("m.text", "org.matrix.msc1767.text");
|
|
58
|
+
const M_TEXT = exports.M_TEXT = new _matrixEventsSdk.UnstableValue("m.text", "org.matrix.msc1767.text");
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* The content for an m.text event
|
|
62
62
|
*/
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
/**
|
|
65
65
|
* The namespaced value for m.html
|
|
66
66
|
*/
|
|
67
|
-
const M_HTML = new _matrixEventsSdk.UnstableValue("m.html", "org.matrix.msc1767.html");
|
|
67
|
+
const M_HTML = exports.M_HTML = new _matrixEventsSdk.UnstableValue("m.html", "org.matrix.msc1767.html");
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* The content for an m.html event
|
|
@@ -73,11 +73,11 @@ const M_HTML = new _matrixEventsSdk.UnstableValue("m.html", "org.matrix.msc1767.
|
|
|
73
73
|
/**
|
|
74
74
|
* The content for an m.message, m.text, or m.html event
|
|
75
75
|
*/
|
|
76
|
-
|
|
76
|
+
|
|
77
77
|
/**
|
|
78
78
|
* The namespaced value for an m.reference relation
|
|
79
79
|
*/
|
|
80
|
-
const REFERENCE_RELATION = new _matrixEventsSdk.NamespacedValue("m.reference");
|
|
80
|
+
const REFERENCE_RELATION = exports.REFERENCE_RELATION = new _matrixEventsSdk.NamespacedValue("m.reference");
|
|
81
81
|
|
|
82
82
|
/**
|
|
83
83
|
* Represents any relation type
|
|
@@ -94,7 +94,7 @@ const REFERENCE_RELATION = new _matrixEventsSdk.NamespacedValue("m.reference");
|
|
|
94
94
|
/**
|
|
95
95
|
* Represents a potentially namespaced event type.
|
|
96
96
|
*/
|
|
97
|
-
|
|
97
|
+
|
|
98
98
|
/**
|
|
99
99
|
* Determines if two event types are the same, including namespaces.
|
|
100
100
|
* @param given - The given event type. This will be compared
|