matrix-js-sdk 41.8.0 → 41.9.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 +11 -0
- package/README.md +1 -1
- package/lib/@types/AESEncryptedSecretStoragePayload.js +3 -1
- package/lib/@types/IIdentityServerProvider.js +3 -1
- package/lib/@types/PushRules.js +7 -7
- package/lib/@types/PushRules.js.map +1 -1
- package/lib/@types/auth.js +4 -4
- package/lib/@types/auth.js.map +1 -1
- package/lib/@types/beacon.js +2 -2
- package/lib/@types/beacon.js.map +1 -1
- package/lib/@types/common.js +3 -1
- package/lib/@types/crypto.js +3 -1
- package/lib/@types/event.js +20 -20
- package/lib/@types/event.js.map +1 -1
- package/lib/@types/events.js +3 -1
- package/lib/@types/extensible_events.js +6 -6
- package/lib/@types/extensible_events.js.map +1 -1
- package/lib/@types/global.d.js.map +1 -1
- package/lib/@types/json.js +3 -1
- package/lib/@types/local_notifications.js +3 -1
- package/lib/@types/location.js +4 -4
- package/lib/@types/location.js.map +1 -1
- package/lib/@types/matrix-sdk-crypto-wasm.d.js +3 -1
- package/lib/@types/media.js +3 -1
- package/lib/@types/membership.js +1 -1
- package/lib/@types/membership.js.map +1 -1
- package/lib/@types/partials.js +6 -6
- package/lib/@types/partials.js.map +1 -1
- package/lib/@types/polls.js +5 -5
- package/lib/@types/polls.js.map +1 -1
- package/lib/@types/read_receipts.js +2 -2
- package/lib/@types/read_receipts.js.map +1 -1
- package/lib/@types/registration.js +3 -1
- package/lib/@types/requests.js +1 -1
- package/lib/@types/requests.js.map +1 -1
- package/lib/@types/retention.js +1 -1
- package/lib/@types/retention.js.map +1 -1
- package/lib/@types/search.js +1 -1
- package/lib/@types/search.js.map +1 -1
- package/lib/@types/signed.js +3 -1
- package/lib/@types/spaces.js +3 -1
- package/lib/@types/state_events.js +3 -1
- package/lib/@types/synapse.js +3 -1
- package/lib/@types/sync.js +1 -1
- package/lib/@types/sync.js.map +1 -1
- package/lib/@types/threepids.js +1 -1
- package/lib/@types/threepids.js.map +1 -1
- package/lib/@types/topic.js +1 -1
- package/lib/@types/topic.js.map +1 -1
- package/lib/@types/uia.js +3 -1
- package/lib/NamespacedValue.js +8 -8
- package/lib/NamespacedValue.js.map +1 -1
- package/lib/ReEmitter.js +9 -16
- package/lib/ReEmitter.js.map +1 -1
- package/lib/ToDeviceMessageQueue.js +49 -57
- package/lib/ToDeviceMessageQueue.js.map +1 -1
- package/lib/autodiscovery.js +232 -247
- package/lib/autodiscovery.js.map +1 -1
- package/lib/base64.js +1 -1
- package/lib/base64.js.map +1 -1
- package/lib/browser-index.d.ts +2 -2
- package/lib/browser-index.d.ts.map +1 -1
- package/lib/browser-index.js +5 -5
- package/lib/browser-index.js.map +1 -1
- package/lib/capabilityPoller.js +19 -22
- package/lib/capabilityPoller.js.map +1 -1
- package/lib/client.d.ts +2 -8
- package/lib/client.d.ts.map +1 -1
- package/lib/client.js +2043 -2487
- package/lib/client.js.map +1 -1
- package/lib/common-crypto/CryptoBackend.js +2 -2
- package/lib/common-crypto/CryptoBackend.js.map +1 -1
- package/lib/common-crypto/key-passphrase.js.map +1 -1
- package/lib/content-helpers.js +43 -48
- package/lib/content-helpers.js.map +1 -1
- package/lib/content-repo.js +14 -24
- package/lib/content-repo.js.map +1 -1
- package/lib/crypto/store/base.js +6 -6
- package/lib/crypto/store/base.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store-backend.js +190 -238
- package/lib/crypto/store/indexeddb-crypto-store-backend.js.map +1 -1
- package/lib/crypto/store/indexeddb-crypto-store.js +25 -30
- package/lib/crypto/store/indexeddb-crypto-store.js.map +1 -1
- package/lib/crypto/store/localStorage-crypto-store.js +113 -145
- package/lib/crypto/store/localStorage-crypto-store.js.map +1 -1
- package/lib/crypto/store/memory-crypto-store.js +74 -105
- package/lib/crypto/store/memory-crypto-store.js.map +1 -1
- package/lib/crypto-api/CryptoEvent.js +1 -1
- package/lib/crypto-api/CryptoEvent.js.map +1 -1
- package/lib/crypto-api/CryptoEventHandlerMap.js +3 -1
- package/lib/crypto-api/index.d.ts +15 -6
- package/lib/crypto-api/index.d.ts.map +1 -1
- package/lib/crypto-api/index.js +22 -22
- package/lib/crypto-api/index.js.map +1 -1
- package/lib/crypto-api/key-passphrase.js +15 -23
- package/lib/crypto-api/key-passphrase.js.map +1 -1
- package/lib/crypto-api/keybackup.js +3 -1
- package/lib/crypto-api/recovery-key.js +11 -12
- package/lib/crypto-api/recovery-key.js.map +1 -1
- package/lib/crypto-api/verification.js +3 -3
- package/lib/crypto-api/verification.js.map +1 -1
- package/lib/digest.js +7 -14
- package/lib/digest.js.map +1 -1
- package/lib/embedded.d.ts.map +1 -1
- package/lib/embedded.js +380 -505
- package/lib/embedded.js.map +1 -1
- package/lib/errors.js +2 -2
- package/lib/errors.js.map +1 -1
- package/lib/event-mapper.js +10 -12
- package/lib/event-mapper.js.map +1 -1
- package/lib/extensible_events_v1/ExtensibleEvent.js.map +1 -1
- package/lib/extensible_events_v1/InvalidEventError.js.map +1 -1
- package/lib/extensible_events_v1/MessageEvent.js +11 -13
- package/lib/extensible_events_v1/MessageEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollEndEvent.js +3 -4
- package/lib/extensible_events_v1/PollEndEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollResponseEvent.js +5 -6
- package/lib/extensible_events_v1/PollResponseEvent.js.map +1 -1
- package/lib/extensible_events_v1/PollStartEvent.js +8 -10
- package/lib/extensible_events_v1/PollStartEvent.js.map +1 -1
- package/lib/extensible_events_v1/utilities.js.map +1 -1
- package/lib/feature.js +18 -31
- package/lib/feature.js.map +1 -1
- package/lib/filter-component.d.ts.map +1 -1
- package/lib/filter-component.js +20 -26
- package/lib/filter-component.js.map +1 -1
- package/lib/filter.js +14 -17
- package/lib/filter.js.map +1 -1
- package/lib/http-api/errors.js +28 -43
- package/lib/http-api/errors.js.map +1 -1
- package/lib/http-api/fetch.js +141 -159
- package/lib/http-api/fetch.js.map +1 -1
- package/lib/http-api/index.js +17 -20
- package/lib/http-api/index.js.map +1 -1
- package/lib/http-api/interface.js +1 -1
- package/lib/http-api/interface.js.map +1 -1
- package/lib/http-api/method.js +1 -1
- package/lib/http-api/method.js.map +1 -1
- package/lib/http-api/prefix.js +3 -3
- package/lib/http-api/prefix.js.map +1 -1
- package/lib/http-api/refresh.js +74 -94
- package/lib/http-api/refresh.js.map +1 -1
- package/lib/http-api/utils.d.ts +1 -1
- package/lib/http-api/utils.d.ts.map +1 -1
- package/lib/http-api/utils.js +34 -42
- package/lib/http-api/utils.js.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/indexeddb-helpers.js +3 -3
- package/lib/indexeddb-helpers.js.map +1 -1
- package/lib/indexeddb-worker.js.map +1 -1
- package/lib/interactive-auth.d.ts +5 -5
- package/lib/interactive-auth.d.ts.map +1 -1
- package/lib/interactive-auth.js +172 -204
- package/lib/interactive-auth.js.map +1 -1
- package/lib/logger.js +21 -57
- package/lib/logger.js.map +1 -1
- package/lib/matrix.js +7 -11
- package/lib/matrix.js.map +1 -1
- package/lib/matrixrtc/CallMembership.js +80 -74
- package/lib/matrixrtc/CallMembership.js.map +1 -1
- package/lib/matrixrtc/EncryptionManager.js +1 -1
- package/lib/matrixrtc/EncryptionManager.js.map +1 -1
- package/lib/matrixrtc/IKeyTransport.js +1 -1
- package/lib/matrixrtc/IKeyTransport.js.map +1 -1
- package/lib/matrixrtc/IMembershipManager.js +1 -1
- package/lib/matrixrtc/IMembershipManager.js.map +1 -1
- package/lib/matrixrtc/LivekitTransport.d.ts +1 -1
- package/lib/matrixrtc/LivekitTransport.js +4 -4
- package/lib/matrixrtc/LivekitTransport.js.map +1 -1
- package/lib/matrixrtc/MatrixRTCSession.js +137 -187
- package/lib/matrixrtc/MatrixRTCSession.js.map +1 -1
- package/lib/matrixrtc/MatrixRTCSessionManager.js +36 -41
- package/lib/matrixrtc/MatrixRTCSessionManager.js.map +1 -1
- package/lib/matrixrtc/MembershipManager.js +332 -378
- package/lib/matrixrtc/MembershipManager.js.map +1 -1
- package/lib/matrixrtc/MembershipManagerActionScheduler.js +54 -63
- package/lib/matrixrtc/MembershipManagerActionScheduler.js.map +1 -1
- package/lib/matrixrtc/RTCEncryptionManager.js +119 -143
- package/lib/matrixrtc/RTCEncryptionManager.js.map +1 -1
- package/lib/matrixrtc/ToDeviceKeyTransport.js +53 -58
- package/lib/matrixrtc/ToDeviceKeyTransport.js.map +1 -1
- package/lib/matrixrtc/index.js.map +1 -1
- package/lib/matrixrtc/membershipData/common.js +1 -1
- package/lib/matrixrtc/membershipData/common.js.map +1 -1
- package/lib/matrixrtc/membershipData/index.js.map +1 -1
- package/lib/matrixrtc/membershipData/rtc.js +15 -23
- package/lib/matrixrtc/membershipData/rtc.js.map +1 -1
- package/lib/matrixrtc/membershipData/session.js +4 -5
- package/lib/matrixrtc/membershipData/session.js.map +1 -1
- package/lib/matrixrtc/types.js +4 -6
- package/lib/matrixrtc/types.js.map +1 -1
- package/lib/matrixrtc/utils.js +4 -11
- package/lib/matrixrtc/utils.js.map +1 -1
- package/lib/models/MSC3089Branch.js +91 -116
- package/lib/models/MSC3089Branch.js.map +1 -1
- package/lib/models/MSC3089TreeSpace.js +209 -245
- package/lib/models/MSC3089TreeSpace.js.map +1 -1
- package/lib/models/ToDeviceMessage.js +3 -1
- package/lib/models/beacon.js +14 -13
- package/lib/models/beacon.js.map +1 -1
- package/lib/models/compare-event-ordering.js +13 -13
- package/lib/models/compare-event-ordering.js.map +1 -1
- package/lib/models/device.js +3 -3
- package/lib/models/device.js.map +1 -1
- package/lib/models/event-context.js +5 -8
- package/lib/models/event-context.js.map +1 -1
- package/lib/models/event-status.js +1 -1
- package/lib/models/event-status.js.map +1 -1
- package/lib/models/event-timeline-set.js +88 -94
- package/lib/models/event-timeline-set.js.map +1 -1
- package/lib/models/event-timeline.js +28 -30
- package/lib/models/event-timeline.js.map +1 -1
- package/lib/models/event.js +182 -226
- package/lib/models/event.js.map +1 -1
- package/lib/models/invites-ignorer-types.js +4 -4
- package/lib/models/invites-ignorer-types.js.map +1 -1
- package/lib/models/invites-ignorer.js +159 -179
- package/lib/models/invites-ignorer.js.map +1 -1
- package/lib/models/poll.js +71 -81
- package/lib/models/poll.js.map +1 -1
- package/lib/models/profile-keys.js +2 -2
- package/lib/models/profile-keys.js.map +1 -1
- package/lib/models/read-receipt.js +40 -56
- package/lib/models/read-receipt.js.map +1 -1
- package/lib/models/related-relations.js.map +1 -1
- package/lib/models/relations-container.js +22 -23
- package/lib/models/relations-container.js.map +1 -1
- package/lib/models/relations.js +133 -159
- package/lib/models/relations.js.map +1 -1
- package/lib/models/room-member.js +24 -29
- package/lib/models/room-member.js.map +1 -1
- package/lib/models/room-receipts.js +29 -43
- package/lib/models/room-receipts.js.map +1 -1
- package/lib/models/room-retention.js +74 -83
- package/lib/models/room-retention.js.map +1 -1
- package/lib/models/room-state.js +143 -172
- package/lib/models/room-state.js.map +1 -1
- package/lib/models/room-sticky-events.d.ts +1 -0
- package/lib/models/room-sticky-events.d.ts.map +1 -1
- package/lib/models/room-sticky-events.js +45 -65
- package/lib/models/room-sticky-events.js.map +1 -1
- package/lib/models/room-summary.js.map +1 -1
- package/lib/models/room.d.ts.map +1 -1
- package/lib/models/room.js +765 -909
- package/lib/models/room.js.map +1 -1
- package/lib/models/search-result.js +5 -5
- package/lib/models/search-result.js.map +1 -1
- package/lib/models/thread.js +225 -285
- package/lib/models/thread.js.map +1 -1
- package/lib/models/typed-event-emitter.js +7 -18
- package/lib/models/typed-event-emitter.js.map +1 -1
- package/lib/models/user.js +8 -8
- package/lib/models/user.js.map +1 -1
- package/lib/oidc/authorize.js +208 -241
- package/lib/oidc/authorize.js.map +1 -1
- package/lib/oidc/discovery.js +23 -36
- package/lib/oidc/discovery.js.map +1 -1
- package/lib/oidc/error.js +1 -1
- package/lib/oidc/error.js.map +1 -1
- package/lib/oidc/index.js +1 -0
- package/lib/oidc/index.js.map +1 -1
- package/lib/oidc/register.js +60 -66
- package/lib/oidc/register.js.map +1 -1
- package/lib/oidc/tokenRefresher.js +77 -91
- package/lib/oidc/tokenRefresher.js.map +1 -1
- package/lib/oidc/validate.js +18 -18
- package/lib/oidc/validate.js.map +1 -1
- package/lib/pushprocessor.js +71 -82
- package/lib/pushprocessor.js.map +1 -1
- package/lib/randomstring.js +9 -9
- package/lib/randomstring.js.map +1 -1
- package/lib/realtime-callbacks.js +25 -28
- package/lib/realtime-callbacks.js.map +1 -1
- package/lib/receipt-accumulator.d.ts +2 -0
- package/lib/receipt-accumulator.d.ts.map +1 -1
- package/lib/receipt-accumulator.js +14 -22
- package/lib/receipt-accumulator.js.map +1 -1
- package/lib/rendezvous/MSC4108SignInWithQR.js +271 -302
- package/lib/rendezvous/MSC4108SignInWithQR.js.map +1 -1
- package/lib/rendezvous/RendezvousChannel.js +3 -1
- package/lib/rendezvous/RendezvousCode.js +3 -1
- package/lib/rendezvous/RendezvousError.js.map +1 -1
- package/lib/rendezvous/RendezvousFailureReason.js +2 -2
- package/lib/rendezvous/RendezvousFailureReason.js.map +1 -1
- package/lib/rendezvous/RendezvousIntent.js +1 -1
- package/lib/rendezvous/RendezvousIntent.js.map +1 -1
- package/lib/rendezvous/RendezvousTransport.js +3 -1
- package/lib/rendezvous/channels/MSC4108SecureChannel.js +123 -147
- package/lib/rendezvous/channels/MSC4108SecureChannel.js.map +1 -1
- package/lib/rendezvous/index.js +44 -69
- package/lib/rendezvous/index.js.map +1 -1
- package/lib/rendezvous/transports/MSC4108RendezvousSession.d.ts +1 -1
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js +134 -152
- package/lib/rendezvous/transports/MSC4108RendezvousSession.js.map +1 -1
- package/lib/retentionPolicy.js +6 -9
- package/lib/retentionPolicy.js.map +1 -1
- package/lib/room-hierarchy.js +52 -60
- package/lib/room-hierarchy.js.map +1 -1
- package/lib/rust-crypto/CrossSigningIdentity.js +94 -104
- package/lib/rust-crypto/CrossSigningIdentity.js.map +1 -1
- package/lib/rust-crypto/DehydratedDeviceManager.js +157 -190
- package/lib/rust-crypto/DehydratedDeviceManager.js.map +1 -1
- package/lib/rust-crypto/KeyClaimManager.js +18 -22
- package/lib/rust-crypto/KeyClaimManager.js.map +1 -1
- package/lib/rust-crypto/OutgoingRequestProcessor.js +109 -139
- package/lib/rust-crypto/OutgoingRequestProcessor.js.map +1 -1
- package/lib/rust-crypto/OutgoingRequestsManager.js +66 -80
- package/lib/rust-crypto/OutgoingRequestsManager.js.map +1 -1
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.d.ts +1 -1
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js +196 -224
- package/lib/rust-crypto/PerSessionKeyBackupDownloader.js.map +1 -1
- package/lib/rust-crypto/RoomEncryptor.js +127 -143
- package/lib/rust-crypto/RoomEncryptor.js.map +1 -1
- package/lib/rust-crypto/backup.js +453 -549
- package/lib/rust-crypto/backup.js.map +1 -1
- package/lib/rust-crypto/constants.js +1 -1
- package/lib/rust-crypto/constants.js.map +1 -1
- package/lib/rust-crypto/device-converter.js +15 -28
- package/lib/rust-crypto/device-converter.js.map +1 -1
- package/lib/rust-crypto/index.js +103 -116
- package/lib/rust-crypto/index.js.map +1 -1
- package/lib/rust-crypto/libolm_migration.js +303 -365
- package/lib/rust-crypto/libolm_migration.js.map +1 -1
- package/lib/rust-crypto/rust-crypto.d.ts +5 -1
- package/lib/rust-crypto/rust-crypto.d.ts.map +1 -1
- package/lib/rust-crypto/rust-crypto.js +1067 -1332
- package/lib/rust-crypto/rust-crypto.js.map +1 -1
- package/lib/rust-crypto/secret-storage.js +12 -25
- package/lib/rust-crypto/secret-storage.js.map +1 -1
- package/lib/rust-crypto/verification.js +137 -189
- package/lib/rust-crypto/verification.js.map +1 -1
- package/lib/scheduler.js +44 -19
- package/lib/scheduler.js.map +1 -1
- package/lib/secret-storage.js +179 -213
- package/lib/secret-storage.js.map +1 -1
- package/lib/serverCapabilities.js +6 -9
- package/lib/serverCapabilities.js.map +1 -1
- package/lib/service-types.js +1 -1
- package/lib/service-types.js.map +1 -1
- package/lib/sliding-sync-sdk.d.ts.map +1 -1
- package/lib/sliding-sync-sdk.js +368 -424
- package/lib/sliding-sync-sdk.js.map +1 -1
- package/lib/sliding-sync.js +135 -171
- package/lib/sliding-sync.js.map +1 -1
- package/lib/store/index.js +3 -1
- package/lib/store/indexeddb-backend.js +3 -1
- package/lib/store/indexeddb-local-backend.js +194 -253
- package/lib/store/indexeddb-local-backend.js.map +1 -1
- package/lib/store/indexeddb-remote-backend.js +33 -63
- package/lib/store/indexeddb-remote-backend.js.map +1 -1
- package/lib/store/indexeddb-store-worker.js +22 -23
- package/lib/store/indexeddb-store-worker.js.map +1 -1
- package/lib/store/indexeddb.js +44 -71
- package/lib/store/indexeddb.js.map +1 -1
- package/lib/store/local-storage-events-emitter.js +2 -2
- package/lib/store/local-storage-events-emitter.js.map +1 -1
- package/lib/store/memory.js +34 -57
- package/lib/store/memory.js.map +1 -1
- package/lib/store/stub.js +22 -35
- package/lib/store/stub.js.map +1 -1
- package/lib/sync-accumulator.js +54 -66
- package/lib/sync-accumulator.js.map +1 -1
- package/lib/sync.d.ts.map +1 -1
- package/lib/sync.js +905 -998
- package/lib/sync.js.map +1 -1
- package/lib/testing.js +63 -105
- package/lib/testing.js.map +1 -1
- package/lib/thread-utils.js +1 -4
- package/lib/thread-utils.js.map +1 -1
- package/lib/timeline-window.js +89 -102
- package/lib/timeline-window.js.map +1 -1
- package/lib/types.js +1 -1
- package/lib/types.js.map +1 -1
- package/lib/utils/decryptAESSecretStorageItem.js +14 -25
- package/lib/utils/decryptAESSecretStorageItem.js.map +1 -1
- package/lib/utils/encryptAESSecretStorageItem.js +27 -38
- package/lib/utils/encryptAESSecretStorageItem.js.map +1 -1
- package/lib/utils/internal/deriveKeys.js +25 -32
- package/lib/utils/internal/deriveKeys.js.map +1 -1
- package/lib/utils/roomVersion.js +1 -1
- package/lib/utils/roomVersion.js.map +1 -1
- package/lib/utils.js +83 -135
- package/lib/utils.js.map +1 -1
- package/lib/version-support.js +3 -3
- package/lib/version-support.js.map +1 -1
- package/lib/webrtc/audioContext.js +5 -6
- package/lib/webrtc/audioContext.js.map +1 -1
- package/lib/webrtc/call.js +1081 -1250
- package/lib/webrtc/call.js.map +1 -1
- package/lib/webrtc/callEventHandler.js +202 -214
- package/lib/webrtc/callEventHandler.js.map +1 -1
- package/lib/webrtc/callEventTypes.js +2 -2
- package/lib/webrtc/callEventTypes.js.map +1 -1
- package/lib/webrtc/callFeed.js +18 -20
- package/lib/webrtc/callFeed.js.map +1 -1
- package/lib/webrtc/groupCall.js +513 -602
- package/lib/webrtc/groupCall.js.map +1 -1
- package/lib/webrtc/groupCallEventHandler.js +59 -62
- package/lib/webrtc/groupCallEventHandler.js.map +1 -1
- package/lib/webrtc/mediaHandler.js +198 -232
- package/lib/webrtc/mediaHandler.js.map +1 -1
- package/lib/webrtc/stats/callFeedStatsReporter.js +16 -20
- package/lib/webrtc/stats/callFeedStatsReporter.js.map +1 -1
- package/lib/webrtc/stats/callStatsReportGatherer.js +67 -75
- package/lib/webrtc/stats/callStatsReportGatherer.js.map +1 -1
- package/lib/webrtc/stats/callStatsReportSummary.js +3 -1
- package/lib/webrtc/stats/connectionStats.js.map +1 -1
- package/lib/webrtc/stats/connectionStatsBuilder.js +2 -2
- package/lib/webrtc/stats/connectionStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/connectionStatsReportBuilder.js +20 -24
- package/lib/webrtc/stats/connectionStatsReportBuilder.js.map +1 -1
- package/lib/webrtc/stats/groupCallStats.js +6 -8
- package/lib/webrtc/stats/groupCallStats.js.map +1 -1
- package/lib/webrtc/stats/media/mediaSsrcHandler.js +7 -8
- package/lib/webrtc/stats/media/mediaSsrcHandler.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackHandler.js +7 -9
- package/lib/webrtc/stats/media/mediaTrackHandler.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackStats.js +3 -3
- package/lib/webrtc/stats/media/mediaTrackStats.js.map +1 -1
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js +7 -7
- package/lib/webrtc/stats/media/mediaTrackStatsHandler.js.map +1 -1
- package/lib/webrtc/stats/statsReport.js +1 -1
- package/lib/webrtc/stats/statsReport.js.map +1 -1
- package/lib/webrtc/stats/statsReportEmitter.js.map +1 -1
- package/lib/webrtc/stats/summaryStatsReportGatherer.js +14 -14
- package/lib/webrtc/stats/summaryStatsReportGatherer.js.map +1 -1
- package/lib/webrtc/stats/trackStatsBuilder.js +32 -34
- package/lib/webrtc/stats/trackStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/transportStats.js +3 -1
- package/lib/webrtc/stats/transportStatsBuilder.js +9 -9
- package/lib/webrtc/stats/transportStatsBuilder.js.map +1 -1
- package/lib/webrtc/stats/valueFormatter.js +1 -1
- package/lib/webrtc/stats/valueFormatter.js.map +1 -1
- package/package.json +18 -33
- package/src/@types/global.d.ts +2 -2
- package/src/ToDeviceMessageQueue.ts +2 -2
- package/src/browser-index.ts +4 -4
- package/src/client.ts +15 -20
- package/src/crypto-api/index.ts +17 -6
- package/src/embedded.ts +4 -6
- package/src/filter-component.ts +1 -0
- package/src/http-api/utils.ts +1 -1
- package/src/interactive-auth.ts +11 -5
- package/src/matrixrtc/LivekitTransport.ts +1 -1
- package/src/matrixrtc/MatrixRTCSession.ts +1 -1
- package/src/models/MSC3089Branch.ts +1 -1
- package/src/models/room-sticky-events.ts +1 -0
- package/src/models/room.ts +9 -11
- package/src/receipt-accumulator.ts +2 -0
- package/src/rendezvous/index.ts +1 -1
- package/src/rendezvous/transports/MSC4108RendezvousSession.ts +2 -2
- package/src/rust-crypto/PerSessionKeyBackupDownloader.ts +1 -1
- package/src/rust-crypto/index.ts +6 -6
- package/src/rust-crypto/rust-crypto.ts +31 -7
- package/src/rust-crypto/verification.ts +1 -1
- package/src/sliding-sync-sdk.ts +5 -7
- package/src/store/indexeddb-local-backend.ts +3 -3
- package/src/sync.ts +6 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensible_events.js","names":[
|
|
1
|
+
{"version":3,"file":"extensible_events.js","names":[],"sources":["../../src/@types/extensible_events.ts"],"sourcesContent":["/*\nCopyright 2021 - 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 EitherAnd, NamespacedValue, UnstableValue } from \"matrix-events-sdk\";\n\nimport { isProvided } from \"../extensible_events_v1/utilities.ts\";\n\n// Types and utilities for MSC1767: Extensible events (version 1) in Matrix\n\n/**\n * Represents the stable and unstable values of a given namespace.\n */\nexport type TSNamespace<N> =\n N extends NamespacedValue<infer S, infer U> ? TSNamespaceValue<S> | TSNamespaceValue<U> : never;\n\n/**\n * Represents a namespaced value, if the value is a string. Used to extract provided types\n * from a TSNamespace<N> (in cases where only stable *or* unstable is provided).\n */\nexport type TSNamespaceValue<V> = V extends string ? V : never;\n\n/**\n * Creates a type which is V when T is `never`, otherwise T.\n */\n// See https://github.com/microsoft/TypeScript/issues/23182#issuecomment-379091887 for details on the array syntax.\nexport type DefaultNever<T, V> = [T] extends [never] ? V : T;\n\n/**\n * The namespaced value for m.message\n */\nexport const M_MESSAGE = new UnstableValue(\"m.message\", \"org.matrix.msc1767.message\");\n\n/**\n * An m.message event rendering\n */\nexport interface IMessageRendering {\n body: string;\n mimetype?: string;\n}\n\n/**\n * The content for an m.message event\n */\nexport type ExtensibleMessageEventContent = EitherAnd<\n { [M_MESSAGE.name]: IMessageRendering[] },\n { [M_MESSAGE.altName]: IMessageRendering[] }\n>;\n\n/**\n * The namespaced value for m.text\n */\nexport const M_TEXT = new UnstableValue(\"m.text\", \"org.matrix.msc1767.text\");\n\n/**\n * The content for an m.text event\n */\nexport type TextEventContent = EitherAnd<{ [M_TEXT.name]: string }, { [M_TEXT.altName]: string }>;\n\n/**\n * The namespaced value for m.html\n */\nexport const M_HTML = new UnstableValue(\"m.html\", \"org.matrix.msc1767.html\");\n\n/**\n * The content for an m.html event\n */\nexport type HtmlEventContent = EitherAnd<{ [M_HTML.name]: string }, { [M_HTML.altName]: string }>;\n\n/**\n * The content for an m.message, m.text, or m.html event\n */\nexport type ExtensibleAnyMessageEventContent = ExtensibleMessageEventContent | TextEventContent | HtmlEventContent;\n\n/**\n * The namespaced value for an m.reference relation\n */\nexport const REFERENCE_RELATION = new NamespacedValue(\"m.reference\");\n\n/**\n * Represents any relation type\n */\nexport type AnyRelation = TSNamespace<typeof REFERENCE_RELATION> | string;\n\n/**\n * An m.relates_to relationship\n */\nexport type RelatesToRelationship<R = never> = {\n \"m.relates_to\": {\n // See https://github.com/microsoft/TypeScript/issues/23182#issuecomment-379091887 for array syntax\n rel_type: [R] extends [never] ? AnyRelation : TSNamespace<R>;\n event_id: string;\n };\n};\n\n/**\n * Partial types for a Matrix Event.\n */\nexport interface IPartialEvent<TContent> {\n type: string;\n content: TContent;\n}\n\n/**\n * Represents a potentially namespaced event type.\n */\nexport type ExtensibleEventType = NamespacedValue<string, string> | string;\n\n/**\n * Determines if two event types are the same, including namespaces.\n * @param given - The given event type. This will be compared\n * against the expected type.\n * @param expected - The expected event type.\n * @returns True if the given type matches the expected type.\n */\nexport function isEventTypeSame(given: ExtensibleEventType | null, expected: ExtensibleEventType | null): boolean {\n if (typeof given === \"string\") {\n if (typeof expected === \"string\") {\n return expected === given;\n } else {\n return (expected as NamespacedValue<string, string>).matches(given as string);\n }\n } else {\n if (typeof expected === \"string\") {\n return (given as NamespacedValue<string, string>).matches(expected as string);\n } else {\n const expectedNs = expected as NamespacedValue<string, string>;\n const givenNs = given as NamespacedValue<string, string>;\n return (\n expectedNs.matches(givenNs.name) ||\n (isProvided(givenNs.altName) && expectedNs.matches(givenNs.altName!))\n );\n }\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAyB,eAAe,EAAE,aAAa,QAAQ,mBAAmB;AAElF,SAAS,UAAU,QAAQ,sCAAsC;;AAEjE;;AAEA;AACA;AACA;;AAIA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAM,SAAS,GAAG,IAAI,aAAa,CAAC,WAAW,EAAE,4BAA4B,CAAC;;AAErF;AACA;AACA;;AAMA;AACA;AACA;;AAMA;AACA;AACA;AACA,OAAO,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,QAAQ,EAAE,yBAAyB,CAAC;;AAE5E;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAM,MAAM,GAAG,IAAI,aAAa,CAAC,QAAQ,EAAE,yBAAyB,CAAC;;AAE5E;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAM,kBAAkB,GAAG,IAAI,eAAe,CAAC,aAAa,CAAC;;AAEpE;AACA;AACA;;AAGA;AACA;AACA;;AASA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAAS,eAAe,CAAC,KAAiC,EAAE,QAAoC,EAAW;EAC9G,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;IAC3B,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;MAC9B,OAAO,QAAQ,KAAK,KAAK;IAC7B,CAAC,MAAM;MACH,OAAQ,QAAQ,CAAqC,OAAO,CAAC,KAAe,CAAC;IACjF;EACJ,CAAC,MAAM;IACH,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE;MAC9B,OAAQ,KAAK,CAAqC,OAAO,CAAC,QAAkB,CAAC;IACjF,CAAC,MAAM;MACH,MAAM,UAAU,GAAG,QAA2C;MAC9D,MAAM,OAAO,GAAG,KAAwC;MACxD,OACI,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,IAC/B,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC,OAAQ,CAAE;IAE7E;EACJ;AACJ","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"global.d.js","names":[],"sources":["../../src/@types/global.d.ts"],"sourcesContent":["/*\nCopyright 2020 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nexport {};\n\ndeclare global {\n // use `number` as the return type in all cases for globalThis.set{Interval,Timeout},\n // so we don't accidentally use the methods on NodeJS.Timeout - they only exist in a subset of environments.\n // The overload for clear{Interval,Timeout} is resolved as expected.\n // We use `ReturnType<typeof setTimeout>` in the code to be agnostic of if this definition gets loaded.\n function setInterval(handler: TimerHandler, timeout: number, ...
|
|
1
|
+
{"version":3,"file":"global.d.js","names":[],"sources":["../../src/@types/global.d.ts"],"sourcesContent":["/*\nCopyright 2020 The Matrix.org Foundation C.I.C.\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n*/\n\nexport {};\n\ndeclare global {\n // use `number` as the return type in all cases for globalThis.set{Interval,Timeout},\n // so we don't accidentally use the methods on NodeJS.Timeout - they only exist in a subset of environments.\n // The overload for clear{Interval,Timeout} is resolved as expected.\n // We use `ReturnType<typeof setTimeout>` in the code to be agnostic of if this definition gets loaded.\n function setInterval(handler: TimerHandler, timeout: number, ...args: any[]): number;\n function setTimeout(handler: TimerHandler, timeout: number, ...args: any[]): number;\n\n namespace NodeJS {\n interface Global {\n // marker variable used to detect both the browser & node entrypoints being used at once\n __js_sdk_entrypoint: unknown;\n }\n }\n\n // Chrome-specific getUserMedia constraints\n interface MediaTrackConstraints {\n mandatory?: {\n chromeMediaSource: string;\n chromeMediaSourceId: string;\n };\n }\n\n interface Navigator {\n // We check for the webkit-prefixed getUserMedia to detect if we're\n // on webkit: we should check if we still need to do this\n webkitGetUserMedia?: unknown;\n }\n\n export interface Uint8ArrayToBase64Options {\n alphabet?: \"base64\" | \"base64url\";\n omitPadding?: boolean;\n }\n\n interface Uint8Array {\n // https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.prototype.tobase64\n toBase64?(options?: Uint8ArrayToBase64Options): string;\n }\n\n export interface Uint8ArrayFromBase64Options {\n alphabet?: \"base64\"; // Our fallback code only handles base64.\n lastChunkHandling?: \"loose\"; // Our fallback code doesn't support other handling at this time.\n }\n\n interface Uint8ArrayConstructor {\n // https://tc39.es/proposal-arraybuffer-base64/spec/#sec-uint8array.frombase64\n fromBase64?(base64: string, options?: Uint8ArrayFromBase64Options): Uint8Array<ArrayBuffer>;\n }\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA","ignoreList":[]}
|
package/lib/@types/json.js
CHANGED
package/lib/@types/location.js
CHANGED
|
@@ -17,23 +17,23 @@ limitations under the License.
|
|
|
17
17
|
// Types for MSC3488 - m.location: Extending events with location data
|
|
18
18
|
|
|
19
19
|
import { UnstableValue } from "../NamespacedValue.js";
|
|
20
|
-
export
|
|
20
|
+
export let LocationAssetType = /*#__PURE__*/function (LocationAssetType) {
|
|
21
21
|
LocationAssetType["Self"] = "m.self";
|
|
22
22
|
LocationAssetType["Pin"] = "m.pin";
|
|
23
23
|
return LocationAssetType;
|
|
24
24
|
}({});
|
|
25
|
-
export
|
|
25
|
+
export const M_ASSET = new UnstableValue("m.asset", "org.matrix.msc3488.asset");
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* The event definition for an m.asset event (in content)
|
|
29
29
|
*/
|
|
30
30
|
|
|
31
|
-
export
|
|
31
|
+
export const M_TIMESTAMP = new UnstableValue("m.ts", "org.matrix.msc3488.ts");
|
|
32
32
|
/**
|
|
33
33
|
* The event definition for an m.ts event (in content)
|
|
34
34
|
*/
|
|
35
35
|
|
|
36
|
-
export
|
|
36
|
+
export const M_LOCATION = new UnstableValue("m.location", "org.matrix.msc3488.location");
|
|
37
37
|
|
|
38
38
|
/* From the spec at:
|
|
39
39
|
* https://github.com/matrix-org/matrix-doc/blob/matthew/location/proposals/3488-location.md
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"location.js","names":[
|
|
1
|
+
{"version":3,"file":"location.js","names":[],"sources":["../../src/@types/location.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// Types for MSC3488 - m.location: Extending events with location data\nimport { type EitherAnd } from \"matrix-events-sdk\";\n\nimport { UnstableValue } from \"../NamespacedValue.ts\";\nimport { type M_TEXT } from \"./extensible_events.ts\";\n\nexport enum LocationAssetType {\n Self = \"m.self\",\n Pin = \"m.pin\",\n}\n\nexport const M_ASSET = new UnstableValue(\"m.asset\", \"org.matrix.msc3488.asset\");\nexport type MAssetContent = { type: LocationAssetType };\n/**\n * The event definition for an m.asset event (in content)\n */\nexport type MAssetEvent = EitherAnd<{ [M_ASSET.name]: MAssetContent }, { [M_ASSET.altName]: MAssetContent }>;\n\nexport const M_TIMESTAMP = new UnstableValue(\"m.ts\", \"org.matrix.msc3488.ts\");\n/**\n * The event definition for an m.ts event (in content)\n */\nexport type MTimestampEvent = EitherAnd<{ [M_TIMESTAMP.name]: number }, { [M_TIMESTAMP.altName]: number }>;\n\nexport const M_LOCATION = new UnstableValue(\"m.location\", \"org.matrix.msc3488.location\");\n\nexport type MLocationContent = {\n uri: string;\n description?: string | null;\n};\n\nexport type MLocationEvent = EitherAnd<\n { [M_LOCATION.name]: MLocationContent },\n { [M_LOCATION.altName]: MLocationContent }\n>;\n\nexport type MTextEvent = EitherAnd<{ [M_TEXT.name]: string }, { [M_TEXT.altName]: string }>;\n\n/* From the spec at:\n * https://github.com/matrix-org/matrix-doc/blob/matthew/location/proposals/3488-location.md\n{\n \"type\": \"m.room.message\",\n \"content\": {\n \"body\": \"Matthew was at geo:51.5008,0.1247;u=35 as of Sat Nov 13 18:50:58 2021\",\n \"msgtype\": \"m.location\",\n \"geo_uri\": \"geo:51.5008,0.1247;u=35\",\n \"m.location\": {\n \"uri\": \"geo:51.5008,0.1247;u=35\",\n \"description\": \"Matthew's whereabouts\",\n },\n \"m.asset\": {\n \"type\": \"m.self\"\n },\n \"m.text\": \"Matthew was at geo:51.5008,0.1247;u=35 as of Sat Nov 13 18:50:58 2021\",\n \"m.ts\": 1636829458432,\n }\n}\n*/\ntype OptionalTimestampEvent = MTimestampEvent | undefined;\n/**\n * The content for an m.location event\n */\nexport type MLocationEventContent = MLocationEvent & MAssetEvent & MTextEvent & OptionalTimestampEvent;\n\nexport type LegacyLocationEventContent = {\n body: string;\n msgtype: string;\n geo_uri: string;\n};\n\n/**\n * Possible content for location events as sent over the wire\n */\nexport type LocationEventWireContent = Partial<LegacyLocationEventContent & MLocationEventContent>;\n\nexport type ILocationContent = MLocationEventContent & LegacyLocationEventContent;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;;AAGA,SAAS,aAAa,QAAQ,uBAAuB;AAGrD,WAAY,iBAAiB,0BAAjB,iBAAiB;EAAjB,iBAAiB;EAAjB,iBAAiB;EAAA,OAAjB,iBAAiB;AAAA;AAK7B,OAAO,MAAM,OAAO,GAAG,IAAI,aAAa,CAAC,SAAS,EAAE,0BAA0B,CAAC;;AAE/E;AACA;AACA;;AAGA,OAAO,MAAM,WAAW,GAAG,IAAI,aAAa,CAAC,MAAM,EAAE,uBAAuB,CAAC;AAC7E;AACA;AACA;;AAGA,OAAO,MAAM,UAAU,GAAG,IAAI,aAAa,CAAC,YAAY,EAAE,6BAA6B,CAAC;;AAcxF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AASA;AACA;AACA","ignoreList":[]}
|
package/lib/@types/media.js
CHANGED
package/lib/@types/membership.js
CHANGED
|
@@ -18,7 +18,7 @@ limitations under the License.
|
|
|
18
18
|
* Well-known values (from the spec or MSCs) that are allowed in the
|
|
19
19
|
* {@link Membership} type.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export let KnownMembership = /*#__PURE__*/function (KnownMembership) {
|
|
22
22
|
/**
|
|
23
23
|
* The user has been banned from the room, and is no longer allowed to join
|
|
24
24
|
* it until they are un-banned from the room (by having their membership
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"membership.js","names":[
|
|
1
|
+
{"version":3,"file":"membership.js","names":[],"sources":["../../src/@types/membership.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\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/**\n * Well-known values (from the spec or MSCs) that are allowed in the\n * {@link Membership} type.\n */\nexport enum KnownMembership {\n /**\n * The user has been banned from the room, and is no longer allowed to join\n * it until they are un-banned from the room (by having their membership\n * state set to a value other than ban).\n */\n Ban = \"ban\",\n /**\n * The user has been invited to join a room, but has not yet joined it.\n * They may not participate in the room until they join.\n * */\n Invite = \"invite\",\n /**\n * The user has joined the room (possibly after accepting an invite), and\n * may participate in it.\n */\n Join = \"join\",\n /**\n * The user has knocked on the room, requesting permission to participate.\n * They may not participate in the room until they join.\n */\n Knock = \"knock\",\n /**\n * The user was once joined to the room, but has since left (possibly by\n * choice, or possibly by being kicked).\n */\n Leave = \"leave\",\n}\n\n/**\n * The membership state for a user in a room [1]. A value from\n * {@link KnownMembership} should be used where available, but all string values\n * are allowed to provide flexibility for upcoming spec changes or proposals.\n *\n * [1] https://spec.matrix.org/latest/client-server-api/#mroommember\n */\nexport type Membership = KnownMembership | string;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,WAAY,eAAe,0BAAf,eAAe;EACvB;AACJ;AACA;AACA;AACA;EALY,eAAe;EAOvB;AACJ;AACA;AACA;EAVY,eAAe;EAYvB;AACJ;AACA;AACA;EAfY,eAAe;EAiBvB;AACJ;AACA;AACA;EApBY,eAAe;EAsBvB;AACJ;AACA;AACA;EAzBY,eAAe;EAAA,OAAf,eAAe;AAAA;;AA6B3B;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
|
package/lib/@types/partials.js
CHANGED
|
@@ -14,19 +14,19 @@ See the License for the specific language governing permissions and
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export let Visibility = /*#__PURE__*/function (Visibility) {
|
|
18
18
|
Visibility["Public"] = "public";
|
|
19
19
|
Visibility["Private"] = "private";
|
|
20
20
|
return Visibility;
|
|
21
21
|
}({});
|
|
22
|
-
export
|
|
22
|
+
export let Preset = /*#__PURE__*/function (Preset) {
|
|
23
23
|
Preset["PrivateChat"] = "private_chat";
|
|
24
24
|
Preset["TrustedPrivateChat"] = "trusted_private_chat";
|
|
25
25
|
Preset["PublicChat"] = "public_chat";
|
|
26
26
|
return Preset;
|
|
27
27
|
}({});
|
|
28
28
|
// Knock and private are reserved keywords which are not yet implemented.
|
|
29
|
-
export
|
|
29
|
+
export let JoinRule = /*#__PURE__*/function (JoinRule) {
|
|
30
30
|
JoinRule["Public"] = "public";
|
|
31
31
|
JoinRule["Invite"] = "invite";
|
|
32
32
|
/**
|
|
@@ -37,16 +37,16 @@ export var JoinRule = /*#__PURE__*/function (JoinRule) {
|
|
|
37
37
|
JoinRule["Restricted"] = "restricted";
|
|
38
38
|
return JoinRule;
|
|
39
39
|
}({});
|
|
40
|
-
export
|
|
40
|
+
export let RestrictedAllowType = /*#__PURE__*/function (RestrictedAllowType) {
|
|
41
41
|
RestrictedAllowType["RoomMembership"] = "m.room_membership";
|
|
42
42
|
return RestrictedAllowType;
|
|
43
43
|
}({});
|
|
44
|
-
export
|
|
44
|
+
export let GuestAccess = /*#__PURE__*/function (GuestAccess) {
|
|
45
45
|
GuestAccess["CanJoin"] = "can_join";
|
|
46
46
|
GuestAccess["Forbidden"] = "forbidden";
|
|
47
47
|
return GuestAccess;
|
|
48
48
|
}({});
|
|
49
|
-
export
|
|
49
|
+
export let HistoryVisibility = /*#__PURE__*/function (HistoryVisibility) {
|
|
50
50
|
HistoryVisibility["Invited"] = "invited";
|
|
51
51
|
HistoryVisibility["Joined"] = "joined";
|
|
52
52
|
HistoryVisibility["Shared"] = "shared";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"partials.js","names":[
|
|
1
|
+
{"version":3,"file":"partials.js","names":[],"sources":["../../src/@types/partials.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\nexport enum Visibility {\n Public = \"public\",\n Private = \"private\",\n}\n\nexport enum Preset {\n PrivateChat = \"private_chat\",\n TrustedPrivateChat = \"trusted_private_chat\",\n PublicChat = \"public_chat\",\n}\n\nexport type ResizeMethod = \"crop\" | \"scale\";\n\nexport type IdServerUnbindResult = \"no-support\" | \"success\";\n\n// Knock and private are reserved keywords which are not yet implemented.\nexport enum JoinRule {\n Public = \"public\",\n Invite = \"invite\",\n /**\n * @deprecated Reserved keyword. Should not be used. Not yet implemented.\n */\n Private = \"private\",\n Knock = \"knock\",\n Restricted = \"restricted\",\n}\n\nexport enum RestrictedAllowType {\n RoomMembership = \"m.room_membership\",\n}\n\nexport enum GuestAccess {\n CanJoin = \"can_join\",\n Forbidden = \"forbidden\",\n}\n\nexport enum HistoryVisibility {\n Invited = \"invited\",\n Joined = \"joined\",\n Shared = \"shared\",\n WorldReadable = \"world_readable\",\n}\n\nexport interface IUsageLimit {\n // \"hs_disabled\" is NOT a specced string, but is used in Synapse\n // This is tracked over at https://github.com/matrix-org/synapse/issues/9237\n // eslint-disable-next-line camelcase\n limit_type: \"monthly_active_user\" | \"hs_disabled\" | string;\n // eslint-disable-next-line camelcase\n admin_contact?: string;\n}\n\n/**\n * A policy name & url in a specific internationalisation\n * @see https://spec.matrix.org/v1.13/identity-service-api/#get_matrixidentityv2terms_response-200_internationalised-policy\n */\nexport interface InternationalisedPolicy {\n name: string;\n url: string;\n}\n\n/**\n * A versioned policy with internationalised variants\n * @see https://spec.matrix.org/v1.13/identity-service-api/#get_matrixidentityv2terms_response-200_policy-object\n */\nexport interface Policy {\n /**\n * The version for the policy.\n * There are no requirements on what this might be and could be “alpha”, semantically versioned, or arbitrary.\n */\n version: string;\n /**\n * The policy information for the specified language.\n * @remarks the type has to include a union with string due to limitations in the type system.\n */\n [lang: string]: InternationalisedPolicy | string;\n}\n\n/**\n * Response from the Terms API for Identity servers\n * @see https://spec.matrix.org/v1.13/identity-service-api/#get_matrixidentityv2terms\n */\nexport interface Terms {\n policies: {\n [policyName: string]: Policy;\n };\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAY,UAAU,0BAAV,UAAU;EAAV,UAAU;EAAV,UAAU;EAAA,OAAV,UAAU;AAAA;AAKtB,WAAY,MAAM,0BAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAN,MAAM;EAAA,OAAN,MAAM;AAAA;AAUlB;AACA,WAAY,QAAQ,0BAAR,QAAQ;EAAR,QAAQ;EAAR,QAAQ;EAGhB;AACJ;AACA;EALY,QAAQ;EAAR,QAAQ;EAAR,QAAQ;EAAA,OAAR,QAAQ;AAAA;AAWpB,WAAY,mBAAmB,0BAAnB,mBAAmB;EAAnB,mBAAmB;EAAA,OAAnB,mBAAmB;AAAA;AAI/B,WAAY,WAAW,0BAAX,WAAW;EAAX,WAAW;EAAX,WAAW;EAAA,OAAX,WAAW;AAAA;AAKvB,WAAY,iBAAiB,0BAAjB,iBAAiB;EAAjB,iBAAiB;EAAjB,iBAAiB;EAAjB,iBAAiB;EAAjB,iBAAiB;EAAA,OAAjB,iBAAiB;AAAA;;AAgB7B;AACA;AACA;AACA;;AAMA;AACA;AACA;AACA;;AAcA;AACA;AACA;AACA","ignoreList":[]}
|
package/lib/@types/polls.js
CHANGED
|
@@ -18,12 +18,12 @@ import { UnstableValue } from "matrix-events-sdk";
|
|
|
18
18
|
/**
|
|
19
19
|
* Identifier for a disclosed poll.
|
|
20
20
|
*/
|
|
21
|
-
export
|
|
21
|
+
export const M_POLL_KIND_DISCLOSED = new UnstableValue("m.poll.disclosed", "org.matrix.msc3381.poll.disclosed");
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Identifier for an undisclosed poll.
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export const M_POLL_KIND_UNDISCLOSED = new UnstableValue("m.poll.undisclosed", "org.matrix.msc3381.poll.undisclosed");
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Any poll kind.
|
|
@@ -36,7 +36,7 @@ export var M_POLL_KIND_UNDISCLOSED = new UnstableValue("m.poll.undisclosed", "or
|
|
|
36
36
|
/**
|
|
37
37
|
* The namespaced value for m.poll.start
|
|
38
38
|
*/
|
|
39
|
-
export
|
|
39
|
+
export const M_POLL_START = new UnstableValue("m.poll.start", "org.matrix.msc3381.poll.start");
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* The m.poll.start type within event content
|
|
@@ -57,7 +57,7 @@ export var M_POLL_START = new UnstableValue("m.poll.start", "org.matrix.msc3381.
|
|
|
57
57
|
/**
|
|
58
58
|
* The namespaced value for m.poll.response
|
|
59
59
|
*/
|
|
60
|
-
export
|
|
60
|
+
export const M_POLL_RESPONSE = new UnstableValue("m.poll.response", "org.matrix.msc3381.poll.response");
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* The m.poll.response type within event content
|
|
@@ -74,7 +74,7 @@ export var M_POLL_RESPONSE = new UnstableValue("m.poll.response", "org.matrix.ms
|
|
|
74
74
|
/**
|
|
75
75
|
* The namespaced value for m.poll.end
|
|
76
76
|
*/
|
|
77
|
-
export
|
|
77
|
+
export const M_POLL_END = new UnstableValue("m.poll.end", "org.matrix.msc3381.poll.end");
|
|
78
78
|
|
|
79
79
|
/**
|
|
80
80
|
* The event definition for an m.poll.end event (in content)
|
package/lib/@types/polls.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"polls.js","names":[
|
|
1
|
+
{"version":3,"file":"polls.js","names":[],"sources":["../../src/@types/polls.ts"],"sourcesContent":["/*\nCopyright 2022 - 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 EitherAnd, UnstableValue } from \"matrix-events-sdk\";\n\nimport {\n type ExtensibleAnyMessageEventContent,\n type REFERENCE_RELATION,\n type RelatesToRelationship,\n type TSNamespace,\n} from \"./extensible_events.ts\";\nimport { type EmptyObject } from \"./common.ts\";\n\n/**\n * Identifier for a disclosed poll.\n */\nexport const M_POLL_KIND_DISCLOSED = new UnstableValue(\"m.poll.disclosed\", \"org.matrix.msc3381.poll.disclosed\");\n\n/**\n * Identifier for an undisclosed poll.\n */\nexport const M_POLL_KIND_UNDISCLOSED = new UnstableValue(\"m.poll.undisclosed\", \"org.matrix.msc3381.poll.undisclosed\");\n\n/**\n * Any poll kind.\n */\nexport type PollKind = TSNamespace<typeof M_POLL_KIND_DISCLOSED> | TSNamespace<typeof M_POLL_KIND_UNDISCLOSED> | string;\n\n/**\n * Known poll kind namespaces.\n */\nexport type KnownPollKind = typeof M_POLL_KIND_DISCLOSED | typeof M_POLL_KIND_UNDISCLOSED;\n\n/**\n * The namespaced value for m.poll.start\n */\nexport const M_POLL_START = new UnstableValue(\"m.poll.start\", \"org.matrix.msc3381.poll.start\");\n\n/**\n * The m.poll.start type within event content\n */\nexport type PollStartSubtype = {\n question: ExtensibleAnyMessageEventContent;\n kind: PollKind;\n max_selections?: number; // default 1, always positive\n answers: PollAnswer[];\n};\n\n/**\n * A poll answer.\n */\nexport type PollAnswer = ExtensibleAnyMessageEventContent & { id: string };\n\n/**\n * The event definition for an m.poll.start event (in content)\n */\nexport type PollStartEvent = EitherAnd<\n { [M_POLL_START.name]: PollStartSubtype },\n { [M_POLL_START.altName]: PollStartSubtype }\n>;\n\n/**\n * The content for an m.poll.start event\n */\nexport type PollStartEventContent = PollStartEvent & ExtensibleAnyMessageEventContent;\n\n/**\n * The namespaced value for m.poll.response\n */\nexport const M_POLL_RESPONSE = new UnstableValue(\"m.poll.response\", \"org.matrix.msc3381.poll.response\");\n\n/**\n * The m.poll.response type within event content\n */\nexport type PollResponseSubtype = {\n answers: string[];\n};\n\n/**\n * The event definition for an m.poll.response event (in content)\n */\nexport type PollResponseEvent = EitherAnd<\n { [M_POLL_RESPONSE.name]: PollResponseSubtype },\n { [M_POLL_RESPONSE.altName]: PollResponseSubtype }\n>;\n\n/**\n * The content for an m.poll.response event\n */\nexport type PollResponseEventContent = PollResponseEvent & RelatesToRelationship<typeof REFERENCE_RELATION>;\n\n/**\n * The namespaced value for m.poll.end\n */\nexport const M_POLL_END = new UnstableValue(\"m.poll.end\", \"org.matrix.msc3381.poll.end\");\n\n/**\n * The event definition for an m.poll.end event (in content)\n */\nexport type PollEndEvent = EitherAnd<{ [M_POLL_END.name]: EmptyObject }, { [M_POLL_END.altName]: EmptyObject }>;\n\n/**\n * The content for an m.poll.end event\n */\nexport type PollEndEventContent = PollEndEvent &\n RelatesToRelationship<typeof REFERENCE_RELATION> &\n ExtensibleAnyMessageEventContent;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAyB,aAAa,QAAQ,mBAAmB;AAUjE;AACA;AACA;AACA,OAAO,MAAM,qBAAqB,GAAG,IAAI,aAAa,CAAC,kBAAkB,EAAE,mCAAmC,CAAC;;AAE/G;AACA;AACA;AACA,OAAO,MAAM,uBAAuB,GAAG,IAAI,aAAa,CAAC,oBAAoB,EAAE,qCAAqC,CAAC;;AAErH;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAM,YAAY,GAAG,IAAI,aAAa,CAAC,cAAc,EAAE,+BAA+B,CAAC;;AAE9F;AACA;AACA;;AAQA;AACA;AACA;;AAGA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAM,eAAe,GAAG,IAAI,aAAa,CAAC,iBAAiB,EAAE,kCAAkC,CAAC;;AAEvG;AACA;AACA;;AAKA;AACA;AACA;;AAMA;AACA;AACA;;AAGA;AACA;AACA;AACA,OAAO,MAAM,UAAU,GAAG,IAAI,aAAa,CAAC,YAAY,EAAE,6BAA6B,CAAC;;AAExF;AACA;AACA;;AAGA;AACA;AACA","ignoreList":[]}
|
|
@@ -14,13 +14,13 @@ See the License for the specific language governing permissions and
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export let ReceiptType = /*#__PURE__*/function (ReceiptType) {
|
|
18
18
|
ReceiptType["Read"] = "m.read";
|
|
19
19
|
ReceiptType["FullyRead"] = "m.fully_read";
|
|
20
20
|
ReceiptType["ReadPrivate"] = "m.read.private";
|
|
21
21
|
return ReceiptType;
|
|
22
22
|
}({});
|
|
23
|
-
export
|
|
23
|
+
export const MAIN_ROOM_TIMELINE = "main";
|
|
24
24
|
|
|
25
25
|
// We will only hold a synthetic receipt if we do not have a real receipt or the synthetic is newer.
|
|
26
26
|
// map: receipt type → user Id → receipt
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"read_receipts.js","names":[
|
|
1
|
+
{"version":3,"file":"read_receipts.js","names":[],"sources":["../../src/@types/read_receipts.ts"],"sourcesContent":["/*\nCopyright 2022 Šimon Brandner <simon.bra.ag@gmail.com>\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\nexport enum ReceiptType {\n Read = \"m.read\",\n FullyRead = \"m.fully_read\",\n ReadPrivate = \"m.read.private\",\n}\n\nexport const MAIN_ROOM_TIMELINE = \"main\";\n\nexport interface Receipt {\n ts: number;\n thread_id?: string;\n}\n\nexport interface WrappedReceipt {\n eventId: string;\n data: Receipt;\n}\n\nexport interface CachedReceipt {\n type: ReceiptType;\n userId: string;\n data: Receipt;\n}\n\nexport type ReceiptCache = Map<string, CachedReceipt[]>;\n\nexport interface ReceiptContent {\n [eventId: string]: {\n [key in ReceiptType | string]: {\n [userId: string]: Receipt;\n };\n };\n}\n\n// We will only hold a synthetic receipt if we do not have a real receipt or the synthetic is newer.\n// map: receipt type → user Id → receipt\nexport type Receipts = Map<string, Map<string, [real: WrappedReceipt | null, synthetic: WrappedReceipt | null]>>;\n\nexport type CachedReceiptStructure = {\n eventId: string;\n receiptType: string | ReceiptType;\n userId: string;\n receipt: Receipt;\n synthetic: boolean;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAY,WAAW,0BAAX,WAAW;EAAX,WAAW;EAAX,WAAW;EAAX,WAAW;EAAA,OAAX,WAAW;AAAA;AAMvB,OAAO,MAAM,kBAAkB,GAAG,MAAM;;AA4BxC;AACA","ignoreList":[]}
|
package/lib/@types/requests.js
CHANGED
|
@@ -31,7 +31,7 @@ export function isSendDelayedEventRequestOpts(opts) {
|
|
|
31
31
|
// At least one of these fields must be specified.
|
|
32
32
|
return "delay" in opts || "parent_delay_id" in opts;
|
|
33
33
|
}
|
|
34
|
-
export
|
|
34
|
+
export let UpdateDelayedEventAction = /*#__PURE__*/function (UpdateDelayedEventAction) {
|
|
35
35
|
UpdateDelayedEventAction["Cancel"] = "cancel";
|
|
36
36
|
UpdateDelayedEventAction["Restart"] = "restart";
|
|
37
37
|
UpdateDelayedEventAction["Send"] = "send";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"requests.js","names":["isSendDelayedEventRequestOpts","opts","parent_delay_id","delay","UpdateDelayedEventAction"],"sources":["../../src/@types/requests.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\nimport { type IContent, type IEvent } from \"../models/event.ts\";\nimport { type Preset, type Visibility } from \"./partials.ts\";\nimport { type IEventWithRoomId, type SearchKey } from \"./search.ts\";\nimport { type IRoomEventFilter } from \"../filter.ts\";\nimport { type Direction } from \"../models/event-timeline.ts\";\nimport { type PushRuleAction } from \"./PushRules.ts\";\nimport { type MatrixError } from \"../matrix.ts\";\nimport { type IRoomEvent } from \"../sync-accumulator.ts\";\nimport { type EventType, type RelationType, type RoomType } from \"./event.ts\";\n\n// allow camelcase as these are things that go onto the wire\n/* eslint-disable camelcase */\n\nexport interface IJoinRoomOpts {\n /**\n * If the caller has a keypair 3pid invite, the signing URL is passed in this parameter.\n */\n inviteSignUrl?: string;\n\n /**\n * The server names to try and join through in addition to those that are automatically chosen.\n * Only the first 3 are actually used in the request, to avoid HTTP 414 Request-URI Too Long responses.\n */\n viaServers?: string[];\n\n /**\n * Previously, configured whether to accept encrypted history shared by the inviter. This is now always enabled,\n * and the setting is only retained to avoid a breaking change to the API. It has no effect.\n *\n * @deprecated\n */\n acceptSharedHistory?: boolean;\n}\n\n/** Options object for {@link MatrixClient.invite}. */\nexport interface InviteOpts {\n /**\n * The reason for the invite.\n */\n reason?: string;\n\n /**\n * Previously, configured whether to send encrypted history if the visibility settings allow it.\n * This is now always enabled, and the setting is only retained to avoid a breaking change to the API. It has no effect.\n *\n * @deprecated\n */\n shareEncryptedHistory?: boolean;\n}\n\nexport interface KnockRoomOpts {\n /**\n * The reason for the knock.\n */\n reason?: string;\n\n /**\n * The server names to try and knock through in addition to those that are automatically chosen.\n * Only the first 3 are actually used in the request, to avoid HTTP 414 Request-URI Too Long responses.\n */\n viaServers?: string | string[];\n}\n\nexport interface IRedactOpts {\n reason?: string;\n /**\n * If specified, then any events which relate to the event being redacted with\n * any of the relationship types listed will also be redacted.\n * Provide a \"*\" list item to tell the server to redact relations of any type.\n *\n * <b>Raises an Error if the server does not support it.</b>\n * Check for server-side support before using this param with\n * <code>client.canSupport.get(Feature.RelationBasedRedactions)</code>.\n * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}\n */\n with_rel_types?: Array<RelationType | \"*\">;\n}\n\nexport interface ISendEventResponse {\n event_id: string;\n}\n\nexport type SendDelayedEventRequestOpts = { parent_delay_id: string } | { delay: number; parent_delay_id?: string };\n\nexport function isSendDelayedEventRequestOpts(opts: object): opts is SendDelayedEventRequestOpts {\n if (\"parent_delay_id\" in opts && typeof opts.parent_delay_id !== \"string\") {\n // Invalid type, reject\n return false;\n }\n if (\"delay\" in opts && typeof opts.delay !== \"number\") {\n // Invalid type, reject.\n return true;\n }\n // At least one of these fields must be specified.\n return \"delay\" in opts || \"parent_delay_id\" in opts;\n}\nexport type SendDelayedEventResponse = {\n delay_id: string;\n};\n\nexport enum UpdateDelayedEventAction {\n Cancel = \"cancel\",\n Restart = \"restart\",\n Send = \"send\",\n}\n\nexport type UpdateDelayedEventRequestOpts = SendDelayedEventResponse & {\n action: UpdateDelayedEventAction;\n};\n\ntype DelayedPartialTimelineEvent = {\n room_id: string;\n type: string;\n content: IContent;\n};\n\ntype DelayedPartialStateEvent = DelayedPartialTimelineEvent & {\n state_key: string;\n};\n\ntype DelayedPartialEvent = DelayedPartialTimelineEvent | DelayedPartialStateEvent;\n\nexport type DelayedEventInfoItem = DelayedPartialEvent &\n SendDelayedEventResponse &\n SendDelayedEventRequestOpts & {\n running_since: number;\n };\n\nexport type DelayedEventInfo = {\n scheduled?: DelayedEventInfoItem[];\n finalised?: {\n delayed_event: DelayedEventInfoItem;\n outcome: \"send\" | \"cancel\";\n reason: \"error\" | \"action\" | \"delay\";\n error?: MatrixError[\"data\"];\n event_id?: string;\n origin_server_ts?: number;\n }[];\n next_batch?: string;\n};\n\nexport interface IPresenceOpts {\n // One of \"online\", \"offline\" or \"unavailable\"\n presence: \"online\" | \"offline\" | \"unavailable\";\n // The status message to attach.\n status_msg?: string;\n}\n\nexport interface IPaginateOpts {\n // true to fill backwards, false to go forwards\n backwards?: boolean;\n // number of events to request\n limit?: number;\n}\n\nexport interface IGuestAccessOpts {\n /**\n * True to allow guests to join this room. This\n * implicitly gives guests write access. If false or not given, guests are\n * explicitly forbidden from joining the room.\n */\n allowJoin: boolean;\n /**\n * True to set history visibility to\n * be world_readable. This gives guests read access *from this point forward*.\n * If false or not given, history visibility is not modified.\n */\n allowRead: boolean;\n}\n\nexport interface ISearchOpts {\n keys?: SearchKey[];\n query: string;\n}\n\nexport interface IEventSearchOpts {\n // a JSON filter object to pass in the request\n filter?: IRoomEventFilter;\n // the term to search for\n term: string;\n}\n\nexport interface IInvite3PID {\n id_server: string;\n id_access_token?: string; // this gets injected by the js-sdk\n medium: string;\n address: string;\n}\n\nexport interface ICreateRoomStateEvent {\n type: string;\n state_key?: string; // defaults to an empty string\n content: IContent;\n}\n\nexport interface ICreateRoomOpts {\n // The alias localpart to assign to this room.\n room_alias_name?: string;\n // Either 'public' or 'private'.\n visibility?: Visibility;\n // The name to give this room.\n name?: string;\n // The topic to give this room.\n topic?: string;\n preset?: Preset;\n power_level_content_override?: {\n ban?: number;\n events?: Record<EventType | string, number>;\n events_default?: number;\n invite?: number;\n kick?: number;\n notifications?: Record<string, number>;\n redact?: number;\n state_default?: number;\n users?: Record<string, number>;\n users_default?: number;\n };\n creation_content?: object;\n initial_state?: ICreateRoomStateEvent[];\n // A list of user IDs to invite to this room.\n invite?: string[];\n invite_3pid?: IInvite3PID[];\n is_direct?: boolean;\n room_version?: string;\n}\n\nexport interface IRoomDirectoryOptions {\n /**\n * The remote server to query for the room list.\n * Optional. If unspecified, get the local homeserver's public room list.\n */\n server?: string;\n /**\n * Maximum number of entries to return\n */\n limit?: number;\n /**\n * Token to paginate from\n */\n since?: string;\n\n /** Filter parameters */\n filter?: {\n // String to search for\n generic_search_term?: string;\n room_types?: Array<RoomType | null>;\n };\n include_all_networks?: boolean;\n third_party_instance_id?: string;\n}\n\nexport interface IAddThreePidOnlyBody {\n auth?: {\n type: string;\n session?: string;\n };\n client_secret: string;\n sid: string;\n}\n\nexport interface IBindThreePidBody {\n client_secret: string;\n id_server: string;\n // Some older identity servers have no auth enabled\n id_access_token: string | null;\n sid: string;\n}\n\nexport interface IRelationsRequestOpts {\n from?: string;\n to?: string;\n limit?: number;\n dir?: Direction;\n recurse?: boolean; // MSC3981 Relations Recursion https://github.com/matrix-org/matrix-spec-proposals/pull/3981\n}\n\nexport interface IRelationsResponse {\n chunk: IEvent[];\n next_batch?: string;\n prev_batch?: string;\n}\n\nexport interface IContextResponse {\n end?: string;\n start?: string;\n state?: IEventWithRoomId[];\n events_before?: IEventWithRoomId[];\n events_after?: IEventWithRoomId[];\n event?: IEventWithRoomId;\n}\n\nexport interface IEventsResponse {\n chunk: IEventWithRoomId[];\n end: string;\n start: string;\n}\n\nexport interface INotification {\n actions: PushRuleAction[];\n event: IRoomEvent;\n profile_tag?: string;\n read: boolean;\n room_id: string;\n ts: number;\n}\n\nexport interface INotificationsResponse {\n next_token: string;\n notifications: INotification[];\n}\n\nexport interface IFilterResponse {\n filter_id: string;\n}\n\nexport interface ITagsResponse {\n tags: {\n [tagId: string]: {\n order: number;\n };\n };\n}\n\nexport interface IStatusResponse extends IPresenceOpts {\n currently_active?: boolean;\n last_active_ago?: number;\n}\n\n/* eslint-enable camelcase */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;;AAuBA;;AAkDA,OAAO,SAASA,6BAA6BA,CAACC,IAAY,EAAuC;EAC7F,IAAI,iBAAiB,IAAIA,IAAI,IAAI,OAAOA,IAAI,CAACC,eAAe,KAAK,QAAQ,EAAE;IACvE;IACA,OAAO,KAAK;EAChB;EACA,IAAI,OAAO,IAAID,IAAI,IAAI,OAAOA,IAAI,CAACE,KAAK,KAAK,QAAQ,EAAE;IACnD;IACA,OAAO,IAAI;EACf;EACA;EACA,OAAO,OAAO,IAAIF,IAAI,IAAI,iBAAiB,IAAIA,IAAI;AACvD;AAKA,WAAYG,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;;AAoOpC","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"requests.js","names":[],"sources":["../../src/@types/requests.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\nimport { type IContent, type IEvent } from \"../models/event.ts\";\nimport { type Preset, type Visibility } from \"./partials.ts\";\nimport { type IEventWithRoomId, type SearchKey } from \"./search.ts\";\nimport { type IRoomEventFilter } from \"../filter.ts\";\nimport { type Direction } from \"../models/event-timeline.ts\";\nimport { type PushRuleAction } from \"./PushRules.ts\";\nimport { type MatrixError } from \"../matrix.ts\";\nimport { type IRoomEvent } from \"../sync-accumulator.ts\";\nimport { type EventType, type RelationType, type RoomType } from \"./event.ts\";\n\n// allow camelcase as these are things that go onto the wire\n/* eslint-disable camelcase */\n\nexport interface IJoinRoomOpts {\n /**\n * If the caller has a keypair 3pid invite, the signing URL is passed in this parameter.\n */\n inviteSignUrl?: string;\n\n /**\n * The server names to try and join through in addition to those that are automatically chosen.\n * Only the first 3 are actually used in the request, to avoid HTTP 414 Request-URI Too Long responses.\n */\n viaServers?: string[];\n\n /**\n * Previously, configured whether to accept encrypted history shared by the inviter. This is now always enabled,\n * and the setting is only retained to avoid a breaking change to the API. It has no effect.\n *\n * @deprecated\n */\n acceptSharedHistory?: boolean;\n}\n\n/** Options object for {@link MatrixClient.invite}. */\nexport interface InviteOpts {\n /**\n * The reason for the invite.\n */\n reason?: string;\n\n /**\n * Previously, configured whether to send encrypted history if the visibility settings allow it.\n * This is now always enabled, and the setting is only retained to avoid a breaking change to the API. It has no effect.\n *\n * @deprecated\n */\n shareEncryptedHistory?: boolean;\n}\n\nexport interface KnockRoomOpts {\n /**\n * The reason for the knock.\n */\n reason?: string;\n\n /**\n * The server names to try and knock through in addition to those that are automatically chosen.\n * Only the first 3 are actually used in the request, to avoid HTTP 414 Request-URI Too Long responses.\n */\n viaServers?: string | string[];\n}\n\nexport interface IRedactOpts {\n reason?: string;\n /**\n * If specified, then any events which relate to the event being redacted with\n * any of the relationship types listed will also be redacted.\n * Provide a \"*\" list item to tell the server to redact relations of any type.\n *\n * <b>Raises an Error if the server does not support it.</b>\n * Check for server-side support before using this param with\n * <code>client.canSupport.get(Feature.RelationBasedRedactions)</code>.\n * {@link https://github.com/matrix-org/matrix-spec-proposals/pull/3912}\n */\n with_rel_types?: Array<RelationType | \"*\">;\n}\n\nexport interface ISendEventResponse {\n event_id: string;\n}\n\nexport type SendDelayedEventRequestOpts = { parent_delay_id: string } | { delay: number; parent_delay_id?: string };\n\nexport function isSendDelayedEventRequestOpts(opts: object): opts is SendDelayedEventRequestOpts {\n if (\"parent_delay_id\" in opts && typeof opts.parent_delay_id !== \"string\") {\n // Invalid type, reject\n return false;\n }\n if (\"delay\" in opts && typeof opts.delay !== \"number\") {\n // Invalid type, reject.\n return true;\n }\n // At least one of these fields must be specified.\n return \"delay\" in opts || \"parent_delay_id\" in opts;\n}\nexport type SendDelayedEventResponse = {\n delay_id: string;\n};\n\nexport enum UpdateDelayedEventAction {\n Cancel = \"cancel\",\n Restart = \"restart\",\n Send = \"send\",\n}\n\nexport type UpdateDelayedEventRequestOpts = SendDelayedEventResponse & {\n action: UpdateDelayedEventAction;\n};\n\ntype DelayedPartialTimelineEvent = {\n room_id: string;\n type: string;\n content: IContent;\n};\n\ntype DelayedPartialStateEvent = DelayedPartialTimelineEvent & {\n state_key: string;\n};\n\ntype DelayedPartialEvent = DelayedPartialTimelineEvent | DelayedPartialStateEvent;\n\nexport type DelayedEventInfoItem = DelayedPartialEvent &\n SendDelayedEventResponse &\n SendDelayedEventRequestOpts & {\n running_since: number;\n };\n\nexport type DelayedEventInfo = {\n scheduled?: DelayedEventInfoItem[];\n finalised?: {\n delayed_event: DelayedEventInfoItem;\n outcome: \"send\" | \"cancel\";\n reason: \"error\" | \"action\" | \"delay\";\n error?: MatrixError[\"data\"];\n event_id?: string;\n origin_server_ts?: number;\n }[];\n next_batch?: string;\n};\n\nexport interface IPresenceOpts {\n // One of \"online\", \"offline\" or \"unavailable\"\n presence: \"online\" | \"offline\" | \"unavailable\";\n // The status message to attach.\n status_msg?: string;\n}\n\nexport interface IPaginateOpts {\n // true to fill backwards, false to go forwards\n backwards?: boolean;\n // number of events to request\n limit?: number;\n}\n\nexport interface IGuestAccessOpts {\n /**\n * True to allow guests to join this room. This\n * implicitly gives guests write access. If false or not given, guests are\n * explicitly forbidden from joining the room.\n */\n allowJoin: boolean;\n /**\n * True to set history visibility to\n * be world_readable. This gives guests read access *from this point forward*.\n * If false or not given, history visibility is not modified.\n */\n allowRead: boolean;\n}\n\nexport interface ISearchOpts {\n keys?: SearchKey[];\n query: string;\n}\n\nexport interface IEventSearchOpts {\n // a JSON filter object to pass in the request\n filter?: IRoomEventFilter;\n // the term to search for\n term: string;\n}\n\nexport interface IInvite3PID {\n id_server: string;\n id_access_token?: string; // this gets injected by the js-sdk\n medium: string;\n address: string;\n}\n\nexport interface ICreateRoomStateEvent {\n type: string;\n state_key?: string; // defaults to an empty string\n content: IContent;\n}\n\nexport interface ICreateRoomOpts {\n // The alias localpart to assign to this room.\n room_alias_name?: string;\n // Either 'public' or 'private'.\n visibility?: Visibility;\n // The name to give this room.\n name?: string;\n // The topic to give this room.\n topic?: string;\n preset?: Preset;\n power_level_content_override?: {\n ban?: number;\n events?: Record<EventType | string, number>;\n events_default?: number;\n invite?: number;\n kick?: number;\n notifications?: Record<string, number>;\n redact?: number;\n state_default?: number;\n users?: Record<string, number>;\n users_default?: number;\n };\n creation_content?: object;\n initial_state?: ICreateRoomStateEvent[];\n // A list of user IDs to invite to this room.\n invite?: string[];\n invite_3pid?: IInvite3PID[];\n is_direct?: boolean;\n room_version?: string;\n}\n\nexport interface IRoomDirectoryOptions {\n /**\n * The remote server to query for the room list.\n * Optional. If unspecified, get the local homeserver's public room list.\n */\n server?: string;\n /**\n * Maximum number of entries to return\n */\n limit?: number;\n /**\n * Token to paginate from\n */\n since?: string;\n\n /** Filter parameters */\n filter?: {\n // String to search for\n generic_search_term?: string;\n room_types?: Array<RoomType | null>;\n };\n include_all_networks?: boolean;\n third_party_instance_id?: string;\n}\n\nexport interface IAddThreePidOnlyBody {\n auth?: {\n type: string;\n session?: string;\n };\n client_secret: string;\n sid: string;\n}\n\nexport interface IBindThreePidBody {\n client_secret: string;\n id_server: string;\n // Some older identity servers have no auth enabled\n id_access_token: string | null;\n sid: string;\n}\n\nexport interface IRelationsRequestOpts {\n from?: string;\n to?: string;\n limit?: number;\n dir?: Direction;\n recurse?: boolean; // MSC3981 Relations Recursion https://github.com/matrix-org/matrix-spec-proposals/pull/3981\n}\n\nexport interface IRelationsResponse {\n chunk: IEvent[];\n next_batch?: string;\n prev_batch?: string;\n}\n\nexport interface IContextResponse {\n end?: string;\n start?: string;\n state?: IEventWithRoomId[];\n events_before?: IEventWithRoomId[];\n events_after?: IEventWithRoomId[];\n event?: IEventWithRoomId;\n}\n\nexport interface IEventsResponse {\n chunk: IEventWithRoomId[];\n end: string;\n start: string;\n}\n\nexport interface INotification {\n actions: PushRuleAction[];\n event: IRoomEvent;\n profile_tag?: string;\n read: boolean;\n room_id: string;\n ts: number;\n}\n\nexport interface INotificationsResponse {\n next_token: string;\n notifications: INotification[];\n}\n\nexport interface IFilterResponse {\n filter_id: string;\n}\n\nexport interface ITagsResponse {\n tags: {\n [tagId: string]: {\n order: number;\n };\n };\n}\n\nexport interface IStatusResponse extends IPresenceOpts {\n currently_active?: boolean;\n last_active_ago?: number;\n}\n\n/* eslint-enable camelcase */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAYA;AACA;;AAuBA;;AAkDA,OAAO,SAAS,6BAA6B,CAAC,IAAY,EAAuC;EAC7F,IAAI,iBAAiB,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,eAAe,KAAK,QAAQ,EAAE;IACvE;IACA,OAAO,KAAK;EAChB;EACA,IAAI,OAAO,IAAI,IAAI,IAAI,OAAO,IAAI,CAAC,KAAK,KAAK,QAAQ,EAAE;IACnD;IACA,OAAO,IAAI;EACf;EACA;EACA,OAAO,OAAO,IAAI,IAAI,IAAI,iBAAiB,IAAI,IAAI;AACvD;AAKA,WAAY,wBAAwB,0BAAxB,wBAAwB;EAAxB,wBAAwB;EAAxB,wBAAwB;EAAxB,wBAAwB;EAAA,OAAxB,wBAAwB;AAAA;;AAoOpC","ignoreList":[]}
|
package/lib/@types/retention.js
CHANGED
|
@@ -5,7 +5,7 @@ import { UnstableValue } from "../NamespacedValue.js";
|
|
|
5
5
|
* NOTE: While MSC1763 has not been merged, `m.room.retention` is unfortunately
|
|
6
6
|
* already in use in production.
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export const ROOM_RETENTION_TYPE = new UnstableValue("m.room.retention", "org.matrix.msc1763.retention");
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The content of a `m.room.retention` state event.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"retention.js","names":[
|
|
1
|
+
{"version":3,"file":"retention.js","names":[],"sources":["../../src/@types/retention.ts"],"sourcesContent":["import { UnstableValue } from \"../NamespacedValue.ts\";\n\n/**\n * Event type for a room policy event.\n * NOTE: While MSC1763 has not been merged, `m.room.retention` is unfortunately\n * already in use in production.\n */\nexport const ROOM_RETENTION_TYPE = new UnstableValue(\"m.room.retention\", \"org.matrix.msc1763.retention\");\n\n/**\n * The content of a `m.room.retention` state event.\n */\nexport interface RoomRetentionContent {\n max_lifetime?: number;\n min_lifetime?: number;\n}\n"],"mappings":"AAAA,SAAS,aAAa,QAAQ,uBAAuB;;AAErD;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,mBAAmB,GAAG,IAAI,aAAa,CAAC,kBAAkB,EAAE,8BAA8B,CAAC;;AAExG;AACA;AACA","ignoreList":[]}
|
package/lib/@types/search.js
CHANGED
|
@@ -20,7 +20,7 @@ var GroupKey = /*#__PURE__*/function (GroupKey) {
|
|
|
20
20
|
GroupKey["Sender"] = "sender";
|
|
21
21
|
return GroupKey;
|
|
22
22
|
}(GroupKey || {});
|
|
23
|
-
export
|
|
23
|
+
export let SearchOrderBy = /*#__PURE__*/function (SearchOrderBy) {
|
|
24
24
|
SearchOrderBy["Recent"] = "recent";
|
|
25
25
|
SearchOrderBy["Rank"] = "rank";
|
|
26
26
|
return SearchOrderBy;
|
package/lib/@types/search.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"search.js","names":[
|
|
1
|
+
{"version":3,"file":"search.js","names":[],"sources":["../../src/@types/search.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// Types relating to the /search API\n\nimport { type IRoomEvent, type IStateEvent } from \"../sync-accumulator.ts\";\nimport { type IRoomEventFilter } from \"../filter.ts\";\nimport { type SearchResult } from \"../models/search-result.ts\";\n\n/* eslint-disable camelcase */\nexport interface IEventWithRoomId extends IRoomEvent {\n room_id: string;\n}\n\nexport interface IStateEventWithRoomId extends IStateEvent {\n room_id: string;\n}\n\nexport interface IMatrixProfile {\n avatar_url?: string;\n displayname?: string;\n}\n\nexport interface IResultContext {\n events_before: IEventWithRoomId[];\n events_after: IEventWithRoomId[];\n profile_info: Record<string, IMatrixProfile>;\n start?: string;\n end?: string;\n}\n\nexport interface ISearchResult {\n rank: number;\n result: IEventWithRoomId;\n context: IResultContext;\n}\n\nenum GroupKey {\n RoomId = \"room_id\",\n Sender = \"sender\",\n}\n\nexport interface IResultRoomEvents {\n count?: number;\n highlights?: string[];\n results?: ISearchResult[];\n state?: { [roomId: string]: IStateEventWithRoomId[] };\n groups?: {\n [groupKey in GroupKey]: {\n [value: string]: {\n next_batch?: string;\n order: number;\n results: string[];\n };\n };\n };\n next_batch?: string;\n}\n\ninterface IResultCategories {\n room_events: IResultRoomEvents;\n}\n\nexport type SearchKey = \"content.body\" | \"content.name\" | \"content.topic\";\n\nexport enum SearchOrderBy {\n Recent = \"recent\",\n Rank = \"rank\",\n}\n\nexport interface ISearchRequestBody {\n search_categories: {\n room_events: {\n search_term: string;\n keys?: SearchKey[];\n filter?: IRoomEventFilter;\n order_by?: SearchOrderBy;\n event_context?: {\n before_limit?: number;\n after_limit?: number;\n include_profile?: boolean;\n };\n include_state?: boolean;\n groupings?: {\n group_by: {\n key: GroupKey;\n }[];\n };\n };\n };\n}\n\nexport interface ISearchResponse {\n search_categories: IResultCategories;\n}\n\nexport interface ISearchResults {\n _query?: ISearchRequestBody;\n results: SearchResult[];\n highlights: string[];\n count?: number;\n next_batch?: string;\n pendingRequest?: Promise<ISearchResults>;\n abortSignal?: AbortSignal;\n}\n/* eslint-enable camelcase */\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AAMA;AAAA,IA4BK,QAAQ,0BAAR,QAAQ;EAAR,QAAQ;EAAR,QAAQ;EAAA,OAAR,QAAQ;AAAA,EAAR,QAAQ;AA4Bb,WAAY,aAAa,0BAAb,aAAa;EAAb,aAAa;EAAb,aAAa;EAAA,OAAb,aAAa;AAAA;;AAwCzB","ignoreList":[]}
|
package/lib/@types/signed.js
CHANGED
package/lib/@types/spaces.js
CHANGED
package/lib/@types/synapse.js
CHANGED
package/lib/@types/sync.js
CHANGED
|
@@ -21,5 +21,5 @@ import { ServerControlledNamespacedValue } from "../NamespacedValue.js";
|
|
|
21
21
|
*
|
|
22
22
|
* @experimental
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export const UNREAD_THREAD_NOTIFICATIONS = new ServerControlledNamespacedValue("unread_thread_notifications", "org.matrix.msc3773.unread_thread_notifications");
|
|
25
25
|
//# sourceMappingURL=sync.js.map
|
package/lib/@types/sync.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sync.js","names":[
|
|
1
|
+
{"version":3,"file":"sync.js","names":[],"sources":["../../src/@types/sync.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 { ServerControlledNamespacedValue } from \"../NamespacedValue.ts\";\n\n/**\n * https://github.com/matrix-org/matrix-doc/pull/3773\n *\n * @experimental\n */\nexport const UNREAD_THREAD_NOTIFICATIONS = new ServerControlledNamespacedValue(\n \"unread_thread_notifications\",\n \"org.matrix.msc3773.unread_thread_notifications\",\n);\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAAS,+BAA+B,QAAQ,uBAAuB;;AAEvE;AACA;AACA;AACA;AACA;AACA,OAAO,MAAM,2BAA2B,GAAG,IAAI,+BAA+B,CAC1E,6BAA6B,EAC7B,gDACJ,CAAC","ignoreList":[]}
|
package/lib/@types/threepids.js
CHANGED
|
@@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
|
|
|
14
14
|
limitations under the License.
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
export
|
|
17
|
+
export let ThreepidMedium = /*#__PURE__*/function (ThreepidMedium) {
|
|
18
18
|
ThreepidMedium["Email"] = "email";
|
|
19
19
|
ThreepidMedium["Phone"] = "msisdn";
|
|
20
20
|
return ThreepidMedium;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"threepids.js","names":[
|
|
1
|
+
{"version":3,"file":"threepids.js","names":[],"sources":["../../src/@types/threepids.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\nexport enum ThreepidMedium {\n Email = \"email\",\n Phone = \"msisdn\",\n}\n\n// TODO: Are these types universal, or specific to just /account/3pid?\nexport interface IThreepid {\n medium: ThreepidMedium;\n address: string;\n validated_at: number; // eslint-disable-line camelcase\n added_at: number; // eslint-disable-line camelcase\n bound?: boolean;\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,WAAY,cAAc,0BAAd,cAAc;EAAd,cAAc;EAAd,cAAc;EAAA,OAAd,cAAc;AAAA;;AAK1B","ignoreList":[]}
|
package/lib/@types/topic.js
CHANGED
|
@@ -40,7 +40,7 @@ import { NamespacedValue } from "../NamespacedValue.js";
|
|
|
40
40
|
/**
|
|
41
41
|
* The event type for an m.topic event (in content)
|
|
42
42
|
*/
|
|
43
|
-
export
|
|
43
|
+
export const M_TOPIC = new NamespacedValue("m.topic", null);
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
46
|
* The event content for an m.topic event (in content)
|
package/lib/@types/topic.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"topic.js","names":[
|
|
1
|
+
{"version":3,"file":"topic.js","names":[],"sources":["../../src/@types/topic.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*/\nimport { NamespacedValue } from \"../NamespacedValue.ts\";\nimport { type IMessageRendering } from \"./extensible_events.ts\";\n\n/**\n * Extensible topic event type based on MSC3765\n * https://github.com/matrix-org/matrix-spec-proposals/pull/3765\n *\n * @example\n * ```\n * {\n * \"type\": \"m.room.topic,\n * \"state_key\": \"\",\n * \"content\": {\n * \"topic\": \"All about **pizza**\",\n * \"m.topic\": [{\n * \"body\": \"All about **pizza**\",\n * \"mimetype\": \"text/plain\",\n * }, {\n * \"body\": \"All about <b>pizza</b>\",\n * \"mimetype\": \"text/html\",\n * }],\n * }\n * }\n * ```\n */\n\n/**\n * The event type for an m.topic event (in content)\n */\nexport const M_TOPIC = new NamespacedValue(\"m.topic\", null);\n\n/**\n * The event content for an m.topic event (in content)\n */\nexport type MTopicContent = { \"m.text\": IMessageRendering[] };\n\n/**\n * A previous incorrect form of m.topic used by matrix-js-sdk\n * TODO remove this after a few releases\n * https://github.com/matrix-org/matrix-js-sdk/pull/4984#pullrequestreview-3174251065\n */\nexport type MalformedMTopicEvent = { \"m.topic\": IMessageRendering[] };\n\n/**\n * The event definition for an m.topic event (in content)\n */\nexport type MTopicEvent = { \"m.topic\": MTopicContent } | MalformedMTopicEvent;\n\n/**\n * The event content for an m.room.topic event\n */\nexport type MRoomTopicEventContent = {\n topic: string | null | undefined;\n} & Partial<MTopicEvent>;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS,eAAe,QAAQ,uBAAuB;AAGvD;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,MAAM,OAAO,GAAG,IAAI,eAAe,CAAC,SAAS,EAAE,IAAI,CAAC;;AAE3D;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAGA;AACA;AACA","ignoreList":[]}
|
package/lib/@types/uia.js
CHANGED
package/lib/NamespacedValue.js
CHANGED
|
@@ -43,8 +43,8 @@ export class NamespacedValue {
|
|
|
43
43
|
return this.unstable;
|
|
44
44
|
}
|
|
45
45
|
get names() {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
const names = [this.name];
|
|
47
|
+
const altName = this.altName;
|
|
48
48
|
if (altName) names.push(altName);
|
|
49
49
|
return names;
|
|
50
50
|
}
|
|
@@ -55,17 +55,17 @@ export class NamespacedValue {
|
|
|
55
55
|
// this desperately wants https://github.com/microsoft/TypeScript/pull/26349 at the top level of the class
|
|
56
56
|
// so we can instantiate `NamespacedValue<string, _, _>` as a default type for that namespace.
|
|
57
57
|
findIn(obj) {
|
|
58
|
-
|
|
58
|
+
let val = undefined;
|
|
59
59
|
if (this.name) {
|
|
60
|
-
val = obj
|
|
60
|
+
val = obj?.[this.name];
|
|
61
61
|
}
|
|
62
62
|
if (!val && this.altName) {
|
|
63
|
-
val = obj
|
|
63
|
+
val = obj?.[this.altName];
|
|
64
64
|
}
|
|
65
65
|
return val;
|
|
66
66
|
}
|
|
67
67
|
includedIn(arr) {
|
|
68
|
-
|
|
68
|
+
let included = false;
|
|
69
69
|
if (this.name) {
|
|
70
70
|
included = arr.includes(this.name);
|
|
71
71
|
}
|
|
@@ -76,8 +76,8 @@ export class NamespacedValue {
|
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
78
|
export class ServerControlledNamespacedValue extends NamespacedValue {
|
|
79
|
-
constructor() {
|
|
80
|
-
super(...
|
|
79
|
+
constructor(...args) {
|
|
80
|
+
super(...args);
|
|
81
81
|
_defineProperty(this, "preferUnstable", false);
|
|
82
82
|
}
|
|
83
83
|
setPreferUnstable(preferUnstable) {
|