@open-e2ee/signal-protocol-sdk 2.0.1 → 3.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/ADAPTERS.md +10 -17
- package/ARCHITECTURE.md +1 -2
- package/CHANGELOG.md +80 -0
- package/LICENSE +11 -655
- package/LICENSE-APACHE +201 -0
- package/LICENSE-MIT +21 -0
- package/NOTICE +5 -7
- package/README.md +11 -11
- package/SECURITY.md +2 -2
- package/TROUBLESHOOTING.md +2 -6
- package/client/README.md +34 -16
- package/device/README.md +1 -1
- package/dist/client/client.d.ts +13 -2
- package/dist/client/client.d.ts.map +1 -1
- package/dist/client/client.js +136 -73
- package/dist/client/client.js.map +1 -1
- package/dist/client/config.d.ts +14 -18
- package/dist/client/config.d.ts.map +1 -1
- package/dist/client/config.js.map +1 -1
- package/dist/client/content-adapter.d.ts +2 -0
- package/dist/client/content-adapter.d.ts.map +1 -1
- package/dist/client/content-adapter.js +4 -0
- package/dist/client/content-adapter.js.map +1 -1
- package/dist/client/endorsement-manager.d.ts +4 -1
- package/dist/client/endorsement-manager.d.ts.map +1 -1
- package/dist/client/endorsement-manager.js +14 -6
- package/dist/client/endorsement-manager.js.map +1 -1
- package/dist/client/group-authority.d.ts +8 -0
- package/dist/client/group-authority.d.ts.map +1 -0
- package/dist/client/group-authority.js +2 -0
- package/dist/client/group-authority.js.map +1 -0
- package/dist/client/headless.d.ts +3 -8
- package/dist/client/headless.d.ts.map +1 -1
- package/dist/client/headless.js +3 -8
- package/dist/client/headless.js.map +1 -1
- package/dist/client/hosted-anonymous-delivery.d.ts +32 -0
- package/dist/client/hosted-anonymous-delivery.d.ts.map +1 -0
- package/dist/client/hosted-anonymous-delivery.js +239 -0
- package/dist/client/hosted-anonymous-delivery.js.map +1 -0
- package/dist/client/hosted-connection.d.ts +1 -1
- package/dist/client/hosted-connection.d.ts.map +1 -1
- package/dist/client/hosted-connection.js +18 -51
- package/dist/client/hosted-connection.js.map +1 -1
- package/dist/client/hosted-group-authority.d.ts +11 -0
- package/dist/client/hosted-group-authority.d.ts.map +1 -0
- package/dist/client/hosted-group-authority.js +96 -0
- package/dist/client/hosted-group-authority.js.map +1 -0
- package/dist/client/hosted-groups.d.ts +31 -0
- package/dist/client/hosted-groups.d.ts.map +1 -0
- package/dist/client/hosted-groups.js +217 -0
- package/dist/client/hosted-groups.js.map +1 -0
- package/dist/client/hosted-mailbox-subscription.d.ts +34 -0
- package/dist/client/hosted-mailbox-subscription.d.ts.map +1 -0
- package/dist/client/hosted-mailbox-subscription.js +257 -0
- package/dist/client/hosted-mailbox-subscription.js.map +1 -0
- package/dist/client/hosted-prekey-publication.d.ts +51 -0
- package/dist/client/hosted-prekey-publication.d.ts.map +1 -0
- package/dist/client/hosted-prekey-publication.js +249 -0
- package/dist/client/hosted-prekey-publication.js.map +1 -0
- package/dist/client/hosted-push.d.ts +4 -5
- package/dist/client/hosted-push.d.ts.map +1 -1
- package/dist/client/hosted-push.js +22 -22
- package/dist/client/hosted-push.js.map +1 -1
- package/dist/client/hosted-transport.d.ts +57 -35
- package/dist/client/hosted-transport.d.ts.map +1 -1
- package/dist/client/hosted-transport.js +666 -341
- package/dist/client/hosted-transport.js.map +1 -1
- package/dist/client/hosted-trust.d.ts +29 -0
- package/dist/client/hosted-trust.d.ts.map +1 -0
- package/dist/client/hosted-trust.js +28 -0
- package/dist/client/hosted-trust.js.map +1 -0
- package/dist/client/hosted.d.ts +18 -13
- package/dist/client/hosted.d.ts.map +1 -1
- package/dist/client/hosted.js +78 -34
- package/dist/client/hosted.js.map +1 -1
- package/dist/client/index.d.ts +14 -14
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +7 -7
- package/dist/client/index.js.map +1 -1
- package/dist/client/key-rotation-core.d.ts +8 -0
- package/dist/client/key-rotation-core.d.ts.map +1 -1
- package/dist/client/key-rotation-core.js +12 -1
- package/dist/client/key-rotation-core.js.map +1 -1
- package/dist/client/key-rotation.d.ts +2 -1
- package/dist/client/key-rotation.d.ts.map +1 -1
- package/dist/client/key-rotation.js +4 -4
- package/dist/client/key-rotation.js.map +1 -1
- package/dist/client/media-queue-persistence.d.ts +14 -0
- package/dist/client/media-queue-persistence.d.ts.map +1 -0
- package/dist/client/media-queue-persistence.js +123 -0
- package/dist/client/media-queue-persistence.js.map +1 -0
- package/dist/client/media-upload-budget.d.ts +3 -0
- package/dist/client/media-upload-budget.d.ts.map +1 -0
- package/dist/client/media-upload-budget.js +27 -0
- package/dist/client/media-upload-budget.js.map +1 -0
- package/dist/client/media.d.ts +51 -15
- package/dist/client/media.d.ts.map +1 -1
- package/dist/client/media.js +541 -73
- package/dist/client/media.js.map +1 -1
- package/dist/client/messages.d.ts.map +1 -1
- package/dist/client/messages.js +13 -14
- package/dist/client/messages.js.map +1 -1
- package/dist/client/prekeys.d.ts.map +1 -1
- package/dist/client/prekeys.js +131 -43
- package/dist/client/prekeys.js.map +1 -1
- package/dist/client/relay-subscription.d.ts +4 -0
- package/dist/client/relay-subscription.d.ts.map +1 -1
- package/dist/client/relay-subscription.js +58 -25
- package/dist/client/relay-subscription.js.map +1 -1
- package/dist/client/sender-key-distribution.d.ts +8 -0
- package/dist/client/sender-key-distribution.d.ts.map +1 -0
- package/dist/client/sender-key-distribution.js +59 -0
- package/dist/client/sender-key-distribution.js.map +1 -0
- package/dist/client/signal-service-cipher.d.ts +7 -3
- package/dist/client/signal-service-cipher.d.ts.map +1 -1
- package/dist/client/signal-service-cipher.js +41 -16
- package/dist/client/signal-service-cipher.js.map +1 -1
- package/dist/device/{expo-metadata.d.ts → expo/index.d.ts} +3 -3
- package/dist/device/expo/index.d.ts.map +1 -0
- package/dist/device/{expo-metadata.js → expo/index.js} +2 -2
- package/dist/device/expo/index.js.map +1 -0
- package/dist/device/index.js +1 -1
- package/dist/device/index.js.map +1 -1
- package/dist/device/provisioning.d.ts +1 -1
- package/dist/device/provisioning.js +1 -1
- package/dist/device/types.d.ts +1 -1
- package/dist/groups/server.d.ts +10 -0
- package/dist/groups/server.d.ts.map +1 -0
- package/dist/groups/server.js +6 -0
- package/dist/groups/server.js.map +1 -0
- package/dist/hooks/use-connection-presence.d.ts +2 -4
- package/dist/hooks/use-connection-presence.d.ts.map +1 -1
- package/dist/hooks/use-connection-presence.js +2 -4
- package/dist/hooks/use-connection-presence.js.map +1 -1
- package/dist/index.d.ts +51 -49
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -24
- package/dist/index.js.map +1 -1
- package/dist/internal/groups/authority-certificate.d.ts +22 -0
- package/dist/internal/groups/authority-certificate.d.ts.map +1 -0
- package/dist/internal/groups/authority-certificate.js +99 -0
- package/dist/internal/groups/authority-certificate.js.map +1 -0
- package/dist/internal/groups/error-details.d.ts +9 -0
- package/dist/internal/groups/error-details.d.ts.map +1 -0
- package/dist/internal/groups/error-details.js +30 -0
- package/dist/internal/groups/error-details.js.map +1 -0
- package/dist/internal/groups/manager.d.ts +5 -0
- package/dist/internal/groups/manager.d.ts.map +1 -1
- package/dist/internal/groups/manager.js +3 -0
- package/dist/internal/groups/manager.js.map +1 -1
- package/dist/internal/groups/server-engine.d.ts +7 -0
- package/dist/internal/groups/server-engine.d.ts.map +1 -1
- package/dist/internal/groups/server-engine.js +51 -19
- package/dist/internal/groups/server-engine.js.map +1 -1
- package/dist/internal/groups/wire.d.ts.map +1 -1
- package/dist/internal/groups/wire.js +10 -9
- package/dist/internal/groups/wire.js.map +1 -1
- package/dist/internal/manager/manager.d.ts +1 -1
- package/dist/internal/manager/manager.d.ts.map +1 -1
- package/dist/internal/manager/manager.js +22 -25
- package/dist/internal/manager/manager.js.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts +1 -1
- package/dist/internal/protocol/sender-keys/manager.d.ts.map +1 -1
- package/dist/internal/protocol/sender-keys/manager.js +27 -14
- package/dist/internal/protocol/sender-keys/manager.js.map +1 -1
- package/dist/internal/sesame/manager.d.ts +2 -2
- package/dist/internal/sesame/manager.d.ts.map +1 -1
- package/dist/internal/sesame/manager.js +6 -6
- package/dist/internal/sesame/manager.js.map +1 -1
- package/dist/internal/sesame/types.d.ts +1 -1
- package/dist/internal/sesame/types.d.ts.map +1 -1
- package/dist/internal/session/cipher.d.ts +1 -1
- package/dist/internal/session/cipher.d.ts.map +1 -1
- package/dist/internal/session/cipher.js +31 -28
- package/dist/internal/session/cipher.js.map +1 -1
- package/dist/layers.d.ts +1 -1
- package/dist/layers.d.ts.map +1 -1
- package/dist/layers.js +1 -1
- package/dist/layers.js.map +1 -1
- package/dist/local/store/expo/adapter.d.ts +8 -2
- package/dist/local/store/expo/adapter.d.ts.map +1 -1
- package/dist/local/store/expo/adapter.js +28 -9
- package/dist/local/store/expo/adapter.js.map +1 -1
- package/dist/local/store/expo/key-storage.d.ts +7 -1
- package/dist/local/store/expo/key-storage.d.ts.map +1 -1
- package/dist/local/store/expo/key-storage.js +82 -17
- package/dist/local/store/expo/key-storage.js.map +1 -1
- package/dist/local/store/expo/models/kyber-prekey-used.d.ts +1 -4
- package/dist/local/store/expo/models/kyber-prekey-used.d.ts.map +1 -1
- package/dist/local/store/expo/models/kyber-prekey-used.js +23 -9
- package/dist/local/store/expo/models/kyber-prekey-used.js.map +1 -1
- package/dist/local/store/expo/models/kyber-prekey.d.ts +4 -4
- package/dist/local/store/expo/models/kyber-prekey.d.ts.map +1 -1
- package/dist/local/store/expo/models/kyber-prekey.js +67 -26
- package/dist/local/store/expo/models/kyber-prekey.js.map +1 -1
- package/dist/local/store/expo/schema.d.ts +21 -2
- package/dist/local/store/expo/schema.d.ts.map +1 -1
- package/dist/local/store/expo/schema.js +10 -2
- package/dist/local/store/expo/schema.js.map +1 -1
- package/dist/local/store/kyber-prekey-lifecycle.d.ts +46 -0
- package/dist/local/store/kyber-prekey-lifecycle.d.ts.map +1 -0
- package/dist/local/store/kyber-prekey-lifecycle.js +88 -0
- package/dist/local/store/kyber-prekey-lifecycle.js.map +1 -0
- package/dist/local/store/memory/adapter.d.ts +11 -3
- package/dist/local/store/memory/adapter.d.ts.map +1 -1
- package/dist/local/store/memory/adapter.js +113 -28
- package/dist/local/store/memory/adapter.js.map +1 -1
- package/dist/local/store/node/adapter.d.ts +8 -2
- package/dist/local/store/node/adapter.d.ts.map +1 -1
- package/dist/local/store/node/adapter.js +31 -13
- package/dist/local/store/node/adapter.js.map +1 -1
- package/dist/local/store/node/database-file-commit.d.ts +8 -0
- package/dist/local/store/node/database-file-commit.d.ts.map +1 -0
- package/dist/local/store/node/database-file-commit.js +62 -0
- package/dist/local/store/node/database-file-commit.js.map +1 -0
- package/dist/local/store/node/database-key.d.ts +6 -1
- package/dist/local/store/node/database-key.d.ts.map +1 -1
- package/dist/local/store/node/database-key.js +79 -44
- package/dist/local/store/node/database-key.js.map +1 -1
- package/dist/local/store/node/database-lock.d.ts +8 -0
- package/dist/local/store/node/database-lock.d.ts.map +1 -0
- package/dist/local/store/node/database-lock.js +44 -0
- package/dist/local/store/node/database-lock.js.map +1 -0
- package/dist/local/store/node/database.d.ts +15 -14
- package/dist/local/store/node/database.d.ts.map +1 -1
- package/dist/local/store/node/database.js +197 -202
- package/dist/local/store/node/database.js.map +1 -1
- package/dist/local/store/react-native/adapter.d.ts +8 -2
- package/dist/local/store/react-native/adapter.d.ts.map +1 -1
- package/dist/local/store/react-native/adapter.js +151 -66
- package/dist/local/store/react-native/adapter.js.map +1 -1
- package/dist/local/store/received-content.d.ts +9 -0
- package/dist/local/store/received-content.d.ts.map +1 -0
- package/dist/local/store/received-content.js +46 -0
- package/dist/local/store/received-content.js.map +1 -0
- package/dist/local/store/reliability.d.ts +2 -2
- package/dist/local/store/reliability.d.ts.map +1 -1
- package/dist/local/store/reliability.js +7 -4
- package/dist/local/store/reliability.js.map +1 -1
- package/dist/local/store/web/adapter.d.ts +8 -2
- package/dist/local/store/web/adapter.d.ts.map +1 -1
- package/dist/local/store/web/adapter.js +206 -73
- package/dist/local/store/web/adapter.js.map +1 -1
- package/dist/media/index.d.ts +71 -61
- package/dist/media/index.d.ts.map +1 -1
- package/dist/media/index.js +550 -386
- package/dist/media/index.js.map +1 -1
- package/dist/media/prepared-upload.d.ts +37 -0
- package/dist/media/prepared-upload.d.ts.map +1 -0
- package/dist/media/prepared-upload.js +46 -0
- package/dist/media/prepared-upload.js.map +1 -0
- package/dist/remote/object-store/convex-r2/server.d.ts +2 -1
- package/dist/remote/object-store/convex-r2/server.d.ts.map +1 -1
- package/dist/remote/object-store/convex-r2/server.js +4 -0
- package/dist/remote/object-store/convex-r2/server.js.map +1 -1
- package/dist/remote/object-store/convex-r2/storage.d.ts.map +1 -1
- package/dist/remote/object-store/convex-r2/storage.js +1 -0
- package/dist/remote/object-store/convex-r2/storage.js.map +1 -1
- package/dist/remote/object-store/index.d.ts +3 -1
- package/dist/remote/object-store/index.d.ts.map +1 -1
- package/dist/remote/object-store/index.js +1 -1
- package/dist/remote/object-store/index.js.map +1 -1
- package/dist/remote/object-store/s3/storage.d.ts +3 -1
- package/dist/remote/object-store/s3/storage.d.ts.map +1 -1
- package/dist/remote/object-store/s3/storage.js +9 -2
- package/dist/remote/object-store/s3/storage.js.map +1 -1
- package/dist/remote/object-store/types.d.ts +33 -4
- package/dist/remote/object-store/types.d.ts.map +1 -1
- package/dist/remote/object-store/upload-error.d.ts +23 -0
- package/dist/remote/object-store/upload-error.d.ts.map +1 -0
- package/dist/remote/object-store/upload-error.js +33 -0
- package/dist/remote/object-store/upload-error.js.map +1 -0
- package/dist/remote/object-store/validation.d.ts +7 -1
- package/dist/remote/object-store/validation.d.ts.map +1 -1
- package/dist/remote/object-store/validation.js +39 -25
- package/dist/remote/object-store/validation.js.map +1 -1
- package/dist/remote/relay/index.d.ts +5 -12
- package/dist/remote/relay/index.d.ts.map +1 -1
- package/dist/remote/relay/index.js +4 -11
- package/dist/remote/relay/index.js.map +1 -1
- package/dist/remote/relay/memory/adapter.d.ts +2 -1
- package/dist/remote/relay/memory/adapter.d.ts.map +1 -1
- package/dist/remote/relay/memory/adapter.js +10 -0
- package/dist/remote/relay/memory/adapter.js.map +1 -1
- package/dist/remote/relay/types.d.ts +28 -17
- package/dist/remote/relay/types.d.ts.map +1 -1
- package/dist/types/api.d.ts +36 -1
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/session.d.ts +6 -0
- package/dist/types/session.d.ts.map +1 -1
- package/dist/types/session.js.map +1 -1
- package/docs/ASSURANCE.md +7 -7
- package/docs/CLIENT_COMPOSITION.md +12 -19
- package/docs/DEVIATIONS.md +1 -1
- package/docs/DOCUMENTATION_STANDARDS.md +4 -0
- package/docs/GETTING_STARTED.md +23 -38
- package/docs/INTERFACES.md +22 -13
- package/docs/PACKAGE_SURFACE.md +5 -12
- package/docs/RECIPES.md +10 -23
- package/examples/browser/index.html +2 -2
- package/local/store/README.md +16 -1
- package/local/store/expo/README.md +23 -19
- package/local/store/node/README.md +29 -0
- package/media/README.md +94 -0
- package/package.json +17 -27
- package/remote/README.md +16 -16
- package/remote/object-store/README.md +8 -0
- package/remote/object-store/s3/README.md +10 -1
- package/remote/relay/README.md +3 -2
- package/COMMERCIAL.md +0 -56
- package/dist/device/expo-metadata.d.ts.map +0 -1
- package/dist/device/expo-metadata.js.map +0 -1
- package/dist/remote/relay/convex/backend.d.ts +0 -394
- package/dist/remote/relay/convex/backend.d.ts.map +0 -1
- package/dist/remote/relay/convex/backend.js +0 -678
- package/dist/remote/relay/convex/backend.js.map +0 -1
- package/dist/remote/relay/convex/component/_generated/api.d.ts +0 -58
- package/dist/remote/relay/convex/component/_generated/api.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/_generated/api.js +0 -31
- package/dist/remote/relay/convex/component/_generated/api.js.map +0 -1
- package/dist/remote/relay/convex/component/_generated/component.d.ts +0 -475
- package/dist/remote/relay/convex/component/_generated/component.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/_generated/component.js +0 -11
- package/dist/remote/relay/convex/component/_generated/component.js.map +0 -1
- package/dist/remote/relay/convex/component/_generated/dataModel.d.ts +0 -46
- package/dist/remote/relay/convex/component/_generated/dataModel.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/_generated/dataModel.js +0 -11
- package/dist/remote/relay/convex/component/_generated/dataModel.js.map +0 -1
- package/dist/remote/relay/convex/component/_generated/server.d.ts +0 -129
- package/dist/remote/relay/convex/component/_generated/server.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/_generated/server.js +0 -79
- package/dist/remote/relay/convex/component/_generated/server.js.map +0 -1
- package/dist/remote/relay/convex/component/accounts.d.ts +0 -45
- package/dist/remote/relay/convex/component/accounts.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/accounts.js +0 -184
- package/dist/remote/relay/convex/component/accounts.js.map +0 -1
- package/dist/remote/relay/convex/component/certificates.d.ts +0 -10
- package/dist/remote/relay/convex/component/certificates.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/certificates.js +0 -126
- package/dist/remote/relay/convex/component/certificates.js.map +0 -1
- package/dist/remote/relay/convex/component/cleanup.d.ts +0 -32
- package/dist/remote/relay/convex/component/cleanup.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/cleanup.js +0 -146
- package/dist/remote/relay/convex/component/cleanup.js.map +0 -1
- package/dist/remote/relay/convex/component/convex.config.d.ts +0 -5
- package/dist/remote/relay/convex/component/convex.config.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/convex.config.js +0 -35
- package/dist/remote/relay/convex/component/convex.config.js.map +0 -1
- package/dist/remote/relay/convex/component/crons.d.ts +0 -3
- package/dist/remote/relay/convex/component/crons.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/crons.js +0 -10
- package/dist/remote/relay/convex/component/crons.js.map +0 -1
- package/dist/remote/relay/convex/component/devices.d.ts +0 -102
- package/dist/remote/relay/convex/component/devices.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/devices.js +0 -300
- package/dist/remote/relay/convex/component/devices.js.map +0 -1
- package/dist/remote/relay/convex/component/errors.d.ts +0 -22
- package/dist/remote/relay/convex/component/errors.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/errors.js +0 -17
- package/dist/remote/relay/convex/component/errors.js.map +0 -1
- package/dist/remote/relay/convex/component/groups.d.ts +0 -63
- package/dist/remote/relay/convex/component/groups.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/groups.js +0 -341
- package/dist/remote/relay/convex/component/groups.js.map +0 -1
- package/dist/remote/relay/convex/component/keys.d.ts +0 -130
- package/dist/remote/relay/convex/component/keys.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/keys.js +0 -578
- package/dist/remote/relay/convex/component/keys.js.map +0 -1
- package/dist/remote/relay/convex/component/messages.d.ts +0 -105
- package/dist/remote/relay/convex/component/messages.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/messages.js +0 -702
- package/dist/remote/relay/convex/component/messages.js.map +0 -1
- package/dist/remote/relay/convex/component/provisioning.d.ts +0 -92
- package/dist/remote/relay/convex/component/provisioning.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/provisioning.js +0 -360
- package/dist/remote/relay/convex/component/provisioning.js.map +0 -1
- package/dist/remote/relay/convex/component/runtime.d.ts +0 -18
- package/dist/remote/relay/convex/component/runtime.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/runtime.js +0 -144
- package/dist/remote/relay/convex/component/runtime.js.map +0 -1
- package/dist/remote/relay/convex/component/schema.d.ts +0 -358
- package/dist/remote/relay/convex/component/schema.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/schema.js +0 -288
- package/dist/remote/relay/convex/component/schema.js.map +0 -1
- package/dist/remote/relay/convex/component/zkAuth.d.ts +0 -18
- package/dist/remote/relay/convex/component/zkAuth.d.ts.map +0 -1
- package/dist/remote/relay/convex/component/zkAuth.js +0 -86
- package/dist/remote/relay/convex/component/zkAuth.js.map +0 -1
- package/dist/remote/relay/convex/constants.d.ts +0 -3
- package/dist/remote/relay/convex/constants.d.ts.map +0 -1
- package/dist/remote/relay/convex/constants.js +0 -3
- package/dist/remote/relay/convex/constants.js.map +0 -1
- package/dist/remote/relay/convex/group-server.d.ts +0 -123
- package/dist/remote/relay/convex/group-server.d.ts.map +0 -1
- package/dist/remote/relay/convex/group-server.js +0 -184
- package/dist/remote/relay/convex/group-server.js.map +0 -1
- package/dist/remote/relay/convex/index.d.ts +0 -42
- package/dist/remote/relay/convex/index.d.ts.map +0 -1
- package/dist/remote/relay/convex/index.js +0 -38
- package/dist/remote/relay/convex/index.js.map +0 -1
- package/dist/remote/relay/convex/relay.d.ts +0 -323
- package/dist/remote/relay/convex/relay.d.ts.map +0 -1
- package/dist/remote/relay/convex/relay.js +0 -1144
- package/dist/remote/relay/convex/relay.js.map +0 -1
- package/dist/remote/relay/convex/types.d.ts +0 -24
- package/dist/remote/relay/convex/types.d.ts.map +0 -1
- package/dist/remote/relay/convex/types.js +0 -14
- package/dist/remote/relay/convex/types.js.map +0 -1
- package/remote/relay/convex/README.md +0 -61
- package/remote/relay/convex/component/README.md +0 -462
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
import { ConvexError } from 'convex/values';
|
|
2
|
-
import { base64ToBytes, bytesToBase64 } from '../../../../internal/crypto/utils.js';
|
|
3
|
-
import { generateServerSecretParams, } from '../../../../internal/protocol/zk/groups/server-params.js';
|
|
4
|
-
import { SERVICE_ID_ACI, SERVICE_ID_PNI, } from '../../../../internal/protocol/zk/groups/uid-struct.js';
|
|
5
|
-
import { asBase64 } from '../../../../types/utils.js';
|
|
6
|
-
import { CONVEX_GROUP_SERVER_SECRET_ENV_VAR } from '../constants.js';
|
|
7
|
-
import { env } from './_generated/server.js';
|
|
8
|
-
const UUID_LENGTH = 16;
|
|
9
|
-
let testDependencies = null;
|
|
10
|
-
/**
|
|
11
|
-
* @internal Test-only deterministic secret/runtime injection seam.
|
|
12
|
-
*
|
|
13
|
-
* Module-global by necessity: component functions are module-scope exports
|
|
14
|
-
* with no per-instance closure. Guarded default-deny: injection is allowed
|
|
15
|
-
* only inside a recognized test runner (and never when CONVEX_CLOUD_URL
|
|
16
|
-
* marks a deployment). Component isolates see only their declared
|
|
17
|
-
* environment variables, so a permissive env-based check could be inert in
|
|
18
|
-
* exactly the environment it must protect. An unrecognized environment
|
|
19
|
-
* therefore refuses injection rather than allowing it.
|
|
20
|
-
*/
|
|
21
|
-
export function configureConvexSignalProtocolComponentForTest(config) {
|
|
22
|
-
const inTestRunner = process.env.JEST_WORKER_ID !== undefined ||
|
|
23
|
-
process.env.VITEST !== undefined ||
|
|
24
|
-
process.env.NODE_ENV === 'test';
|
|
25
|
-
if (process.env.CONVEX_CLOUD_URL || !inTestRunner) {
|
|
26
|
-
throw new Error('Test-only component configuration is unavailable in deployments');
|
|
27
|
-
}
|
|
28
|
-
testDependencies = config;
|
|
29
|
-
}
|
|
30
|
-
function defaultConvexRuntime() {
|
|
31
|
-
return {
|
|
32
|
-
now: () => Date.now(),
|
|
33
|
-
randomBytes: (length) => crypto.getRandomValues(new Uint8Array(length)),
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Derived server parameters, cached per isolate and keyed by the exact
|
|
38
|
-
* environment value so a rotated secret is picked up on the next request.
|
|
39
|
-
* Derivation costs tens of milliseconds. Without the cache every query and
|
|
40
|
-
* mutation would pay it before doing any work.
|
|
41
|
-
*/
|
|
42
|
-
let cachedSecretParams = null;
|
|
43
|
-
function secretParamsFromEnvironment() {
|
|
44
|
-
// Read through the component's *declared* environment (convex.config.ts).
|
|
45
|
-
// Component isolates cannot see undeclared app deployment variables, so
|
|
46
|
-
// the app must forward the secret at mount time:
|
|
47
|
-
// ```ts
|
|
48
|
-
// app.use(signalProtocol, {
|
|
49
|
-
// env: { OE_GROUPS_SERVER_SECRET: app.env.OE_GROUPS_SERVER_SECRET },
|
|
50
|
-
// });
|
|
51
|
-
// ```
|
|
52
|
-
const encoded = env.OE_GROUPS_SERVER_SECRET;
|
|
53
|
-
if (!encoded) {
|
|
54
|
-
throw new Error(`${CONVEX_GROUP_SERVER_SECRET_ENV_VAR} is not configured; run npx oe-groups trust-root and forward it to the component with app.use(signalProtocol, { env: { ${CONVEX_GROUP_SERVER_SECRET_ENV_VAR}: app.env.${CONVEX_GROUP_SERVER_SECRET_ENV_VAR} } })`);
|
|
55
|
-
}
|
|
56
|
-
if (cachedSecretParams && cachedSecretParams.encoded === encoded) {
|
|
57
|
-
return cachedSecretParams.params;
|
|
58
|
-
}
|
|
59
|
-
let seed;
|
|
60
|
-
try {
|
|
61
|
-
seed = base64ToBytes(asBase64(encoded));
|
|
62
|
-
}
|
|
63
|
-
catch {
|
|
64
|
-
throw new Error(`${CONVEX_GROUP_SERVER_SECRET_ENV_VAR} must be canonical base64`);
|
|
65
|
-
}
|
|
66
|
-
try {
|
|
67
|
-
if (seed.length !== 32) {
|
|
68
|
-
throw new Error(`${CONVEX_GROUP_SERVER_SECRET_ENV_VAR} must decode to exactly 32 bytes`);
|
|
69
|
-
}
|
|
70
|
-
if (bytesToBase64(seed) !== encoded) {
|
|
71
|
-
throw new Error(`${CONVEX_GROUP_SERVER_SECRET_ENV_VAR} must be canonical base64`);
|
|
72
|
-
}
|
|
73
|
-
const params = generateServerSecretParams(seed);
|
|
74
|
-
cachedSecretParams = { encoded, params };
|
|
75
|
-
return params;
|
|
76
|
-
}
|
|
77
|
-
finally {
|
|
78
|
-
seed.fill(0);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
export function groupServerRuntime() {
|
|
82
|
-
return testDependencies?.runtime ?? defaultConvexRuntime();
|
|
83
|
-
}
|
|
84
|
-
export function groupServerSecretParams() {
|
|
85
|
-
return testDependencies?.secretParams ?? secretParamsFromEnvironment();
|
|
86
|
-
}
|
|
87
|
-
function requireUuid(value, label) {
|
|
88
|
-
if (!(value instanceof Uint8Array) || value.length !== UUID_LENGTH) {
|
|
89
|
-
throw new Error(`${label} must be a ${UUID_LENGTH}-byte UUID`);
|
|
90
|
-
}
|
|
91
|
-
if (value.every((byte) => byte === 0)) {
|
|
92
|
-
throw new Error(`${label} must not be the nil UUID`);
|
|
93
|
-
}
|
|
94
|
-
return value;
|
|
95
|
-
}
|
|
96
|
-
export function serviceIds(input) {
|
|
97
|
-
if (input === null || typeof input !== 'object') {
|
|
98
|
-
throw new ConvexError({
|
|
99
|
-
code: 'UNAUTHORIZED',
|
|
100
|
-
status: 401,
|
|
101
|
-
message: 'identify() returned no identity',
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
const aci = {
|
|
105
|
-
kind: SERVICE_ID_ACI,
|
|
106
|
-
uuid: requireUuid(new Uint8Array(input.aciBytes), 'identify().aciBytes'),
|
|
107
|
-
};
|
|
108
|
-
const pni = input.pniBytes === undefined
|
|
109
|
-
? undefined
|
|
110
|
-
: {
|
|
111
|
-
kind: SERVICE_ID_PNI,
|
|
112
|
-
uuid: requireUuid(new Uint8Array(input.pniBytes), 'identify().pniBytes'),
|
|
113
|
-
};
|
|
114
|
-
return { aci, pni };
|
|
115
|
-
}
|
|
116
|
-
/**
|
|
117
|
-
* Translate an engine rejection into a `ConvexError` so its structured
|
|
118
|
-
* `{ code, status }` data survives serialization to real deployments.
|
|
119
|
-
*/
|
|
120
|
-
export async function translateEngineErrors(operation) {
|
|
121
|
-
try {
|
|
122
|
-
return await operation();
|
|
123
|
-
}
|
|
124
|
-
catch (error) {
|
|
125
|
-
if (!(error instanceof ConvexError) && error instanceof Error) {
|
|
126
|
-
const data = error.data;
|
|
127
|
-
if (data !== null &&
|
|
128
|
-
typeof data === 'object' &&
|
|
129
|
-
typeof data.code === 'string' &&
|
|
130
|
-
typeof data.status === 'number') {
|
|
131
|
-
throw new ConvexError({
|
|
132
|
-
code: data.code,
|
|
133
|
-
status: data.status,
|
|
134
|
-
message: error.message,
|
|
135
|
-
...(typeof data.reason === 'string'
|
|
136
|
-
? { reason: data.reason }
|
|
137
|
-
: {}),
|
|
138
|
-
});
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
throw error;
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
//# sourceMappingURL=runtime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
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;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,qBAAqB,CACzC,SAA2B;IAE3B,IAAI,CAAC;QACH,OAAO,MAAM,SAAS,EAAE,CAAC;IAC3B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,CAAC,CAAC,KAAK,YAAY,WAAW,CAAC,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC9D,MAAM,IAAI,GACR,KAGD,CAAC,IAAI,CAAC;YACP,IACE,IAAI,KAAK,IAAI;gBACb,OAAO,IAAI,KAAK,QAAQ;gBACxB,OAAO,IAAI,CAAC,IAAI,KAAK,QAAQ;gBAC7B,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,EAC/B,CAAC;gBACD,MAAM,IAAI,WAAW,CAAC;oBACpB,IAAI,EAAE,IAAI,CAAC,IAAI;oBACf,MAAM,EAAE,IAAI,CAAC,MAAM;oBACnB,OAAO,EAAE,KAAK,CAAC,OAAO;oBACtB,GAAG,CAAC,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ;wBACjC,CAAC,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;wBACzB,CAAC,CAAC,EAAE,CAAC;iBACR,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QACD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
declare const _default: import("convex/server").SchemaDefinition<{
|
|
2
|
-
accounts: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
3
|
-
aciBytes: ArrayBuffer;
|
|
4
|
-
pniBytes?: ArrayBuffer | undefined;
|
|
5
|
-
unidentifiedAccessKey?: string | undefined;
|
|
6
|
-
updatedAt: number;
|
|
7
|
-
userId: string;
|
|
8
|
-
}, {
|
|
9
|
-
userId: import("convex/values").VString<string, "required">;
|
|
10
|
-
aciBytes: import("convex/values").VBytes<ArrayBuffer, "required">;
|
|
11
|
-
pniBytes: import("convex/values").VBytes<ArrayBuffer | undefined, "optional">;
|
|
12
|
-
unidentifiedAccessKey: import("convex/values").VString<string | undefined, "optional">;
|
|
13
|
-
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
14
|
-
}, "required", "aciBytes" | "pniBytes" | "unidentifiedAccessKey" | "updatedAt" | "userId">, {
|
|
15
|
-
by_aci_bytes: ["aciBytes", "_creationTime"];
|
|
16
|
-
by_user_id: ["userId", "_creationTime"];
|
|
17
|
-
}, {}, {}>;
|
|
18
|
-
devices: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
19
|
-
active: boolean;
|
|
20
|
-
createdAt: number;
|
|
21
|
-
deviceId: number;
|
|
22
|
-
deviceType?: "desktop" | "mobile" | "tablet" | "web" | undefined;
|
|
23
|
-
enabled: boolean;
|
|
24
|
-
encryptedDeviceName?: ArrayBuffer | undefined;
|
|
25
|
-
lastSeen: number;
|
|
26
|
-
linkToken?: string | undefined;
|
|
27
|
-
linked: boolean;
|
|
28
|
-
linkedAt?: number | undefined;
|
|
29
|
-
registered: boolean;
|
|
30
|
-
userId: string;
|
|
31
|
-
}, {
|
|
32
|
-
userId: import("convex/values").VString<string, "required">;
|
|
33
|
-
deviceId: import("convex/values").VFloat64<number, "required">;
|
|
34
|
-
encryptedDeviceName: import("convex/values").VBytes<ArrayBuffer | undefined, "optional">;
|
|
35
|
-
deviceType: import("convex/values").VUnion<"desktop" | "mobile" | "tablet" | "web" | undefined, [import("convex/values").VLiteral<"mobile", "required">, import("convex/values").VLiteral<"desktop", "required">, import("convex/values").VLiteral<"tablet", "required">, import("convex/values").VLiteral<"web", "required">], "optional", never>;
|
|
36
|
-
registered: import("convex/values").VBoolean<boolean, "required">;
|
|
37
|
-
linked: import("convex/values").VBoolean<boolean, "required">;
|
|
38
|
-
enabled: import("convex/values").VBoolean<boolean, "required">;
|
|
39
|
-
active: import("convex/values").VBoolean<boolean, "required">;
|
|
40
|
-
lastSeen: import("convex/values").VFloat64<number, "required">;
|
|
41
|
-
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
42
|
-
linkedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
43
|
-
linkToken: import("convex/values").VString<string | undefined, "optional">;
|
|
44
|
-
}, "required", "active" | "createdAt" | "deviceId" | "deviceType" | "enabled" | "encryptedDeviceName" | "lastSeen" | "linkToken" | "linked" | "linkedAt" | "registered" | "userId">, {
|
|
45
|
-
by_user_id: ["userId", "_creationTime"];
|
|
46
|
-
by_user_id_and_device_id: ["userId", "deviceId", "_creationTime"];
|
|
47
|
-
}, {}, {}>;
|
|
48
|
-
deviceHeartbeats: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
49
|
-
deviceId: number;
|
|
50
|
-
lastSeen: number;
|
|
51
|
-
userId: string;
|
|
52
|
-
}, {
|
|
53
|
-
userId: import("convex/values").VString<string, "required">;
|
|
54
|
-
deviceId: import("convex/values").VFloat64<number, "required">;
|
|
55
|
-
lastSeen: import("convex/values").VFloat64<number, "required">;
|
|
56
|
-
}, "required", "deviceId" | "lastSeen" | "userId">, {
|
|
57
|
-
by_user_id_and_device_id: ["userId", "deviceId", "_creationTime"];
|
|
58
|
-
}, {}, {}>;
|
|
59
|
-
identityKeys: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
60
|
-
compositeIdentity: string;
|
|
61
|
-
createdAt: number;
|
|
62
|
-
identityType: "aci" | "pni";
|
|
63
|
-
updatedAt: number;
|
|
64
|
-
userId: string;
|
|
65
|
-
}, {
|
|
66
|
-
userId: import("convex/values").VString<string, "required">;
|
|
67
|
-
identityType: import("convex/values").VUnion<"aci" | "pni", [import("convex/values").VLiteral<"aci", "required">, import("convex/values").VLiteral<"pni", "required">], "required", never>;
|
|
68
|
-
compositeIdentity: import("convex/values").VString<string, "required">;
|
|
69
|
-
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
70
|
-
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
71
|
-
}, "required", "compositeIdentity" | "createdAt" | "identityType" | "updatedAt" | "userId">, {
|
|
72
|
-
by_user_id_and_identity_type: ["userId", "identityType", "_creationTime"];
|
|
73
|
-
}, {}, {}>;
|
|
74
|
-
identityRegistrations: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
75
|
-
deviceId: number;
|
|
76
|
-
identityType: "aci" | "pni";
|
|
77
|
-
registrationId: number;
|
|
78
|
-
updatedAt: number;
|
|
79
|
-
userId: string;
|
|
80
|
-
}, {
|
|
81
|
-
userId: import("convex/values").VString<string, "required">;
|
|
82
|
-
deviceId: import("convex/values").VFloat64<number, "required">;
|
|
83
|
-
identityType: import("convex/values").VUnion<"aci" | "pni", [import("convex/values").VLiteral<"aci", "required">, import("convex/values").VLiteral<"pni", "required">], "required", never>;
|
|
84
|
-
registrationId: import("convex/values").VFloat64<number, "required">;
|
|
85
|
-
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
86
|
-
}, "required", "deviceId" | "identityType" | "registrationId" | "updatedAt" | "userId">, {
|
|
87
|
-
by_user_id_and_device_id_and_identity_type: ["userId", "deviceId", "identityType", "_creationTime"];
|
|
88
|
-
by_user_id_and_identity_type: ["userId", "identityType", "_creationTime"];
|
|
89
|
-
}, {}, {}>;
|
|
90
|
-
ecPreKeys: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
91
|
-
consumedAt?: number | undefined;
|
|
92
|
-
deviceId: number;
|
|
93
|
-
identityType: "aci" | "pni";
|
|
94
|
-
keyId: number;
|
|
95
|
-
publicKey: string;
|
|
96
|
-
uploadedAt: number;
|
|
97
|
-
userId: string;
|
|
98
|
-
}, {
|
|
99
|
-
userId: import("convex/values").VString<string, "required">;
|
|
100
|
-
deviceId: import("convex/values").VFloat64<number, "required">;
|
|
101
|
-
identityType: import("convex/values").VUnion<"aci" | "pni", [import("convex/values").VLiteral<"aci", "required">, import("convex/values").VLiteral<"pni", "required">], "required", never>;
|
|
102
|
-
keyId: import("convex/values").VFloat64<number, "required">;
|
|
103
|
-
publicKey: import("convex/values").VString<string, "required">;
|
|
104
|
-
uploadedAt: import("convex/values").VFloat64<number, "required">;
|
|
105
|
-
consumedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
106
|
-
}, "required", "consumedAt" | "deviceId" | "identityType" | "keyId" | "publicKey" | "uploadedAt" | "userId">, {
|
|
107
|
-
by_user_id_and_device_id_and_identity_type_and_consumed_at: ["userId", "deviceId", "identityType", "consumedAt", "_creationTime"];
|
|
108
|
-
by_user_id_and_device_id_and_identity_type_and_key_id: ["userId", "deviceId", "identityType", "keyId", "_creationTime"];
|
|
109
|
-
by_user_id_and_identity_type: ["userId", "identityType", "_creationTime"];
|
|
110
|
-
}, {}, {}>;
|
|
111
|
-
ecSignedPreKeys: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
112
|
-
createdAt: number;
|
|
113
|
-
deviceId: number;
|
|
114
|
-
expiresAt: number;
|
|
115
|
-
identityType: "aci" | "pni";
|
|
116
|
-
keyId: number;
|
|
117
|
-
publicKey: string;
|
|
118
|
-
signature: string;
|
|
119
|
-
userId: string;
|
|
120
|
-
}, {
|
|
121
|
-
userId: import("convex/values").VString<string, "required">;
|
|
122
|
-
deviceId: import("convex/values").VFloat64<number, "required">;
|
|
123
|
-
identityType: import("convex/values").VUnion<"aci" | "pni", [import("convex/values").VLiteral<"aci", "required">, import("convex/values").VLiteral<"pni", "required">], "required", never>;
|
|
124
|
-
keyId: import("convex/values").VFloat64<number, "required">;
|
|
125
|
-
publicKey: import("convex/values").VString<string, "required">;
|
|
126
|
-
signature: import("convex/values").VString<string, "required">;
|
|
127
|
-
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
128
|
-
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
129
|
-
}, "required", "createdAt" | "deviceId" | "expiresAt" | "identityType" | "keyId" | "publicKey" | "signature" | "userId">, {
|
|
130
|
-
by_user_id_and_device_id_and_identity_type: ["userId", "deviceId", "identityType", "_creationTime"];
|
|
131
|
-
by_user_id_and_identity_type: ["userId", "identityType", "_creationTime"];
|
|
132
|
-
}, {}, {}>;
|
|
133
|
-
kemOneTimePreKeys: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
134
|
-
consumedAt?: number | undefined;
|
|
135
|
-
deviceId: number;
|
|
136
|
-
identityType: "aci" | "pni";
|
|
137
|
-
keyId: number;
|
|
138
|
-
publicKey: string;
|
|
139
|
-
signature?: string | undefined;
|
|
140
|
-
uploadedAt: number;
|
|
141
|
-
userId: string;
|
|
142
|
-
}, {
|
|
143
|
-
userId: import("convex/values").VString<string, "required">;
|
|
144
|
-
deviceId: import("convex/values").VFloat64<number, "required">;
|
|
145
|
-
identityType: import("convex/values").VUnion<"aci" | "pni", [import("convex/values").VLiteral<"aci", "required">, import("convex/values").VLiteral<"pni", "required">], "required", never>;
|
|
146
|
-
keyId: import("convex/values").VFloat64<number, "required">;
|
|
147
|
-
publicKey: import("convex/values").VString<string, "required">;
|
|
148
|
-
signature: import("convex/values").VString<string | undefined, "optional">;
|
|
149
|
-
uploadedAt: import("convex/values").VFloat64<number, "required">;
|
|
150
|
-
consumedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
151
|
-
}, "required", "consumedAt" | "deviceId" | "identityType" | "keyId" | "publicKey" | "signature" | "uploadedAt" | "userId">, {
|
|
152
|
-
by_consumed_at_and_uploaded_at: ["consumedAt", "uploadedAt", "_creationTime"];
|
|
153
|
-
by_uploaded_at: ["uploadedAt", "_creationTime"];
|
|
154
|
-
by_user_id_and_device_id_and_identity_type_and_consumed_at: ["userId", "deviceId", "identityType", "consumedAt", "_creationTime"];
|
|
155
|
-
by_user_id_and_device_id_and_identity_type_and_key_id: ["userId", "deviceId", "identityType", "keyId", "_creationTime"];
|
|
156
|
-
by_user_id_and_identity_type: ["userId", "identityType", "_creationTime"];
|
|
157
|
-
}, {}, {}>;
|
|
158
|
-
kemLastResortPreKeys: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
159
|
-
createdAt: number;
|
|
160
|
-
deviceId: number;
|
|
161
|
-
expiresAt: number;
|
|
162
|
-
identityType: "aci" | "pni";
|
|
163
|
-
keyId: number;
|
|
164
|
-
publicKey: string;
|
|
165
|
-
signature: string;
|
|
166
|
-
userId: string;
|
|
167
|
-
}, {
|
|
168
|
-
userId: import("convex/values").VString<string, "required">;
|
|
169
|
-
deviceId: import("convex/values").VFloat64<number, "required">;
|
|
170
|
-
identityType: import("convex/values").VUnion<"aci" | "pni", [import("convex/values").VLiteral<"aci", "required">, import("convex/values").VLiteral<"pni", "required">], "required", never>;
|
|
171
|
-
keyId: import("convex/values").VFloat64<number, "required">;
|
|
172
|
-
publicKey: import("convex/values").VString<string, "required">;
|
|
173
|
-
signature: import("convex/values").VString<string, "required">;
|
|
174
|
-
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
175
|
-
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
176
|
-
}, "required", "createdAt" | "deviceId" | "expiresAt" | "identityType" | "keyId" | "publicKey" | "signature" | "userId">, {
|
|
177
|
-
by_expires_at: ["expiresAt", "_creationTime"];
|
|
178
|
-
by_user_id_and_device_id_and_identity_type: ["userId", "deviceId", "identityType", "_creationTime"];
|
|
179
|
-
by_user_id_and_identity_type: ["userId", "identityType", "_creationTime"];
|
|
180
|
-
}, {}, {}>;
|
|
181
|
-
messages: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
182
|
-
ciphertext: string;
|
|
183
|
-
clientMessageId?: string | undefined;
|
|
184
|
-
deliveryClass: "background-sync" | "ephemeral" | "user-visible";
|
|
185
|
-
expiresAt: number;
|
|
186
|
-
messageId: string;
|
|
187
|
-
messageType: "ciphertext" | "prekey_bundle" | "sender_key" | "server_delivery_receipt" | "unidentified_sender";
|
|
188
|
-
senderDeviceId: number;
|
|
189
|
-
senderUserId: string;
|
|
190
|
-
serverTimestamp: number;
|
|
191
|
-
sharedPayloadId?: string | undefined;
|
|
192
|
-
targetDeviceId: number;
|
|
193
|
-
targetUserId: string;
|
|
194
|
-
timestamp: number;
|
|
195
|
-
}, {
|
|
196
|
-
messageId: import("convex/values").VString<string, "required">;
|
|
197
|
-
targetUserId: import("convex/values").VString<string, "required">;
|
|
198
|
-
targetDeviceId: import("convex/values").VFloat64<number, "required">;
|
|
199
|
-
senderUserId: import("convex/values").VString<string, "required">;
|
|
200
|
-
senderDeviceId: import("convex/values").VFloat64<number, "required">;
|
|
201
|
-
ciphertext: import("convex/values").VString<string, "required">;
|
|
202
|
-
messageType: import("convex/values").VUnion<"ciphertext" | "prekey_bundle" | "sender_key" | "server_delivery_receipt" | "unidentified_sender", [import("convex/values").VLiteral<"ciphertext", "required">, import("convex/values").VLiteral<"prekey_bundle", "required">, import("convex/values").VLiteral<"sender_key", "required">, import("convex/values").VLiteral<"server_delivery_receipt", "required">, import("convex/values").VLiteral<"unidentified_sender", "required">], "required", never>;
|
|
203
|
-
deliveryClass: import("convex/values").VUnion<"background-sync" | "ephemeral" | "user-visible", [import("convex/values").VLiteral<"user-visible", "required">, import("convex/values").VLiteral<"background-sync", "required">, import("convex/values").VLiteral<"ephemeral", "required">], "required", never>;
|
|
204
|
-
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
205
|
-
serverTimestamp: import("convex/values").VFloat64<number, "required">;
|
|
206
|
-
clientMessageId: import("convex/values").VString<string | undefined, "optional">;
|
|
207
|
-
sharedPayloadId: import("convex/values").VString<string | undefined, "optional">;
|
|
208
|
-
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
209
|
-
}, "required", "ciphertext" | "clientMessageId" | "deliveryClass" | "expiresAt" | "messageId" | "messageType" | "senderDeviceId" | "senderUserId" | "serverTimestamp" | "sharedPayloadId" | "targetDeviceId" | "targetUserId" | "timestamp">, {
|
|
210
|
-
by_expires_at: ["expiresAt", "_creationTime"];
|
|
211
|
-
by_message_id: ["messageId", "_creationTime"];
|
|
212
|
-
by_target_and_client_message_id: ["targetUserId", "targetDeviceId", "senderUserId", "clientMessageId", "_creationTime"];
|
|
213
|
-
by_target_user_id_and_target_device_id: ["targetUserId", "targetDeviceId", "_creationTime"];
|
|
214
|
-
}, {}, {}>;
|
|
215
|
-
multiRecipientPayloads: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
216
|
-
expiresAt: number;
|
|
217
|
-
payloadId: string;
|
|
218
|
-
sharedBase64: string;
|
|
219
|
-
}, {
|
|
220
|
-
payloadId: import("convex/values").VString<string, "required">;
|
|
221
|
-
sharedBase64: import("convex/values").VString<string, "required">;
|
|
222
|
-
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
223
|
-
}, "required", "expiresAt" | "payloadId" | "sharedBase64">, {
|
|
224
|
-
by_expires_at: ["expiresAt", "_creationTime"];
|
|
225
|
-
by_payload_id: ["payloadId", "_creationTime"];
|
|
226
|
-
}, {}, {}>;
|
|
227
|
-
retryRequests: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
228
|
-
expiresAt: number;
|
|
229
|
-
failedTimestamp: number;
|
|
230
|
-
originalSenderDeviceId: number;
|
|
231
|
-
originalSenderUserId: string;
|
|
232
|
-
reason: "DECRYPTION_FAILED" | "IDENTITY_KEY_MISMATCH" | "NO_SESSION" | "SESSION_EXPIRED" | "STALE_DEVICE_LIST";
|
|
233
|
-
requestId: string;
|
|
234
|
-
requesterDeviceId: number;
|
|
235
|
-
requesterUserId: string;
|
|
236
|
-
timestamp: number;
|
|
237
|
-
}, {
|
|
238
|
-
requestId: import("convex/values").VString<string, "required">;
|
|
239
|
-
requesterUserId: import("convex/values").VString<string, "required">;
|
|
240
|
-
requesterDeviceId: import("convex/values").VFloat64<number, "required">;
|
|
241
|
-
originalSenderUserId: import("convex/values").VString<string, "required">;
|
|
242
|
-
originalSenderDeviceId: import("convex/values").VFloat64<number, "required">;
|
|
243
|
-
failedTimestamp: import("convex/values").VFloat64<number, "required">;
|
|
244
|
-
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
245
|
-
reason: import("convex/values").VUnion<"DECRYPTION_FAILED" | "IDENTITY_KEY_MISMATCH" | "NO_SESSION" | "SESSION_EXPIRED" | "STALE_DEVICE_LIST", [import("convex/values").VLiteral<"NO_SESSION", "required">, import("convex/values").VLiteral<"DECRYPTION_FAILED", "required">, import("convex/values").VLiteral<"SESSION_EXPIRED", "required">, import("convex/values").VLiteral<"STALE_DEVICE_LIST", "required">, import("convex/values").VLiteral<"IDENTITY_KEY_MISMATCH", "required">], "required", never>;
|
|
246
|
-
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
247
|
-
}, "required", "expiresAt" | "failedTimestamp" | "originalSenderDeviceId" | "originalSenderUserId" | "reason" | "requestId" | "requesterDeviceId" | "requesterUserId" | "timestamp">, {
|
|
248
|
-
by_expires_at: ["expiresAt", "_creationTime"];
|
|
249
|
-
by_original_sender_user_id_and_original_sender_device_id: ["originalSenderUserId", "originalSenderDeviceId", "_creationTime"];
|
|
250
|
-
by_request_id: ["requestId", "_creationTime"];
|
|
251
|
-
}, {}, {}>;
|
|
252
|
-
provisioningSessions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
253
|
-
assignedDeviceId?: number | undefined;
|
|
254
|
-
createdAt: number;
|
|
255
|
-
deviceMetadata?: {
|
|
256
|
-
appVersion?: string | undefined;
|
|
257
|
-
osVersion?: string | undefined;
|
|
258
|
-
platform?: string | undefined;
|
|
259
|
-
} | undefined;
|
|
260
|
-
encryptedMessage?: string | undefined;
|
|
261
|
-
ephemeralPublicKey: string;
|
|
262
|
-
expiresAt: number;
|
|
263
|
-
linkedDeviceToken?: string | undefined;
|
|
264
|
-
newDeviceEphemeralPublicKey?: string | undefined;
|
|
265
|
-
sessionId: string;
|
|
266
|
-
status: "completed" | "connected" | "linked_pending_ack" | "ready" | "rolled_back" | "waiting";
|
|
267
|
-
userId: string;
|
|
268
|
-
}, {
|
|
269
|
-
sessionId: import("convex/values").VString<string, "required">;
|
|
270
|
-
userId: import("convex/values").VString<string, "required">;
|
|
271
|
-
ephemeralPublicKey: import("convex/values").VString<string, "required">;
|
|
272
|
-
newDeviceEphemeralPublicKey: import("convex/values").VString<string | undefined, "optional">;
|
|
273
|
-
deviceMetadata: import("convex/values").VObject<{
|
|
274
|
-
appVersion?: string | undefined;
|
|
275
|
-
osVersion?: string | undefined;
|
|
276
|
-
platform?: string | undefined;
|
|
277
|
-
} | undefined, {
|
|
278
|
-
platform: import("convex/values").VString<string | undefined, "optional">;
|
|
279
|
-
appVersion: import("convex/values").VString<string | undefined, "optional">;
|
|
280
|
-
osVersion: import("convex/values").VString<string | undefined, "optional">;
|
|
281
|
-
}, "optional", "appVersion" | "osVersion" | "platform">;
|
|
282
|
-
encryptedMessage: import("convex/values").VString<string | undefined, "optional">;
|
|
283
|
-
assignedDeviceId: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
284
|
-
linkedDeviceToken: import("convex/values").VString<string | undefined, "optional">;
|
|
285
|
-
status: import("convex/values").VUnion<"completed" | "connected" | "linked_pending_ack" | "ready" | "rolled_back" | "waiting", [import("convex/values").VLiteral<"waiting", "required">, import("convex/values").VLiteral<"connected", "required">, import("convex/values").VLiteral<"ready", "required">, import("convex/values").VLiteral<"linked_pending_ack", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"rolled_back", "required">], "required", never>;
|
|
286
|
-
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
287
|
-
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
288
|
-
}, "required", "assignedDeviceId" | "createdAt" | "deviceMetadata" | "deviceMetadata.appVersion" | "deviceMetadata.osVersion" | "deviceMetadata.platform" | "encryptedMessage" | "ephemeralPublicKey" | "expiresAt" | "linkedDeviceToken" | "newDeviceEphemeralPublicKey" | "sessionId" | "status" | "userId">, {
|
|
289
|
-
by_expires_at: ["expiresAt", "_creationTime"];
|
|
290
|
-
by_session_id: ["sessionId", "_creationTime"];
|
|
291
|
-
by_user_id: ["userId", "_creationTime"];
|
|
292
|
-
}, {}, {}>;
|
|
293
|
-
senderCertificates: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
294
|
-
certificate: string;
|
|
295
|
-
certificateContract: "scoped";
|
|
296
|
-
deviceId: number;
|
|
297
|
-
expiresAt: number;
|
|
298
|
-
identityKey: string;
|
|
299
|
-
identityType: "aci" | "pni";
|
|
300
|
-
issuedAt: number;
|
|
301
|
-
userId: string;
|
|
302
|
-
}, {
|
|
303
|
-
userId: import("convex/values").VString<string, "required">;
|
|
304
|
-
deviceId: import("convex/values").VFloat64<number, "required">;
|
|
305
|
-
identityType: import("convex/values").VUnion<"aci" | "pni", [import("convex/values").VLiteral<"aci", "required">, import("convex/values").VLiteral<"pni", "required">], "required", never>;
|
|
306
|
-
identityKey: import("convex/values").VString<string, "required">;
|
|
307
|
-
certificate: import("convex/values").VString<string, "required">;
|
|
308
|
-
certificateContract: import("convex/values").VLiteral<"scoped", "required">;
|
|
309
|
-
issuedAt: import("convex/values").VFloat64<number, "required">;
|
|
310
|
-
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
311
|
-
}, "required", "certificate" | "certificateContract" | "deviceId" | "expiresAt" | "identityKey" | "identityType" | "issuedAt" | "userId">, {
|
|
312
|
-
by_user_id_and_device_id_and_identity_type: ["userId", "deviceId", "identityType", "_creationTime"];
|
|
313
|
-
by_user_id_and_identity_type: ["userId", "identityType", "_creationTime"];
|
|
314
|
-
}, {}, {}>;
|
|
315
|
-
groups: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
316
|
-
encryptedState: ArrayBuffer;
|
|
317
|
-
groupId: string;
|
|
318
|
-
version: number;
|
|
319
|
-
}, {
|
|
320
|
-
groupId: import("convex/values").VString<string, "required">;
|
|
321
|
-
encryptedState: import("convex/values").VBytes<ArrayBuffer, "required">;
|
|
322
|
-
version: import("convex/values").VFloat64<number, "required">;
|
|
323
|
-
}, "required", "encryptedState" | "groupId" | "version">, {
|
|
324
|
-
by_group_id: ["groupId", "_creationTime"];
|
|
325
|
-
}, {}, {}>;
|
|
326
|
-
groupChanges: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
327
|
-
actions: ArrayBuffer;
|
|
328
|
-
changeEpoch: number;
|
|
329
|
-
groupId: string;
|
|
330
|
-
serverSignature: ArrayBuffer;
|
|
331
|
-
timestamp: number;
|
|
332
|
-
version: number;
|
|
333
|
-
}, {
|
|
334
|
-
groupId: import("convex/values").VString<string, "required">;
|
|
335
|
-
version: import("convex/values").VFloat64<number, "required">;
|
|
336
|
-
actions: import("convex/values").VBytes<ArrayBuffer, "required">;
|
|
337
|
-
serverSignature: import("convex/values").VBytes<ArrayBuffer, "required">;
|
|
338
|
-
changeEpoch: import("convex/values").VFloat64<number, "required">;
|
|
339
|
-
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
340
|
-
}, "required", "actions" | "changeEpoch" | "groupId" | "serverSignature" | "timestamp" | "version">, {
|
|
341
|
-
by_group_id_version: ["groupId", "version", "_creationTime"];
|
|
342
|
-
}, {}, {}>;
|
|
343
|
-
groupSnapshots: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
344
|
-
baselineSignature: ArrayBuffer;
|
|
345
|
-
encryptedState: ArrayBuffer;
|
|
346
|
-
groupId: string;
|
|
347
|
-
version: number;
|
|
348
|
-
}, {
|
|
349
|
-
groupId: import("convex/values").VString<string, "required">;
|
|
350
|
-
version: import("convex/values").VFloat64<number, "required">;
|
|
351
|
-
encryptedState: import("convex/values").VBytes<ArrayBuffer, "required">;
|
|
352
|
-
baselineSignature: import("convex/values").VBytes<ArrayBuffer, "required">;
|
|
353
|
-
}, "required", "baselineSignature" | "encryptedState" | "groupId" | "version">, {
|
|
354
|
-
by_group_id_version: ["groupId", "version", "_creationTime"];
|
|
355
|
-
}, {}, {}>;
|
|
356
|
-
}, true>;
|
|
357
|
-
export default _default;
|
|
358
|
-
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../remote/relay/convex/component/schema.ts"],"names":[],"mappings":""}
|