{ "$schema": "https://json-schema.org/draft/2020-12/schema", "x-backend-contract-sha256": "654ec761e3481b423296b402497a97f4092ce167e7a2ca51a47d25f0fca4466e", "$defs": { "AccountChannelBody": { "type": "object", "properties": { "channel_id": { "type": "string" }, "created_at": { "type": "integer" }, "payload": { "type": "string" }, "role": { "type": "string" } }, "required": [ "channel_id", "created_at", "payload", "role" ] }, "AccountDeviceBody": { "type": "object", "properties": { "created_at": { "type": "integer" }, "current": { "type": "boolean" }, "id": { "type": "string" }, "last_seen": { "type": "integer" }, "name": { "type": "string" } }, "required": [ "created_at", "current", "id", "last_seen", "name" ] }, "AccountDeviceNameRequest": { "type": "object", "properties": { "name": { "type": "string" } }, "required": [ "name" ] }, "AccountDeviceSigningRequest": { "type": "object", "properties": { "device_id": { "type": "string" }, "public_key": { "type": "string" }, "signature": { "type": "string" } }, "required": [ "device_id", "public_key", "signature" ] }, "AccountProfile": { "type": "object", "properties": { "avatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "displayName": { "type": "string" }, "modifiedAt": { "type": "integer" }, "username": { "type": "string" } }, "required": [ "displayName", "modifiedAt", "username" ] }, "AccountProfileRequest": { "type": "object", "properties": { "avatar": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "displayName": { "type": "string" } }, "required": [ "displayName" ] }, "AccountRegisterRequest": { "type": "object", "properties": { "public_key": { "type": "string" }, "salt": { "type": "string" }, "signing_public_key": { "type": "string" }, "username": { "type": "string" }, "vault": { "type": "string" }, "verifier": { "type": "string" } }, "required": [ "public_key", "salt", "signing_public_key", "username", "vault", "verifier" ] }, "AccountSaltBody": { "type": "object", "properties": { "salt": { "type": "string" } }, "required": [ "salt" ] }, "AccountSaltRequest": { "type": "object", "properties": { "username": { "type": "string" } }, "required": [ "username" ] }, "AccountSessionBody": { "type": "object", "properties": { "token": { "type": "string" }, "username": { "type": "string" } }, "required": [ "token", "username" ] }, "AccountSessionRequest": { "type": "object", "properties": { "device_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "device_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "username": { "type": "string" }, "verifier": { "type": "string" } }, "required": [ "username", "verifier" ] }, "AccountVaultBody": { "type": "object", "properties": { "revision": { "type": "integer" }, "vault": { "type": "string" } }, "required": [ "revision", "vault" ] }, "AccountVaultRequest": { "type": "object", "properties": { "revision": { "type": "integer" }, "vault": { "type": "string" } }, "required": [ "revision", "vault" ] }, "AppendResult": { "type": "object", "properties": { "seq": { "type": "integer" } }, "required": [ "seq" ] }, "ChannelHistoryRequest": { "type": "object", "properties": { "chatHistory": { "type": "boolean" }, "filesHistory": { "type": "boolean" } }, "required": [ "chatHistory", "filesHistory" ] }, "ChannelInfo": { "type": "object", "properties": { "can_manage_structure": { "type": "boolean" }, "can_upload": { "type": "boolean" }, "created_at": { "type": "integer" }, "creator_account": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "expires_at": { "type": "integer" }, "id": { "type": "string" }, "last_seq": { "type": "integer" }, "mode": { "$ref": "#/$defs/ChannelMode" }, "oldest_seq": { "type": "integer" }, "password_required": { "type": "boolean" }, "seats_used": { "type": "integer" }, "settings": { "$ref": "#/$defs/ChannelSettings" } }, "required": [ "can_manage_structure", "can_upload", "created_at", "expires_at", "id", "last_seq", "mode", "oldest_seq", "password_required", "seats_used", "settings" ] }, "ChannelMode": { "type": "string", "enum": [ "enc", "raw" ] }, "ChannelSettings": { "type": "object", "properties": { "allow_guests": { "type": "boolean" }, "delete_policy": { "$ref": "#/$defs/DeletePolicy" }, "file_max_downloads": { "type": "integer" }, "join_policy": { "$ref": "#/$defs/JoinPolicy" }, "max_items": { "type": "integer" }, "members_can_upload": { "type": "boolean" }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "seats": { "type": "integer" }, "ttl_seconds": { "type": "integer" }, "ui_restrict_copy_download": { "type": "boolean" } }, "required": [ "allow_guests", "delete_policy", "file_max_downloads", "join_policy", "max_items", "members_can_upload", "seats", "ttl_seconds", "ui_restrict_copy_download" ] }, "ChannelSettingsPatch": { "type": "object", "properties": { "allow_guests": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "delete_policy": { "anyOf": [ { "$ref": "#/$defs/DeletePolicy" }, { "type": "null" } ] }, "file_max_downloads": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "join_password": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "join_policy": { "anyOf": [ { "$ref": "#/$defs/JoinPolicy" }, { "type": "null" } ] }, "max_items": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "members_can_upload": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "seats": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "ttl_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "ui_restrict_copy_download": { "anyOf": [ { "type": "boolean" }, { "type": "null" } ] } }, "required": [] }, "CreateChannelRequest": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "join_password": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "key_package": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "mode": { "anyOf": [ { "$ref": "#/$defs/ChannelMode" }, { "type": "null" } ] }, "owner_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "read_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "settings": { "anyOf": [ { "$ref": "#/$defs/ChannelSettings" }, { "type": "null" } ] }, "write_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [] }, "CreateShareRequest": { "type": "object", "properties": { "id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "owner_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "read_hash": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "settings": { "anyOf": [ { "$ref": "#/$defs/ShareSettings" }, { "type": "null" } ] } }, "required": [] }, "CryptoState": { "type": "object", "properties": { "access": { "type": "array", "items": { "$ref": "#/$defs/ChannelAccess" } }, "envelopes": { "type": "array", "items": { "$ref": "#/$defs/DomainEnvelope" } }, "objects": { "type": "array", "items": { "$ref": "#/$defs/ObjectEnvelope" } }, "revision": { "type": "integer" } }, "required": [ "access", "envelopes", "objects", "revision" ] }, "ChannelAccess": { "type": "object", "properties": { "channelId": { "type": "string" }, "chatFromRevision": { "type": "integer" }, "chatRead": { "type": "boolean" }, "chatWrite": { "type": "boolean" }, "filesFromRevision": { "type": "integer" }, "filesRead": { "type": "boolean" }, "filesUpload": { "type": "boolean" }, "username": { "type": "string" } }, "required": [ "channelId", "chatFromRevision", "chatRead", "chatWrite", "filesFromRevision", "filesRead", "filesUpload", "username" ] }, "DeletePolicy": { "type": "string", "enum": [ "owner_only", "own", "anyone" ] }, "DomainEnvelope": { "type": "object", "properties": { "channelId": { "type": "string" }, "domain": { "$ref": "#/$defs/CryptoDomain" }, "epoch": { "type": "integer" }, "payload": { "type": "string" }, "username": { "type": "string" } }, "required": [ "channelId", "domain", "epoch", "payload", "username" ] }, "CryptoDomain": { "type": "string", "enum": [ "chat", "files" ] }, "DomainPublishRequest": { "type": "object", "properties": { "channelId": { "type": "string" }, "domain": { "$ref": "#/$defs/CryptoDomain" }, "envelopes": { "type": "array", "items": { "$ref": "#/$defs/DomainEnvelope" } }, "epoch": { "type": "integer" } }, "required": [ "channelId", "domain", "envelopes", "epoch" ] }, "ErrorBody": { "type": "object", "properties": { "error": { "type": "string" } }, "required": [ "error" ] }, "FinishShareRequest": { "type": "object", "properties": { "manifest_item_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [] }, "GoneLogBody": { "type": "object", "properties": { "error": { "type": "string" }, "oldest_seq": { "type": "integer" } }, "required": [ "error", "oldest_seq" ] }, "InvitationBody": { "type": "object", "properties": { "channel_id": { "type": "string" }, "created_at": { "type": "integer" }, "payload": { "type": "string" }, "username": { "type": "string" } }, "required": [ "channel_id", "created_at", "payload", "username" ] }, "InvitationCryptoPlan": { "type": "object", "properties": { "batches": { "type": "array", "items": { "$ref": "#/$defs/CryptoGrantBatch" } }, "channelId": { "type": "string" }, "username": { "type": "string" } }, "required": [ "batches", "channelId", "username" ] }, "CryptoGrantBatch": { "type": "object", "properties": { "domain": { "$ref": "#/$defs/CryptoDomain" }, "epoch": { "type": "integer" }, "recipients": { "type": "array", "items": { "type": "string" } }, "rotate": { "type": "boolean" } }, "required": [ "domain", "epoch", "recipients", "rotate" ] }, "InvitationRequest": { "type": "object", "properties": { "domain_envelopes": { "anyOf": [ { "type": "array", "items": { "$ref": "#/$defs/DomainEnvelope" } }, { "type": "null" } ] }, "payload": { "type": "string" }, "username": { "type": "string" } }, "required": [ "payload", "username" ] }, "JoinPolicy": { "type": "string", "enum": [ "open", "invite" ] }, "JoinRequest": { "type": "object", "properties": { "password": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [] }, "KeyPackageRequest": { "type": "object", "properties": { "payload": { "type": "string" } }, "required": [ "payload" ] }, "MemberBody": { "type": "object", "properties": { "joined_at": { "type": "integer" }, "role": { "type": "string" }, "username": { "type": "string" } }, "required": [ "joined_at", "role", "username" ] }, "ObjectEnvelope": { "type": "object", "properties": { "authorAccount": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "channelId": { "type": "string" }, "createdRevision": { "type": "integer" }, "deleteEvent": { "anyOf": [ { "$ref": "#/$defs/SignedContentEventRecord" }, { "type": "null" } ] }, "domain": { "$ref": "#/$defs/CryptoDomain" }, "epoch": { "type": "integer" }, "event": { "anyOf": [ { "$ref": "#/$defs/SignedContentEventRecord" }, { "type": "null" } ] }, "itemId": { "type": "string" }, "keyEnvelope": { "type": "string" } }, "required": [ "channelId", "createdRevision", "domain", "epoch", "itemId", "keyEnvelope" ] }, "PasskeyBeginRequest": { "type": "object", "properties": { "username": { "type": "string" }, "verifier": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "username" ] }, "PasskeyEnvelopeRequest": { "type": "object", "properties": { "credential": { "type": "string" }, "id": { "type": "string" }, "key_envelope": { "type": "string" }, "username": { "type": "string" } }, "required": [ "credential", "id", "key_envelope", "username" ] }, "PasskeyFinishRequest": { "type": "object", "properties": { "credential": { "type": "string" }, "device_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "device_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "type": "string" }, "key_envelope": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "username": { "type": "string" } }, "required": [ "credential", "id", "username" ] }, "PasskeyInfoBody": { "type": "object", "properties": { "can_recover": { "type": "boolean" }, "created_at": { "type": "integer" }, "id": { "type": "string" }, "name": { "type": "string" }, "prf_salt": { "type": "string" } }, "required": [ "can_recover", "created_at", "id", "name", "prf_salt" ] }, "PasskeyOptionsBody": { "type": "object", "properties": { "credentials": { "type": "array", "items": { "$ref": "#/$defs/PasskeyInfoBody" } }, "id": { "type": "string" }, "options": { "type": "string" }, "prf_salt": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "credentials", "id", "options" ] }, "PasskeySessionBody": { "type": "object", "properties": { "credential_id": { "type": "string" }, "key_envelope": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "prf_salt": { "type": "string" }, "token": { "type": "string" }, "username": { "type": "string" } }, "required": [ "credential_id", "prf_salt", "token", "username" ] }, "PublicKeyBody": { "type": "object", "properties": { "public_key": { "type": "string" }, "signing_public_key": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "public_key" ] }, "SeatInfo": { "type": "object", "properties": { "account_name": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "endpoint_hash": { "type": "string" }, "joined_at": { "type": "integer" }, "label": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "endpoint_hash", "joined_at" ] }, "SeatJoined": { "type": "object", "properties": { "endpoint_hash": { "type": "string" }, "joined_at": { "type": "integer" }, "seats_max": { "type": "integer" }, "seats_used": { "type": "integer" } }, "required": [ "endpoint_hash", "joined_at", "seats_max", "seats_used" ] }, "ServerInfoBody": { "type": "object", "properties": { "captcha": { "$ref": "#/$defs/CaptchaBody" }, "choices": { "$ref": "#/$defs/SettingChoicesBody" }, "contract_version": { "type": "string" }, "defaults": { "$ref": "#/$defs/DefaultsBody" }, "limits": { "$ref": "#/$defs/LimitsBody" }, "protocol": { "type": "integer" }, "transports": { "$ref": "#/$defs/TransportsBody" } }, "required": [ "captcha", "choices", "contract_version", "defaults", "limits", "protocol", "transports" ] }, "CaptchaBody": { "type": "object", "properties": { "api_endpoint": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "enabled": { "type": "boolean" }, "provider": { "type": "string" } }, "required": [ "enabled", "provider" ] }, "DefaultsBody": { "type": "object", "properties": { "channel": { "$ref": "#/$defs/ChannelSettings" }, "channel_mode": { "$ref": "#/$defs/ChannelMode" }, "share": { "$ref": "#/$defs/ShareSettings" } }, "required": [ "channel", "channel_mode", "share" ] }, "LimitsBody": { "type": "object", "properties": { "max_channel_bytes": { "type": "integer" }, "max_frames_per_item": { "type": "integer" }, "max_items": { "type": "integer" }, "max_payload_bytes": { "type": "integer" }, "max_seats": { "type": "integer" }, "max_ttl_seconds": { "type": "integer" }, "max_visitors": { "type": "integer" }, "min_ttl_seconds": { "type": "integer" } }, "required": [ "max_channel_bytes", "max_frames_per_item", "max_items", "max_payload_bytes", "max_seats", "max_ttl_seconds", "max_visitors", "min_ttl_seconds" ] }, "SettingChoicesBody": { "type": "object", "properties": { "file_max_downloads": { "type": "array", "items": { "type": "integer" } }, "max_visitors": { "type": "array", "items": { "type": "integer" } }, "seats": { "type": "array", "items": { "type": "integer" } }, "ttl_seconds": { "type": "array", "items": { "type": "integer" } } }, "required": [ "file_max_downloads", "max_visitors", "seats", "ttl_seconds" ] }, "ShareInfo": { "type": "object", "properties": { "created_at": { "type": "integer" }, "expires_at": { "type": "integer" }, "id": { "type": "string" }, "items": { "type": "array", "items": { "$ref": "#/$defs/ShareItemInfo" } }, "manifest_item_id": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "sealed_at": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "settings": { "$ref": "#/$defs/ShareSettings" }, "state": { "type": "string" } }, "required": [ "created_at", "expires_at", "id", "items", "settings", "state" ] }, "ShareItemInfo": { "type": "object", "properties": { "bytes": { "type": "integer" }, "complete": { "type": "boolean" }, "downloads_left": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "frames": { "type": "integer" }, "item_id": { "type": "string" }, "max_downloads": { "type": "integer" } }, "required": [ "bytes", "complete", "downloads_left", "frames", "item_id", "max_downloads" ] }, "ShareSettings": { "type": "object", "properties": { "file_max_downloads": { "type": "integer" }, "max_visitors": { "type": "integer" }, "ttl_seconds": { "type": "integer" } }, "required": [ "file_max_downloads", "max_visitors", "ttl_seconds" ] }, "ShareSettingsPatch": { "type": "object", "properties": { "file_max_downloads": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "max_visitors": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] }, "ttl_seconds": { "anyOf": [ { "type": "integer" }, { "type": "null" } ] } }, "required": [] }, "SignedContentEventRecord": { "type": "object", "properties": { "deviceCertificateSignature": { "type": "string" }, "eventId": { "type": "string" }, "frameCount": { "type": "integer" }, "kind": { "type": "string" }, "manifestHash": { "type": "string" }, "signature": { "type": "string" }, "signerDeviceId": { "type": "string" }, "signerDevicePublicKey": { "type": "string" }, "signerRootPublicKey": { "type": "string" }, "targetItemId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [ "deviceCertificateSignature", "eventId", "frameCount", "kind", "manifestHash", "signature", "signerDeviceId", "signerDevicePublicKey", "signerRootPublicKey" ] }, "TransportsBody": { "type": "object", "properties": { "http3": { "type": "boolean" }, "sse": { "type": "boolean" }, "websocket": { "type": "boolean" } }, "required": [ "http3", "sse", "websocket" ] }, "WorkspaceBody": { "type": "object", "properties": { "people": { "type": "array", "items": { "$ref": "#/$defs/AccountProfile" } }, "structure": { "$ref": "#/$defs/WorkspaceState" } }, "required": [ "people", "structure" ] }, "WorkspaceChannelCreatedBody": { "type": "object", "properties": { "channel": { "$ref": "#/$defs/WorkspaceChannel" }, "workspace": { "$ref": "#/$defs/WorkspaceBody" } }, "required": [ "channel", "workspace" ] }, "WorkspaceChannel": { "type": "object", "properties": { "chatEpoch": { "type": "integer" }, "chatHistory": { "type": "boolean" }, "createdAt": { "type": "integer" }, "createdBy": { "type": "string" }, "filesEpoch": { "type": "integer" }, "filesHistory": { "type": "boolean" }, "groupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "chatEpoch", "chatHistory", "createdAt", "createdBy", "filesEpoch", "filesHistory", "id", "name" ] }, "WorkspaceChannelRequest": { "type": "object", "properties": { "groupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "name": { "type": "string" } }, "required": [ "name" ] }, "WorkspaceFolderRequest": { "type": "object", "properties": { "name": { "type": "string" }, "parentId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "threadId": { "type": "string" } }, "required": [ "name", "threadId" ] }, "WorkspaceGroupCreatedBody": { "type": "object", "properties": { "group": { "$ref": "#/$defs/WorkspaceGroup" }, "workspace": { "$ref": "#/$defs/WorkspaceBody" } }, "required": [ "group", "workspace" ] }, "WorkspaceGroup": { "type": "object", "properties": { "createdAt": { "type": "integer" }, "id": { "type": "string" }, "name": { "type": "string" } }, "required": [ "createdAt", "id", "name" ] }, "WorkspaceGroupRequest": { "type": "object", "properties": { "groupId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] } }, "required": [] }, "WorkspaceMoveRequest": { "type": "object", "properties": { "folderId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "itemIds": { "type": "array", "items": { "type": "string" } }, "threadId": { "type": "string" } }, "required": [ "itemIds", "threadId" ] }, "WorkspaceNameRequest": { "type": "object", "properties": { "name": { "type": "string" } }, "required": [ "name" ] }, "WorkspaceState": { "type": "object", "properties": { "channels": { "type": "array", "items": { "$ref": "#/$defs/WorkspaceChannel" } }, "defaultChannelId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "folders": { "type": "array", "items": { "$ref": "#/$defs/WorkspaceFolder" } }, "groups": { "type": "array", "items": { "$ref": "#/$defs/WorkspaceGroup" } }, "locations": { "type": "array", "items": { "$ref": "#/$defs/WorkspaceLocation" } }, "revision": { "type": "integer" } }, "required": [ "channels", "folders", "groups", "locations", "revision" ] }, "WorkspaceFolder": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" }, "parentId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "threadId": { "type": "string" } }, "required": [ "id", "name", "threadId" ] }, "WorkspaceLocation": { "type": "object", "properties": { "authorAccount": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "folderId": { "anyOf": [ { "type": "string" }, { "type": "null" } ] }, "itemId": { "type": "string" }, "threadId": { "type": "string" } }, "required": [ "itemId", "threadId" ] } } }