@textrp/briij-js-sdk 41.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 +6464 -0
- package/LICENSE +177 -0
- package/README.md +477 -0
- package/lib/@types/AESEncryptedSecretStoragePayload.d.ts +14 -0
- package/lib/@types/AESEncryptedSecretStoragePayload.d.ts.map +1 -0
- package/lib/@types/AESEncryptedSecretStoragePayload.js +1 -0
- package/lib/@types/AESEncryptedSecretStoragePayload.js.map +1 -0
- package/lib/@types/IIdentityServerProvider.d.ts +9 -0
- package/lib/@types/IIdentityServerProvider.d.ts.map +1 -0
- package/lib/@types/IIdentityServerProvider.js +1 -0
- package/lib/@types/IIdentityServerProvider.js.map +1 -0
- package/lib/@types/PushRules.d.ts +140 -0
- package/lib/@types/PushRules.d.ts.map +1 -0
- package/lib/@types/PushRules.js +94 -0
- package/lib/@types/PushRules.js.map +1 -0
- package/lib/@types/another-json.d.js +0 -0
- package/lib/@types/another-json.d.js.map +1 -0
- package/lib/@types/auth.d.ts +213 -0
- package/lib/@types/auth.d.ts.map +1 -0
- package/lib/@types/auth.js +107 -0
- package/lib/@types/auth.js.map +1 -0
- package/lib/@types/beacon.d.ts +106 -0
- package/lib/@types/beacon.d.ts.map +1 -0
- package/lib/@types/beacon.js +119 -0
- package/lib/@types/beacon.js.map +1 -0
- package/lib/@types/common.d.ts +10 -0
- package/lib/@types/common.d.ts.map +1 -0
- package/lib/@types/common.js +1 -0
- package/lib/@types/common.js.map +1 -0
- package/lib/@types/crypto.d.ts +46 -0
- package/lib/@types/crypto.d.ts.map +1 -0
- package/lib/@types/crypto.js +1 -0
- package/lib/@types/crypto.js.map +1 -0
- package/lib/@types/event.d.ts +356 -0
- package/lib/@types/event.d.ts.map +1 -0
- package/lib/@types/event.js +280 -0
- package/lib/@types/event.js.map +1 -0
- package/lib/@types/events.d.ts +92 -0
- package/lib/@types/events.d.ts.map +1 -0
- package/lib/@types/events.js +1 -0
- package/lib/@types/events.js.map +1 -0
- package/lib/@types/extensible_events.d.ts +98 -0
- package/lib/@types/extensible_events.d.ts.map +1 -0
- package/lib/@types/extensible_events.js +116 -0
- package/lib/@types/extensible_events.js.map +1 -0
- package/lib/@types/global.d.js +18 -0
- package/lib/@types/global.d.js.map +1 -0
- package/lib/@types/local_notifications.d.ts +4 -0
- package/lib/@types/local_notifications.d.ts.map +1 -0
- package/lib/@types/local_notifications.js +1 -0
- package/lib/@types/local_notifications.js.map +1 -0
- package/lib/@types/location.d.ts +60 -0
- package/lib/@types/location.d.ts.map +1 -0
- package/lib/@types/location.js +66 -0
- package/lib/@types/location.js.map +1 -0
- package/lib/@types/matrix-sdk-crypto-wasm.d.js +1 -0
- package/lib/@types/matrix-sdk-crypto-wasm.d.js.map +1 -0
- package/lib/@types/media.d.ts +220 -0
- package/lib/@types/media.d.ts.map +1 -0
- package/lib/@types/media.js +1 -0
- package/lib/@types/media.js.map +1 -0
- package/lib/@types/membership.d.ts +41 -0
- package/lib/@types/membership.d.ts.map +1 -0
- package/lib/@types/membership.js +58 -0
- package/lib/@types/membership.js.map +1 -0
- package/lib/@types/partials.d.ts +72 -0
- package/lib/@types/partials.d.ts.map +1 -0
- package/lib/@types/partials.js +71 -0
- package/lib/@types/partials.js.map +1 -0
- package/lib/@types/polls.d.ts +89 -0
- package/lib/@types/polls.d.ts.map +1 -0
- package/lib/@types/polls.js +86 -0
- package/lib/@types/polls.js.map +1 -0
- package/lib/@types/read_receipts.d.ts +36 -0
- package/lib/@types/read_receipts.d.ts.map +1 -0
- package/lib/@types/read_receipts.js +27 -0
- package/lib/@types/read_receipts.js.map +1 -0
- package/lib/@types/registration.d.ts +85 -0
- package/lib/@types/registration.d.ts.map +1 -0
- package/lib/@types/registration.js +1 -0
- package/lib/@types/registration.js.map +1 -0
- package/lib/@types/requests.d.ts +267 -0
- package/lib/@types/requests.d.ts.map +1 -0
- package/lib/@types/requests.js +42 -0
- package/lib/@types/requests.js.map +1 -0
- package/lib/@types/search.d.ts +90 -0
- package/lib/@types/search.d.ts.map +1 -0
- package/lib/@types/search.js +30 -0
- package/lib/@types/search.js.map +1 -0
- package/lib/@types/signed.d.ts +9 -0
- package/lib/@types/signed.d.ts.map +1 -0
- package/lib/@types/signed.js +1 -0
- package/lib/@types/signed.js.map +1 -0
- package/lib/@types/spaces.d.ts +16 -0
- package/lib/@types/spaces.d.ts.map +1 -0
- package/lib/@types/spaces.js +1 -0
- package/lib/@types/spaces.js.map +1 -0
- package/lib/@types/state_events.d.ts +121 -0
- package/lib/@types/state_events.d.ts.map +1 -0
- package/lib/@types/state_events.js +1 -0
- package/lib/@types/state_events.js.map +1 -0
- package/lib/@types/synapse.d.ts +19 -0
- package/lib/@types/synapse.d.ts.map +1 -0
- package/lib/@types/synapse.js +1 -0
- package/lib/@types/synapse.js.map +1 -0
- package/lib/@types/sync.d.ts +8 -0
- package/lib/@types/sync.d.ts.map +1 -0
- package/lib/@types/sync.js +25 -0
- package/lib/@types/sync.js.map +1 -0
- package/lib/@types/threepids.d.ts +12 -0
- package/lib/@types/threepids.d.ts.map +1 -0
- package/lib/@types/threepids.js +24 -0
- package/lib/@types/threepids.js.map +1 -0
- package/lib/@types/topic.d.ts +55 -0
- package/lib/@types/topic.d.ts.map +1 -0
- package/lib/@types/topic.js +62 -0
- package/lib/@types/topic.js.map +1 -0
- package/lib/@types/uia.d.ts +8 -0
- package/lib/@types/uia.d.ts.map +1 -0
- package/lib/@types/uia.js +1 -0
- package/lib/@types/uia.js.map +1 -0
- package/lib/NamespacedValue.d.ts +32 -0
- package/lib/NamespacedValue.d.ts.map +1 -0
- package/lib/NamespacedValue.js +113 -0
- package/lib/NamespacedValue.js.map +1 -0
- package/lib/ReEmitter.d.ts +15 -0
- package/lib/ReEmitter.d.ts.map +1 -0
- package/lib/ReEmitter.js +87 -0
- package/lib/ReEmitter.js.map +1 -0
- package/lib/ToDeviceMessageQueue.d.ts +30 -0
- package/lib/ToDeviceMessageQueue.d.ts.map +1 -0
- package/lib/ToDeviceMessageQueue.js +135 -0
- package/lib/ToDeviceMessageQueue.js.map +1 -0
- package/lib/autodiscovery.d.ts +136 -0
- package/lib/autodiscovery.d.ts.map +1 -0
- package/lib/autodiscovery.js +464 -0
- package/lib/autodiscovery.js.map +1 -0
- package/lib/base64.d.ts +25 -0
- package/lib/base64.d.ts.map +1 -0
- package/lib/base64.js +95 -0
- package/lib/base64.js.map +1 -0
- package/lib/briij.d.ts +116 -0
- package/lib/briij.d.ts.map +1 -0
- package/lib/briij.js +145 -0
- package/lib/briij.js.map +1 -0
- package/lib/browser-index.d.ts +8 -0
- package/lib/browser-index.d.ts.map +1 -0
- package/lib/browser-index.js +35 -0
- package/lib/browser-index.js.map +1 -0
- package/lib/client.d.ts +3493 -0
- package/lib/client.d.ts.map +1 -0
- package/lib/client.js +7482 -0
- package/lib/client.js.map +1 -0
- package/lib/common-crypto/CryptoBackend.d.ts +234 -0
- package/lib/common-crypto/CryptoBackend.d.ts.map +1 -0
- package/lib/common-crypto/CryptoBackend.js +69 -0
- package/lib/common-crypto/CryptoBackend.js.map +1 -0
- package/lib/common-crypto/key-passphrase.d.ts +14 -0
- package/lib/common-crypto/key-passphrase.d.ts.map +1 -0
- package/lib/common-crypto/key-passphrase.js +33 -0
- package/lib/common-crypto/key-passphrase.js.map +1 -0
- package/lib/content-helpers.d.ts +90 -0
- package/lib/content-helpers.d.ts.map +1 -0
- package/lib/content-helpers.js +262 -0
- package/lib/content-helpers.js.map +1 -0
- package/lib/content-repo.d.ts +25 -0
- package/lib/content-repo.d.ts.map +1 -0
- package/lib/content-repo.js +109 -0
- package/lib/content-repo.js.map +1 -0
- package/lib/crypto/store/base.d.ts +301 -0
- package/lib/crypto/store/base.d.ts.map +1 -0
- package/lib/crypto/store/base.js +145 -0
- package/lib/crypto/store/base.js.map +1 -0
- package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts +94 -0
- package/lib/crypto/store/indexeddb-crypto-store-backend.d.ts.map +1 -0
- package/lib/crypto/store/indexeddb-crypto-store-backend.js +604 -0
- package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -0
- package/lib/crypto/store/indexeddb-crypto-store.d.ts +251 -0
- package/lib/crypto/store/indexeddb-crypto-store.d.ts.map +1 -0
- package/lib/crypto/store/indexeddb-crypto-store.js +477 -0
- package/lib/crypto/store/indexeddb-crypto-store.js.map +1 -0
- package/lib/crypto/store/localStorage-crypto-store.d.ts +102 -0
- package/lib/crypto/store/localStorage-crypto-store.d.ts.map +1 -0
- package/lib/crypto/store/localStorage-crypto-store.js +374 -0
- package/lib/crypto/store/localStorage-crypto-store.js.map +1 -0
- package/lib/crypto/store/memory-crypto-store.d.ts +117 -0
- package/lib/crypto/store/memory-crypto-store.d.ts.map +1 -0
- package/lib/crypto/store/memory-crypto-store.js +311 -0
- package/lib/crypto/store/memory-crypto-store.js.map +1 -0
- package/lib/crypto-api/CryptoEvent.d.ts +120 -0
- package/lib/crypto-api/CryptoEvent.d.ts.map +1 -0
- package/lib/crypto-api/CryptoEvent.js +137 -0
- package/lib/crypto-api/CryptoEvent.js.map +1 -0
- package/lib/crypto-api/CryptoEventHandlerMap.d.ts +26 -0
- package/lib/crypto-api/CryptoEventHandlerMap.d.ts.map +1 -0
- package/lib/crypto-api/CryptoEventHandlerMap.js +1 -0
- package/lib/crypto-api/CryptoEventHandlerMap.js.map +1 -0
- package/lib/crypto-api/index.d.ts +1160 -0
- package/lib/crypto-api/index.d.ts.map +1 -0
- package/lib/crypto-api/index.js +410 -0
- package/lib/crypto-api/index.js.map +1 -0
- package/lib/crypto-api/key-passphrase.d.ts +11 -0
- package/lib/crypto-api/key-passphrase.d.ts.map +1 -0
- package/lib/crypto-api/key-passphrase.js +51 -0
- package/lib/crypto-api/key-passphrase.js.map +1 -0
- package/lib/crypto-api/keybackup.d.ts +87 -0
- package/lib/crypto-api/keybackup.d.ts.map +1 -0
- package/lib/crypto-api/keybackup.js +1 -0
- package/lib/crypto-api/keybackup.js.map +1 -0
- package/lib/crypto-api/recovery-key.d.ts +11 -0
- package/lib/crypto-api/recovery-key.d.ts.map +1 -0
- package/lib/crypto-api/recovery-key.js +65 -0
- package/lib/crypto-api/recovery-key.js.map +1 -0
- package/lib/crypto-api/verification.d.ts +315 -0
- package/lib/crypto-api/verification.d.ts.map +1 -0
- package/lib/crypto-api/verification.js +130 -0
- package/lib/crypto-api/verification.js.map +1 -0
- package/lib/digest.d.ts +10 -0
- package/lib/digest.d.ts.map +1 -0
- package/lib/digest.js +40 -0
- package/lib/digest.js.map +1 -0
- package/lib/embedded.d.ts +182 -0
- package/lib/embedded.d.ts.map +1 -0
- package/lib/embedded.js +746 -0
- package/lib/embedded.js.map +1 -0
- package/lib/errors.d.ts +38 -0
- package/lib/errors.d.ts.map +1 -0
- package/lib/errors.js +73 -0
- package/lib/errors.js.map +1 -0
- package/lib/event-mapper.d.ts +9 -0
- package/lib/event-mapper.d.ts.map +1 -0
- package/lib/event-mapper.js +74 -0
- package/lib/event-mapper.js.map +1 -0
- package/lib/extensible_events_v1/ExtensibleEvent.d.ts +38 -0
- package/lib/extensible_events_v1/ExtensibleEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/ExtensibleEvent.js +57 -0
- package/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -0
- package/lib/extensible_events_v1/InvalidEventError.d.ts +7 -0
- package/lib/extensible_events_v1/InvalidEventError.d.ts.map +1 -0
- package/lib/extensible_events_v1/InvalidEventError.js +25 -0
- package/lib/extensible_events_v1/InvalidEventError.js.map +1 -0
- package/lib/extensible_events_v1/MessageEvent.d.ts +44 -0
- package/lib/extensible_events_v1/MessageEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/MessageEvent.js +134 -0
- package/lib/extensible_events_v1/MessageEvent.js.map +1 -0
- package/lib/extensible_events_v1/PollEndEvent.d.ts +33 -0
- package/lib/extensible_events_v1/PollEndEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/PollEndEvent.js +88 -0
- package/lib/extensible_events_v1/PollEndEvent.js.map +1 -0
- package/lib/extensible_events_v1/PollResponseEvent.d.ts +49 -0
- package/lib/extensible_events_v1/PollResponseEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/PollResponseEvent.js +135 -0
- package/lib/extensible_events_v1/PollResponseEvent.js.map +1 -0
- package/lib/extensible_events_v1/PollStartEvent.d.ts +71 -0
- package/lib/extensible_events_v1/PollStartEvent.d.ts.map +1 -0
- package/lib/extensible_events_v1/PollStartEvent.js +185 -0
- package/lib/extensible_events_v1/PollStartEvent.js.map +1 -0
- package/lib/extensible_events_v1/utilities.d.ts +14 -0
- package/lib/extensible_events_v1/utilities.d.ts.map +1 -0
- package/lib/extensible_events_v1/utilities.js +34 -0
- package/lib/extensible_events_v1/utilities.js.map +1 -0
- package/lib/feature.d.ts +20 -0
- package/lib/feature.d.ts.map +1 -0
- package/lib/feature.js +89 -0
- package/lib/feature.js.map +1 -0
- package/lib/filter-component.d.ts +64 -0
- package/lib/filter-component.d.ts.map +1 -0
- package/lib/filter-component.js +170 -0
- package/lib/filter-component.js.map +1 -0
- package/lib/filter.d.ts +97 -0
- package/lib/filter.d.ts.map +1 -0
- package/lib/filter.js +207 -0
- package/lib/filter.js.map +1 -0
- package/lib/http-api/errors.d.ts +117 -0
- package/lib/http-api/errors.d.ts.map +1 -0
- package/lib/http-api/errors.js +245 -0
- package/lib/http-api/errors.js.map +1 -0
- package/lib/http-api/fetch.d.ts +80 -0
- package/lib/http-api/fetch.d.ts.map +1 -0
- package/lib/http-api/fetch.js +332 -0
- package/lib/http-api/fetch.js.map +1 -0
- package/lib/http-api/index.d.ts +33 -0
- package/lib/http-api/index.d.ts.map +1 -0
- package/lib/http-api/index.js +178 -0
- package/lib/http-api/index.js.map +1 -0
- package/lib/http-api/interface.d.ts +186 -0
- package/lib/http-api/interface.d.ts.map +1 -0
- package/lib/http-api/interface.js +39 -0
- package/lib/http-api/interface.js.map +1 -0
- package/lib/http-api/method.d.ts +10 -0
- package/lib/http-api/method.d.ts.map +1 -0
- package/lib/http-api/method.js +27 -0
- package/lib/http-api/method.js.map +1 -0
- package/lib/http-api/prefix.d.ts +31 -0
- package/lib/http-api/prefix.d.ts.map +1 -0
- package/lib/http-api/prefix.js +50 -0
- package/lib/http-api/prefix.js.map +1 -0
- package/lib/http-api/refresh.d.ts +53 -0
- package/lib/http-api/refresh.d.ts.map +1 -0
- package/lib/http-api/refresh.js +174 -0
- package/lib/http-api/refresh.js.map +1 -0
- package/lib/http-api/utils.d.ts +37 -0
- package/lib/http-api/utils.d.ts.map +1 -0
- package/lib/http-api/utils.js +182 -0
- package/lib/http-api/utils.js.map +1 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.d.ts.map +1 -0
- package/lib/index.js +24 -0
- package/lib/index.js.map +1 -0
- package/lib/indexeddb-helpers.d.ts +10 -0
- package/lib/indexeddb-helpers.d.ts.map +1 -0
- package/lib/indexeddb-helpers.js +51 -0
- package/lib/indexeddb-helpers.js.map +1 -0
- package/lib/indexeddb-worker.d.ts +7 -0
- package/lib/indexeddb-worker.d.ts.map +1 -0
- package/lib/indexeddb-worker.js +25 -0
- package/lib/indexeddb-worker.js.map +1 -0
- package/lib/interactive-auth.d.ts +341 -0
- package/lib/interactive-auth.d.ts.map +1 -0
- package/lib/interactive-auth.js +563 -0
- package/lib/interactive-auth.js.map +1 -0
- package/lib/logger.d.ts +124 -0
- package/lib/logger.d.ts.map +1 -0
- package/lib/logger.js +230 -0
- package/lib/logger.js.map +1 -0
- package/lib/matrixrtc/CallMembership.d.ts +154 -0
- package/lib/matrixrtc/CallMembership.d.ts.map +1 -0
- package/lib/matrixrtc/CallMembership.js +469 -0
- package/lib/matrixrtc/CallMembership.js.map +1 -0
- package/lib/matrixrtc/EncryptionManager.d.ts +44 -0
- package/lib/matrixrtc/EncryptionManager.d.ts.map +1 -0
- package/lib/matrixrtc/EncryptionManager.js +13 -0
- package/lib/matrixrtc/EncryptionManager.js.map +1 -0
- package/lib/matrixrtc/IKeyTransport.d.ts +37 -0
- package/lib/matrixrtc/IKeyTransport.d.ts.map +1 -0
- package/lib/matrixrtc/IKeyTransport.js +27 -0
- package/lib/matrixrtc/IKeyTransport.js.map +1 -0
- package/lib/matrixrtc/IMembershipManager.d.ts +94 -0
- package/lib/matrixrtc/IMembershipManager.d.ts.map +1 -0
- package/lib/matrixrtc/IMembershipManager.js +40 -0
- package/lib/matrixrtc/IMembershipManager.js.map +1 -0
- package/lib/matrixrtc/LivekitTransport.d.ts +23 -0
- package/lib/matrixrtc/LivekitTransport.d.ts.map +1 -0
- package/lib/matrixrtc/LivekitTransport.js +29 -0
- package/lib/matrixrtc/LivekitTransport.js.map +1 -0
- package/lib/matrixrtc/MatrixRTCSession.d.ts +343 -0
- package/lib/matrixrtc/MatrixRTCSession.d.ts.map +1 -0
- package/lib/matrixrtc/MatrixRTCSession.js +623 -0
- package/lib/matrixrtc/MatrixRTCSession.js.map +1 -0
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts +46 -0
- package/lib/matrixrtc/MatrixRTCSessionManager.d.ts.map +1 -0
- package/lib/matrixrtc/MatrixRTCSessionManager.js +149 -0
- package/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -0
- package/lib/matrixrtc/MembershipManager.d.ts +210 -0
- package/lib/matrixrtc/MembershipManager.d.ts.map +1 -0
- package/lib/matrixrtc/MembershipManager.js +977 -0
- package/lib/matrixrtc/MembershipManager.js.map +1 -0
- package/lib/matrixrtc/MembershipManagerActionScheduler.d.ts +59 -0
- package/lib/matrixrtc/MembershipManagerActionScheduler.d.ts.map +1 -0
- package/lib/matrixrtc/MembershipManagerActionScheduler.js +125 -0
- package/lib/matrixrtc/MembershipManagerActionScheduler.js.map +1 -0
- package/lib/matrixrtc/RTCEncryptionManager.d.ts +110 -0
- package/lib/matrixrtc/RTCEncryptionManager.d.ts.map +1 -0
- package/lib/matrixrtc/RTCEncryptionManager.js +376 -0
- package/lib/matrixrtc/RTCEncryptionManager.js.map +1 -0
- package/lib/matrixrtc/ToDeviceKeyTransport.d.ts +30 -0
- package/lib/matrixrtc/ToDeviceKeyTransport.d.ts.map +1 -0
- package/lib/matrixrtc/ToDeviceKeyTransport.js +164 -0
- package/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -0
- package/lib/matrixrtc/index.d.ts +9 -0
- package/lib/matrixrtc/index.d.ts.map +1 -0
- package/lib/matrixrtc/index.js +23 -0
- package/lib/matrixrtc/index.js.map +1 -0
- package/lib/matrixrtc/membershipData/common.d.ts +8 -0
- package/lib/matrixrtc/membershipData/common.d.ts.map +1 -0
- package/lib/matrixrtc/membershipData/common.js +26 -0
- package/lib/matrixrtc/membershipData/common.js.map +1 -0
- package/lib/matrixrtc/membershipData/index.d.ts +4 -0
- package/lib/matrixrtc/membershipData/index.d.ts.map +1 -0
- package/lib/matrixrtc/membershipData/index.js +20 -0
- package/lib/matrixrtc/membershipData/index.js.map +1 -0
- package/lib/matrixrtc/membershipData/rtc.d.ts +33 -0
- package/lib/matrixrtc/membershipData/rtc.d.ts.map +1 -0
- package/lib/matrixrtc/membershipData/rtc.js +137 -0
- package/lib/matrixrtc/membershipData/rtc.js.map +1 -0
- package/lib/matrixrtc/membershipData/session.d.ts +77 -0
- package/lib/matrixrtc/membershipData/session.d.ts.map +1 -0
- package/lib/matrixrtc/membershipData/session.js +62 -0
- package/lib/matrixrtc/membershipData/session.js.map +1 -0
- package/lib/matrixrtc/types.d.ts +169 -0
- package/lib/matrixrtc/types.d.ts.map +1 -0
- package/lib/matrixrtc/types.js +117 -0
- package/lib/matrixrtc/types.js.map +1 -0
- package/lib/matrixrtc/utils.d.ts +27 -0
- package/lib/matrixrtc/utils.d.ts.map +1 -0
- package/lib/matrixrtc/utils.js +72 -0
- package/lib/matrixrtc/utils.js.map +1 -0
- package/lib/models/MSC3089Branch.d.ts +98 -0
- package/lib/models/MSC3089Branch.d.ts.map +1 -0
- package/lib/models/MSC3089Branch.js +240 -0
- package/lib/models/MSC3089Branch.js.map +1 -0
- package/lib/models/MSC3089TreeSpace.d.ts +166 -0
- package/lib/models/MSC3089TreeSpace.d.ts.map +1 -0
- package/lib/models/MSC3089TreeSpace.js +521 -0
- package/lib/models/MSC3089TreeSpace.js.map +1 -0
- package/lib/models/ToDeviceMessage.d.ts +17 -0
- package/lib/models/ToDeviceMessage.d.ts.map +1 -0
- package/lib/models/ToDeviceMessage.js +1 -0
- package/lib/models/ToDeviceMessage.js.map +1 -0
- package/lib/models/beacon.d.ts +52 -0
- package/lib/models/beacon.d.ts.map +1 -0
- package/lib/models/beacon.js +174 -0
- package/lib/models/beacon.js.map +1 -0
- package/lib/models/compare-event-ordering.d.ts +24 -0
- package/lib/models/compare-event-ordering.d.ts.map +1 -0
- package/lib/models/compare-event-ordering.js +120 -0
- package/lib/models/compare-event-ordering.js.map +1 -0
- package/lib/models/device.d.ts +45 -0
- package/lib/models/device.d.ts.map +1 -0
- package/lib/models/device.js +77 -0
- package/lib/models/device.js.map +1 -0
- package/lib/models/event-context.d.ts +62 -0
- package/lib/models/event-context.d.ts.map +1 -0
- package/lib/models/event-context.js +113 -0
- package/lib/models/event-context.js.map +1 -0
- package/lib/models/event-status.d.ts +19 -0
- package/lib/models/event-status.d.ts.map +1 -0
- package/lib/models/event-status.js +36 -0
- package/lib/models/event-status.js.map +1 -0
- package/lib/models/event-timeline-set.d.ts +308 -0
- package/lib/models/event-timeline-set.d.ts.map +1 -0
- package/lib/models/event-timeline-set.js +805 -0
- package/lib/models/event-timeline-set.js.map +1 -0
- package/lib/models/event-timeline.d.ts +224 -0
- package/lib/models/event-timeline.d.ts.map +1 -0
- package/lib/models/event-timeline.js +434 -0
- package/lib/models/event-timeline.js.map +1 -0
- package/lib/models/event.d.ts +844 -0
- package/lib/models/event.d.ts.map +1 -0
- package/lib/models/event.js +1600 -0
- package/lib/models/event.js.map +1 -0
- package/lib/models/invites-ignorer-types.d.ts +27 -0
- package/lib/models/invites-ignorer-types.d.ts.map +1 -0
- package/lib/models/invites-ignorer-types.js +56 -0
- package/lib/models/invites-ignorer-types.js.map +1 -0
- package/lib/models/invites-ignorer.d.ts +112 -0
- package/lib/models/invites-ignorer.d.ts.map +1 -0
- package/lib/models/invites-ignorer.js +357 -0
- package/lib/models/invites-ignorer.js.map +1 -0
- package/lib/models/poll.d.ts +67 -0
- package/lib/models/poll.d.ts.map +1 -0
- package/lib/models/poll.js +241 -0
- package/lib/models/poll.js.map +1 -0
- package/lib/models/profile-keys.d.ts +17 -0
- package/lib/models/profile-keys.d.ts.map +1 -0
- package/lib/models/profile-keys.js +34 -0
- package/lib/models/profile-keys.js.map +1 -0
- package/lib/models/read-receipt.d.ts +115 -0
- package/lib/models/read-receipt.d.ts.map +1 -0
- package/lib/models/read-receipt.js +366 -0
- package/lib/models/read-receipt.js.map +1 -0
- package/lib/models/related-relations.d.ts +11 -0
- package/lib/models/related-relations.d.ts.map +1 -0
- package/lib/models/related-relations.js +33 -0
- package/lib/models/related-relations.js.map +1 -0
- package/lib/models/relations-container.d.ts +44 -0
- package/lib/models/relations-container.d.ts.map +1 -0
- package/lib/models/relations-container.js +132 -0
- package/lib/models/relations-container.js.map +1 -0
- package/lib/models/relations.d.ts +123 -0
- package/lib/models/relations.d.ts.map +1 -0
- package/lib/models/relations.js +378 -0
- package/lib/models/relations.js.map +1 -0
- package/lib/models/room-member.d.ts +221 -0
- package/lib/models/room-member.d.ts.map +1 -0
- package/lib/models/room-member.js +376 -0
- package/lib/models/room-member.js.map +1 -0
- package/lib/models/room-receipts.d.ts +39 -0
- package/lib/models/room-receipts.d.ts.map +1 -0
- package/lib/models/room-receipts.js +392 -0
- package/lib/models/room-receipts.js.map +1 -0
- package/lib/models/room-state.d.ts +463 -0
- package/lib/models/room-state.d.ts.map +1 -0
- package/lib/models/room-state.js +1066 -0
- package/lib/models/room-state.js.map +1 -0
- package/lib/models/room-sticky-events.d.ts +110 -0
- package/lib/models/room-sticky-events.d.ts.map +1 -0
- package/lib/models/room-sticky-events.js +353 -0
- package/lib/models/room-sticky-events.js.map +1 -0
- package/lib/models/room-summary.d.ts +59 -0
- package/lib/models/room-summary.d.ts.map +1 -0
- package/lib/models/room-summary.js +39 -0
- package/lib/models/room-summary.js.map +1 -0
- package/lib/models/room.d.ts +1285 -0
- package/lib/models/room.d.ts.map +1 -0
- package/lib/models/room.js +3548 -0
- package/lib/models/room.js.map +1 -0
- package/lib/models/search-result.d.ts +20 -0
- package/lib/models/search-result.d.ts.map +1 -0
- package/lib/models/search-result.js +52 -0
- package/lib/models/search-result.js.map +1 -0
- package/lib/models/thread.d.ts +245 -0
- package/lib/models/thread.d.ts.map +1 -0
- package/lib/models/thread.js +866 -0
- package/lib/models/thread.js.map +1 -0
- package/lib/models/typed-event-emitter.d.ts +157 -0
- package/lib/models/typed-event-emitter.d.ts.map +1 -0
- package/lib/models/typed-event-emitter.js +227 -0
- package/lib/models/typed-event-emitter.js.map +1 -0
- package/lib/models/user.d.ts +195 -0
- package/lib/models/user.d.ts.map +1 -0
- package/lib/models/user.js +218 -0
- package/lib/models/user.js.map +1 -0
- package/lib/oidc/authorize.d.ts +93 -0
- package/lib/oidc/authorize.d.ts.map +1 -0
- package/lib/oidc/authorize.js +282 -0
- package/lib/oidc/authorize.js.map +1 -0
- package/lib/oidc/discovery.d.ts +22 -0
- package/lib/oidc/discovery.d.ts.map +1 -0
- package/lib/oidc/discovery.js +78 -0
- package/lib/oidc/discovery.js.map +1 -0
- package/lib/oidc/error.d.ts +18 -0
- package/lib/oidc/error.d.ts.map +1 -0
- package/lib/oidc/error.js +35 -0
- package/lib/oidc/error.js.map +1 -0
- package/lib/oidc/index.d.ts +16 -0
- package/lib/oidc/index.d.ts.map +1 -0
- package/lib/oidc/index.js +29 -0
- package/lib/oidc/index.js.map +1 -0
- package/lib/oidc/register.d.ts +70 -0
- package/lib/oidc/register.d.ts.map +1 -0
- package/lib/oidc/register.js +135 -0
- package/lib/oidc/register.js.map +1 -0
- package/lib/oidc/tokenRefresher.d.ts +91 -0
- package/lib/oidc/tokenRefresher.d.ts.map +1 -0
- package/lib/oidc/tokenRefresher.js +187 -0
- package/lib/oidc/tokenRefresher.js.map +1 -0
- package/lib/oidc/validate.d.ts +78 -0
- package/lib/oidc/validate.d.ts.map +1 -0
- package/lib/oidc/validate.js +181 -0
- package/lib/oidc/validate.js.map +1 -0
- package/lib/pushprocessor.d.ts +140 -0
- package/lib/pushprocessor.d.ts.map +1 -0
- package/lib/pushprocessor.js +702 -0
- package/lib/pushprocessor.js.map +1 -0
- package/lib/randomstring.d.ts +32 -0
- package/lib/randomstring.d.ts.map +1 -0
- package/lib/randomstring.js +97 -0
- package/lib/randomstring.js.map +1 -0
- package/lib/realtime-callbacks.d.ts +18 -0
- package/lib/realtime-callbacks.d.ts.map +1 -0
- package/lib/realtime-callbacks.js +177 -0
- package/lib/realtime-callbacks.js.map +1 -0
- package/lib/receipt-accumulator.d.ts +51 -0
- package/lib/receipt-accumulator.d.ts.map +1 -0
- package/lib/receipt-accumulator.js +164 -0
- package/lib/receipt-accumulator.js.map +1 -0
- package/lib/rendezvous/MSC4108SignInWithQR.d.ts +112 -0
- package/lib/rendezvous/MSC4108SignInWithQR.d.ts.map +1 -0
- package/lib/rendezvous/MSC4108SignInWithQR.js +389 -0
- package/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -0
- package/lib/rendezvous/RendezvousChannel.d.ts +27 -0
- package/lib/rendezvous/RendezvousChannel.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousChannel.js +1 -0
- package/lib/rendezvous/RendezvousChannel.js.map +1 -0
- package/lib/rendezvous/RendezvousCode.d.ts +9 -0
- package/lib/rendezvous/RendezvousCode.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousCode.js +1 -0
- package/lib/rendezvous/RendezvousCode.js.map +1 -0
- package/lib/rendezvous/RendezvousError.d.ts +6 -0
- package/lib/rendezvous/RendezvousError.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousError.js +23 -0
- package/lib/rendezvous/RendezvousError.js.map +1 -0
- package/lib/rendezvous/RendezvousFailureReason.d.ts +31 -0
- package/lib/rendezvous/RendezvousFailureReason.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousFailureReason.js +47 -0
- package/lib/rendezvous/RendezvousFailureReason.js.map +1 -0
- package/lib/rendezvous/RendezvousIntent.d.ts +5 -0
- package/lib/rendezvous/RendezvousIntent.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousIntent.js +22 -0
- package/lib/rendezvous/RendezvousIntent.js.map +1 -0
- package/lib/rendezvous/RendezvousTransport.d.ts +36 -0
- package/lib/rendezvous/RendezvousTransport.d.ts.map +1 -0
- package/lib/rendezvous/RendezvousTransport.js +1 -0
- package/lib/rendezvous/RendezvousTransport.js.map +1 -0
- package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts +58 -0
- package/lib/rendezvous/channels/MSC4108SecureChannel.d.ts.map +1 -0
- package/lib/rendezvous/channels/MSC4108SecureChannel.js +246 -0
- package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -0
- package/lib/rendezvous/channels/index.d.ts +2 -0
- package/lib/rendezvous/channels/index.d.ts.map +1 -0
- package/lib/rendezvous/channels/index.js +18 -0
- package/lib/rendezvous/channels/index.js.map +1 -0
- package/lib/rendezvous/index.d.ts +10 -0
- package/lib/rendezvous/index.d.ts.map +1 -0
- package/lib/rendezvous/index.js +23 -0
- package/lib/rendezvous/index.js.map +1 -0
- package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +61 -0
- package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts.map +1 -0
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js +254 -0
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -0
- package/lib/rendezvous/transports/index.d.ts +2 -0
- package/lib/rendezvous/transports/index.d.ts.map +1 -0
- package/lib/rendezvous/transports/index.js +18 -0
- package/lib/rendezvous/transports/index.js.map +1 -0
- package/lib/room-hierarchy.d.ts +35 -0
- package/lib/room-hierarchy.d.ts.map +1 -0
- package/lib/room-hierarchy.js +136 -0
- package/lib/room-hierarchy.js.map +1 -0
- package/lib/rust-crypto/CrossSigningIdentity.d.ts +35 -0
- package/lib/rust-crypto/CrossSigningIdentity.d.ts.map +1 -0
- package/lib/rust-crypto/CrossSigningIdentity.js +163 -0
- package/lib/rust-crypto/CrossSigningIdentity.js.map +1 -0
- package/lib/rust-crypto/DehydratedDeviceManager.d.ts +118 -0
- package/lib/rust-crypto/DehydratedDeviceManager.d.ts.map +1 -0
- package/lib/rust-crypto/DehydratedDeviceManager.js +361 -0
- package/lib/rust-crypto/DehydratedDeviceManager.js.map +1 -0
- package/lib/rust-crypto/KeyClaimManager.d.ts +33 -0
- package/lib/rust-crypto/KeyClaimManager.d.ts.map +1 -0
- package/lib/rust-crypto/KeyClaimManager.js +82 -0
- package/lib/rust-crypto/KeyClaimManager.js.map +1 -0
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts +36 -0
- package/lib/rust-crypto/OutgoingRequestProcessor.d.ts.map +1 -0
- package/lib/rust-crypto/OutgoingRequestProcessor.js +194 -0
- package/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -0
- package/lib/rust-crypto/OutgoingRequestsManager.d.ts +47 -0
- package/lib/rust-crypto/OutgoingRequestsManager.d.ts.map +1 -0
- package/lib/rust-crypto/OutgoingRequestsManager.js +175 -0
- package/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -0
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +120 -0
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts.map +1 -0
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +469 -0
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -0
- package/lib/rust-crypto/RoomEncryptor.d.ts +100 -0
- package/lib/rust-crypto/RoomEncryptor.d.ts.map +1 -0
- package/lib/rust-crypto/RoomEncryptor.js +308 -0
- package/lib/rust-crypto/RoomEncryptor.js.map +1 -0
- package/lib/rust-crypto/backup.d.ts +278 -0
- package/lib/rust-crypto/backup.d.ts.map +1 -0
- package/lib/rust-crypto/backup.js +898 -0
- package/lib/rust-crypto/backup.js.map +1 -0
- package/lib/rust-crypto/constants.d.ts +3 -0
- package/lib/rust-crypto/constants.d.ts.map +1 -0
- package/lib/rust-crypto/constants.js +19 -0
- package/lib/rust-crypto/constants.js.map +1 -0
- package/lib/rust-crypto/device-converter.d.ts +28 -0
- package/lib/rust-crypto/device-converter.d.ts.map +1 -0
- package/lib/rust-crypto/device-converter.js +123 -0
- package/lib/rust-crypto/device-converter.js.map +1 -0
- package/lib/rust-crypto/index.d.ts +65 -0
- package/lib/rust-crypto/index.d.ts.map +1 -0
- package/lib/rust-crypto/index.js +149 -0
- package/lib/rust-crypto/index.js.map +1 -0
- package/lib/rust-crypto/libolm_migration.d.ts +81 -0
- package/lib/rust-crypto/libolm_migration.d.ts.map +1 -0
- package/lib/rust-crypto/libolm_migration.js +456 -0
- package/lib/rust-crypto/libolm_migration.js.map +1 -0
- package/lib/rust-crypto/rust-crypto.d.ts +576 -0
- package/lib/rust-crypto/rust-crypto.d.ts.map +1 -0
- package/lib/rust-crypto/rust-crypto.js +2324 -0
- package/lib/rust-crypto/rust-crypto.js.map +1 -0
- package/lib/rust-crypto/secret-storage.d.ts +22 -0
- package/lib/rust-crypto/secret-storage.d.ts.map +1 -0
- package/lib/rust-crypto/secret-storage.js +63 -0
- package/lib/rust-crypto/secret-storage.js.map +1 -0
- package/lib/rust-crypto/verification.d.ts +321 -0
- package/lib/rust-crypto/verification.d.ts.map +1 -0
- package/lib/rust-crypto/verification.js +817 -0
- package/lib/rust-crypto/verification.js.map +1 -0
- package/lib/scheduler.d.ts +132 -0
- package/lib/scheduler.d.ts.map +1 -0
- package/lib/scheduler.js +259 -0
- package/lib/scheduler.js.map +1 -0
- package/lib/secret-storage.d.ts +383 -0
- package/lib/secret-storage.d.ts.map +1 -0
- package/lib/secret-storage.js +487 -0
- package/lib/secret-storage.js.map +1 -0
- package/lib/serverCapabilities.d.ts +78 -0
- package/lib/serverCapabilities.d.ts.map +1 -0
- package/lib/serverCapabilities.js +104 -0
- package/lib/serverCapabilities.js.map +1 -0
- package/lib/service-types.d.ts +5 -0
- package/lib/service-types.d.ts.map +1 -0
- package/lib/service-types.js +23 -0
- package/lib/service-types.js.map +1 -0
- package/lib/sliding-sync-sdk.d.ts +107 -0
- package/lib/sliding-sync-sdk.d.ts.map +1 -0
- package/lib/sliding-sync-sdk.js +892 -0
- package/lib/sliding-sync-sdk.js.map +1 -0
- package/lib/sliding-sync.d.ts +306 -0
- package/lib/sliding-sync.d.ts.map +1 -0
- package/lib/sliding-sync.js +585 -0
- package/lib/sliding-sync.js.map +1 -0
- package/lib/store/index.d.ts +201 -0
- package/lib/store/index.d.ts.map +1 -0
- package/lib/store/index.js +1 -0
- package/lib/store/index.js.map +1 -0
- package/lib/store/indexeddb-backend.d.ts +24 -0
- package/lib/store/indexeddb-backend.d.ts.map +1 -0
- package/lib/store/indexeddb-backend.js +1 -0
- package/lib/store/indexeddb-backend.js.map +1 -0
- package/lib/store/indexeddb-local-backend.d.ts +129 -0
- package/lib/store/indexeddb-local-backend.d.ts.map +1 -0
- package/lib/store/indexeddb-local-backend.js +599 -0
- package/lib/store/indexeddb-local-backend.js.map +1 -0
- package/lib/store/indexeddb-remote-backend.d.ts +79 -0
- package/lib/store/indexeddb-remote-backend.d.ts.map +1 -0
- package/lib/store/indexeddb-remote-backend.js +209 -0
- package/lib/store/indexeddb-remote-backend.js.map +1 -0
- package/lib/store/indexeddb-store-worker.d.ts +35 -0
- package/lib/store/indexeddb-store-worker.d.ts.map +1 -0
- package/lib/store/indexeddb-store-worker.js +146 -0
- package/lib/store/indexeddb-store-worker.js.map +1 -0
- package/lib/store/indexeddb.d.ts +142 -0
- package/lib/store/indexeddb.d.ts.map +1 -0
- package/lib/store/indexeddb.js +347 -0
- package/lib/store/indexeddb.js.map +1 -0
- package/lib/store/local-storage-events-emitter.d.ts +30 -0
- package/lib/store/local-storage-events-emitter.d.ts.map +1 -0
- package/lib/store/local-storage-events-emitter.js +37 -0
- package/lib/store/local-storage-events-emitter.js.map +1 -0
- package/lib/store/memory.d.ts +209 -0
- package/lib/store/memory.d.ts.map +1 -0
- package/lib/store/memory.js +432 -0
- package/lib/store/memory.js.map +1 -0
- package/lib/store/stub.d.ts +161 -0
- package/lib/store/stub.d.ts.map +1 -0
- package/lib/store/stub.js +268 -0
- package/lib/store/stub.js.map +1 -0
- package/lib/sync-accumulator.d.ts +207 -0
- package/lib/sync-accumulator.d.ts.map +1 -0
- package/lib/sync-accumulator.js +588 -0
- package/lib/sync-accumulator.js.map +1 -0
- package/lib/sync.d.ts +273 -0
- package/lib/sync.d.ts.map +1 -0
- package/lib/sync.js +1764 -0
- package/lib/sync.js.map +1 -0
- package/lib/testing.d.ts +98 -0
- package/lib/testing.d.ts.map +1 -0
- package/lib/testing.js +205 -0
- package/lib/testing.js.map +1 -0
- package/lib/thread-utils.d.ts +10 -0
- package/lib/thread-utils.d.ts.map +1 -0
- package/lib/thread-utils.js +31 -0
- package/lib/thread-utils.js.map +1 -0
- package/lib/timeline-window.d.ts +168 -0
- package/lib/timeline-window.d.ts.map +1 -0
- package/lib/timeline-window.js +494 -0
- package/lib/timeline-window.js.map +1 -0
- package/lib/types.d.ts +33 -0
- package/lib/types.d.ts.map +1 -0
- package/lib/types.js +52 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/decryptAESSecretStorageItem.d.ts +12 -0
- package/lib/utils/decryptAESSecretStorageItem.d.ts.map +1 -0
- package/lib/utils/decryptAESSecretStorageItem.js +50 -0
- package/lib/utils/decryptAESSecretStorageItem.js.map +1 -0
- package/lib/utils/encryptAESSecretStorageItem.d.ts +16 -0
- package/lib/utils/encryptAESSecretStorageItem.d.ts.map +1 -0
- package/lib/utils/encryptAESSecretStorageItem.js +68 -0
- package/lib/utils/encryptAESSecretStorageItem.js.map +1 -0
- package/lib/utils/internal/deriveKeys.d.ts +10 -0
- package/lib/utils/internal/deriveKeys.d.ts.map +1 -0
- package/lib/utils/internal/deriveKeys.js +60 -0
- package/lib/utils/internal/deriveKeys.js.map +1 -0
- package/lib/utils/roomVersion.d.ts +13 -0
- package/lib/utils/roomVersion.d.ts.map +1 -0
- package/lib/utils/roomVersion.js +36 -0
- package/lib/utils/roomVersion.js.map +1 -0
- package/lib/utils.d.ts +270 -0
- package/lib/utils.d.ts.map +1 -0
- package/lib/utils.js +764 -0
- package/lib/utils.js.map +1 -0
- package/lib/version-support.d.ts +19 -0
- package/lib/version-support.d.ts.map +1 -0
- package/lib/version-support.js +37 -0
- package/lib/version-support.js.map +1 -0
- package/lib/webrtc/audioContext.d.ts +15 -0
- package/lib/webrtc/audioContext.d.ts.map +1 -0
- package/lib/webrtc/audioContext.js +46 -0
- package/lib/webrtc/audioContext.js.map +1 -0
- package/lib/webrtc/call.d.ts +560 -0
- package/lib/webrtc/call.d.ts.map +1 -0
- package/lib/webrtc/call.js +2596 -0
- package/lib/webrtc/call.js.map +1 -0
- package/lib/webrtc/callEventHandler.d.ts +37 -0
- package/lib/webrtc/callEventHandler.d.ts.map +1 -0
- package/lib/webrtc/callEventHandler.js +344 -0
- package/lib/webrtc/callEventHandler.js.map +1 -0
- package/lib/webrtc/callEventTypes.d.ts +79 -0
- package/lib/webrtc/callEventTypes.d.ts.map +1 -0
- package/lib/webrtc/callEventTypes.js +13 -0
- package/lib/webrtc/callEventTypes.js.map +1 -0
- package/lib/webrtc/callFeed.d.ts +128 -0
- package/lib/webrtc/callFeed.d.ts.map +1 -0
- package/lib/webrtc/callFeed.js +289 -0
- package/lib/webrtc/callFeed.js.map +1 -0
- package/lib/webrtc/groupCall.d.ts +319 -0
- package/lib/webrtc/groupCall.d.ts.map +1 -0
- package/lib/webrtc/groupCall.js +1334 -0
- package/lib/webrtc/groupCall.js.map +1 -0
- package/lib/webrtc/groupCallEventHandler.d.ts +31 -0
- package/lib/webrtc/groupCallEventHandler.d.ts.map +1 -0
- package/lib/webrtc/groupCallEventHandler.js +178 -0
- package/lib/webrtc/groupCallEventHandler.js.map +1 -0
- package/lib/webrtc/mediaHandler.d.ts +89 -0
- package/lib/webrtc/mediaHandler.d.ts.map +1 -0
- package/lib/webrtc/mediaHandler.js +454 -0
- package/lib/webrtc/mediaHandler.js.map +1 -0
- package/lib/webrtc/stats/callFeedStatsReporter.d.ts +8 -0
- package/lib/webrtc/stats/callFeedStatsReporter.d.ts.map +1 -0
- package/lib/webrtc/stats/callFeedStatsReporter.js +79 -0
- package/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -0
- package/lib/webrtc/stats/callStatsReportGatherer.d.ts +25 -0
- package/lib/webrtc/stats/callStatsReportGatherer.d.ts.map +1 -0
- package/lib/webrtc/stats/callStatsReportGatherer.js +199 -0
- package/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -0
- package/lib/webrtc/stats/callStatsReportSummary.d.ts +17 -0
- package/lib/webrtc/stats/callStatsReportSummary.d.ts.map +1 -0
- package/lib/webrtc/stats/callStatsReportSummary.js +1 -0
- package/lib/webrtc/stats/callStatsReportSummary.js.map +1 -0
- package/lib/webrtc/stats/connectionStats.d.ts +28 -0
- package/lib/webrtc/stats/connectionStats.d.ts.map +1 -0
- package/lib/webrtc/stats/connectionStats.js +26 -0
- package/lib/webrtc/stats/connectionStats.js.map +1 -0
- package/lib/webrtc/stats/connectionStatsBuilder.d.ts +5 -0
- package/lib/webrtc/stats/connectionStatsBuilder.d.ts.map +1 -0
- package/lib/webrtc/stats/connectionStatsBuilder.js +27 -0
- package/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -0
- package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts +7 -0
- package/lib/webrtc/stats/connectionStatsReportBuilder.d.ts.map +1 -0
- package/lib/webrtc/stats/connectionStatsReportBuilder.js +121 -0
- package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -0
- package/lib/webrtc/stats/groupCallStats.d.ts +22 -0
- package/lib/webrtc/stats/groupCallStats.d.ts.map +1 -0
- package/lib/webrtc/stats/groupCallStats.js +78 -0
- package/lib/webrtc/stats/groupCallStats.js.map +1 -0
- package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts +10 -0
- package/lib/webrtc/stats/media/mediaSsrcHandler.d.ts.map +1 -0
- package/lib/webrtc/stats/media/mediaSsrcHandler.js +57 -0
- package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackHandler.d.ts +12 -0
- package/lib/webrtc/stats/media/mediaTrackHandler.d.ts.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackHandler.js +58 -0
- package/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackStats.d.ts +86 -0
- package/lib/webrtc/stats/media/mediaTrackStats.d.ts.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackStats.js +142 -0
- package/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts +22 -0
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.d.ts.map +1 -0
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +76 -0
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -0
- package/lib/webrtc/stats/statsReport.d.ts +99 -0
- package/lib/webrtc/stats/statsReport.d.ts.map +1 -0
- package/lib/webrtc/stats/statsReport.js +32 -0
- package/lib/webrtc/stats/statsReport.js.map +1 -0
- package/lib/webrtc/stats/statsReportEmitter.d.ts +15 -0
- package/lib/webrtc/stats/statsReportEmitter.d.ts.map +1 -0
- package/lib/webrtc/stats/statsReportEmitter.js +33 -0
- package/lib/webrtc/stats/statsReportEmitter.js.map +1 -0
- package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts +16 -0
- package/lib/webrtc/stats/summaryStatsReportGatherer.d.ts.map +1 -0
- package/lib/webrtc/stats/summaryStatsReportGatherer.js +116 -0
- package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +1 -0
- package/lib/webrtc/stats/trackStatsBuilder.d.ts +19 -0
- package/lib/webrtc/stats/trackStatsBuilder.d.ts.map +1 -0
- package/lib/webrtc/stats/trackStatsBuilder.js +168 -0
- package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -0
- package/lib/webrtc/stats/transportStats.d.ts +11 -0
- package/lib/webrtc/stats/transportStats.d.ts.map +1 -0
- package/lib/webrtc/stats/transportStats.js +1 -0
- package/lib/webrtc/stats/transportStats.js.map +1 -0
- package/lib/webrtc/stats/transportStatsBuilder.d.ts +5 -0
- package/lib/webrtc/stats/transportStatsBuilder.d.ts.map +1 -0
- package/lib/webrtc/stats/transportStatsBuilder.js +34 -0
- package/lib/webrtc/stats/transportStatsBuilder.js.map +1 -0
- package/lib/webrtc/stats/valueFormatter.d.ts +4 -0
- package/lib/webrtc/stats/valueFormatter.d.ts.map +1 -0
- package/lib/webrtc/stats/valueFormatter.js +25 -0
- package/lib/webrtc/stats/valueFormatter.js.map +1 -0
- package/package.json +129 -0
- package/src/@types/AESEncryptedSecretStoragePayload.ts +29 -0
- package/src/@types/IIdentityServerProvider.ts +24 -0
- package/src/@types/PushRules.ts +208 -0
- package/src/@types/another-json.d.ts +19 -0
- package/src/@types/auth.ts +258 -0
- package/src/@types/beacon.ts +140 -0
- package/src/@types/common.ts +24 -0
- package/src/@types/crypto.ts +71 -0
- package/src/@types/event.ts +449 -0
- package/src/@types/events.ts +119 -0
- package/src/@types/extensible_events.ts +147 -0
- package/src/@types/global.d.ts +67 -0
- package/src/@types/local_notifications.ts +19 -0
- package/src/@types/location.ts +92 -0
- package/src/@types/matrix-sdk-crypto-wasm.d.ts +39 -0
- package/src/@types/media.ts +245 -0
- package/src/@types/membership.ts +57 -0
- package/src/@types/partials.ts +103 -0
- package/src/@types/polls.ts +120 -0
- package/src/@types/read_receipts.ts +61 -0
- package/src/@types/registration.ts +102 -0
- package/src/@types/requests.ts +346 -0
- package/src/@types/search.ts +119 -0
- package/src/@types/signed.ts +25 -0
- package/src/@types/spaces.ts +37 -0
- package/src/@types/state_events.ts +153 -0
- package/src/@types/synapse.ts +40 -0
- package/src/@types/sync.ts +27 -0
- package/src/@types/threepids.ts +29 -0
- package/src/@types/topic.ts +69 -0
- package/src/@types/uia.ts +24 -0
- package/src/NamespacedValue.ts +121 -0
- package/src/ReEmitter.ts +93 -0
- package/src/ToDeviceMessageQueue.ts +156 -0
- package/src/autodiscovery.ts +505 -0
- package/src/base64.ts +86 -0
- package/src/briij.ts +173 -0
- package/src/browser-index.ts +44 -0
- package/src/client.ts +9031 -0
- package/src/common-crypto/CryptoBackend.ts +295 -0
- package/src/common-crypto/README.md +4 -0
- package/src/common-crypto/key-passphrase.ts +43 -0
- package/src/content-helpers.ts +298 -0
- package/src/content-repo.ts +122 -0
- package/src/crypto/store/base.ts +388 -0
- package/src/crypto/store/indexeddb-crypto-store-backend.ts +655 -0
- package/src/crypto/store/indexeddb-crypto-store.ts +555 -0
- package/src/crypto/store/localStorage-crypto-store.ts +409 -0
- package/src/crypto/store/memory-crypto-store.ts +326 -0
- package/src/crypto-api/CryptoEvent.ts +152 -0
- package/src/crypto-api/CryptoEventHandlerMap.ts +42 -0
- package/src/crypto-api/index.ts +1362 -0
- package/src/crypto-api/key-passphrase.ts +58 -0
- package/src/crypto-api/keybackup.ts +114 -0
- package/src/crypto-api/recovery-key.ts +69 -0
- package/src/crypto-api/verification.ts +382 -0
- package/src/digest.ts +34 -0
- package/src/embedded.ts +865 -0
- package/src/errors.ts +87 -0
- package/src/event-mapper.ts +88 -0
- package/src/extensible_events_v1/ExtensibleEvent.ts +58 -0
- package/src/extensible_events_v1/InvalidEventError.ts +24 -0
- package/src/extensible_events_v1/MessageEvent.ts +143 -0
- package/src/extensible_events_v1/PollEndEvent.ts +97 -0
- package/src/extensible_events_v1/PollResponseEvent.ts +148 -0
- package/src/extensible_events_v1/PollStartEvent.ts +207 -0
- package/src/extensible_events_v1/utilities.ts +35 -0
- package/src/feature.ts +88 -0
- package/src/filter-component.ts +209 -0
- package/src/filter.ts +245 -0
- package/src/http-api/errors.ts +261 -0
- package/src/http-api/fetch.ts +377 -0
- package/src/http-api/index.ts +194 -0
- package/src/http-api/interface.ts +229 -0
- package/src/http-api/method.ts +25 -0
- package/src/http-api/prefix.ts +48 -0
- package/src/http-api/refresh.ts +167 -0
- package/src/http-api/utils.ts +217 -0
- package/src/index.ts +25 -0
- package/src/indexeddb-helpers.ts +50 -0
- package/src/indexeddb-worker.ts +24 -0
- package/src/interactive-auth.ts +700 -0
- package/src/logger.ts +279 -0
- package/src/matrixrtc/CallMembership.ts +438 -0
- package/src/matrixrtc/EncryptionManager.ts +54 -0
- package/src/matrixrtc/IKeyTransport.ts +63 -0
- package/src/matrixrtc/IMembershipManager.ts +120 -0
- package/src/matrixrtc/LivekitTransport.ts +46 -0
- package/src/matrixrtc/MatrixRTCSession.ts +934 -0
- package/src/matrixrtc/MatrixRTCSessionManager.ts +170 -0
- package/src/matrixrtc/MembershipManager.ts +1122 -0
- package/src/matrixrtc/MembershipManagerActionScheduler.ts +135 -0
- package/src/matrixrtc/RTCEncryptionManager.ts +459 -0
- package/src/matrixrtc/ToDeviceKeyTransport.ts +197 -0
- package/src/matrixrtc/index.ts +24 -0
- package/src/matrixrtc/membershipData/common.ts +27 -0
- package/src/matrixrtc/membershipData/index.ts +19 -0
- package/src/matrixrtc/membershipData/rtc.ts +156 -0
- package/src/matrixrtc/membershipData/session.ts +146 -0
- package/src/matrixrtc/types.ts +227 -0
- package/src/matrixrtc/utils.ts +71 -0
- package/src/models/MSC3089Branch.ts +272 -0
- package/src/models/MSC3089TreeSpace.ts +565 -0
- package/src/models/ToDeviceMessage.ts +38 -0
- package/src/models/beacon.ts +213 -0
- package/src/models/compare-event-ordering.ts +139 -0
- package/src/models/device.ts +85 -0
- package/src/models/event-context.ts +110 -0
- package/src/models/event-status.ts +39 -0
- package/src/models/event-timeline-set.ts +962 -0
- package/src/models/event-timeline.ts +461 -0
- package/src/models/event.ts +1819 -0
- package/src/models/invites-ignorer-types.ts +58 -0
- package/src/models/invites-ignorer.ts +341 -0
- package/src/models/poll.ts +285 -0
- package/src/models/profile-keys.ts +33 -0
- package/src/models/read-receipt.ts +422 -0
- package/src/models/related-relations.ts +39 -0
- package/src/models/relations-container.ts +149 -0
- package/src/models/relations.ts +392 -0
- package/src/models/room-member.ts +486 -0
- package/src/models/room-receipts.ts +439 -0
- package/src/models/room-state.ts +1230 -0
- package/src/models/room-sticky-events.ts +383 -0
- package/src/models/room-summary.ts +78 -0
- package/src/models/room.ts +4067 -0
- package/src/models/search-result.ts +57 -0
- package/src/models/thread.ts +928 -0
- package/src/models/typed-event-emitter.ts +246 -0
- package/src/models/user.ts +302 -0
- package/src/oidc/authorize.ts +279 -0
- package/src/oidc/discovery.ts +67 -0
- package/src/oidc/error.ts +33 -0
- package/src/oidc/index.ts +33 -0
- package/src/oidc/register.ts +163 -0
- package/src/oidc/tokenRefresher.ts +184 -0
- package/src/oidc/validate.ts +265 -0
- package/src/pushprocessor.ts +856 -0
- package/src/randomstring.ts +103 -0
- package/src/realtime-callbacks.ts +191 -0
- package/src/receipt-accumulator.ts +189 -0
- package/src/rendezvous/MSC4108SignInWithQR.ts +443 -0
- package/src/rendezvous/RendezvousChannel.ts +48 -0
- package/src/rendezvous/RendezvousCode.ts +25 -0
- package/src/rendezvous/RendezvousError.ts +26 -0
- package/src/rendezvous/RendezvousFailureReason.ts +49 -0
- package/src/rendezvous/RendezvousIntent.ts +20 -0
- package/src/rendezvous/RendezvousTransport.ts +58 -0
- package/src/rendezvous/channels/MSC4108SecureChannel.ts +270 -0
- package/src/rendezvous/channels/index.ts +17 -0
- package/src/rendezvous/index.ts +25 -0
- package/src/rendezvous/transports/MSC4108RendezvousSession.ts +272 -0
- package/src/rendezvous/transports/index.ts +17 -0
- package/src/room-hierarchy.ts +152 -0
- package/src/rust-crypto/CrossSigningIdentity.ts +195 -0
- package/src/rust-crypto/DehydratedDeviceManager.ts +392 -0
- package/src/rust-crypto/KeyClaimManager.ts +86 -0
- package/src/rust-crypto/OutgoingRequestProcessor.ts +233 -0
- package/src/rust-crypto/OutgoingRequestsManager.ts +170 -0
- package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +501 -0
- package/src/rust-crypto/RoomEncryptor.ts +362 -0
- package/src/rust-crypto/backup.ts +942 -0
- package/src/rust-crypto/constants.ts +18 -0
- package/src/rust-crypto/device-converter.ts +128 -0
- package/src/rust-crypto/index.ts +251 -0
- package/src/rust-crypto/libolm_migration.ts +532 -0
- package/src/rust-crypto/rust-crypto.ts +2542 -0
- package/src/rust-crypto/secret-storage.ts +60 -0
- package/src/rust-crypto/verification.ts +833 -0
- package/src/scheduler.ts +309 -0
- package/src/secret-storage.ts +714 -0
- package/src/serverCapabilities.ts +146 -0
- package/src/service-types.ts +20 -0
- package/src/sliding-sync-sdk.ts +1005 -0
- package/src/sliding-sync.ts +674 -0
- package/src/store/index.ts +261 -0
- package/src/store/indexeddb-backend.ts +41 -0
- package/src/store/indexeddb-local-backend.ts +610 -0
- package/src/store/indexeddb-remote-backend.ts +212 -0
- package/src/store/indexeddb-store-worker.ts +157 -0
- package/src/store/indexeddb.ts +397 -0
- package/src/store/local-storage-events-emitter.ts +46 -0
- package/src/store/memory.ts +448 -0
- package/src/store/stub.ts +280 -0
- package/src/sync-accumulator.ts +779 -0
- package/src/sync.ts +2020 -0
- package/src/testing.ts +231 -0
- package/src/thread-utils.ts +31 -0
- package/src/timeline-window.ts +534 -0
- package/src/types.ts +59 -0
- package/src/utils/decryptAESSecretStorageItem.ts +54 -0
- package/src/utils/encryptAESSecretStorageItem.ts +73 -0
- package/src/utils/internal/deriveKeys.ts +63 -0
- package/src/utils/roomVersion.ts +35 -0
- package/src/utils.ts +775 -0
- package/src/version-support.ts +50 -0
- package/src/webrtc/audioContext.ts +44 -0
- package/src/webrtc/call.ts +3061 -0
- package/src/webrtc/callEventHandler.ts +425 -0
- package/src/webrtc/callEventTypes.ts +101 -0
- package/src/webrtc/callFeed.ts +364 -0
- package/src/webrtc/groupCall.ts +1729 -0
- package/src/webrtc/groupCallEventHandler.ts +234 -0
- package/src/webrtc/mediaHandler.ts +501 -0
- package/src/webrtc/stats/callFeedStatsReporter.ts +91 -0
- package/src/webrtc/stats/callStatsReportGatherer.ts +219 -0
- package/src/webrtc/stats/callStatsReportSummary.ts +30 -0
- package/src/webrtc/stats/connectionStats.ts +47 -0
- package/src/webrtc/stats/connectionStatsBuilder.ts +28 -0
- package/src/webrtc/stats/connectionStatsReportBuilder.ts +140 -0
- package/src/webrtc/stats/groupCallStats.ts +93 -0
- package/src/webrtc/stats/media/mediaSsrcHandler.ts +57 -0
- package/src/webrtc/stats/media/mediaTrackHandler.ts +70 -0
- package/src/webrtc/stats/media/mediaTrackStats.ts +176 -0
- package/src/webrtc/stats/media/mediaTrackStatsHandler.ts +90 -0
- package/src/webrtc/stats/statsReport.ts +133 -0
- package/src/webrtc/stats/statsReportEmitter.ts +49 -0
- package/src/webrtc/stats/summaryStatsReportGatherer.ts +148 -0
- package/src/webrtc/stats/trackStatsBuilder.ts +207 -0
- package/src/webrtc/stats/transportStats.ts +26 -0
- package/src/webrtc/stats/transportStatsBuilder.ts +48 -0
- package/src/webrtc/stats/valueFormatter.ts +27 -0
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
/*
|
|
2
|
+
Copyright 2023 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
|
+
*/
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* An incoming, or outgoing, request to verify a user or a device via cross-signing.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
/** Events emitted by {@link VerificationRequest}. */
|
|
22
|
+
export var VerificationRequestEvent = /*#__PURE__*/function (VerificationRequestEvent) {
|
|
23
|
+
/**
|
|
24
|
+
* Fires whenever the state of the request object has changed.
|
|
25
|
+
*
|
|
26
|
+
* There is no payload to the event.
|
|
27
|
+
*/
|
|
28
|
+
VerificationRequestEvent["Change"] = "change";
|
|
29
|
+
return VerificationRequestEvent;
|
|
30
|
+
}({});
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Listener type map for {@link VerificationRequestEvent}s.
|
|
34
|
+
*
|
|
35
|
+
* @internal
|
|
36
|
+
*/
|
|
37
|
+
|
|
38
|
+
/** The current phase of a verification request. */
|
|
39
|
+
export var VerificationPhase = /*#__PURE__*/function (VerificationPhase) {
|
|
40
|
+
/** Initial state: no event yet exchanged */
|
|
41
|
+
VerificationPhase[VerificationPhase["Unsent"] = 1] = "Unsent";
|
|
42
|
+
/** An `m.key.verification.request` event has been sent or received */
|
|
43
|
+
VerificationPhase[VerificationPhase["Requested"] = 2] = "Requested";
|
|
44
|
+
/** An `m.key.verification.ready` event has been sent or received, indicating the verification request is accepted. */
|
|
45
|
+
VerificationPhase[VerificationPhase["Ready"] = 3] = "Ready";
|
|
46
|
+
/**
|
|
47
|
+
* The verification is in flight.
|
|
48
|
+
*
|
|
49
|
+
* This means that an `m.key.verification.start` event has been sent or received, choosing a verification method;
|
|
50
|
+
* however the verification has not yet completed or been cancelled.
|
|
51
|
+
*/
|
|
52
|
+
VerificationPhase[VerificationPhase["Started"] = 4] = "Started";
|
|
53
|
+
/**
|
|
54
|
+
* An `m.key.verification.cancel` event has been sent or received at any time before the `done` event, cancelling
|
|
55
|
+
* the verification request
|
|
56
|
+
*/
|
|
57
|
+
VerificationPhase[VerificationPhase["Cancelled"] = 5] = "Cancelled";
|
|
58
|
+
/**
|
|
59
|
+
* The verification request is complete.
|
|
60
|
+
*
|
|
61
|
+
* Normally this means that `m.key.verification.done` events have been sent and received.
|
|
62
|
+
*/
|
|
63
|
+
VerificationPhase[VerificationPhase["Done"] = 6] = "Done";
|
|
64
|
+
return VerificationPhase;
|
|
65
|
+
}({});
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* A `Verifier` is responsible for performing the verification using a particular method, such as via QR code or SAS
|
|
69
|
+
* (emojis).
|
|
70
|
+
*
|
|
71
|
+
* A verifier object can be created by calling `VerificationRequest.beginVerification`; one is also created
|
|
72
|
+
* automatically when a `m.key.verification.start` event is received for an existing VerificationRequest.
|
|
73
|
+
*
|
|
74
|
+
* Once a verifier object is created, the verification can be started by calling the {@link Verifier#verify} method.
|
|
75
|
+
*/
|
|
76
|
+
|
|
77
|
+
/** Events emitted by {@link Verifier} */
|
|
78
|
+
export var VerifierEvent = /*#__PURE__*/function (VerifierEvent) {
|
|
79
|
+
/**
|
|
80
|
+
* The verification has been cancelled, by us or the other side.
|
|
81
|
+
*
|
|
82
|
+
* The payload is either an {@link Error}, or an (incoming or outgoing) {@link BriijEvent}, depending on
|
|
83
|
+
* unspecified reasons.
|
|
84
|
+
*/
|
|
85
|
+
VerifierEvent["Cancel"] = "cancel";
|
|
86
|
+
/**
|
|
87
|
+
* SAS data has been exchanged and should be displayed to the user.
|
|
88
|
+
*
|
|
89
|
+
* The payload is the {@link ShowSasCallbacks} object.
|
|
90
|
+
*/
|
|
91
|
+
VerifierEvent["ShowSas"] = "show_sas";
|
|
92
|
+
/**
|
|
93
|
+
* The user should confirm if the other side has scanned our QR code.
|
|
94
|
+
*
|
|
95
|
+
* The payload is the {@link ShowQrCodeCallbacks} object.
|
|
96
|
+
*/
|
|
97
|
+
VerifierEvent["ShowReciprocateQr"] = "show_reciprocate_qr";
|
|
98
|
+
return VerifierEvent;
|
|
99
|
+
}({});
|
|
100
|
+
|
|
101
|
+
/** Listener type map for {@link VerifierEvent}s. */
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Callbacks for user actions to confirm that the other side has scanned our QR code.
|
|
105
|
+
*
|
|
106
|
+
* This is exposed as the payload of a `VerifierEvent.ShowReciprocateQr` event, or can be retrieved directly from the
|
|
107
|
+
* verifier as `reciprocateQREvent`.
|
|
108
|
+
*/
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Callbacks for user actions while a SAS is displayed.
|
|
112
|
+
*
|
|
113
|
+
* This is exposed as the payload of a `VerifierEvent.ShowSas` event, or directly from the verifier as `sasEvent`.
|
|
114
|
+
*/
|
|
115
|
+
|
|
116
|
+
/** A generated SAS to be shown to the user, in alternative formats */
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* An emoji for the generated SAS. A tuple `[emoji, name]` where `emoji` is the emoji itself and `name` is the
|
|
120
|
+
* English name.
|
|
121
|
+
*/
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* True if the request is in a state where it can be accepted (ie, that we're in phases {@link VerificationPhase.Unsent}
|
|
125
|
+
* or {@link VerificationPhase.Requested}, and that we're not in the process of sending a `ready` or `cancel`).
|
|
126
|
+
*/
|
|
127
|
+
export function canAcceptVerificationRequest(req) {
|
|
128
|
+
return req.phase < VerificationPhase.Ready && !req.accepting && !req.declining;
|
|
129
|
+
}
|
|
130
|
+
//# sourceMappingURL=verification.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verification.js","names":["VerificationRequestEvent","VerificationPhase","VerifierEvent","canAcceptVerificationRequest","req","phase","Ready","accepting","declining"],"sources":["../../src/crypto-api/verification.ts"],"sourcesContent":["/*\nCopyright 2023 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 BriijEvent } from \"../models/event.ts\";\nimport { type TypedEventEmitter } from \"../models/typed-event-emitter.ts\";\n\n/**\n * An incoming, or outgoing, request to verify a user or a device via cross-signing.\n */\nexport interface VerificationRequest extends TypedEventEmitter<\n VerificationRequestEvent,\n VerificationRequestEventHandlerMap\n> {\n /**\n * Unique ID for this verification request.\n *\n * An ID isn't assigned until the first message is sent, so this may be `undefined` in the early phases.\n */\n get transactionId(): string | undefined;\n\n /**\n * For an in-room verification, the ID of the room.\n *\n * For to-device verifictions, `undefined`.\n */\n get roomId(): string | undefined;\n\n /**\n * True if this request was initiated by the local client.\n *\n * For in-room verifications, the initiator is who sent the `m.key.verification.request` event.\n * For to-device verifications, the initiator is who sent the `m.key.verification.start` event.\n */\n get initiatedByMe(): boolean;\n\n /** The user id of the other party in this request */\n get otherUserId(): string;\n\n /** For verifications via to-device messages: the ID of the other device. Otherwise, undefined. */\n get otherDeviceId(): string | undefined;\n\n /** True if the other party in this request is one of this user's own devices. */\n get isSelfVerification(): boolean;\n\n /** current phase of the request. */\n get phase(): VerificationPhase;\n\n /** True if the request has sent its initial event and needs more events to complete\n * (ie it is in phase `Requested`, `Ready` or `Started`).\n */\n get pending(): boolean;\n\n /**\n * True if we have started the process of sending an `m.key.verification.ready` (but have not necessarily received\n * the remote echo which causes a transition to {@link VerificationPhase.Ready}.\n */\n get accepting(): boolean;\n\n /**\n * True if we have started the process of sending an `m.key.verification.cancel` (but have not necessarily received\n * the remote echo which causes a transition to {@link VerificationPhase.Cancelled}).\n */\n get declining(): boolean;\n\n /**\n * The remaining number of ms before the request will be automatically cancelled.\n *\n * `null` indicates that there is no timeout\n */\n get timeout(): number | null;\n\n /** once the phase is Started (and !initiatedByMe) or Ready: common methods supported by both sides */\n get methods(): string[];\n\n /** the method picked in the .start event */\n get chosenMethod(): string | null;\n\n /**\n * Checks whether the other party supports a given verification method.\n * This is useful when setting up the QR code UI, as it is somewhat asymmetrical:\n * if the other party supports SCAN_QR, we should show a QR code in the UI, and vice versa.\n * For methods that need to be supported by both ends, use the `methods` property.\n *\n * @param method - the method to check\n * @returns true if the other party said they supported the method\n */\n otherPartySupportsMethod(method: string): boolean;\n\n /**\n * Accepts the request, sending a .ready event to the other party\n *\n * @returns Promise which resolves when the event has been sent.\n */\n accept(): Promise<void>;\n\n /**\n * Cancels the request, sending a cancellation to the other party\n *\n * @param params - Details for the cancellation, including `reason` (defaults to \"User declined\"), and `code`\n * (defaults to `m.user`). **Deprecated**: this parameter is ignored by the Rust cryptography implementation.\n *\n * @returns Promise which resolves when the event has been sent.\n */\n cancel(params?: { reason?: string; code?: string }): Promise<void>;\n\n /**\n * Send an `m.key.verification.start` event to start verification via a particular method.\n *\n * This is normally used when starting a verification via emojis (ie, `method` is set to `m.sas.v1`).\n *\n * @param method - the name of the verification method to use.\n *\n * @returns The verifier which will do the actual verification.\n */\n startVerification(method: string): Promise<Verifier>;\n\n /**\n * Start a QR code verification by providing a scanned QR code for this verification flow.\n *\n * Validates the QR code, and if it is ok, sends an `m.key.verification.start` event with `method` set to\n * `m.reciprocate.v1`, to tell the other side the scan was successful.\n *\n * See also {@link VerificationRequest#startVerification} which can be used to start other verification methods.\n *\n * @param qrCodeData - the decoded QR code.\n * @returns A verifier; call `.verify()` on it to wait for the other side to complete the verification flow.\n */\n scanQRCode(qrCodeData: Uint8ClampedArray): Promise<Verifier>;\n\n /**\n * The verifier which is doing the actual verification, once the method has been established.\n * Only defined when the `phase` is Started.\n */\n get verifier(): Verifier | undefined;\n\n /**\n * Generate the data for a QR code allowing the other device to verify this one, if it supports it.\n *\n * Only returns data once `phase` is {@link VerificationPhase.Ready} and the other party can scan a QR code;\n * otherwise returns `undefined`.\n */\n generateQRCode(): Promise<Uint8ClampedArray | undefined>;\n\n /**\n * If this request has been cancelled, the cancellation code (e.g `m.user`) which is responsible for cancelling\n * this verification.\n */\n get cancellationCode(): string | null;\n\n /**\n * The id of the user that cancelled the request.\n *\n * Only defined when phase is Cancelled\n */\n get cancellingUserId(): string | undefined;\n}\n\n/** Events emitted by {@link VerificationRequest}. */\nexport enum VerificationRequestEvent {\n /**\n * Fires whenever the state of the request object has changed.\n *\n * There is no payload to the event.\n */\n Change = \"change\",\n}\n\n/**\n * Listener type map for {@link VerificationRequestEvent}s.\n *\n * @internal\n */\nexport type VerificationRequestEventHandlerMap = {\n [VerificationRequestEvent.Change]: () => void;\n};\n\n/** The current phase of a verification request. */\nexport enum VerificationPhase {\n /** Initial state: no event yet exchanged */\n Unsent = 1,\n\n /** An `m.key.verification.request` event has been sent or received */\n Requested,\n\n /** An `m.key.verification.ready` event has been sent or received, indicating the verification request is accepted. */\n Ready,\n\n /**\n * The verification is in flight.\n *\n * This means that an `m.key.verification.start` event has been sent or received, choosing a verification method;\n * however the verification has not yet completed or been cancelled.\n */\n Started,\n\n /**\n * An `m.key.verification.cancel` event has been sent or received at any time before the `done` event, cancelling\n * the verification request\n */\n Cancelled,\n\n /**\n * The verification request is complete.\n *\n * Normally this means that `m.key.verification.done` events have been sent and received.\n */\n Done,\n}\n\n/**\n * A `Verifier` is responsible for performing the verification using a particular method, such as via QR code or SAS\n * (emojis).\n *\n * A verifier object can be created by calling `VerificationRequest.beginVerification`; one is also created\n * automatically when a `m.key.verification.start` event is received for an existing VerificationRequest.\n *\n * Once a verifier object is created, the verification can be started by calling the {@link Verifier#verify} method.\n */\nexport interface Verifier extends TypedEventEmitter<VerifierEvent, VerifierEventHandlerMap> {\n /**\n * Returns true if the verification has been cancelled, either by us or the other side.\n */\n get hasBeenCancelled(): boolean;\n\n /**\n * The ID of the other user in the verification process.\n */\n get userId(): string;\n\n /**\n * Start the key verification, if it has not already been started.\n *\n * This means sending a `m.key.verification.start` if we are the first responder, or a `m.key.verification.accept`\n * if the other side has already sent a start event.\n *\n * @returns Promise which resolves when the verification has completed, or rejects if the verification is cancelled\n * or times out.\n */\n verify(): Promise<void>;\n\n /**\n * Cancel a verification.\n *\n * We will send an `m.key.verification.cancel` if the verification is still in flight. The verification promise\n * will reject, and a {@link crypto-api.VerifierEvent.Cancel | VerifierEvent.Cancel} will be emitted.\n *\n * @param e - the reason for the cancellation.\n */\n cancel(e: Error): void;\n\n /**\n * Get the details for an SAS verification, if one is in progress\n *\n * Returns `null`, unless this verifier is for a SAS-based verification and we are waiting for the user to confirm\n * the SAS matches.\n */\n getShowSasCallbacks(): ShowSasCallbacks | null;\n\n /**\n * Get the details for reciprocating QR code verification, if one is in progress\n *\n * Returns `null`, unless this verifier is for reciprocating a QR-code-based verification (ie, the other user has\n * already scanned our QR code), and we are waiting for the user to confirm.\n */\n getReciprocateQrCodeCallbacks(): ShowQrCodeCallbacks | null;\n}\n\n/** Events emitted by {@link Verifier} */\nexport enum VerifierEvent {\n /**\n * The verification has been cancelled, by us or the other side.\n *\n * The payload is either an {@link Error}, or an (incoming or outgoing) {@link BriijEvent}, depending on\n * unspecified reasons.\n */\n Cancel = \"cancel\",\n\n /**\n * SAS data has been exchanged and should be displayed to the user.\n *\n * The payload is the {@link ShowSasCallbacks} object.\n */\n ShowSas = \"show_sas\",\n\n /**\n * The user should confirm if the other side has scanned our QR code.\n *\n * The payload is the {@link ShowQrCodeCallbacks} object.\n */\n ShowReciprocateQr = \"show_reciprocate_qr\",\n}\n\n/** Listener type map for {@link VerifierEvent}s. */\nexport type VerifierEventHandlerMap = {\n [VerifierEvent.Cancel]: (e: Error | BriijEvent) => void;\n [VerifierEvent.ShowSas]: (sas: ShowSasCallbacks) => void;\n [VerifierEvent.ShowReciprocateQr]: (qr: ShowQrCodeCallbacks) => void;\n};\n\n/**\n * Callbacks for user actions to confirm that the other side has scanned our QR code.\n *\n * This is exposed as the payload of a `VerifierEvent.ShowReciprocateQr` event, or can be retrieved directly from the\n * verifier as `reciprocateQREvent`.\n */\nexport interface ShowQrCodeCallbacks {\n /** The user confirms that the verification data matches */\n confirm(): void;\n\n /** Cancel the verification flow */\n cancel(): void;\n}\n\n/**\n * Callbacks for user actions while a SAS is displayed.\n *\n * This is exposed as the payload of a `VerifierEvent.ShowSas` event, or directly from the verifier as `sasEvent`.\n */\nexport interface ShowSasCallbacks {\n /** The generated SAS to be shown to the user */\n sas: GeneratedSas;\n\n /** Function to call if the user confirms that the SAS matches.\n *\n * @returns A Promise that completes once the m.key.verification.mac is queued.\n */\n confirm(): Promise<void>;\n\n /**\n * Function to call if the user finds the SAS does not match.\n *\n * Sends an `m.key.verification.cancel` event with a `m.mismatched_sas` error code.\n */\n mismatch(): void;\n\n /** Cancel the verification flow */\n cancel(): void;\n}\n\n/** A generated SAS to be shown to the user, in alternative formats */\nexport interface GeneratedSas {\n /**\n * The SAS as three numbers between 0 and 8191.\n *\n * Only populated if the `decimal` SAS method was negotiated.\n */\n decimal?: [number, number, number];\n\n /**\n * The SAS as seven emojis.\n *\n * Only populated if the `emoji` SAS method was negotiated.\n */\n emoji?: EmojiMapping[];\n}\n\n/**\n * An emoji for the generated SAS. A tuple `[emoji, name]` where `emoji` is the emoji itself and `name` is the\n * English name.\n */\nexport type EmojiMapping = [emoji: string, name: string];\n\n/**\n * True if the request is in a state where it can be accepted (ie, that we're in phases {@link VerificationPhase.Unsent}\n * or {@link VerificationPhase.Requested}, and that we're not in the process of sending a `ready` or `cancel`).\n */\nexport function canAcceptVerificationRequest(req: VerificationRequest): boolean {\n return req.phase < VerificationPhase.Ready && !req.accepting && !req.declining;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;;AAqJA;AACA,WAAYA,wBAAwB,0BAAxBA,wBAAwB;EAChC;AACJ;AACA;AACA;AACA;EALYA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;;AASpC;AACA;AACA;AACA;AACA;;AAKA;AACA,WAAYC,iBAAiB,0BAAjBA,iBAAiB;EACzB;EADQA,iBAAiB,CAAjBA,iBAAiB;EAIzB;EAJQA,iBAAiB,CAAjBA,iBAAiB;EAOzB;EAPQA,iBAAiB,CAAjBA,iBAAiB;EAUzB;AACJ;AACA;AACA;AACA;AACA;EAfYA,iBAAiB,CAAjBA,iBAAiB;EAkBzB;AACJ;AACA;AACA;EArBYA,iBAAiB,CAAjBA,iBAAiB;EAwBzB;AACJ;AACA;AACA;AACA;EA5BYA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA;;AAgC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkDA;AACA,WAAYC,aAAa,0BAAbA,aAAa;EACrB;AACJ;AACA;AACA;AACA;AACA;EANYA,aAAa;EASrB;AACJ;AACA;AACA;AACA;EAbYA,aAAa;EAgBrB;AACJ;AACA;AACA;AACA;EApBYA,aAAa;EAAA,OAAbA,aAAa;AAAA;;AAwBzB;;AAOA;AACA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACA;;AAsBA;;AAiBA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA,OAAO,SAASC,4BAA4BA,CAACC,GAAwB,EAAW;EAC5E,OAAOA,GAAG,CAACC,KAAK,GAAGJ,iBAAiB,CAACK,KAAK,IAAI,CAACF,GAAG,CAACG,SAAS,IAAI,CAACH,GAAG,CAACI,SAAS;AAClF","ignoreList":[]}
|
package/lib/digest.d.ts
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Computes a SHA-256 hash of a string (after utf-8 encoding) and returns it as an ArrayBuffer.
|
|
3
|
+
*
|
|
4
|
+
* @param plaintext The string to hash
|
|
5
|
+
* @returns An Uint8Array containing the SHA-256 hash of the input string
|
|
6
|
+
* @throws If the subtle crypto API is not available, for example if the code is running
|
|
7
|
+
* in a web page with an insecure context (eg. served over plain HTTP).
|
|
8
|
+
*/
|
|
9
|
+
export declare function sha256(plaintext: string): Promise<Uint8Array>;
|
|
10
|
+
//# sourceMappingURL=digest.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digest.d.ts","sourceRoot":"","sources":["../src/digest.ts"],"names":[],"mappings":"AAgBA;;;;;;;GAOG;AACH,wBAAsB,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,UAAU,CAAC,CASnE"}
|
package/lib/digest.js
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
|
|
2
|
+
/*
|
|
3
|
+
Copyright 2024 The Matrix.org Foundation C.I.C.
|
|
4
|
+
|
|
5
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
you may not use this file except in compliance with the License.
|
|
7
|
+
You may obtain a copy of the License at
|
|
8
|
+
|
|
9
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
|
|
11
|
+
Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
See the License for the specific language governing permissions and
|
|
15
|
+
limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Computes a SHA-256 hash of a string (after utf-8 encoding) and returns it as an ArrayBuffer.
|
|
20
|
+
*
|
|
21
|
+
* @param plaintext The string to hash
|
|
22
|
+
* @returns An Uint8Array containing the SHA-256 hash of the input string
|
|
23
|
+
* @throws If the subtle crypto API is not available, for example if the code is running
|
|
24
|
+
* in a web page with an insecure context (eg. served over plain HTTP).
|
|
25
|
+
*/
|
|
26
|
+
export function sha256(_x) {
|
|
27
|
+
return _sha.apply(this, arguments);
|
|
28
|
+
}
|
|
29
|
+
function _sha() {
|
|
30
|
+
_sha = _asyncToGenerator(function* (plaintext) {
|
|
31
|
+
if (!globalThis.crypto.subtle) {
|
|
32
|
+
throw new Error("Crypto.subtle is not available: insecure context?");
|
|
33
|
+
}
|
|
34
|
+
var utf8 = new TextEncoder().encode(plaintext);
|
|
35
|
+
var digest = yield globalThis.crypto.subtle.digest("SHA-256", utf8);
|
|
36
|
+
return new Uint8Array(digest);
|
|
37
|
+
});
|
|
38
|
+
return _sha.apply(this, arguments);
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=digest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"digest.js","names":["sha256","_x","_sha","apply","arguments","_asyncToGenerator","plaintext","globalThis","crypto","subtle","Error","utf8","TextEncoder","encode","digest","Uint8Array"],"sources":["../src/digest.ts"],"sourcesContent":["/*\r\nCopyright 2024 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\n/**\r\n * Computes a SHA-256 hash of a string (after utf-8 encoding) and returns it as an ArrayBuffer.\r\n *\r\n * @param plaintext The string to hash\r\n * @returns An Uint8Array containing the SHA-256 hash of the input string\r\n * @throws If the subtle crypto API is not available, for example if the code is running\r\n * in a web page with an insecure context (eg. served over plain HTTP).\r\n */\r\nexport async function sha256(plaintext: string): Promise<Uint8Array> {\r\n if (!globalThis.crypto.subtle) {\r\n throw new Error(\"Crypto.subtle is not available: insecure context?\");\r\n }\r\n const utf8 = new TextEncoder().encode(plaintext);\r\n\r\n const digest = await globalThis.crypto.subtle.digest(\"SHA-256\", utf8);\r\n\r\n return new Uint8Array(digest);\r\n}\r\n"],"mappings":";AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAsBA,MAAMA,CAAAC,EAAA;EAAA,OAAAC,IAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA;AAS3B,SAAAF,KAAA;EAAAA,IAAA,GAAAG,iBAAA,CATM,WAAsBC,SAAiB,EAAuB;IACjE,IAAI,CAACC,UAAU,CAACC,MAAM,CAACC,MAAM,EAAE;MAC3B,MAAM,IAAIC,KAAK,CAAC,mDAAmD,CAAC;IACxE;IACA,IAAMC,IAAI,GAAG,IAAIC,WAAW,CAAC,CAAC,CAACC,MAAM,CAACP,SAAS,CAAC;IAEhD,IAAMQ,MAAM,SAASP,UAAU,CAACC,MAAM,CAACC,MAAM,CAACK,MAAM,CAAC,SAAS,EAAEH,IAAI,CAAC;IAErE,OAAO,IAAII,UAAU,CAACD,MAAM,CAAC;EACjC,CAAC;EAAA,OAAAZ,IAAA,CAAAC,KAAA,OAAAC,SAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { type WidgetApi } from "matrix-widget-api";
|
|
2
|
+
import { BriijEvent } from "./models/event.ts";
|
|
3
|
+
import { type ISendEventResponse, type SendDelayedEventRequestOpts, type SendDelayedEventResponse, UpdateDelayedEventAction } from "./@types/requests.ts";
|
|
4
|
+
import { type StateEvents } from "./@types/event.ts";
|
|
5
|
+
import { BriijClient, type IBriijClientCreateOpts, type IStartClientOpts, type SendToDeviceContentMap, type IOpenIDToken } from "./client.ts";
|
|
6
|
+
import { SyncState } from "./sync.ts";
|
|
7
|
+
import { type Room } from "./models/room.ts";
|
|
8
|
+
import { type ToDeviceBatch, type ToDevicePayload } from "./models/ToDeviceMessage.ts";
|
|
9
|
+
import { type QueryDict } from "./utils.ts";
|
|
10
|
+
import { type EmptyObject } from "./briij.ts";
|
|
11
|
+
interface IStateEventRequest {
|
|
12
|
+
eventType: string;
|
|
13
|
+
stateKey?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface ICapabilities {
|
|
16
|
+
/**
|
|
17
|
+
* Event types that this client expects to send.
|
|
18
|
+
*/
|
|
19
|
+
sendEvent?: string[];
|
|
20
|
+
/**
|
|
21
|
+
* Event types that this client expects to receive.
|
|
22
|
+
*/
|
|
23
|
+
receiveEvent?: string[];
|
|
24
|
+
/**
|
|
25
|
+
* Message types that this client expects to send, or true for all message
|
|
26
|
+
* types.
|
|
27
|
+
*/
|
|
28
|
+
sendMessage?: string[] | true;
|
|
29
|
+
/**
|
|
30
|
+
* Message types that this client expects to receive, or true for all
|
|
31
|
+
* message types.
|
|
32
|
+
*/
|
|
33
|
+
receiveMessage?: string[] | true;
|
|
34
|
+
/**
|
|
35
|
+
* Types of state events that this client expects to send.
|
|
36
|
+
*/
|
|
37
|
+
sendState?: IStateEventRequest[];
|
|
38
|
+
/**
|
|
39
|
+
* Types of state events that this client expects to receive.
|
|
40
|
+
*/
|
|
41
|
+
receiveState?: IStateEventRequest[];
|
|
42
|
+
/**
|
|
43
|
+
* To-device event types that this client expects to send.
|
|
44
|
+
*/
|
|
45
|
+
sendToDevice?: string[];
|
|
46
|
+
/**
|
|
47
|
+
* To-device event types that this client expects to receive.
|
|
48
|
+
*/
|
|
49
|
+
receiveToDevice?: string[];
|
|
50
|
+
/**
|
|
51
|
+
* Whether this client needs access to TURN servers.
|
|
52
|
+
* @defaultValue false
|
|
53
|
+
*/
|
|
54
|
+
turnServers?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether this client needs to be able to send delayed events.
|
|
57
|
+
* @experimental Part of MSC4140 & MSC4157
|
|
58
|
+
* @defaultValue false
|
|
59
|
+
*/
|
|
60
|
+
sendDelayedEvents?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Whether this client needs to be able to update delayed events.
|
|
63
|
+
* @experimental Part of MSC4140 & MSC4157
|
|
64
|
+
* @defaultValue false
|
|
65
|
+
*/
|
|
66
|
+
updateDelayedEvents?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether this client needs to be able to send sticky events.
|
|
69
|
+
* @experimental Part of MSC4354 & MSC4407
|
|
70
|
+
* @defaultValue false
|
|
71
|
+
*/
|
|
72
|
+
sendSticky?: boolean;
|
|
73
|
+
/**
|
|
74
|
+
* Whether this client needs to be able to receive sticky events.
|
|
75
|
+
* @experimental Part of MSC4354 & MSC4407
|
|
76
|
+
* @defaultValue false
|
|
77
|
+
*/
|
|
78
|
+
receiveSticky?: boolean;
|
|
79
|
+
}
|
|
80
|
+
export declare enum RoomWidgetClientEvent {
|
|
81
|
+
PendingEventsChanged = "PendingEvent.pendingEventsChanged"
|
|
82
|
+
}
|
|
83
|
+
export type EventHandlerMap = {
|
|
84
|
+
[RoomWidgetClientEvent.PendingEventsChanged]: () => void;
|
|
85
|
+
};
|
|
86
|
+
/**
|
|
87
|
+
* A BriijClient that routes its requests through the widget API instead of the
|
|
88
|
+
* real CS API.
|
|
89
|
+
* @experimental This class is considered unstable!
|
|
90
|
+
*/
|
|
91
|
+
export declare class RoomWidgetClient extends BriijClient {
|
|
92
|
+
private readonly widgetApi;
|
|
93
|
+
private readonly capabilities;
|
|
94
|
+
private readonly roomId;
|
|
95
|
+
private room?;
|
|
96
|
+
private readonly widgetApiReady;
|
|
97
|
+
private readonly roomStateSynced;
|
|
98
|
+
private lifecycle?;
|
|
99
|
+
private syncState;
|
|
100
|
+
private pendingSendingEventsTxId;
|
|
101
|
+
private eventEmitter;
|
|
102
|
+
/**
|
|
103
|
+
*
|
|
104
|
+
* @param widgetApi - The widget api to use for communication.
|
|
105
|
+
* @param capabilities - The capabilities the widget client will request.
|
|
106
|
+
* @param roomId - The room id the widget is associated with.
|
|
107
|
+
* @param opts - The configuration options for this client.
|
|
108
|
+
* @param sendContentLoaded - Whether to send a content loaded widget action immediately after initial setup.
|
|
109
|
+
* Set to `false` if the widget uses `waitForIFrameLoad=true` (in this case the client does not expect a content loaded action at all),
|
|
110
|
+
* or if the the widget wants to send the `ContentLoaded` action at a later point in time after the initial setup.
|
|
111
|
+
*/
|
|
112
|
+
constructor(widgetApi: WidgetApi, capabilities: ICapabilities, roomId: string, opts: IBriijClientCreateOpts, sendContentLoaded: boolean);
|
|
113
|
+
private requestInitialCapabilities;
|
|
114
|
+
supportUpdateState(): Promise<boolean>;
|
|
115
|
+
private readonly syncApiResolver;
|
|
116
|
+
startClient(opts?: IStartClientOpts): Promise<void>;
|
|
117
|
+
stopClient(): void;
|
|
118
|
+
joinRoom(roomIdOrAlias: string): Promise<Room>;
|
|
119
|
+
protected encryptAndSendEvent(room: Room, event: BriijEvent, queryDict?: QueryDict): Promise<ISendEventResponse>;
|
|
120
|
+
protected encryptAndSendEvent(room: Room, event: BriijEvent, delayOpts: SendDelayedEventRequestOpts, queryDict?: QueryDict): Promise<ISendEventResponse>;
|
|
121
|
+
sendStateEvent(roomId: string, eventType: string, content: any, stateKey?: string): Promise<ISendEventResponse>;
|
|
122
|
+
/**
|
|
123
|
+
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
124
|
+
*/
|
|
125
|
+
_unstable_sendDelayedStateEvent<K extends keyof StateEvents>(roomId: string, delayOpts: SendDelayedEventRequestOpts, eventType: K, content: StateEvents[K], stateKey?: string): Promise<SendDelayedEventResponse>;
|
|
126
|
+
private validateSendDelayedEventResponse;
|
|
127
|
+
/**
|
|
128
|
+
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
129
|
+
* @deprecated Instead use one of:
|
|
130
|
+
* - {@link _unstable_cancelScheduledDelayedEvent}
|
|
131
|
+
* - {@link _unstable_restartScheduledDelayedEvent}
|
|
132
|
+
* - {@link _unstable_sendScheduledDelayedEvent}
|
|
133
|
+
*/
|
|
134
|
+
_unstable_updateDelayedEvent(delayId: string, action: UpdateDelayedEventAction): Promise<EmptyObject>;
|
|
135
|
+
/**
|
|
136
|
+
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
137
|
+
*/
|
|
138
|
+
_unstable_cancelScheduledDelayedEvent(delayId: string): Promise<EmptyObject>;
|
|
139
|
+
/**
|
|
140
|
+
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
141
|
+
*/
|
|
142
|
+
_unstable_restartScheduledDelayedEvent(delayId: string): Promise<EmptyObject>;
|
|
143
|
+
/**
|
|
144
|
+
* @experimental This currently relies on an unstable MSC (MSC4140).
|
|
145
|
+
*/
|
|
146
|
+
_unstable_sendScheduledDelayedEvent(delayId: string): Promise<EmptyObject>;
|
|
147
|
+
/**
|
|
148
|
+
* by {@link BriijClient.encryptAndSendToDevice}.
|
|
149
|
+
*/
|
|
150
|
+
encryptAndSendToDevice(eventType: string, devices: {
|
|
151
|
+
userId: string;
|
|
152
|
+
deviceId: string;
|
|
153
|
+
}[], payload: ToDevicePayload): Promise<void>;
|
|
154
|
+
sendToDevice(eventType: string, contentMap: SendToDeviceContentMap): Promise<EmptyObject>;
|
|
155
|
+
getOpenIdToken(): Promise<IOpenIDToken>;
|
|
156
|
+
queueToDevice({ eventType, batch }: ToDeviceBatch): Promise<void>;
|
|
157
|
+
/**
|
|
158
|
+
* Send an event to a specific list of devices via the widget API. Optionally encrypts the event.
|
|
159
|
+
*
|
|
160
|
+
* If you are using a full BriijClient you would be calling {@link BriijClient.getCrypto().encryptToDeviceMessages()} followed
|
|
161
|
+
* by {@link BriijClient.queueToDevice}.
|
|
162
|
+
*
|
|
163
|
+
* However, this is combined into a single step when running as an embedded widget client. So, we expose this method for those
|
|
164
|
+
* that need it.
|
|
165
|
+
*
|
|
166
|
+
* @param eventType - Type of the event to send.
|
|
167
|
+
* @param encrypted - Whether the event should be encrypted.
|
|
168
|
+
* @param contentMap - The content to send. Map from user_id to device_id to content object.
|
|
169
|
+
*/
|
|
170
|
+
sendToDeviceViaWidgetApi(eventType: string, encrypted: boolean, contentMap: SendToDeviceContentMap): Promise<void>;
|
|
171
|
+
checkTurnServers(): Promise<boolean>;
|
|
172
|
+
getSyncState(): SyncState | null;
|
|
173
|
+
private setSyncState;
|
|
174
|
+
private ack;
|
|
175
|
+
private updateTxId;
|
|
176
|
+
private onEvent;
|
|
177
|
+
private onToDevice;
|
|
178
|
+
private onStateUpdate;
|
|
179
|
+
private watchTurnServers;
|
|
180
|
+
}
|
|
181
|
+
export {};
|
|
182
|
+
//# sourceMappingURL=embedded.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedded.d.ts","sourceRoot":"","sources":["../src/embedded.ts"],"names":[],"mappings":"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"}
|