@polyester/sdk 0.30.2 → 0.31.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.
Files changed (39) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/dist/browser-core.d.ts.map +1 -1
  3. package/dist/browser-core.js +24 -2
  4. package/dist/browser-core.js.map +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +2 -2
  7. package/dist/realtime/snapshot-then-stream.js +1 -1
  8. package/dist/realtime/snapshot-then-stream.js.map +1 -1
  9. package/dist/services/address-book/address-book.schemas.d.ts +2 -2
  10. package/dist/services/auth/account-signer-auth.d.ts +6 -0
  11. package/dist/services/auth/account-signer-auth.d.ts.map +1 -1
  12. package/dist/services/auth/account-signer-auth.js +19 -0
  13. package/dist/services/auth/account-signer-auth.js.map +1 -1
  14. package/dist/services/heatmap/heatmap.schemas.d.ts +4 -4
  15. package/dist/services/lifecycle/lifecycle.schemas.d.ts +42 -42
  16. package/dist/services/orderbook/orderbook.schemas.d.ts +1 -1
  17. package/dist/services/orders/order-errors.schemas.d.ts +1 -1
  18. package/dist/services/orders/orders-batch.schemas.d.ts +32 -32
  19. package/dist/services/orders/orders-input.schemas.d.ts +3 -3
  20. package/dist/services/orders/orders-output.schemas.d.ts +6 -6
  21. package/dist/services/subaccounts/subaccounts.schemas.d.ts +11 -11
  22. package/dist/services/trades/trades.schemas.d.ts +1 -1
  23. package/dist/services/trading-withdraws/trading-withdraws.d.ts +7 -0
  24. package/dist/services/trading-withdraws/trading-withdraws.d.ts.map +1 -1
  25. package/dist/services/trading-withdraws/trading-withdraws.js +13 -4
  26. package/dist/services/trading-withdraws/trading-withdraws.js.map +1 -1
  27. package/dist/services/triggers/trigger-input.schemas.d.ts +1 -1
  28. package/dist/services/triggers/triggers-output.schemas.d.ts +15 -15
  29. package/dist/services/whiteboard/whiteboard.schemas.d.ts +49 -49
  30. package/dist/shared/errors.d.ts +21 -3
  31. package/dist/shared/errors.d.ts.map +1 -1
  32. package/dist/shared/errors.js +17 -1
  33. package/dist/shared/errors.js.map +1 -1
  34. package/dist/shared/rate-limit.schemas.d.ts +1 -1
  35. package/dist/shared/subscription-errors.d.ts +6 -6
  36. package/dist/shared/subscription-errors.d.ts.map +1 -1
  37. package/dist/shared/subscription-errors.js +20 -29
  38. package/dist/shared/subscription-errors.js.map +1 -1
  39. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"trading-withdraws.js","names":["#client","Proto.WithdrawService","#resolver","#signingConfig","#catalog","#scales","#toFundingInputSchema","#toExternalChainInputSchema","#prepareWithdraw"],"sources":["../../../src/services/trading-withdraws/trading-withdraws.ts"],"sourcesContent":["import { ValidationError } from \"../../shared/errors.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport type { Address, Hex } from \"viem\";\nimport { checksumEvmAddress, evmHexToBytes } from \"../../utils/evm.js\";\nimport type { ClientCatalog } from \"../../catalogs/types.js\";\nimport * as Proto from \"../../gen/chain/withdraw/v1/withdraw_pb.js\";\nimport { idToBigInt } from \"../../utils/base58-id.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n createCreateTradingWithdrawToExternalChainInputSchema,\n createCreateTradingWithdrawToFundingInputSchema,\n CreateTradingWithdrawResultSchema,\n CreateWalletTradingWithdrawResultSchema,\n ValidateWithdrawDestinationInputSchema,\n ValidateWithdrawDestinationResultSchema,\n type CreateTradingWithdrawResult,\n type CreateTradingWithdrawToExternalChainInput,\n type CreateTradingWithdrawToExternalChainRequest,\n type CreateTradingWithdrawToFundingInput,\n type CreateTradingWithdrawToFundingRequest,\n type TradingWithdrawIntentPayloadRequest,\n type ValidateWithdrawDestinationInput,\n type ValidateWithdrawDestinationResult,\n} from \"./trading-withdraws.schemas.js\";\nimport { buildTradingWithdrawWalletMessage } from \"./wallet-message.js\";\n\nexport type TradingWithdrawWalletSigner = {\n signerWallet: string;\n accountId: string;\n /**\n * Signs the UTF-8 message directly using EIP-191 personal_sign, without pre-hashing or switching chains.\n * For a viem account, use `(message) => account.signMessage({ message })`.\n */\n signMessage: (message: string) => Promise<Hex>;\n};\n\nexport type TradingWithdrawSigningConfig = {\n chainId: number;\n tradingGatewayAddress: Address;\n};\n\nexport type CreateTradingWithdrawToFundingServiceInput = CreateTradingWithdrawToFundingInput & {\n walletSigner?: TradingWithdrawWalletSigner;\n};\n\nexport type CreateTradingWithdrawToExternalChainServiceInput =\n CreateTradingWithdrawToExternalChainInput & {\n walletSigner?: TradingWithdrawWalletSigner;\n };\n\nexport type PreparedTradingWithdraw = Readonly<{\n /**\n * Submits the exact payload and signature produced during preparation.\n * Repeated calls only change transport options such as the step-up token.\n */\n submit: (options?: PolyesterMutationOptions) => Promise<CreateTradingWithdrawResult>;\n}>;\n\ntype TradingWithdrawRequest =\n | CreateTradingWithdrawToFundingRequest\n | CreateTradingWithdrawToExternalChainRequest;\n\nfunction resolveTradingWithdrawTargetAccountId(params: {\n subaccountId: bigint | undefined;\n rootAccountId: string;\n}): bigint {\n if (params.subaccountId !== undefined) return params.subaccountId;\n return idToBigInt(params.rootAccountId, \"targetAccountId\");\n}\n\nasync function resolveTradingWithdrawSigningConfig(params: {\n fallback: TradingWithdrawSigningConfig;\n catalog?: ClientCatalog;\n}): Promise<TradingWithdrawSigningConfig> {\n if (!params.catalog) return params.fallback;\n\n try {\n await params.catalog.ensureReady();\n const gateway = params.catalog.zipper.getContractByName(\"tradingGateway\");\n const address = gateway?.address?.trim();\n if (!address?.startsWith(\"0x\")) return params.fallback;\n\n return {\n chainId: params.fallback.chainId,\n tradingGatewayAddress: checksumEvmAddress(address),\n };\n } catch {\n return params.fallback;\n }\n}\n\nasync function resolveWalletSignature(params: {\n signingConfig: TradingWithdrawSigningConfig;\n payload: TradingWithdrawIntentPayloadRequest;\n walletSigner: TradingWithdrawWalletSigner;\n targetAccountId: bigint;\n}): Promise<{ signerWallet: string; payloadSignature: Uint8Array }> {\n const signerWallet = params.walletSigner.signerWallet.trim().toLowerCase();\n const accountId = idToBigInt(params.walletSigner.accountId, \"accountId\");\n const signature = await params.walletSigner.signMessage(\n buildTradingWithdrawWalletMessage({\n signingConfig: params.signingConfig,\n payload: params.payload,\n signerWallet,\n accountId,\n targetAccountId: params.targetAccountId,\n }),\n );\n if (!/^0x[0-9a-fA-F]{128}(?:00|01|1[bBcC])$/.test(signature)) {\n throw new ValidationError(\n \"Trading withdraw wallet signature must be 65 bytes with recovery byte 0, 1, 27, or 28.\",\n );\n }\n return {\n signerWallet,\n payloadSignature: evmHexToBytes(signature),\n };\n}\n\n/**\n * Creates durable Trading withdrawal intents to Funding using API signatures or wallet EIP-191 signatures.\n */\nexport class TradingWithdrawsService {\n #client: Client<typeof Proto.WithdrawService>;\n #resolver?: SubaccountResolver;\n #signingConfig: TradingWithdrawSigningConfig;\n #catalog?: ClientCatalog;\n #scales: SdkScales;\n #toFundingInputSchema: ReturnType<typeof createCreateTradingWithdrawToFundingInputSchema>;\n #toExternalChainInputSchema: ReturnType<\n typeof createCreateTradingWithdrawToExternalChainInputSchema\n >;\n\n constructor(\n transports: AuthApiTransports,\n resolver: SubaccountResolver | undefined,\n signingConfig: TradingWithdrawSigningConfig,\n scales: SdkScales,\n catalog?: ClientCatalog,\n ) {\n this.#client = createClient(Proto.WithdrawService, transports.authApi);\n this.#resolver = resolver;\n this.#signingConfig = signingConfig;\n this.#catalog = catalog;\n this.#scales = scales;\n this.#toFundingInputSchema = createCreateTradingWithdrawToFundingInputSchema(scales);\n this.#toExternalChainInputSchema =\n createCreateTradingWithdrawToExternalChainInputSchema(scales);\n }\n\n /**\n * Checks whether an external-chain destination can receive a withdrawal without creating, signing, or reserving one.\n */\n async validateDestination(\n input: ValidateWithdrawDestinationInput,\n options?: PolyesterRequestOptions,\n ): Promise<ValidateWithdrawDestinationResult> {\n const request = parse(ValidateWithdrawDestinationInputSchema, input);\n const response = await this.#client.validateWithdrawDestination(\n request,\n toConnectCallOptions(options),\n );\n return parse(ValidateWithdrawDestinationResultSchema, response);\n }\n\n /**\n * Builds a Trading-to-Funding withdraw intent payload with asset id, decimal amount, destination address, five-minute deadline, nonce, and idempotency key. If a wallet signer is provided, it signs the canonical EIP-191 message and calls the wallet endpoint; otherwise a payload signature is required for the backend-authorized endpoint.\n */\n async createToFunding(\n input: CreateTradingWithdrawToFundingServiceInput,\n options?: PolyesterMutationOptions,\n ): Promise<CreateTradingWithdrawResult> {\n const prepared = await this.prepareToFunding(input);\n return prepared.submit(options);\n }\n\n /**\n * Builds and signs a Trading-to-Funding withdrawal once so the exact request can be\n * resubmitted after backend-directed authorization such as MFA step-up.\n */\n async prepareToFunding(\n input: CreateTradingWithdrawToFundingServiceInput,\n ): Promise<PreparedTradingWithdraw> {\n await this.#scales.ready();\n const { walletSigner, ...inputForValidation } = input;\n const resolvedInput = resolveAccountScopedInput(inputForValidation, this.#resolver);\n const validated = parse(this.#toFundingInputSchema, resolvedInput);\n return this.#prepareWithdraw(validated, walletSigner);\n }\n\n /**\n * Builds a Trading-to-external-chain withdraw intent payload with asset id, decimal gross amount, destination network, destination address, five-minute deadline, nonce, and idempotency key. If a wallet signer is provided, it signs the canonical EIP-191 message and calls the wallet endpoint; otherwise a payload signature is required for the backend-authorized endpoint.\n */\n async createToExternalChain(\n input: CreateTradingWithdrawToExternalChainServiceInput,\n options?: PolyesterMutationOptions,\n ): Promise<CreateTradingWithdrawResult> {\n const prepared = await this.prepareToExternalChain(input);\n return prepared.submit(options);\n }\n\n /**\n * Builds and signs a Trading-to-external-chain withdrawal once so the exact request can\n * be resubmitted after backend-directed authorization such as MFA step-up.\n */\n async prepareToExternalChain(\n input: CreateTradingWithdrawToExternalChainServiceInput,\n ): Promise<PreparedTradingWithdraw> {\n await this.#scales.ready();\n const { walletSigner, ...inputForValidation } = input;\n const resolvedInput = resolveAccountScopedInput(inputForValidation, this.#resolver);\n const validated = parse(this.#toExternalChainInputSchema, resolvedInput);\n return this.#prepareWithdraw(validated, walletSigner);\n }\n\n async #prepareWithdraw(\n validated: TradingWithdrawRequest,\n walletSigner: TradingWithdrawWalletSigner | undefined,\n ): Promise<PreparedTradingWithdraw> {\n if (walletSigner) {\n const signingConfig = await resolveTradingWithdrawSigningConfig({\n fallback: this.#signingConfig,\n catalog: this.#catalog,\n });\n const targetAccountId = resolveTradingWithdrawTargetAccountId({\n subaccountId: validated.subaccountId,\n rootAccountId: walletSigner.accountId,\n });\n\n const walletSignature = await resolveWalletSignature({\n signingConfig,\n payload: validated.payload,\n walletSigner,\n targetAccountId,\n });\n const request = removeUndefined({\n payload: validated.payload,\n subaccountId: validated.subaccountId,\n signerWallet: walletSignature.signerWallet,\n payloadSignature: walletSignature.payloadSignature,\n });\n return {\n submit: async (options) => {\n const response = await this.#client.createWalletTradingWithdraw(\n request,\n toConnectCallOptions(options),\n );\n return parse(CreateWalletTradingWithdrawResultSchema, response);\n },\n };\n }\n\n if (!validated.payloadSignature) {\n throw new ValidationError(\n \"Trading withdraw requires a wallet signer or payload signature.\",\n );\n }\n\n const request = removeUndefined({\n payload: validated.payload,\n payloadSignature: validated.payloadSignature,\n });\n return {\n submit: async (options) => {\n const response = await this.#client.createTradingWithdraw(\n request,\n toConnectCallOptions(options),\n );\n return parse(CreateTradingWithdrawResultSchema, response);\n },\n };\n }\n}\n"],"mappings":"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"}
1
+ {"version":3,"file":"trading-withdraws.js","names":["#client","Proto.WithdrawService","#resolver","#signingConfig","#catalog","#scales","#toFundingInputSchema","#toExternalChainInputSchema","#prepareWithdraw"],"sources":["../../../src/services/trading-withdraws/trading-withdraws.ts"],"sourcesContent":["import { ValidationError } from \"../../shared/errors.js\";\nimport { createClient, type Client } from \"@connectrpc/connect\";\nimport type { Address, Hex } from \"viem\";\nimport { checksumEvmAddress, evmHexToBytes } from \"../../utils/evm.js\";\nimport type { ClientCatalog } from \"../../catalogs/types.js\";\nimport * as Proto from \"../../gen/chain/withdraw/v1/withdraw_pb.js\";\nimport { idToBigInt } from \"../../utils/base58-id.js\";\nimport { removeUndefined } from \"../../utils/remove-undefined.js\";\nimport {\n toConnectCallOptions,\n type PolyesterMutationOptions,\n type PolyesterRequestOptions,\n} from \"../../shared/request-options.js\";\nimport { type SubaccountResolver, resolveAccountScopedInput } from \"../subaccount-resolver.js\";\nimport type { SdkScales } from \"../../shared/decimal-surface.js\";\nimport type { AuthApiTransports } from \"../../shared/transports.js\";\nimport { parse } from \"../../shared/validation.js\";\nimport {\n createCreateTradingWithdrawToExternalChainInputSchema,\n createCreateTradingWithdrawToFundingInputSchema,\n CreateTradingWithdrawResultSchema,\n CreateWalletTradingWithdrawResultSchema,\n ValidateWithdrawDestinationInputSchema,\n ValidateWithdrawDestinationResultSchema,\n type CreateTradingWithdrawResult,\n type CreateTradingWithdrawToExternalChainInput,\n type CreateTradingWithdrawToExternalChainRequest,\n type CreateTradingWithdrawToFundingInput,\n type CreateTradingWithdrawToFundingRequest,\n type TradingWithdrawIntentPayloadRequest,\n type ValidateWithdrawDestinationInput,\n type ValidateWithdrawDestinationResult,\n} from \"./trading-withdraws.schemas.js\";\nimport { buildTradingWithdrawWalletMessage } from \"./wallet-message.js\";\n\nexport type TradingWithdrawWalletSigner = {\n signerWallet: string;\n accountId: string;\n /**\n * Signs the UTF-8 message directly using EIP-191 personal_sign, without pre-hashing or switching chains.\n * For a viem account, use `(message) => account.signMessage({ message })`.\n */\n signMessage: (message: string) => Promise<Hex>;\n};\n\nexport type TradingWithdrawSigningConfig = {\n chainId: number;\n tradingGatewayAddress: Address;\n};\n\nexport type CreateTradingWithdrawToFundingServiceInput = CreateTradingWithdrawToFundingInput & {\n walletSigner?: TradingWithdrawWalletSigner;\n};\n\nexport type CreateTradingWithdrawToExternalChainServiceInput =\n CreateTradingWithdrawToExternalChainInput & {\n walletSigner?: TradingWithdrawWalletSigner;\n };\n\nexport type PreparedTradingWithdraw = Readonly<{\n /** When the backend stops accepting this signed request. */\n deadline: Date;\n /**\n * True once the deadline is less than a minute away. Prepare again (same input,\n * same idempotency key) instead of submitting, e.g. after a slow MFA enrollment.\n */\n isExpired: () => boolean;\n /**\n * Submits the exact payload and signature produced during preparation.\n * Repeated calls only change transport options such as the step-up token.\n */\n submit: (options?: PolyesterMutationOptions) => Promise<CreateTradingWithdrawResult>;\n}>;\n\n// Leaves room for the request to reach the backend and for modest clock skew.\nconst PREPARED_WITHDRAW_EXPIRY_MARGIN_MS = 60_000;\n\nfunction preparedWithdraw(\n payload: TradingWithdrawIntentPayloadRequest,\n submit: PreparedTradingWithdraw[\"submit\"],\n): PreparedTradingWithdraw {\n const deadline = new Date(Number(payload.deadlineTsSec) * 1000);\n return {\n deadline,\n isExpired: () => Date.now() >= deadline.getTime() - PREPARED_WITHDRAW_EXPIRY_MARGIN_MS,\n submit,\n };\n}\n\ntype TradingWithdrawRequest =\n | CreateTradingWithdrawToFundingRequest\n | CreateTradingWithdrawToExternalChainRequest;\n\nfunction resolveTradingWithdrawTargetAccountId(params: {\n subaccountId: bigint | undefined;\n rootAccountId: string;\n}): bigint {\n if (params.subaccountId !== undefined) return params.subaccountId;\n return idToBigInt(params.rootAccountId, \"targetAccountId\");\n}\n\nasync function resolveTradingWithdrawSigningConfig(params: {\n fallback: TradingWithdrawSigningConfig;\n catalog?: ClientCatalog;\n}): Promise<TradingWithdrawSigningConfig> {\n if (!params.catalog) return params.fallback;\n\n try {\n await params.catalog.ensureReady();\n const gateway = params.catalog.zipper.getContractByName(\"tradingGateway\");\n const address = gateway?.address?.trim();\n if (!address?.startsWith(\"0x\")) return params.fallback;\n\n return {\n chainId: params.fallback.chainId,\n tradingGatewayAddress: checksumEvmAddress(address),\n };\n } catch {\n return params.fallback;\n }\n}\n\nasync function resolveWalletSignature(params: {\n signingConfig: TradingWithdrawSigningConfig;\n payload: TradingWithdrawIntentPayloadRequest;\n walletSigner: TradingWithdrawWalletSigner;\n targetAccountId: bigint;\n}): Promise<{ signerWallet: string; payloadSignature: Uint8Array }> {\n const signerWallet = params.walletSigner.signerWallet.trim().toLowerCase();\n const accountId = idToBigInt(params.walletSigner.accountId, \"accountId\");\n const signature = await params.walletSigner.signMessage(\n buildTradingWithdrawWalletMessage({\n signingConfig: params.signingConfig,\n payload: params.payload,\n signerWallet,\n accountId,\n targetAccountId: params.targetAccountId,\n }),\n );\n if (!/^0x[0-9a-fA-F]{128}(?:00|01|1[bBcC])$/.test(signature)) {\n throw new ValidationError(\n \"Trading withdraw wallet signature must be 65 bytes with recovery byte 0, 1, 27, or 28.\",\n );\n }\n return {\n signerWallet,\n payloadSignature: evmHexToBytes(signature),\n };\n}\n\n/**\n * Creates durable Trading withdrawal intents to Funding using API signatures or wallet EIP-191 signatures.\n */\nexport class TradingWithdrawsService {\n #client: Client<typeof Proto.WithdrawService>;\n #resolver?: SubaccountResolver;\n #signingConfig: TradingWithdrawSigningConfig;\n #catalog?: ClientCatalog;\n #scales: SdkScales;\n #toFundingInputSchema: ReturnType<typeof createCreateTradingWithdrawToFundingInputSchema>;\n #toExternalChainInputSchema: ReturnType<\n typeof createCreateTradingWithdrawToExternalChainInputSchema\n >;\n\n constructor(\n transports: AuthApiTransports,\n resolver: SubaccountResolver | undefined,\n signingConfig: TradingWithdrawSigningConfig,\n scales: SdkScales,\n catalog?: ClientCatalog,\n ) {\n this.#client = createClient(Proto.WithdrawService, transports.authApi);\n this.#resolver = resolver;\n this.#signingConfig = signingConfig;\n this.#catalog = catalog;\n this.#scales = scales;\n this.#toFundingInputSchema = createCreateTradingWithdrawToFundingInputSchema(scales);\n this.#toExternalChainInputSchema =\n createCreateTradingWithdrawToExternalChainInputSchema(scales);\n }\n\n /**\n * Checks whether an external-chain destination can receive a withdrawal without creating, signing, or reserving one.\n */\n async validateDestination(\n input: ValidateWithdrawDestinationInput,\n options?: PolyesterRequestOptions,\n ): Promise<ValidateWithdrawDestinationResult> {\n const request = parse(ValidateWithdrawDestinationInputSchema, input);\n const response = await this.#client.validateWithdrawDestination(\n request,\n toConnectCallOptions(options),\n );\n return parse(ValidateWithdrawDestinationResultSchema, response);\n }\n\n /**\n * Builds a Trading-to-Funding withdraw intent payload with asset id, decimal amount, destination address, five-minute deadline, nonce, and idempotency key. If a wallet signer is provided, it signs the canonical EIP-191 message and calls the wallet endpoint; otherwise a payload signature is required for the backend-authorized endpoint.\n */\n async createToFunding(\n input: CreateTradingWithdrawToFundingServiceInput,\n options?: PolyesterMutationOptions,\n ): Promise<CreateTradingWithdrawResult> {\n const prepared = await this.prepareToFunding(input);\n return prepared.submit(options);\n }\n\n /**\n * Builds and signs a Trading-to-Funding withdrawal once so the exact request can be\n * resubmitted after backend-directed authorization such as MFA step-up.\n */\n async prepareToFunding(\n input: CreateTradingWithdrawToFundingServiceInput,\n ): Promise<PreparedTradingWithdraw> {\n await this.#scales.ready();\n const { walletSigner, ...inputForValidation } = input;\n const resolvedInput = resolveAccountScopedInput(inputForValidation, this.#resolver);\n const validated = parse(this.#toFundingInputSchema, resolvedInput);\n return this.#prepareWithdraw(validated, walletSigner);\n }\n\n /**\n * Builds a Trading-to-external-chain withdraw intent payload with asset id, decimal gross amount, destination network, destination address, five-minute deadline, nonce, and idempotency key. If a wallet signer is provided, it signs the canonical EIP-191 message and calls the wallet endpoint; otherwise a payload signature is required for the backend-authorized endpoint.\n */\n async createToExternalChain(\n input: CreateTradingWithdrawToExternalChainServiceInput,\n options?: PolyesterMutationOptions,\n ): Promise<CreateTradingWithdrawResult> {\n const prepared = await this.prepareToExternalChain(input);\n return prepared.submit(options);\n }\n\n /**\n * Builds and signs a Trading-to-external-chain withdrawal once so the exact request can\n * be resubmitted after backend-directed authorization such as MFA step-up.\n */\n async prepareToExternalChain(\n input: CreateTradingWithdrawToExternalChainServiceInput,\n ): Promise<PreparedTradingWithdraw> {\n await this.#scales.ready();\n const { walletSigner, ...inputForValidation } = input;\n const resolvedInput = resolveAccountScopedInput(inputForValidation, this.#resolver);\n const validated = parse(this.#toExternalChainInputSchema, resolvedInput);\n return this.#prepareWithdraw(validated, walletSigner);\n }\n\n async #prepareWithdraw(\n validated: TradingWithdrawRequest,\n walletSigner: TradingWithdrawWalletSigner | undefined,\n ): Promise<PreparedTradingWithdraw> {\n if (walletSigner) {\n const signingConfig = await resolveTradingWithdrawSigningConfig({\n fallback: this.#signingConfig,\n catalog: this.#catalog,\n });\n const targetAccountId = resolveTradingWithdrawTargetAccountId({\n subaccountId: validated.subaccountId,\n rootAccountId: walletSigner.accountId,\n });\n\n const walletSignature = await resolveWalletSignature({\n signingConfig,\n payload: validated.payload,\n walletSigner,\n targetAccountId,\n });\n const request = removeUndefined({\n payload: validated.payload,\n subaccountId: validated.subaccountId,\n signerWallet: walletSignature.signerWallet,\n payloadSignature: walletSignature.payloadSignature,\n });\n return preparedWithdraw(validated.payload, async (options) => {\n const response = await this.#client.createWalletTradingWithdraw(\n request,\n toConnectCallOptions(options),\n );\n return parse(CreateWalletTradingWithdrawResultSchema, response);\n });\n }\n\n if (!validated.payloadSignature) {\n throw new ValidationError(\n \"Trading withdraw requires a wallet signer or payload signature.\",\n );\n }\n\n const request = removeUndefined({\n payload: validated.payload,\n payloadSignature: validated.payloadSignature,\n });\n return preparedWithdraw(validated.payload, async (options) => {\n const response = await this.#client.createTradingWithdraw(\n request,\n toConnectCallOptions(options),\n );\n return parse(CreateTradingWithdrawResultSchema, response);\n });\n }\n}\n"],"mappings":"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"}
@@ -845,7 +845,7 @@ type CreateTriggerInput = v.InferInput<ReturnType<typeof createCreateTriggerInpu
845
845
  declare const ListTriggersInputSchema: v.SchemaWithPipe<readonly [v.StrictObjectSchema<{
846
846
  readonly parentOrderId: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, undefined>, v.TransformAction<string | undefined, bigint | undefined>]>;
847
847
  readonly symbolId: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 4294967295, undefined>]>, undefined>;
848
- readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
848
+ readonly status: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.PicklistSchema<readonly ["created", "armed", "running", "completed", "cancelled", "failed", "paused"], undefined>, undefined>, undefined>, v.TransformAction<("failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused")[] | undefined, (TriggerStatus.STATUS_CREATED | TriggerStatus.STATUS_ARMED | TriggerStatus.STATUS_RUNNING | TriggerStatus.STATUS_COMPLETED | TriggerStatus.STATUS_CANCELED | TriggerStatus.STATUS_FAILED | TriggerStatus.STATUS_PAUSED)[]>]>;
849
849
  readonly triggerType: v.SchemaWithPipe<readonly [v.OptionalSchema<v.PicklistSchema<readonly ["stop_loss", "take_profit", "trailing_stop", "twap", "ladder"], undefined>, undefined>, v.TransformAction<"stop_loss" | "take_profit" | "trailing_stop" | "twap" | "ladder" | undefined, TriggerType>]>;
850
850
  readonly limit: v.OptionalSchema<v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.IntegerAction<number, undefined>, v.GtValueAction<number, 0, undefined>, v.MaxValueAction<number, 1000, undefined>]>, 50>;
851
851
  readonly pageToken: v.OptionalSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.TrimAction]>, "">;
@@ -29,62 +29,62 @@ declare const CreateTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSche
29
29
  type CreateTriggerResult = v.InferOutput<typeof CreateTriggerResultSchema>;
30
30
  declare const CancelTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
31
31
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
32
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
32
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused">]>;
33
33
  readonly tsNs: v.BigintSchema<undefined>;
34
34
  }, undefined>, v.TransformAction<{
35
35
  triggerId: string;
36
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
36
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
37
37
  tsNs: bigint;
38
38
  }, {
39
39
  ts: number;
40
40
  tsNs: string;
41
41
  triggerId: string;
42
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
42
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
43
43
  }>]>;
44
44
  type CancelTriggerResult = v.InferOutput<typeof CancelTriggerResultSchema>;
45
45
  declare const ModifyTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
46
46
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
47
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
47
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused">]>;
48
48
  readonly tsNs: v.BigintSchema<undefined>;
49
49
  }, undefined>, v.TransformAction<{
50
50
  triggerId: string;
51
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
51
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
52
52
  tsNs: bigint;
53
53
  }, {
54
54
  ts: number;
55
55
  tsNs: string;
56
56
  triggerId: string;
57
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
57
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
58
58
  }>]>;
59
59
  type ModifyTriggerResult = v.InferOutput<typeof ModifyTriggerResultSchema>;
60
60
  declare const PauseTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
61
61
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
62
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
62
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused">]>;
63
63
  readonly tsNs: v.BigintSchema<undefined>;
64
64
  }, undefined>, v.TransformAction<{
65
65
  triggerId: string;
66
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
66
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
67
67
  tsNs: bigint;
68
68
  }, {
69
69
  ts: number;
70
70
  tsNs: string;
71
71
  triggerId: string;
72
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
72
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
73
73
  }>]>;
74
74
  type PauseTriggerResult = v.InferOutput<typeof PauseTriggerResultSchema>;
75
75
  declare const ResumeTriggerResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
76
76
  readonly triggerId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
77
- readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused">]>;
77
+ readonly status: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused">]>;
78
78
  readonly tsNs: v.BigintSchema<undefined>;
79
79
  }, undefined>, v.TransformAction<{
80
80
  triggerId: string;
81
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
81
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
82
82
  tsNs: bigint;
83
83
  }, {
84
84
  ts: number;
85
85
  tsNs: string;
86
86
  triggerId: string;
87
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
87
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
88
88
  }>]>;
89
89
  type ResumeTriggerResult = v.InferOutput<typeof ResumeTriggerResultSchema>;
90
90
  type StopDetailsOutput = {
@@ -560,7 +560,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
560
560
  triggerId: string;
561
561
  subaccountId: string;
562
562
  symbolId: number;
563
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
563
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
564
564
  parentOrderId: string | undefined;
565
565
  qty: string;
566
566
  feeAsset: "unspecified" | "quote" | "base";
@@ -716,7 +716,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
716
716
  triggerId: string;
717
717
  subaccountId: string;
718
718
  symbolId: number;
719
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
719
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
720
720
  parentOrderId: string | undefined;
721
721
  qty: string;
722
722
  feeAsset: "unspecified" | "quote" | "base";
@@ -872,7 +872,7 @@ declare function createTriggerSchema(scales: SdkScales): v.SchemaWithPipe<readon
872
872
  triggerId: string;
873
873
  subaccountId: string;
874
874
  symbolId: number;
875
- status: "unspecified" | "failed" | "cancelled" | "created" | "completed" | "armed" | "running" | "paused";
875
+ status: "unspecified" | "failed" | "cancelled" | "created" | "armed" | "running" | "completed" | "paused";
876
876
  parentOrderId: string | undefined;
877
877
  qty: string;
878
878
  feeAsset: "unspecified" | "quote" | "base";
@@ -94,7 +94,7 @@ declare const WhiteboardPermissionsSchema: v.ObjectSchema<{
94
94
  }, undefined>;
95
95
  type WhiteboardPermissions = v.InferOutput<typeof WhiteboardPermissionsSchema>;
96
96
  declare const WhiteboardAccessSchema: v.ObjectSchema<{
97
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
97
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
98
98
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
99
99
  readonly canView: v.BooleanSchema<undefined>;
100
100
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -105,7 +105,7 @@ type WhiteboardAccess = v.InferOutput<typeof WhiteboardAccessSchema>;
105
105
  declare const WhiteboardAclEntrySchema: v.ObjectSchema<{
106
106
  readonly subjectType: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "user" | "group">]>;
107
107
  readonly subjectId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
108
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
108
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
109
109
  }, undefined>;
110
110
  type WhiteboardAclEntry = v.InferOutput<typeof WhiteboardAclEntrySchema>;
111
111
  declare const WhiteboardBoardSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
@@ -113,7 +113,7 @@ declare const WhiteboardBoardSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
113
113
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
114
114
  readonly title: v.StringSchema<undefined>;
115
115
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
116
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
116
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
117
117
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
118
118
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
119
119
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -142,7 +142,7 @@ declare const WhiteboardBoardSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
142
142
  ownerAccountId: string;
143
143
  title: string;
144
144
  audience: "unspecified" | "private" | "public" | "followers";
145
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
145
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
146
146
  accessVersion: string;
147
147
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
148
148
  createdAt?: number | undefined;
@@ -156,7 +156,7 @@ declare const WhiteboardBoardSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
156
156
  ownerAccountId: string;
157
157
  title: string;
158
158
  audience: "unspecified" | "private" | "public" | "followers";
159
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
159
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
160
160
  accessVersion: string;
161
161
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
162
162
  }>]>;
@@ -167,7 +167,7 @@ declare const WhiteboardBoardListItemSchema: v.ObjectSchema<{
167
167
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
168
168
  readonly title: v.StringSchema<undefined>;
169
169
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
170
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
170
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
171
171
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
172
172
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
173
173
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -196,7 +196,7 @@ declare const WhiteboardBoardListItemSchema: v.ObjectSchema<{
196
196
  ownerAccountId: string;
197
197
  title: string;
198
198
  audience: "unspecified" | "private" | "public" | "followers";
199
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
199
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
200
200
  accessVersion: string;
201
201
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
202
202
  createdAt?: number | undefined;
@@ -210,12 +210,12 @@ declare const WhiteboardBoardListItemSchema: v.ObjectSchema<{
210
210
  ownerAccountId: string;
211
211
  title: string;
212
212
  audience: "unspecified" | "private" | "public" | "followers";
213
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
213
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
214
214
  accessVersion: string;
215
215
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
216
216
  }>]>;
217
217
  readonly access: v.OptionalSchema<v.ObjectSchema<{
218
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
218
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
219
219
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
220
220
  readonly canView: v.BooleanSchema<undefined>;
221
221
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -230,7 +230,7 @@ declare const WhiteboardBoardDetailsSchema: v.ObjectSchema<{
230
230
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
231
231
  readonly title: v.StringSchema<undefined>;
232
232
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
233
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
233
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
234
234
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
235
235
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
236
236
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -259,7 +259,7 @@ declare const WhiteboardBoardDetailsSchema: v.ObjectSchema<{
259
259
  ownerAccountId: string;
260
260
  title: string;
261
261
  audience: "unspecified" | "private" | "public" | "followers";
262
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
262
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
263
263
  accessVersion: string;
264
264
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
265
265
  createdAt?: number | undefined;
@@ -273,17 +273,17 @@ declare const WhiteboardBoardDetailsSchema: v.ObjectSchema<{
273
273
  ownerAccountId: string;
274
274
  title: string;
275
275
  audience: "unspecified" | "private" | "public" | "followers";
276
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
276
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
277
277
  accessVersion: string;
278
278
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
279
279
  }>]>;
280
280
  readonly aclEntries: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
281
281
  readonly subjectType: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "user" | "group">]>;
282
282
  readonly subjectId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
283
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
283
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
284
284
  }, undefined>, undefined>, readonly []>;
285
285
  readonly access: v.OptionalSchema<v.ObjectSchema<{
286
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
286
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
287
287
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
288
288
  readonly canView: v.BooleanSchema<undefined>;
289
289
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -298,7 +298,7 @@ declare const CreateWhiteboardBoardResultSchema: v.ObjectSchema<{
298
298
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
299
299
  readonly title: v.StringSchema<undefined>;
300
300
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
301
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
301
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
302
302
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
303
303
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
304
304
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -327,7 +327,7 @@ declare const CreateWhiteboardBoardResultSchema: v.ObjectSchema<{
327
327
  ownerAccountId: string;
328
328
  title: string;
329
329
  audience: "unspecified" | "private" | "public" | "followers";
330
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
330
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
331
331
  accessVersion: string;
332
332
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
333
333
  createdAt?: number | undefined;
@@ -341,17 +341,17 @@ declare const CreateWhiteboardBoardResultSchema: v.ObjectSchema<{
341
341
  ownerAccountId: string;
342
342
  title: string;
343
343
  audience: "unspecified" | "private" | "public" | "followers";
344
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
344
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
345
345
  accessVersion: string;
346
346
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
347
347
  }>]>;
348
348
  readonly aclEntries: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
349
349
  readonly subjectType: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "user" | "group">]>;
350
350
  readonly subjectId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
351
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
351
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
352
352
  }, undefined>, undefined>, readonly []>;
353
353
  readonly access: v.OptionalSchema<v.ObjectSchema<{
354
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
354
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
355
355
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
356
356
  readonly canView: v.BooleanSchema<undefined>;
357
357
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -366,7 +366,7 @@ declare const GetWhiteboardBoardResultSchema: v.ObjectSchema<{
366
366
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
367
367
  readonly title: v.StringSchema<undefined>;
368
368
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
369
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
369
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
370
370
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
371
371
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
372
372
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -395,7 +395,7 @@ declare const GetWhiteboardBoardResultSchema: v.ObjectSchema<{
395
395
  ownerAccountId: string;
396
396
  title: string;
397
397
  audience: "unspecified" | "private" | "public" | "followers";
398
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
398
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
399
399
  accessVersion: string;
400
400
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
401
401
  createdAt?: number | undefined;
@@ -409,17 +409,17 @@ declare const GetWhiteboardBoardResultSchema: v.ObjectSchema<{
409
409
  ownerAccountId: string;
410
410
  title: string;
411
411
  audience: "unspecified" | "private" | "public" | "followers";
412
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
412
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
413
413
  accessVersion: string;
414
414
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
415
415
  }>]>;
416
416
  readonly aclEntries: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
417
417
  readonly subjectType: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "user" | "group">]>;
418
418
  readonly subjectId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
419
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
419
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
420
420
  }, undefined>, undefined>, readonly []>;
421
421
  readonly access: v.OptionalSchema<v.ObjectSchema<{
422
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
422
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
423
423
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
424
424
  readonly canView: v.BooleanSchema<undefined>;
425
425
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -434,7 +434,7 @@ declare const UpdateWhiteboardBoardResultSchema: v.ObjectSchema<{
434
434
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
435
435
  readonly title: v.StringSchema<undefined>;
436
436
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
437
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
437
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
438
438
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
439
439
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
440
440
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -463,7 +463,7 @@ declare const UpdateWhiteboardBoardResultSchema: v.ObjectSchema<{
463
463
  ownerAccountId: string;
464
464
  title: string;
465
465
  audience: "unspecified" | "private" | "public" | "followers";
466
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
466
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
467
467
  accessVersion: string;
468
468
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
469
469
  createdAt?: number | undefined;
@@ -477,17 +477,17 @@ declare const UpdateWhiteboardBoardResultSchema: v.ObjectSchema<{
477
477
  ownerAccountId: string;
478
478
  title: string;
479
479
  audience: "unspecified" | "private" | "public" | "followers";
480
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
480
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
481
481
  accessVersion: string;
482
482
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
483
483
  }>]>;
484
484
  readonly aclEntries: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
485
485
  readonly subjectType: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "user" | "group">]>;
486
486
  readonly subjectId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
487
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
487
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
488
488
  }, undefined>, undefined>, readonly []>;
489
489
  readonly access: v.OptionalSchema<v.ObjectSchema<{
490
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
490
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
491
491
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
492
492
  readonly canView: v.BooleanSchema<undefined>;
493
493
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -502,7 +502,7 @@ declare const UpdateWhiteboardBoardAclResultSchema: v.ObjectSchema<{
502
502
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
503
503
  readonly title: v.StringSchema<undefined>;
504
504
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
505
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
505
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
506
506
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
507
507
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
508
508
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -531,7 +531,7 @@ declare const UpdateWhiteboardBoardAclResultSchema: v.ObjectSchema<{
531
531
  ownerAccountId: string;
532
532
  title: string;
533
533
  audience: "unspecified" | "private" | "public" | "followers";
534
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
534
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
535
535
  accessVersion: string;
536
536
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
537
537
  createdAt?: number | undefined;
@@ -545,17 +545,17 @@ declare const UpdateWhiteboardBoardAclResultSchema: v.ObjectSchema<{
545
545
  ownerAccountId: string;
546
546
  title: string;
547
547
  audience: "unspecified" | "private" | "public" | "followers";
548
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
548
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
549
549
  accessVersion: string;
550
550
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
551
551
  }>]>;
552
552
  readonly aclEntries: v.OptionalSchema<v.ArraySchema<v.ObjectSchema<{
553
553
  readonly subjectType: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "user" | "group">]>;
554
554
  readonly subjectId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
555
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
555
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
556
556
  }, undefined>, undefined>, readonly []>;
557
557
  readonly access: v.OptionalSchema<v.ObjectSchema<{
558
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
558
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
559
559
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
560
560
  readonly canView: v.BooleanSchema<undefined>;
561
561
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -571,7 +571,7 @@ declare const ListWhiteboardBoardsResultSchema: v.ObjectSchema<{
571
571
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
572
572
  readonly title: v.StringSchema<undefined>;
573
573
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
574
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
574
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
575
575
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
576
576
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
577
577
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -600,7 +600,7 @@ declare const ListWhiteboardBoardsResultSchema: v.ObjectSchema<{
600
600
  ownerAccountId: string;
601
601
  title: string;
602
602
  audience: "unspecified" | "private" | "public" | "followers";
603
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
603
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
604
604
  accessVersion: string;
605
605
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
606
606
  createdAt?: number | undefined;
@@ -614,12 +614,12 @@ declare const ListWhiteboardBoardsResultSchema: v.ObjectSchema<{
614
614
  ownerAccountId: string;
615
615
  title: string;
616
616
  audience: "unspecified" | "private" | "public" | "followers";
617
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
617
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
618
618
  accessVersion: string;
619
619
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
620
620
  }>]>;
621
621
  readonly access: v.OptionalSchema<v.ObjectSchema<{
622
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
622
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
623
623
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
624
624
  readonly canView: v.BooleanSchema<undefined>;
625
625
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -636,7 +636,7 @@ declare const ArchiveWhiteboardBoardResultSchema: v.ObjectSchema<{
636
636
  readonly ownerAccountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
637
637
  readonly title: v.StringSchema<undefined>;
638
638
  readonly audience: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "private" | "public" | "followers">]>;
639
- readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
639
+ readonly defaultRole: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
640
640
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
641
641
  readonly initialSnapshot: v.OptionalSchema<v.CustomSchema<import("@bufbuild/protobuf").JsonObject, undefined>, undefined>;
642
642
  readonly createdAt: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ObjectSchema<{
@@ -665,7 +665,7 @@ declare const ArchiveWhiteboardBoardResultSchema: v.ObjectSchema<{
665
665
  ownerAccountId: string;
666
666
  title: string;
667
667
  audience: "unspecified" | "private" | "public" | "followers";
668
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
668
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
669
669
  accessVersion: string;
670
670
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
671
671
  createdAt?: number | undefined;
@@ -679,12 +679,12 @@ declare const ArchiveWhiteboardBoardResultSchema: v.ObjectSchema<{
679
679
  ownerAccountId: string;
680
680
  title: string;
681
681
  audience: "unspecified" | "private" | "public" | "followers";
682
- defaultRole: "owner" | "viewer" | "unspecified" | "editor";
682
+ defaultRole: "unspecified" | "owner" | "viewer" | "editor";
683
683
  accessVersion: string;
684
684
  initialSnapshot?: import("@bufbuild/protobuf").JsonObject | undefined;
685
685
  }>]>, undefined>;
686
686
  readonly access: v.OptionalSchema<v.ObjectSchema<{
687
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
687
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
688
688
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
689
689
  readonly canView: v.BooleanSchema<undefined>;
690
690
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -695,13 +695,13 @@ declare const ArchiveWhiteboardBoardResultSchema: v.ObjectSchema<{
695
695
  type ArchiveWhiteboardBoardResult = v.InferOutput<typeof ArchiveWhiteboardBoardResultSchema>;
696
696
  declare const WhiteboardPresencePayloadSchema: v.ObjectSchema<{
697
697
  readonly accountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
698
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
698
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
699
699
  }, undefined>;
700
700
  type WhiteboardPresencePayload = v.InferOutput<typeof WhiteboardPresencePayloadSchema>;
701
701
  declare const WhiteboardJoinTokenResultSchema: v.SchemaWithPipe<readonly [v.ObjectSchema<{
702
702
  readonly boardId: v.StringSchema<undefined>;
703
703
  readonly access: v.OptionalSchema<v.ObjectSchema<{
704
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
704
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
705
705
  readonly permissions: v.OptionalSchema<v.ObjectSchema<{
706
706
  readonly canView: v.BooleanSchema<undefined>;
707
707
  readonly canEdit: v.BooleanSchema<undefined>;
@@ -721,13 +721,13 @@ declare const WhiteboardJoinTokenResultSchema: v.SchemaWithPipe<readonly [v.Obje
721
721
  readonly socketPath: v.StringSchema<undefined>;
722
722
  readonly presence: v.OptionalSchema<v.ObjectSchema<{
723
723
  readonly accountId: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
724
- readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "owner" | "viewer" | "unspecified" | "editor">]>;
724
+ readonly role: v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.TransformAction<number, "unspecified" | "owner" | "viewer" | "editor">]>;
725
725
  }, undefined>, undefined>;
726
726
  readonly accessVersion: v.SchemaWithPipe<readonly [v.BigintSchema<undefined>, v.TransformAction<bigint, string>]>;
727
727
  }, undefined>, v.TransformAction<{
728
728
  boardId: string;
729
729
  access?: {
730
- role: "owner" | "viewer" | "unspecified" | "editor";
730
+ role: "unspecified" | "owner" | "viewer" | "editor";
731
731
  permissions?: {
732
732
  canView: boolean;
733
733
  canEdit: boolean;
@@ -741,14 +741,14 @@ declare const WhiteboardJoinTokenResultSchema: v.SchemaWithPipe<readonly [v.Obje
741
741
  socketPath: string;
742
742
  presence?: {
743
743
  accountId: string;
744
- role: "owner" | "viewer" | "unspecified" | "editor";
744
+ role: "unspecified" | "owner" | "viewer" | "editor";
745
745
  } | undefined;
746
746
  accessVersion: string;
747
747
  }, {
748
748
  expiresAtMs: number | undefined;
749
749
  boardId: string;
750
750
  access?: {
751
- role: "owner" | "viewer" | "unspecified" | "editor";
751
+ role: "unspecified" | "owner" | "viewer" | "editor";
752
752
  permissions?: {
753
753
  canView: boolean;
754
754
  canEdit: boolean;
@@ -761,7 +761,7 @@ declare const WhiteboardJoinTokenResultSchema: v.SchemaWithPipe<readonly [v.Obje
761
761
  socketPath: string;
762
762
  presence?: {
763
763
  accountId: string;
764
- role: "owner" | "viewer" | "unspecified" | "editor";
764
+ role: "unspecified" | "owner" | "viewer" | "editor";
765
765
  } | undefined;
766
766
  accessVersion: string;
767
767
  }>]>;