@textrp/briij-js-sdk 41.0.0 → 42.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 +14 -1
- package/LICENSE +177 -177
- package/README.md +47 -46
- package/lib/@types/AESEncryptedSecretStoragePayload.js.map +1 -1
- package/lib/@types/IIdentityServerProvider.js.map +1 -1
- package/lib/@types/PushRules.js +14 -14
- package/lib/@types/PushRules.js.map +1 -1
- package/lib/@types/another-json.d.js.map +1 -1
- package/lib/@types/auth.d.ts +19 -1
- package/lib/@types/auth.d.ts.map +1 -1
- package/lib/@types/auth.js +55 -54
- package/lib/@types/auth.js.map +1 -1
- package/lib/@types/beacon.js +100 -100
- package/lib/@types/beacon.js.map +1 -1
- package/lib/@types/common.js.map +1 -1
- package/lib/@types/crypto.js.map +1 -1
- package/lib/@types/event.d.ts +27 -0
- package/lib/@types/event.d.ts.map +1 -1
- package/lib/@types/event.js +105 -102
- package/lib/@types/event.js.map +1 -1
- package/lib/@types/events.js.map +1 -1
- package/lib/@types/extensible_events.js +53 -53
- package/lib/@types/extensible_events.js.map +1 -1
- package/lib/@types/local_notifications.js.map +1 -1
- package/lib/@types/location.js +41 -41
- package/lib/@types/location.js.map +1 -1
- package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +1 -1
- package/lib/@types/media.js.map +1 -1
- package/lib/@types/membership.js +39 -39
- package/lib/@types/membership.js.map +1 -1
- package/lib/@types/partials.js +25 -25
- package/lib/@types/partials.js.map +1 -1
- package/lib/@types/polls.js +46 -46
- package/lib/@types/polls.js.map +1 -1
- package/lib/@types/read_receipts.js +14 -14
- package/lib/@types/read_receipts.js.map +1 -1
- package/lib/@types/registration.js.map +1 -1
- package/lib/@types/search.js +14 -14
- package/lib/@types/search.js.map +1 -1
- package/lib/@types/signed.js.map +1 -1
- package/lib/@types/spaces.js.map +1 -1
- package/lib/@types/state_events.js.map +1 -1
- package/lib/@types/synapse.js.map +1 -1
- package/lib/@types/sync.js +18 -18
- package/lib/@types/sync.js.map +1 -1
- package/lib/@types/threepids.js +14 -14
- package/lib/@types/threepids.js.map +1 -1
- package/lib/@types/topic.js +47 -47
- package/lib/@types/topic.js.map +1 -1
- package/lib/@types/uia.js.map +1 -1
- package/lib/NamespacedValue.js +20 -20
- package/lib/NamespacedValue.js.map +1 -1
- package/lib/ReEmitter.js +16 -16
- package/lib/ReEmitter.js.map +1 -1
- package/lib/base64.js +32 -32
- package/lib/base64.js.map +1 -1
- package/lib/briij.d.ts +3 -0
- package/lib/briij.d.ts.map +1 -1
- package/lib/briij.js +3 -0
- package/lib/briij.js.map +1 -1
- package/lib/client.d.ts +18 -1
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +166 -103
- package/lib/client.js.map +1 -1
- package/lib/common-crypto/key-passphrase.js +19 -19
- package/lib/common-crypto/key-passphrase.js.map +1 -1
- package/lib/content-helpers.js +57 -57
- package/lib/content-helpers.js.map +1 -1
- package/lib/content-repo.js +36 -36
- package/lib/content-repo.js.map +1 -1
- package/lib/crypto/store/base.js +69 -69
- package/lib/crypto/store/base.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store-backend.js +58 -58
- package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store.js +193 -193
- package/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
- package/lib/crypto/store/localStorage-crypto-store.js +72 -72
- package/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
- package/lib/crypto/store/memory-crypto-store.js +74 -74
- package/lib/crypto/store/memory-crypto-store.js.map +1 -1
- package/lib/crypto-api/CryptoEventHandlerMap.js.map +1 -1
- package/lib/crypto-api/key-passphrase.js +22 -22
- package/lib/crypto-api/key-passphrase.js.map +1 -1
- package/lib/crypto-api/keybackup.js.map +1 -1
- package/lib/crypto-api/recovery-key.js +20 -20
- package/lib/crypto-api/recovery-key.js.map +1 -1
- package/lib/digest.js +21 -21
- package/lib/digest.js.map +1 -1
- package/lib/extensible_events_v1/ExtensibleEvent.js +39 -39
- package/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -1
- package/lib/extensible_events_v1/InvalidEventError.js +16 -16
- package/lib/extensible_events_v1/InvalidEventError.js.map +1 -1
- package/lib/extensible_events_v1/MessageEvent.js +39 -39
- package/lib/extensible_events_v1/MessageEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollEndEvent.js +29 -29
- package/lib/extensible_events_v1/PollEndEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollResponseEvent.js +39 -39
- package/lib/extensible_events_v1/PollResponseEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollStartEvent.js +52 -52
- package/lib/extensible_events_v1/PollStartEvent.js.map +1 -1
- package/lib/extensible_events_v1/utilities.js +22 -22
- package/lib/extensible_events_v1/utilities.js.map +1 -1
- package/lib/feature.js +16 -16
- package/lib/feature.js.map +1 -1
- package/lib/http-api/method.js +14 -14
- package/lib/http-api/method.js.map +1 -1
- package/lib/http-api/prefix.js +26 -26
- package/lib/http-api/prefix.js.map +1 -1
- package/lib/indexeddb-helpers.js +21 -21
- package/lib/indexeddb-helpers.js.map +1 -1
- package/lib/indexeddb-worker.js +18 -18
- package/lib/indexeddb-worker.js.map +1 -1
- package/lib/matrixrtc/IKeyTransport.js +17 -17
- package/lib/matrixrtc/IKeyTransport.js.map +1 -1
- package/lib/matrixrtc/IMembershipManager.js +27 -27
- package/lib/matrixrtc/IMembershipManager.js.map +1 -1
- package/lib/matrixrtc/LivekitTransport.js +19 -19
- package/lib/matrixrtc/LivekitTransport.js.map +1 -1
- package/lib/matrixrtc/index.js +14 -14
- package/lib/matrixrtc/index.js.map +1 -1
- package/lib/matrixrtc/utils.js +27 -27
- package/lib/matrixrtc/utils.js.map +1 -1
- package/lib/models/ToDeviceMessage.js.map +1 -1
- package/lib/models/device.js +24 -24
- package/lib/models/device.js.map +1 -1
- package/lib/models/event-status.js +17 -17
- package/lib/models/event-status.js.map +1 -1
- package/lib/models/invites-ignorer-types.js +25 -25
- package/lib/models/invites-ignorer-types.js.map +1 -1
- package/lib/models/profile-keys.js +26 -26
- package/lib/models/profile-keys.js.map +1 -1
- package/lib/models/room-summary.js +26 -26
- package/lib/models/room-summary.js.map +1 -1
- package/lib/models/search-result.js +22 -22
- package/lib/models/search-result.js.map +1 -1
- package/lib/models/typed-event-emitter.js +122 -122
- package/lib/models/typed-event-emitter.js.map +1 -1
- package/lib/oidc/authorize.js +76 -76
- package/lib/oidc/authorize.js.map +1 -1
- package/lib/oidc/error.js +17 -17
- package/lib/oidc/error.js.map +1 -1
- package/lib/oidc/index.js +17 -17
- package/lib/oidc/index.js.map +1 -1
- package/lib/oidc/register.js +41 -41
- package/lib/oidc/register.js.map +1 -1
- package/lib/oidc/tokenRefresher.js +51 -51
- package/lib/oidc/tokenRefresher.js.map +1 -1
- package/lib/oidc/validate.js +59 -59
- package/lib/oidc/validate.js.map +1 -1
- package/lib/randomstring.js +35 -35
- package/lib/randomstring.js.map +1 -1
- package/lib/realtime-callbacks.js +39 -39
- package/lib/realtime-callbacks.js.map +1 -1
- package/lib/receipt-accumulator.js +44 -44
- package/lib/receipt-accumulator.js.map +1 -1
- package/lib/rendezvous/RendezvousChannel.js.map +1 -1
- package/lib/rendezvous/RendezvousCode.js.map +1 -1
- package/lib/rendezvous/RendezvousError.js +14 -14
- package/lib/rendezvous/RendezvousError.js.map +1 -1
- package/lib/rendezvous/RendezvousFailureReason.js +14 -14
- package/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
- package/lib/rendezvous/RendezvousIntent.js +14 -14
- package/lib/rendezvous/RendezvousIntent.js.map +1 -1
- package/lib/rendezvous/RendezvousTransport.js.map +1 -1
- package/lib/rendezvous/channels/MSC4108SecureChannel.js +63 -63
- package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -1
- package/lib/rendezvous/channels/index.js +14 -14
- package/lib/rendezvous/channels/index.js.map +1 -1
- package/lib/rendezvous/index.js +14 -14
- package/lib/rendezvous/index.js.map +1 -1
- package/lib/rendezvous/transports/index.js +14 -14
- package/lib/rendezvous/transports/index.js.map +1 -1
- package/lib/rust-crypto/CrossSigningIdentity.js +29 -29
- package/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
- package/lib/rust-crypto/OutgoingRequestsManager.js +37 -37
- package/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -1
- package/lib/rust-crypto/device-converter.js +30 -30
- package/lib/rust-crypto/device-converter.js.map +1 -1
- package/lib/rust-crypto/secret-storage.js +30 -30
- package/lib/rust-crypto/secret-storage.js.map +1 -1
- package/lib/service-types.js +14 -14
- package/lib/service-types.js.map +1 -1
- package/lib/store/local-storage-events-emitter.js +21 -21
- package/lib/store/local-storage-events-emitter.js.map +1 -1
- package/lib/sync-accumulator.js +50 -50
- package/lib/sync-accumulator.js.map +1 -1
- package/lib/thread-utils.js +20 -20
- package/lib/thread-utils.js.map +1 -1
- package/lib/types.js +34 -34
- package/lib/types.js.map +1 -1
- package/lib/utils/decryptAESSecretStorageItem.js +22 -22
- package/lib/utils/decryptAESSecretStorageItem.js.map +1 -1
- package/lib/utils/encryptAESSecretStorageItem.js +26 -26
- package/lib/utils/encryptAESSecretStorageItem.js.map +1 -1
- package/lib/utils/internal/deriveKeys.js +21 -21
- package/lib/utils/internal/deriveKeys.js.map +1 -1
- package/lib/utils/roomVersion.js +26 -26
- package/lib/utils/roomVersion.js.map +1 -1
- package/lib/version-support.js +26 -26
- package/lib/version-support.js.map +1 -1
- package/lib/webrtc/audioContext.js +24 -24
- package/lib/webrtc/audioContext.js.map +1 -1
- package/lib/webrtc/callEventTypes.js.map +1 -1
- package/lib/webrtc/stats/callFeedStatsReporter.js +14 -14
- package/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
- package/lib/webrtc/stats/callStatsReportGatherer.js +14 -14
- package/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
- package/lib/webrtc/stats/callStatsReportSummary.js.map +1 -1
- package/lib/webrtc/stats/connectionStats.js +14 -14
- package/lib/webrtc/stats/connectionStats.js.map +1 -1
- package/lib/webrtc/stats/connectionStatsBuilder.js +14 -14
- package/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/connectionStatsReportBuilder.js +14 -14
- package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
- package/lib/webrtc/stats/groupCallStats.js +14 -14
- package/lib/webrtc/stats/groupCallStats.js.map +1 -1
- package/lib/webrtc/stats/media/mediaSsrcHandler.js +14 -14
- package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackHandler.js +14 -14
- package/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackStats.js +27 -27
- package/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +20 -20
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
- package/lib/webrtc/stats/statsReport.js +14 -14
- package/lib/webrtc/stats/statsReport.js.map +1 -1
- package/lib/webrtc/stats/statsReportEmitter.js +14 -14
- package/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
- package/lib/webrtc/stats/trackStatsBuilder.js +4 -4
- package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/transportStats.js.map +1 -1
- package/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/valueFormatter.js +11 -11
- package/lib/webrtc/stats/valueFormatter.js.map +1 -1
- package/lib/xrpl/identity.d.ts +28 -0
- package/lib/xrpl/identity.d.ts.map +1 -0
- package/lib/xrpl/identity.js +213 -0
- package/lib/xrpl/identity.js.map +1 -0
- package/lib/xrpl/trust.d.ts +8 -0
- package/lib/xrpl/trust.d.ts.map +1 -0
- package/lib/xrpl/trust.js +61 -0
- package/lib/xrpl/trust.js.map +1 -0
- package/lib/xrpl/verification.d.ts +26 -0
- package/lib/xrpl/verification.d.ts.map +1 -0
- package/lib/xrpl/verification.js +295 -0
- package/lib/xrpl/verification.js.map +1 -0
- package/package.json +128 -129
- package/src/@types/AESEncryptedSecretStoragePayload.ts +29 -29
- package/src/@types/IIdentityServerProvider.ts +24 -24
- package/src/@types/PushRules.ts +208 -208
- package/src/@types/another-json.d.ts +19 -19
- package/src/@types/auth.ts +280 -258
- package/src/@types/beacon.ts +140 -140
- package/src/@types/common.ts +24 -24
- package/src/@types/crypto.ts +71 -71
- package/src/@types/event.ts +476 -449
- package/src/@types/events.ts +119 -119
- package/src/@types/extensible_events.ts +147 -147
- package/src/@types/local_notifications.ts +19 -19
- package/src/@types/location.ts +92 -92
- package/src/@types/matrix-sdk-crypto-wasm.d.ts +39 -39
- package/src/@types/media.ts +245 -245
- package/src/@types/membership.ts +57 -57
- package/src/@types/partials.ts +103 -103
- package/src/@types/polls.ts +120 -120
- package/src/@types/read_receipts.ts +61 -61
- package/src/@types/registration.ts +102 -102
- package/src/@types/search.ts +119 -119
- package/src/@types/signed.ts +25 -25
- package/src/@types/spaces.ts +37 -37
- package/src/@types/state_events.ts +153 -153
- package/src/@types/synapse.ts +40 -40
- package/src/@types/sync.ts +27 -27
- package/src/@types/threepids.ts +29 -29
- package/src/@types/topic.ts +69 -69
- package/src/@types/uia.ts +24 -24
- package/src/NamespacedValue.ts +121 -121
- package/src/ReEmitter.ts +93 -93
- package/src/base64.ts +86 -86
- package/src/briij.ts +3 -0
- package/src/client.ts +90 -10
- package/src/common-crypto/README.md +4 -4
- package/src/common-crypto/key-passphrase.ts +43 -43
- package/src/content-helpers.ts +298 -298
- package/src/content-repo.ts +122 -122
- package/src/crypto/store/base.ts +388 -388
- package/src/crypto/store/indexeddb-crypto-store-backend.ts +655 -655
- package/src/crypto/store/indexeddb-crypto-store.ts +555 -555
- package/src/crypto/store/localStorage-crypto-store.ts +409 -409
- package/src/crypto/store/memory-crypto-store.ts +326 -326
- package/src/crypto-api/CryptoEventHandlerMap.ts +42 -42
- package/src/crypto-api/key-passphrase.ts +58 -58
- package/src/crypto-api/keybackup.ts +114 -114
- package/src/crypto-api/recovery-key.ts +69 -69
- package/src/digest.ts +34 -34
- package/src/extensible_events_v1/ExtensibleEvent.ts +58 -58
- package/src/extensible_events_v1/InvalidEventError.ts +24 -24
- package/src/extensible_events_v1/MessageEvent.ts +143 -143
- package/src/extensible_events_v1/PollEndEvent.ts +97 -97
- package/src/extensible_events_v1/PollResponseEvent.ts +148 -148
- package/src/extensible_events_v1/PollStartEvent.ts +207 -207
- package/src/extensible_events_v1/utilities.ts +35 -35
- package/src/feature.ts +88 -88
- package/src/http-api/method.ts +25 -25
- package/src/http-api/prefix.ts +48 -48
- package/src/indexeddb-helpers.ts +50 -50
- package/src/indexeddb-worker.ts +24 -24
- package/src/matrixrtc/IKeyTransport.ts +63 -63
- package/src/matrixrtc/IMembershipManager.ts +120 -120
- package/src/matrixrtc/LivekitTransport.ts +46 -46
- package/src/matrixrtc/index.ts +24 -24
- package/src/matrixrtc/utils.ts +71 -71
- package/src/models/ToDeviceMessage.ts +38 -38
- package/src/models/device.ts +85 -85
- package/src/models/event-status.ts +39 -39
- package/src/models/invites-ignorer-types.ts +58 -58
- package/src/models/profile-keys.ts +33 -33
- package/src/models/room-summary.ts +78 -78
- package/src/models/search-result.ts +57 -57
- package/src/models/typed-event-emitter.ts +246 -246
- package/src/oidc/authorize.ts +279 -279
- package/src/oidc/error.ts +33 -33
- package/src/oidc/index.ts +33 -33
- package/src/oidc/register.ts +163 -163
- package/src/oidc/tokenRefresher.ts +184 -184
- package/src/oidc/validate.ts +265 -265
- package/src/randomstring.ts +103 -103
- package/src/realtime-callbacks.ts +191 -191
- package/src/receipt-accumulator.ts +189 -189
- package/src/rendezvous/RendezvousChannel.ts +48 -48
- package/src/rendezvous/RendezvousCode.ts +25 -25
- package/src/rendezvous/RendezvousError.ts +26 -26
- package/src/rendezvous/RendezvousFailureReason.ts +49 -49
- package/src/rendezvous/RendezvousIntent.ts +20 -20
- package/src/rendezvous/RendezvousTransport.ts +58 -58
- package/src/rendezvous/channels/MSC4108SecureChannel.ts +270 -270
- package/src/rendezvous/channels/index.ts +17 -17
- package/src/rendezvous/index.ts +25 -25
- package/src/rendezvous/transports/index.ts +17 -17
- package/src/rust-crypto/CrossSigningIdentity.ts +195 -195
- package/src/rust-crypto/OutgoingRequestsManager.ts +170 -170
- package/src/rust-crypto/device-converter.ts +128 -128
- package/src/rust-crypto/secret-storage.ts +60 -60
- package/src/service-types.ts +20 -20
- package/src/store/local-storage-events-emitter.ts +46 -46
- package/src/sync-accumulator.ts +779 -779
- package/src/thread-utils.ts +31 -31
- package/src/types.ts +59 -59
- package/src/utils/decryptAESSecretStorageItem.ts +54 -54
- package/src/utils/encryptAESSecretStorageItem.ts +73 -73
- package/src/utils/internal/deriveKeys.ts +63 -63
- package/src/utils/roomVersion.ts +35 -35
- package/src/version-support.ts +50 -50
- package/src/webrtc/audioContext.ts +44 -44
- package/src/webrtc/callEventTypes.ts +101 -101
- package/src/webrtc/stats/callFeedStatsReporter.ts +91 -91
- package/src/webrtc/stats/callStatsReportGatherer.ts +219 -219
- package/src/webrtc/stats/callStatsReportSummary.ts +30 -30
- package/src/webrtc/stats/connectionStats.ts +47 -47
- package/src/webrtc/stats/connectionStatsBuilder.ts +28 -28
- package/src/webrtc/stats/connectionStatsReportBuilder.ts +140 -140
- package/src/webrtc/stats/groupCallStats.ts +93 -93
- package/src/webrtc/stats/media/mediaSsrcHandler.ts +57 -57
- package/src/webrtc/stats/media/mediaTrackHandler.ts +70 -70
- package/src/webrtc/stats/media/mediaTrackStats.ts +176 -176
- package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +90 -90
- package/src/webrtc/stats/statsReport.ts +133 -133
- package/src/webrtc/stats/statsReportEmitter.ts +49 -49
- package/src/webrtc/stats/trackStatsBuilder.ts +207 -207
- package/src/webrtc/stats/transportStats.ts +26 -26
- package/src/webrtc/stats/transportStatsBuilder.ts +48 -48
- package/src/webrtc/stats/valueFormatter.ts +27 -27
- package/src/xrpl/identity.ts +245 -0
- package/src/xrpl/trust.ts +64 -0
- package/src/xrpl/verification.ts +284 -0
package/lib/@types/PushRules.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2021 The Matrix.org Foundation C.I.C.
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2021 The Matrix.org Foundation C.I.C.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
// allow camelcase as these are things that go onto the wire
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PushRules.js","names":["PushRuleActionName","TweakName","ConditionOperator","DMMemberCountCondition","isDmMemberCountCondition","condition","ConditionKind","PushRuleKind","RuleId"],"sources":["../../src/@types/PushRules.ts"],"sourcesContent":["/*\
|
|
1
|
+
{"version":3,"file":"PushRules.js","names":["PushRuleActionName","TweakName","ConditionOperator","DMMemberCountCondition","isDmMemberCountCondition","condition","ConditionKind","PushRuleKind","RuleId"],"sources":["../../src/@types/PushRules.ts"],"sourcesContent":["/*\nCopyright 2021 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\n// allow camelcase as these are things that go onto the wire\n/* eslint-disable camelcase */\n\nexport enum PushRuleActionName {\n DontNotify = \"dont_notify\",\n Notify = \"notify\",\n Coalesce = \"coalesce\",\n}\n\nexport enum TweakName {\n Highlight = \"highlight\",\n Sound = \"sound\",\n}\n\nexport type Tweak<N extends TweakName, V> = {\n set_tweak: N;\n value?: V;\n};\n\nexport type TweakHighlight = Tweak<TweakName.Highlight, boolean>;\nexport type TweakSound = Tweak<TweakName.Sound, string>;\n\nexport type Tweaks = TweakHighlight | TweakSound;\n\nexport enum ConditionOperator {\n ExactEquals = \"==\",\n LessThan = \"<\",\n GreaterThan = \">\",\n GreaterThanOrEqual = \">=\",\n LessThanOrEqual = \"<=\",\n}\n\nexport type PushRuleAction = Tweaks | PushRuleActionName;\n\nexport type MemberCountCondition<N extends number, Op extends ConditionOperator = ConditionOperator.ExactEquals> =\n | `${Op}${N}`\n | (Op extends ConditionOperator.ExactEquals ? `${N}` : never);\n\nexport type AnyMemberCountCondition = MemberCountCondition<number, ConditionOperator>;\n\nexport const DMMemberCountCondition: MemberCountCondition<2> = \"2\";\n\nexport function isDmMemberCountCondition(condition: AnyMemberCountCondition): boolean {\n return condition === \"==2\" || condition === \"2\";\n}\n\nexport enum ConditionKind {\n EventMatch = \"event_match\",\n EventPropertyIs = \"event_property_is\",\n EventPropertyContains = \"event_property_contains\",\n ContainsDisplayName = \"contains_display_name\",\n RoomMemberCount = \"room_member_count\",\n SenderNotificationPermission = \"sender_notification_permission\",\n CallStarted = \"call_started\",\n CallStartedPrefix = \"org.matrix.msc3914.call_started\",\n}\n\nexport interface IPushRuleCondition<N extends ConditionKind | string> {\n [k: string]: any; // for custom conditions, there can be other fields here\n kind: N;\n}\n\nexport interface IEventMatchCondition extends IPushRuleCondition<ConditionKind.EventMatch> {\n key: string;\n pattern?: string;\n // Note that value property is an optimization for patterns which do not do\n // any globbing and when the key is not \"content.body\".\n value?: string;\n}\n\nexport interface IEventPropertyIsCondition extends IPushRuleCondition<ConditionKind.EventPropertyIs> {\n key: string;\n value: string | boolean | null | number;\n}\n\nexport interface IEventPropertyContainsCondition extends IPushRuleCondition<ConditionKind.EventPropertyContains> {\n key: string;\n value: string | boolean | null | number;\n}\n\nexport interface IContainsDisplayNameCondition extends IPushRuleCondition<ConditionKind.ContainsDisplayName> {\n // no additional fields\n}\n\nexport interface IRoomMemberCountCondition extends IPushRuleCondition<ConditionKind.RoomMemberCount> {\n is: AnyMemberCountCondition;\n}\n\nexport interface ISenderNotificationPermissionCondition extends IPushRuleCondition<ConditionKind.SenderNotificationPermission> {\n key: string;\n}\n\nexport interface ICallStartedCondition extends IPushRuleCondition<ConditionKind.CallStarted> {\n // no additional fields\n}\n\nexport interface ICallStartedPrefixCondition extends IPushRuleCondition<ConditionKind.CallStartedPrefix> {\n // no additional fields\n}\n\n// XXX: custom conditions are possible but always fail, and break the typescript discriminated union so ignore them here\n// IPushRuleCondition<Exclude<string, ConditionKind>> unfortunately does not resolve this at the time of writing.\nexport type PushRuleCondition =\n | IEventMatchCondition\n | IEventPropertyIsCondition\n | IEventPropertyContainsCondition\n | IContainsDisplayNameCondition\n | IRoomMemberCountCondition\n | ISenderNotificationPermissionCondition\n | ICallStartedCondition\n | ICallStartedPrefixCondition;\n\nexport enum PushRuleKind {\n Override = \"override\",\n ContentSpecific = \"content\",\n RoomSpecific = \"room\",\n SenderSpecific = \"sender\",\n Underride = \"underride\",\n}\n\nexport enum RuleId {\n Master = \".m.rule.master\",\n IsUserMention = \".m.rule.is_user_mention\",\n IsRoomMention = \".m.rule.is_room_mention\",\n ContainsDisplayName = \".m.rule.contains_display_name\",\n ContainsUserName = \".m.rule.contains_user_name\",\n AtRoomNotification = \".m.rule.roomnotif\",\n DM = \".m.rule.room_one_to_one\",\n EncryptedDM = \".m.rule.encrypted_room_one_to_one\",\n Message = \".m.rule.message\",\n EncryptedMessage = \".m.rule.encrypted\",\n InviteToSelf = \".m.rule.invite_for_me\",\n MemberEvent = \".m.rule.member_event\",\n IncomingCall = \".m.rule.call\",\n SuppressNotices = \".m.rule.suppress_notices\",\n Tombstone = \".m.rule.tombstone\",\n PollStart = \".m.rule.poll_start\",\n PollStartUnstable = \".org.matrix.msc3930.rule.poll_start\",\n PollEnd = \".m.rule.poll_end\",\n PollEndUnstable = \".org.matrix.msc3930.rule.poll_end\",\n PollStartOneToOne = \".m.rule.poll_start_one_to_one\",\n PollStartOneToOneUnstable = \".org.matrix.msc3930.rule.poll_start_one_to_one\",\n PollEndOneToOne = \".m.rule.poll_end_one_to_one\",\n PollEndOneToOneUnstable = \".org.matrix.msc3930.rule.poll_end_one_to_one\",\n}\n\nexport type PushRuleSet = {\n [k in PushRuleKind]?: IPushRule[];\n};\n\nexport interface IPushRule {\n actions: PushRuleAction[];\n conditions?: PushRuleCondition[];\n default: boolean;\n enabled: boolean;\n pattern?: string;\n rule_id: RuleId | string;\n}\n\nexport interface IAnnotatedPushRule extends IPushRule {\n kind: PushRuleKind;\n}\n\nexport interface IPushRules {\n global: PushRuleSet;\n device?: PushRuleSet;\n}\n\nexport interface IPusher {\n \"app_display_name\": string;\n \"app_id\": string;\n \"data\": {\n format?: string;\n url?: string; // TODO: Required if kind==http\n brand?: string; // TODO: For email notifications only? Unspecced field\n };\n \"device_display_name\": string;\n \"kind\": \"http\" | string;\n \"lang\": string;\n \"profile_tag\"?: string;\n \"pushkey\": string;\n \"enabled\"?: boolean | null;\n \"org.matrix.msc3881.enabled\"?: boolean | null;\n \"device_id\"?: string | null;\n \"org.matrix.msc3881.device_id\"?: string | null;\n}\n\nexport interface IPusherRequest extends Omit<IPusher, \"device_id\" | \"org.matrix.msc3881.device_id\"> {\n append?: boolean;\n}\n\n/* eslint-enable camelcase */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,WAAYA,kBAAkB,0BAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAlBA,kBAAkB;EAAA,OAAlBA,kBAAkB;AAAA;AAM9B,WAAYC,SAAS,0BAATA,SAAS;EAATA,SAAS;EAATA,SAAS;EAAA,OAATA,SAAS;AAAA;AAerB,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;AAgB7B,OAAO,IAAMC,sBAA+C,GAAG,GAAG;AAElE,OAAO,SAASC,wBAAwBA,CAACC,SAAkC,EAAW;EAClF,OAAOA,SAAS,KAAK,KAAK,IAAIA,SAAS,KAAK,GAAG;AACnD;AAEA,WAAYC,aAAa,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;;AAsDzB;AACA;;AAWA,WAAYC,YAAY,0BAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAZA,YAAY;EAAA,OAAZA,YAAY;AAAA;AAQxB,WAAYC,MAAM,0BAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA;;AAuElB","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"another-json.d.js","names":[],"sources":["../../src/@types/another-json.d.ts"],"sourcesContent":["/*\
|
|
1
|
+
{"version":3,"file":"another-json.d.js","names":[],"sources":["../../src/@types/another-json.d.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\ndeclare module \"another-json\" {\n export function stringify(o: object): string;\n}\n"],"mappings":"","ignoreList":[]}
|
package/lib/@types/auth.d.ts
CHANGED
|
@@ -14,13 +14,17 @@ export interface IRefreshTokenResponse {
|
|
|
14
14
|
export interface ILoginFlowsResponse {
|
|
15
15
|
flows: LoginFlow[];
|
|
16
16
|
}
|
|
17
|
-
export
|
|
17
|
+
export declare const XRPL_WALLET_LOGIN_TYPE = "io.briij.login.xrpl";
|
|
18
|
+
export type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;
|
|
18
19
|
export interface ILoginFlow {
|
|
19
20
|
type: string;
|
|
20
21
|
}
|
|
21
22
|
export interface IPasswordFlow extends ILoginFlow {
|
|
22
23
|
type: "m.login.password";
|
|
23
24
|
}
|
|
25
|
+
export interface IXrplWalletLoginFlow extends ILoginFlow {
|
|
26
|
+
type: typeof XRPL_WALLET_LOGIN_TYPE;
|
|
27
|
+
}
|
|
24
28
|
export declare const OAUTH_AWARE_PREFERRED_FLOW_FIELD: UnstableValue<"oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility">;
|
|
25
29
|
/**
|
|
26
30
|
* @alias
|
|
@@ -153,6 +157,20 @@ export interface LoginRequest {
|
|
|
153
157
|
[key: string]: any;
|
|
154
158
|
}
|
|
155
159
|
export type ILoginParams = LoginRequest;
|
|
160
|
+
export interface XrplWalletChallengePayload {
|
|
161
|
+
nonce: string;
|
|
162
|
+
timestamp: number | string;
|
|
163
|
+
message: string;
|
|
164
|
+
public_key: string;
|
|
165
|
+
algorithm?: "secp256k1" | "ed25519" | string;
|
|
166
|
+
}
|
|
167
|
+
export interface XrplWalletLoginRequest extends Omit<LoginRequest, "type"> {
|
|
168
|
+
type: typeof XRPL_WALLET_LOGIN_TYPE;
|
|
169
|
+
wallet_address: string;
|
|
170
|
+
signature: string;
|
|
171
|
+
challenge: string | XrplWalletChallengePayload;
|
|
172
|
+
network?: string;
|
|
173
|
+
}
|
|
156
174
|
/**
|
|
157
175
|
* Response body for POST /login request
|
|
158
176
|
* @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
|
package/lib/@types/auth.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/@types/auth.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKrD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,EAAE,MAAM,CAAC;CACzB;AAID;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAChC,KAAK,EAAE,SAAS,EAAE,CAAC;CACtB;AAED,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,aAAa,GAAG,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/@types/auth.ts"],"names":[],"mappings":"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"}
|
package/lib/@types/auth.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { UnstableValue } from "../NamespacedValue.js";
|
|
@@ -19,26 +19,27 @@ import { UnstableValue } from "../NamespacedValue.js";
|
|
|
19
19
|
// disable lint because these are wire responses
|
|
20
20
|
/* eslint-disable camelcase */
|
|
21
21
|
|
|
22
|
-
/**
|
|
23
|
-
* Represents a response to the CSAPI `/refresh` endpoint.
|
|
22
|
+
/**
|
|
23
|
+
* Represents a response to the CSAPI `/refresh` endpoint.
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
/* eslint-enable camelcase */
|
|
27
27
|
|
|
28
|
-
/**
|
|
29
|
-
* Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login
|
|
28
|
+
/**
|
|
29
|
+
* Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login
|
|
30
30
|
*/
|
|
31
31
|
|
|
32
|
+
export var XRPL_WALLET_LOGIN_TYPE = "io.briij.login.xrpl";
|
|
32
33
|
export var OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue("oauth_aware_preferred", "org.matrix.msc3824.delegated_oidc_compatibility");
|
|
33
34
|
|
|
34
|
-
/**
|
|
35
|
-
* @alias
|
|
36
|
-
* @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.
|
|
35
|
+
/**
|
|
36
|
+
* @alias
|
|
37
|
+
* @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.
|
|
37
38
|
*/
|
|
38
39
|
export var DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;
|
|
39
40
|
|
|
40
|
-
/**
|
|
41
|
-
* Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso
|
|
41
|
+
/**
|
|
42
|
+
* Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso
|
|
42
43
|
*/
|
|
43
44
|
|
|
44
45
|
export var IdentityProviderBrand = /*#__PURE__*/function (IdentityProviderBrand) {
|
|
@@ -58,50 +59,50 @@ export var SSOAction = /*#__PURE__*/function (SSOAction) {
|
|
|
58
59
|
return SSOAction;
|
|
59
60
|
}({});
|
|
60
61
|
|
|
61
|
-
/**
|
|
62
|
-
* A client can identify a user using their Matrix ID.
|
|
63
|
-
* This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.
|
|
64
|
-
* @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id
|
|
62
|
+
/**
|
|
63
|
+
* A client can identify a user using their Matrix ID.
|
|
64
|
+
* This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.
|
|
65
|
+
* @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id
|
|
65
66
|
*/
|
|
66
67
|
|
|
67
|
-
/**
|
|
68
|
-
* A client can identify a user using a 3PID associated with the user’s account on the homeserver,
|
|
69
|
-
* where the 3PID was previously associated using the /account/3pid API.
|
|
70
|
-
* See the 3PID Types Appendix for a list of Third-party ID media.
|
|
71
|
-
* @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id
|
|
68
|
+
/**
|
|
69
|
+
* A client can identify a user using a 3PID associated with the user’s account on the homeserver,
|
|
70
|
+
* where the 3PID was previously associated using the /account/3pid API.
|
|
71
|
+
* See the 3PID Types Appendix for a list of Third-party ID media.
|
|
72
|
+
* @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id
|
|
72
73
|
*/
|
|
73
74
|
|
|
74
|
-
/**
|
|
75
|
-
* A client can identify a user using a phone number associated with the user’s account,
|
|
76
|
-
* where the phone number was previously associated using the /account/3pid API.
|
|
77
|
-
* The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.
|
|
78
|
-
* If the client wishes to canonicalise the phone number,
|
|
79
|
-
* then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.
|
|
80
|
-
*
|
|
81
|
-
* 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.
|
|
82
|
-
*
|
|
83
|
-
* @see https://spec.matrix.org/v1.7/client-server-api/#phone-number
|
|
75
|
+
/**
|
|
76
|
+
* A client can identify a user using a phone number associated with the user’s account,
|
|
77
|
+
* where the phone number was previously associated using the /account/3pid API.
|
|
78
|
+
* The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.
|
|
79
|
+
* If the client wishes to canonicalise the phone number,
|
|
80
|
+
* then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.
|
|
81
|
+
*
|
|
82
|
+
* 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.
|
|
83
|
+
*
|
|
84
|
+
* @see https://spec.matrix.org/v1.7/client-server-api/#phone-number
|
|
84
85
|
*/
|
|
85
86
|
|
|
86
|
-
/**
|
|
87
|
-
* User Identifiers usable for login & user-interactive authentication.
|
|
88
|
-
*
|
|
89
|
-
* Extensibly allows more than Matrix specified identifiers.
|
|
87
|
+
/**
|
|
88
|
+
* User Identifiers usable for login & user-interactive authentication.
|
|
89
|
+
*
|
|
90
|
+
* Extensibly allows more than Matrix specified identifiers.
|
|
90
91
|
*/
|
|
91
92
|
|
|
92
|
-
/**
|
|
93
|
-
* Request body for POST /login request
|
|
94
|
-
* @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
|
|
93
|
+
/**
|
|
94
|
+
* Request body for POST /login request
|
|
95
|
+
* @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
|
|
95
96
|
*/
|
|
96
97
|
|
|
97
98
|
// Export for backwards compatibility
|
|
98
99
|
|
|
99
|
-
/**
|
|
100
|
-
* Response body for POST /login request
|
|
101
|
-
* @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
|
|
100
|
+
/**
|
|
101
|
+
* Response body for POST /login request
|
|
102
|
+
* @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login
|
|
102
103
|
*/
|
|
103
104
|
|
|
104
|
-
/**
|
|
105
|
-
* The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token
|
|
105
|
+
/**
|
|
106
|
+
* The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token
|
|
106
107
|
*/
|
|
107
108
|
//# sourceMappingURL=auth.js.map
|
package/lib/@types/auth.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","names":["UnstableValue","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\r\nCopyright 2022 The Matrix.org Foundation C.I.C.\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n*/\r\n\r\nimport { UnstableValue } from \"../NamespacedValue.ts\";\r\nimport { type IClientWellKnown } from \"../client.ts\";\r\n\r\n// disable lint because these are wire responses\r\n/* eslint-disable camelcase */\r\n\r\n/**\r\n * Represents a response to the CSAPI `/refresh` endpoint.\r\n */\r\nexport interface IRefreshTokenResponse {\r\n access_token: string;\r\n expires_in_ms: number;\r\n refresh_token: string;\r\n}\r\n\r\n/* eslint-enable camelcase */\r\n\r\n/**\r\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\r\n */\r\nexport interface ILoginFlowsResponse {\r\n flows: LoginFlow[];\r\n}\r\n\r\nexport type LoginFlow = ISSOFlow | IPasswordFlow | ILoginFlow;\r\n\r\nexport interface ILoginFlow {\r\n type: string;\r\n}\r\n\r\nexport interface IPasswordFlow extends ILoginFlow {\r\n type: \"m.login.password\";\r\n}\r\n\r\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\r\n \"oauth_aware_preferred\",\r\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\r\n);\r\n\r\n/**\r\n * @alias\r\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\r\n */\r\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\r\n\r\n/**\r\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\r\n */\r\nexport interface ISSOFlow extends ILoginFlow {\r\n type: \"m.login.sso\" | \"m.login.cas\";\r\n // eslint-disable-next-line camelcase\r\n identity_providers?: IIdentityProvider[];\r\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\r\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\r\n}\r\n\r\nexport enum IdentityProviderBrand {\r\n Gitlab = \"gitlab\",\r\n Github = \"github\",\r\n Apple = \"apple\",\r\n Google = \"google\",\r\n Facebook = \"facebook\",\r\n Twitter = \"twitter\",\r\n}\r\n\r\nexport interface IIdentityProvider {\r\n id: string;\r\n name: string;\r\n icon?: string;\r\n brand?: IdentityProviderBrand | string;\r\n}\r\n\r\nexport enum SSOAction {\r\n /** The user intends to login to an existing account */\r\n LOGIN = \"login\",\r\n\r\n /** The user intends to register for a new account */\r\n REGISTER = \"register\",\r\n}\r\n\r\n/**\r\n * A client can identify a user using their Matrix ID.\r\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\r\n */\r\ntype UserLoginIdentifier = {\r\n type: \"m.id.user\";\r\n user: string;\r\n};\r\n\r\n/**\r\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\r\n * where the 3PID was previously associated using the /account/3pid API.\r\n * See the 3PID Types Appendix for a list of Third-party ID media.\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\r\n */\r\ntype ThirdPartyLoginIdentifier = {\r\n type: \"m.id.thirdparty\";\r\n medium: string;\r\n address: string;\r\n};\r\n\r\n/**\r\n * A client can identify a user using a phone number associated with the user’s account,\r\n * where the phone number was previously associated using the /account/3pid API.\r\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\r\n * If the client wishes to canonicalise the phone number,\r\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\r\n *\r\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.\r\n *\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\r\n */\r\ntype PhoneLoginIdentifier = {\r\n type: \"m.id.phone\";\r\n country: string;\r\n phone: string;\r\n};\r\n\r\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\r\n\r\n/**\r\n * User Identifiers usable for login & user-interactive authentication.\r\n *\r\n * Extensibly allows more than Matrix specified identifiers.\r\n */\r\nexport type UserIdentifier =\r\n | SpecUserIdentifier\r\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\r\n\r\n/**\r\n * Request body for POST /login request\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\r\n */\r\nexport interface LoginRequest {\r\n /**\r\n * The login type being used.\r\n */\r\n type: \"m.login.password\" | \"m.login.token\" | string;\r\n /**\r\n * ID of the client device.\r\n * If this does not correspond to a known client device, a new device will be created.\r\n * The given device ID must not be the same as a cross-signing key ID.\r\n * The server will auto-generate a device_id if this is not specified.\r\n */\r\n device_id?: string;\r\n /**\r\n * Identification information for a user\r\n */\r\n identifier?: UserIdentifier;\r\n /**\r\n * A display name to assign to the newly-created device.\r\n * Ignored if device_id corresponds to a known device.\r\n */\r\n initial_device_display_name?: string;\r\n /**\r\n * When logging in using a third-party identifier, the medium of the identifier.\r\n * Must be `email`.\r\n * @deprecated in favour of `identifier`.\r\n */\r\n medium?: \"email\";\r\n /**\r\n * Required when type is `m.login.password`. The user’s password.\r\n */\r\n password?: string;\r\n /**\r\n * If true, the client supports refresh tokens.\r\n */\r\n refresh_token?: boolean;\r\n /**\r\n * Required when type is `m.login.token`. Part of Token-based login.\r\n */\r\n token?: string;\r\n /**\r\n * The fully qualified user ID or just local part of the user ID, to log in.\r\n * @deprecated in favour of identifier.\r\n */\r\n user?: string;\r\n // Extensible\r\n [key: string]: any;\r\n}\r\n\r\n// Export for backwards compatibility\r\nexport type ILoginParams = LoginRequest;\r\n\r\n/**\r\n * Response body for POST /login request\r\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\r\n */\r\nexport interface LoginResponse {\r\n /**\r\n * An access token for the account.\r\n * This access token can then be used to authorize other requests.\r\n */\r\n access_token: string;\r\n /**\r\n * ID of the logged-in device.\r\n * Will be the same as the corresponding parameter in the request, if one was specified.\r\n */\r\n device_id: string;\r\n /**\r\n * The fully-qualified Matrix ID for the account.\r\n */\r\n user_id: string;\r\n /**\r\n * The lifetime of the access token, in milliseconds.\r\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\r\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\r\n * If not given, the client can assume that the access token will not expire.\r\n */\r\n expires_in_ms?: number;\r\n /**\r\n * A refresh token for the account.\r\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\r\n */\r\n refresh_token?: string;\r\n /**\r\n * Optional client configuration provided by the server.\r\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\r\n * This object takes the same form as the one returned from .well-known autodiscovery.\r\n */\r\n well_known?: IClientWellKnown;\r\n /**\r\n * The server_name of the homeserver on which the account has been registered.\r\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\r\n */\r\n home_server?: string;\r\n}\r\n\r\n/**\r\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\r\n */\r\nexport interface LoginTokenPostResponse {\r\n /**\r\n * The token to use with `m.login.token` to authenticate.\r\n */\r\n login_token: string;\r\n /**\r\n * Expiration in milliseconds.\r\n */\r\n expires_in_ms: number;\r\n}\r\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAeA,OAAO,IAAMC,gCAAgC,GAAG,IAAID,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAME,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AAGA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"auth.js","names":["UnstableValue","XRPL_WALLET_LOGIN_TYPE","OAUTH_AWARE_PREFERRED_FLOW_FIELD","DELEGATED_OIDC_COMPATIBILITY","IdentityProviderBrand","SSOAction"],"sources":["../../src/@types/auth.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type IClientWellKnown } from \"../client.ts\";\n\n// disable lint because these are wire responses\n/* eslint-disable camelcase */\n\n/**\n * Represents a response to the CSAPI `/refresh` endpoint.\n */\nexport interface IRefreshTokenResponse {\n access_token: string;\n expires_in_ms: number;\n refresh_token: string;\n}\n\n/* eslint-enable camelcase */\n\n/**\n * Response to GET login flows as per https://spec.matrix.org/v1.3/client-server-api/#get_matrixclientv3login\n */\nexport interface ILoginFlowsResponse {\n flows: LoginFlow[];\n}\n\nexport const XRPL_WALLET_LOGIN_TYPE = \"io.briij.login.xrpl\";\n\nexport type LoginFlow = ISSOFlow | IPasswordFlow | IXrplWalletLoginFlow | ILoginFlow;\n\nexport interface ILoginFlow {\n type: string;\n}\n\nexport interface IPasswordFlow extends ILoginFlow {\n type: \"m.login.password\";\n}\n\nexport interface IXrplWalletLoginFlow extends ILoginFlow {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n}\n\nexport const OAUTH_AWARE_PREFERRED_FLOW_FIELD = new UnstableValue(\n \"oauth_aware_preferred\",\n \"org.matrix.msc3824.delegated_oidc_compatibility\",\n);\n\n/**\n * @alias\n * @deprecated use `OAUTH_AWARE_PREFERRED_FLOW_FIELD` instead.\n */\nexport const DELEGATED_OIDC_COMPATIBILITY = OAUTH_AWARE_PREFERRED_FLOW_FIELD;\n\n/**\n * Representation of SSO flow as per https://spec.matrix.org/v1.3/client-server-api/#client-login-via-sso\n */\nexport interface ISSOFlow extends ILoginFlow {\n type: \"m.login.sso\" | \"m.login.cas\";\n // eslint-disable-next-line camelcase\n identity_providers?: IIdentityProvider[];\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.name]?: boolean;\n [OAUTH_AWARE_PREFERRED_FLOW_FIELD.altName]?: boolean;\n}\n\nexport enum IdentityProviderBrand {\n Gitlab = \"gitlab\",\n Github = \"github\",\n Apple = \"apple\",\n Google = \"google\",\n Facebook = \"facebook\",\n Twitter = \"twitter\",\n}\n\nexport interface IIdentityProvider {\n id: string;\n name: string;\n icon?: string;\n brand?: IdentityProviderBrand | string;\n}\n\nexport enum SSOAction {\n /** The user intends to login to an existing account */\n LOGIN = \"login\",\n\n /** The user intends to register for a new account */\n REGISTER = \"register\",\n}\n\n/**\n * A client can identify a user using their Matrix ID.\n * This can either be the fully qualified Matrix user ID, or just the localpart of the user ID.\n * @see https://spec.matrix.org/v1.7/client-server-api/#matrix-user-id\n */\ntype UserLoginIdentifier = {\n type: \"m.id.user\";\n user: string;\n};\n\n/**\n * A client can identify a user using a 3PID associated with the user’s account on the homeserver,\n * where the 3PID was previously associated using the /account/3pid API.\n * See the 3PID Types Appendix for a list of Third-party ID media.\n * @see https://spec.matrix.org/v1.7/client-server-api/#third-party-id\n */\ntype ThirdPartyLoginIdentifier = {\n type: \"m.id.thirdparty\";\n medium: string;\n address: string;\n};\n\n/**\n * A client can identify a user using a phone number associated with the user’s account,\n * where the phone number was previously associated using the /account/3pid API.\n * The phone number can be passed in as entered by the user; the homeserver will be responsible for canonicalising it.\n * If the client wishes to canonicalise the phone number,\n * then it can use the m.id.thirdparty identifier type with a medium of msisdn instead.\n *\n * The country is the two-letter uppercase ISO-3166-1 alpha-2 country code that the number in phone should be parsed as if it were dialled from.\n *\n * @see https://spec.matrix.org/v1.7/client-server-api/#phone-number\n */\ntype PhoneLoginIdentifier = {\n type: \"m.id.phone\";\n country: string;\n phone: string;\n};\n\ntype SpecUserIdentifier = UserLoginIdentifier | ThirdPartyLoginIdentifier | PhoneLoginIdentifier;\n\n/**\n * User Identifiers usable for login & user-interactive authentication.\n *\n * Extensibly allows more than Matrix specified identifiers.\n */\nexport type UserIdentifier =\n | SpecUserIdentifier\n | { type: Exclude<string, SpecUserIdentifier[\"type\"]>; [key: string]: any };\n\n/**\n * Request body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginRequest {\n /**\n * The login type being used.\n */\n type: \"m.login.password\" | \"m.login.token\" | string;\n /**\n * ID of the client device.\n * If this does not correspond to a known client device, a new device will be created.\n * The given device ID must not be the same as a cross-signing key ID.\n * The server will auto-generate a device_id if this is not specified.\n */\n device_id?: string;\n /**\n * Identification information for a user\n */\n identifier?: UserIdentifier;\n /**\n * A display name to assign to the newly-created device.\n * Ignored if device_id corresponds to a known device.\n */\n initial_device_display_name?: string;\n /**\n * When logging in using a third-party identifier, the medium of the identifier.\n * Must be `email`.\n * @deprecated in favour of `identifier`.\n */\n medium?: \"email\";\n /**\n * Required when type is `m.login.password`. The user’s password.\n */\n password?: string;\n /**\n * If true, the client supports refresh tokens.\n */\n refresh_token?: boolean;\n /**\n * Required when type is `m.login.token`. Part of Token-based login.\n */\n token?: string;\n /**\n * The fully qualified user ID or just local part of the user ID, to log in.\n * @deprecated in favour of identifier.\n */\n user?: string;\n // Extensible\n [key: string]: any;\n}\n\n// Export for backwards compatibility\nexport type ILoginParams = LoginRequest;\n\nexport interface XrplWalletChallengePayload {\n nonce: string;\n timestamp: number | string;\n message: string;\n public_key: string;\n algorithm?: \"secp256k1\" | \"ed25519\" | string;\n}\n\nexport interface XrplWalletLoginRequest extends Omit<LoginRequest, \"type\"> {\n type: typeof XRPL_WALLET_LOGIN_TYPE;\n wallet_address: string;\n signature: string;\n challenge: string | XrplWalletChallengePayload;\n network?: string;\n}\n\n/**\n * Response body for POST /login request\n * @see https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv3login\n */\nexport interface LoginResponse {\n /**\n * An access token for the account.\n * This access token can then be used to authorize other requests.\n */\n access_token: string;\n /**\n * ID of the logged-in device.\n * Will be the same as the corresponding parameter in the request, if one was specified.\n */\n device_id: string;\n /**\n * The fully-qualified Matrix ID for the account.\n */\n user_id: string;\n /**\n * The lifetime of the access token, in milliseconds.\n * Once the access token has expired a new access token can be obtained by using the provided refresh token.\n * If no refresh token is provided, the client will need to re-log in to obtain a new access token.\n * If not given, the client can assume that the access token will not expire.\n */\n expires_in_ms?: number;\n /**\n * A refresh token for the account.\n * This token can be used to obtain a new access token when it expires by calling the /refresh endpoint.\n */\n refresh_token?: string;\n /**\n * Optional client configuration provided by the server.\n * If present, clients SHOULD use the provided object to reconfigure themselves, optionally validating the URLs within.\n * This object takes the same form as the one returned from .well-known autodiscovery.\n */\n well_known?: IClientWellKnown;\n /**\n * The server_name of the homeserver on which the account has been registered.\n * @deprecated Clients should extract the server_name from user_id (by splitting at the first colon) if they require it.\n */\n home_server?: string;\n}\n\n/**\n * The result of a successful `m.login.token` issuance request as per https://spec.matrix.org/v1.7/client-server-api/#post_matrixclientv1loginget_token\n */\nexport interface LoginTokenPostResponse {\n /**\n * The token to use with `m.login.token` to authenticate.\n */\n login_token: string;\n /**\n * Expiration in milliseconds.\n */\n expires_in_ms: number;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,aAAa,QAAQ,uBAAuB;;AAGrD;AACA;;AAEA;AACA;AACA;;AAOA;;AAEA;AACA;AACA;;AAKA,OAAO,IAAMC,sBAAsB,GAAG,qBAAqB;AAgB3D,OAAO,IAAMC,gCAAgC,GAAG,IAAIF,aAAa,CAC7D,uBAAuB,EACvB,iDACJ,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,IAAMG,4BAA4B,GAAGD,gCAAgC;;AAE5E;AACA;AACA;;AASA,WAAYE,qBAAqB,0BAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAArBA,qBAAqB;EAAA,OAArBA,qBAAqB;AAAA;AAgBjC,WAAYC,SAAS,0BAATA,SAAS;EACjB;EADQA,SAAS;EAIjB;EAJQA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAQrB;AACA;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;;AAiDA;;AAmBA;AACA;AACA;AACA;;AAyCA;AACA;AACA","ignoreList":[]}
|
package/lib/@types/beacon.js
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
|
-
/*
|
|
2
|
-
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
3
|
-
|
|
4
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
-
you may not use this file except in compliance with the License.
|
|
6
|
-
You may obtain a copy of the License at
|
|
7
|
-
|
|
8
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
-
|
|
10
|
-
Unless required by applicable law or agreed to in writing, software
|
|
11
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
-
See the License for the specific language governing permissions and
|
|
14
|
-
limitations under the License.
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2022 The Matrix.org Foundation C.I.C.
|
|
3
|
+
|
|
4
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
5
|
+
you may not use this file except in compliance with the License.
|
|
6
|
+
You may obtain a copy of the License at
|
|
7
|
+
|
|
8
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
9
|
+
|
|
10
|
+
Unless required by applicable law or agreed to in writing, software
|
|
11
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
12
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
13
|
+
See the License for the specific language governing permissions and
|
|
14
|
+
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
17
|
import { UnstableValue } from "../NamespacedValue.js";
|
|
18
|
-
/**
|
|
19
|
-
* Beacon info and beacon event types as described in MSC3672
|
|
20
|
-
* https://github.com/matrix-org/matrix-spec-proposals/pull/3672
|
|
18
|
+
/**
|
|
19
|
+
* Beacon info and beacon event types as described in MSC3672
|
|
20
|
+
* https://github.com/matrix-org/matrix-spec-proposals/pull/3672
|
|
21
21
|
*/
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* Beacon info events are state events.
|
|
25
|
-
* We have two requirements for these events:
|
|
26
|
-
* 1. they can only be written by their owner
|
|
27
|
-
* 2. a user can have an arbitrary number of beacon_info events
|
|
28
|
-
*
|
|
29
|
-
* 1. is achieved by setting the state_key to the owners mxid.
|
|
30
|
-
* Event keys in room state are a combination of `type` + `state_key`.
|
|
31
|
-
* To achieve an arbitrary number of only owner-writable state events
|
|
32
|
-
* we introduce a variable suffix to the event type
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```
|
|
36
|
-
* {
|
|
37
|
-
* "type": "m.beacon_info.@matthew:matrix.org.1",
|
|
38
|
-
* "state_key": "@matthew:matrix.org",
|
|
39
|
-
* "content": {
|
|
40
|
-
* "m.beacon_info": {
|
|
41
|
-
* "description": "The Matthew Tracker",
|
|
42
|
-
* "timeout": 86400000,
|
|
43
|
-
* },
|
|
44
|
-
* // more content as described below
|
|
45
|
-
* }
|
|
46
|
-
* },
|
|
47
|
-
* {
|
|
48
|
-
* "type": "m.beacon_info.@matthew:matrix.org.2",
|
|
49
|
-
* "state_key": "@matthew:matrix.org",
|
|
50
|
-
* "content": {
|
|
51
|
-
* "m.beacon_info": {
|
|
52
|
-
* "description": "Another different Matthew tracker",
|
|
53
|
-
* "timeout": 400000,
|
|
54
|
-
* },
|
|
55
|
-
* // more content as described below
|
|
56
|
-
* }
|
|
57
|
-
* }
|
|
58
|
-
* ```
|
|
23
|
+
/**
|
|
24
|
+
* Beacon info events are state events.
|
|
25
|
+
* We have two requirements for these events:
|
|
26
|
+
* 1. they can only be written by their owner
|
|
27
|
+
* 2. a user can have an arbitrary number of beacon_info events
|
|
28
|
+
*
|
|
29
|
+
* 1. is achieved by setting the state_key to the owners mxid.
|
|
30
|
+
* Event keys in room state are a combination of `type` + `state_key`.
|
|
31
|
+
* To achieve an arbitrary number of only owner-writable state events
|
|
32
|
+
* we introduce a variable suffix to the event type
|
|
33
|
+
*
|
|
34
|
+
* @example
|
|
35
|
+
* ```
|
|
36
|
+
* {
|
|
37
|
+
* "type": "m.beacon_info.@matthew:matrix.org.1",
|
|
38
|
+
* "state_key": "@matthew:matrix.org",
|
|
39
|
+
* "content": {
|
|
40
|
+
* "m.beacon_info": {
|
|
41
|
+
* "description": "The Matthew Tracker",
|
|
42
|
+
* "timeout": 86400000,
|
|
43
|
+
* },
|
|
44
|
+
* // more content as described below
|
|
45
|
+
* }
|
|
46
|
+
* },
|
|
47
|
+
* {
|
|
48
|
+
* "type": "m.beacon_info.@matthew:matrix.org.2",
|
|
49
|
+
* "state_key": "@matthew:matrix.org",
|
|
50
|
+
* "content": {
|
|
51
|
+
* "m.beacon_info": {
|
|
52
|
+
* "description": "Another different Matthew tracker",
|
|
53
|
+
* "timeout": 400000,
|
|
54
|
+
* },
|
|
55
|
+
* // more content as described below
|
|
56
|
+
* }
|
|
57
|
+
* }
|
|
58
|
+
* ```
|
|
59
59
|
*/
|
|
60
60
|
|
|
61
|
-
/**
|
|
62
|
-
* Non-variable type for m.beacon_info event content
|
|
61
|
+
/**
|
|
62
|
+
* Non-variable type for m.beacon_info event content
|
|
63
63
|
*/
|
|
64
64
|
export var M_BEACON_INFO = new UnstableValue("m.beacon_info", "org.matrix.msc3672.beacon_info");
|
|
65
65
|
export var M_BEACON = new UnstableValue("m.beacon", "org.matrix.msc3672.beacon");
|
|
66
66
|
|
|
67
|
-
/**
|
|
68
|
-
* m.beacon_info Event example from the spec
|
|
69
|
-
* https://github.com/matrix-org/matrix-spec-proposals/pull/3672
|
|
70
|
-
* @example
|
|
71
|
-
* ```
|
|
72
|
-
* {
|
|
73
|
-
* "type": "m.beacon_info",
|
|
74
|
-
* "state_key": "@matthew:matrix.org",
|
|
75
|
-
* "content": {
|
|
76
|
-
* "m.beacon_info": {
|
|
77
|
-
* "description": "The Matthew Tracker", // same as an `m.location` description
|
|
78
|
-
* "timeout": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds
|
|
79
|
-
* },
|
|
80
|
-
* "m.ts": 1436829458432, // creation timestamp of the beacon on the client
|
|
81
|
-
* "m.asset": {
|
|
82
|
-
* "type": "m.self" // the type of asset being tracked as per MSC3488
|
|
83
|
-
* }
|
|
84
|
-
* }
|
|
85
|
-
* }
|
|
86
|
-
* ```
|
|
67
|
+
/**
|
|
68
|
+
* m.beacon_info Event example from the spec
|
|
69
|
+
* https://github.com/matrix-org/matrix-spec-proposals/pull/3672
|
|
70
|
+
* @example
|
|
71
|
+
* ```
|
|
72
|
+
* {
|
|
73
|
+
* "type": "m.beacon_info",
|
|
74
|
+
* "state_key": "@matthew:matrix.org",
|
|
75
|
+
* "content": {
|
|
76
|
+
* "m.beacon_info": {
|
|
77
|
+
* "description": "The Matthew Tracker", // same as an `m.location` description
|
|
78
|
+
* "timeout": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds
|
|
79
|
+
* },
|
|
80
|
+
* "m.ts": 1436829458432, // creation timestamp of the beacon on the client
|
|
81
|
+
* "m.asset": {
|
|
82
|
+
* "type": "m.self" // the type of asset being tracked as per MSC3488
|
|
83
|
+
* }
|
|
84
|
+
* }
|
|
85
|
+
* }
|
|
86
|
+
* ```
|
|
87
87
|
*/
|
|
88
88
|
|
|
89
|
-
/**
|
|
90
|
-
* m.beacon_info.* event content
|
|
89
|
+
/**
|
|
90
|
+
* m.beacon_info.* event content
|
|
91
91
|
*/
|
|
92
92
|
|
|
93
|
-
/**
|
|
94
|
-
* m.beacon event example
|
|
95
|
-
* https://github.com/matrix-org/matrix-spec-proposals/pull/3672
|
|
96
|
-
* @example
|
|
97
|
-
* ```
|
|
98
|
-
* {
|
|
99
|
-
* "type": "m.beacon",
|
|
100
|
-
* "sender": "@matthew:matrix.org",
|
|
101
|
-
* "content": {
|
|
102
|
-
* "m.relates_to": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674
|
|
103
|
-
* "rel_type": "m.reference", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267
|
|
104
|
-
* "event_id": "$beacon_info"
|
|
105
|
-
* },
|
|
106
|
-
* "m.location": {
|
|
107
|
-
* "uri": "geo:51.5008,0.1247;u=35",
|
|
108
|
-
* "description": "Arbitrary beacon information"
|
|
109
|
-
* },
|
|
110
|
-
* "m.ts": 1636829458432,
|
|
111
|
-
* }
|
|
112
|
-
* }
|
|
113
|
-
* ```
|
|
93
|
+
/**
|
|
94
|
+
* m.beacon event example
|
|
95
|
+
* https://github.com/matrix-org/matrix-spec-proposals/pull/3672
|
|
96
|
+
* @example
|
|
97
|
+
* ```
|
|
98
|
+
* {
|
|
99
|
+
* "type": "m.beacon",
|
|
100
|
+
* "sender": "@matthew:matrix.org",
|
|
101
|
+
* "content": {
|
|
102
|
+
* "m.relates_to": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674
|
|
103
|
+
* "rel_type": "m.reference", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267
|
|
104
|
+
* "event_id": "$beacon_info"
|
|
105
|
+
* },
|
|
106
|
+
* "m.location": {
|
|
107
|
+
* "uri": "geo:51.5008,0.1247;u=35",
|
|
108
|
+
* "description": "Arbitrary beacon information"
|
|
109
|
+
* },
|
|
110
|
+
* "m.ts": 1636829458432,
|
|
111
|
+
* }
|
|
112
|
+
* }
|
|
113
|
+
* ```
|
|
114
114
|
*/
|
|
115
115
|
|
|
116
|
-
/**
|
|
117
|
-
* Content of an m.beacon event
|
|
116
|
+
/**
|
|
117
|
+
* Content of an m.beacon event
|
|
118
118
|
*/
|
|
119
119
|
//# sourceMappingURL=beacon.js.map
|
package/lib/@types/beacon.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"beacon.js","names":["UnstableValue","M_BEACON_INFO","M_BEACON"],"sources":["../../src/@types/beacon.ts"],"sourcesContent":["/*\
|
|
1
|
+
{"version":3,"file":"beacon.js","names":["UnstableValue","M_BEACON_INFO","M_BEACON"],"sources":["../../src/@types/beacon.ts"],"sourcesContent":["/*\nCopyright 2022 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nimport { type RelatesToRelationship, type REFERENCE_RELATION } from \"./extensible_events.ts\";\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type MAssetEvent, type MLocationEvent, type MTimestampEvent } from \"./location.ts\";\n\n/**\n * Beacon info and beacon event types as described in MSC3672\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n */\n\n/**\n * Beacon info events are state events.\n * We have two requirements for these events:\n * 1. they can only be written by their owner\n * 2. a user can have an arbitrary number of beacon_info events\n *\n * 1. is achieved by setting the state_key to the owners mxid.\n * Event keys in room state are a combination of `type` + `state_key`.\n * To achieve an arbitrary number of only owner-writable state events\n * we introduce a variable suffix to the event type\n *\n * @example\n * ```\n * {\n * \"type\": \"m.beacon_info.@matthew:matrix.org.1\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"The Matthew Tracker\",\n * \"timeout\": 86400000,\n * },\n * // more content as described below\n * }\n * },\n * {\n * \"type\": \"m.beacon_info.@matthew:matrix.org.2\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"Another different Matthew tracker\",\n * \"timeout\": 400000,\n * },\n * // more content as described below\n * }\n * }\n * ```\n */\n\n/**\n * Non-variable type for m.beacon_info event content\n */\nexport const M_BEACON_INFO = new UnstableValue(\"m.beacon_info\", \"org.matrix.msc3672.beacon_info\");\nexport const M_BEACON = new UnstableValue(\"m.beacon\", \"org.matrix.msc3672.beacon\");\n\nexport type MBeaconInfoContent = {\n description?: string;\n // how long from the last event until we consider the beacon inactive in milliseconds\n timeout: number;\n // true when this is a live location beacon\n // https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n live?: boolean;\n};\n\n/**\n * m.beacon_info Event example from the spec\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n * @example\n * ```\n * {\n * \"type\": \"m.beacon_info\",\n * \"state_key\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.beacon_info\": {\n * \"description\": \"The Matthew Tracker\", // same as an `m.location` description\n * \"timeout\": 86400000, // how long from the last event until we consider the beacon inactive in milliseconds\n * },\n * \"m.ts\": 1436829458432, // creation timestamp of the beacon on the client\n * \"m.asset\": {\n * \"type\": \"m.self\" // the type of asset being tracked as per MSC3488\n * }\n * }\n * }\n * ```\n */\n\n/**\n * m.beacon_info.* event content\n */\nexport type MBeaconInfoEventContent = MBeaconInfoContent &\n // creation timestamp of the beacon on the client\n MTimestampEvent &\n // the type of asset being tracked as per MSC3488\n MAssetEvent;\n\n/**\n * m.beacon event example\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3672\n * @example\n * ```\n * {\n * \"type\": \"m.beacon\",\n * \"sender\": \"@matthew:matrix.org\",\n * \"content\": {\n * \"m.relates_to\": { // from MSC2674: https://github.com/matrix-org/matrix-doc/pull/2674\n * \"rel_type\": \"m.reference\", // from MSC3267: https://github.com/matrix-org/matrix-doc/pull/3267\n * \"event_id\": \"$beacon_info\"\n * },\n * \"m.location\": {\n * \"uri\": \"geo:51.5008,0.1247;u=35\",\n * \"description\": \"Arbitrary beacon information\"\n * },\n * \"m.ts\": 1636829458432,\n * }\n * }\n * ```\n */\n\n/**\n * Content of an m.beacon event\n */\nexport type MBeaconEventContent = MLocationEvent &\n // timestamp when location was taken\n MTimestampEvent &\n // relates to a beacon_info event\n RelatesToRelationship<typeof REFERENCE_RELATION>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA,SAASA,aAAa,QAAQ,uBAAuB;AAGrD;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,IAAMC,aAAa,GAAG,IAAID,aAAa,CAAC,eAAe,EAAE,gCAAgC,CAAC;AACjG,OAAO,IAAME,QAAQ,GAAG,IAAIF,aAAa,CAAC,UAAU,EAAE,2BAA2B,CAAC;;AAWlF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA","ignoreList":[]}
|
package/lib/@types/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","names":[],"sources":["../../src/@types/common.ts"],"sourcesContent":["/*\
|
|
1
|
+
{"version":3,"file":"common.js","names":[],"sources":["../../src/@types/common.ts"],"sourcesContent":["/*\nCopyright 2024 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\nhttp://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\nexport type NonEmptyArray<T> = [T, ...T[]];\n\n// Based on https://stackoverflow.com/a/53229857/3532235\nexport type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };\nexport type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;\nexport type Writeable<T> = { -readonly [P in keyof T]: T[P] };\n\nexport type EmptyObject = Record<PropertyKey, never>;\n"],"mappings":"","ignoreList":[]}
|