UNPKG

@fairmint/canton-node-sdk

Version:
176 lines 9.15 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CompletionsParamsSchema = exports.AsyncSubmitReassignmentParamsSchema = exports.AsyncSubmitParamsSchema = exports.SubmitAndWaitForTransactionTreeParamsSchema = exports.SubmitAndWaitForReassignmentParamsSchema = exports.SubmitAndWaitForTransactionParamsSchema = exports.SubmitAndWaitParamsSchema = void 0; const zod_1 = require("zod"); const base_1 = require("./base"); exports.SubmitAndWaitParamsSchema = zod_1.z.object({ /** Commands to submit and wait for completion. */ commands: zod_1.z.array(zod_1.z.any()), /** Unique identifier for the command. */ commandId: base_1.NonEmptyStringSchema, /** Parties on whose behalf the command should be executed. */ actAs: zod_1.z.array(base_1.NonEmptyStringSchema), /** User ID submitting the command (optional if using authentication). */ userId: base_1.NonEmptyStringSchema.optional(), /** Parties to read as (optional). */ readAs: zod_1.z.array(base_1.NonEmptyStringSchema).optional(), /** Workflow ID (optional). */ workflowId: base_1.NonEmptyStringSchema.optional(), /** Deduplication period (optional). */ deduplicationPeriod: zod_1.z.any().optional(), /** Minimum ledger time absolute (optional). */ minLedgerTimeAbs: base_1.NonEmptyStringSchema.optional(), /** Minimum ledger time relative (optional). */ minLedgerTimeRel: zod_1.z.any().optional(), /** Submission ID (optional). */ submissionId: base_1.NonEmptyStringSchema.optional(), /** Disclosed contracts (optional). */ disclosedContracts: zod_1.z.array(zod_1.z.any()).optional(), /** Synchronizer ID (optional). */ synchronizerId: base_1.NonEmptyStringSchema.optional(), /** Package ID selection preference (optional). */ packageIdSelectionPreference: zod_1.z.array(base_1.NonEmptyStringSchema).optional(), /** Prefetch contract keys (optional). */ prefetchContractKeys: zod_1.z.array(zod_1.z.any()).optional(), }); exports.SubmitAndWaitForTransactionParamsSchema = zod_1.z.object({ /** Commands to submit and wait for transaction. */ commands: zod_1.z.array(zod_1.z.any()), /** Unique identifier for the command. */ commandId: base_1.NonEmptyStringSchema, /** Parties on whose behalf the command should be executed. */ actAs: zod_1.z.array(base_1.NonEmptyStringSchema), /** User ID submitting the command (optional if using authentication). */ userId: base_1.NonEmptyStringSchema.optional(), /** Parties to read as (optional). */ readAs: zod_1.z.array(base_1.NonEmptyStringSchema).optional(), /** Workflow ID (optional). */ workflowId: base_1.NonEmptyStringSchema.optional(), /** Deduplication period (optional). */ deduplicationPeriod: zod_1.z.any().optional(), /** Minimum ledger time absolute (optional). */ minLedgerTimeAbs: base_1.NonEmptyStringSchema.optional(), /** Minimum ledger time relative (optional). */ minLedgerTimeRel: zod_1.z.any().optional(), /** Submission ID (optional). */ submissionId: base_1.NonEmptyStringSchema.optional(), /** Disclosed contracts (optional). */ disclosedContracts: zod_1.z.array(zod_1.z.any()).optional(), /** Synchronizer ID (optional). */ synchronizerId: base_1.NonEmptyStringSchema.optional(), /** Package ID selection preference (optional). */ packageIdSelectionPreference: zod_1.z.array(base_1.NonEmptyStringSchema).optional(), /** Prefetch contract keys (optional). */ prefetchContractKeys: zod_1.z.array(zod_1.z.any()).optional(), /** Transaction format (optional). */ transactionFormat: zod_1.z.any().optional(), }); exports.SubmitAndWaitForReassignmentParamsSchema = zod_1.z.object({ /** Reassignment commands to submit. */ reassignmentCommands: zod_1.z.object({ /** Workflow ID (optional). */ workflowId: base_1.NonEmptyStringSchema.optional(), /** User ID submitting the command (optional if using authentication). */ userId: base_1.NonEmptyStringSchema.optional(), /** Unique identifier for the command. */ commandId: base_1.NonEmptyStringSchema, /** Party submitting the command. */ submitter: base_1.NonEmptyStringSchema, /** Submission ID (optional). */ submissionId: base_1.NonEmptyStringSchema.optional(), /** Individual reassignment commands. */ commands: zod_1.z.array(zod_1.z.any()), }), /** Event format (optional). */ eventFormat: zod_1.z.any().optional(), }); exports.SubmitAndWaitForTransactionTreeParamsSchema = zod_1.z.object({ /** Commands to submit and wait for transaction tree. */ commands: zod_1.z.array(zod_1.z.any()), /** Unique identifier for the command. */ commandId: base_1.NonEmptyStringSchema, /** Parties on whose behalf the command should be executed. */ actAs: zod_1.z.array(base_1.NonEmptyStringSchema), /** User ID submitting the command (optional if using authentication). */ userId: base_1.NonEmptyStringSchema.optional(), /** Parties to read as (optional). */ readAs: zod_1.z.array(base_1.NonEmptyStringSchema).optional(), /** Workflow ID (optional). */ workflowId: base_1.NonEmptyStringSchema.optional(), /** Deduplication period (optional). */ deduplicationPeriod: zod_1.z.any().optional(), /** Minimum ledger time absolute (optional). */ minLedgerTimeAbs: base_1.NonEmptyStringSchema.optional(), /** Minimum ledger time relative (optional). */ minLedgerTimeRel: zod_1.z.any().optional(), /** Submission ID (optional). */ submissionId: base_1.NonEmptyStringSchema.optional(), /** Disclosed contracts (optional). */ disclosedContracts: zod_1.z.array(zod_1.z.any()).optional(), /** Synchronizer ID (optional). */ synchronizerId: base_1.NonEmptyStringSchema.optional(), /** Package ID selection preference (optional). */ packageIdSelectionPreference: zod_1.z.array(base_1.NonEmptyStringSchema).optional(), /** Prefetch contract keys (optional). */ prefetchContractKeys: zod_1.z.array(zod_1.z.any()).optional(), }); exports.AsyncSubmitParamsSchema = zod_1.z.object({ /** Commands to submit asynchronously. */ commands: zod_1.z.array(zod_1.z.any()), /** Unique identifier for the command. */ commandId: base_1.NonEmptyStringSchema, /** Parties on whose behalf the command should be executed. */ actAs: zod_1.z.array(base_1.NonEmptyStringSchema), /** User ID submitting the command (optional if using authentication). */ userId: base_1.NonEmptyStringSchema.optional(), /** Parties to read as (optional). */ readAs: zod_1.z.array(base_1.NonEmptyStringSchema).optional(), /** Workflow ID (optional). */ workflowId: base_1.NonEmptyStringSchema.optional(), /** Deduplication period (optional). */ deduplicationPeriod: zod_1.z.any().optional(), /** Minimum ledger time absolute (optional). */ minLedgerTimeAbs: base_1.NonEmptyStringSchema.optional(), /** Minimum ledger time relative (optional). */ minLedgerTimeRel: zod_1.z.any().optional(), /** Submission ID (optional). */ submissionId: base_1.NonEmptyStringSchema.optional(), /** Disclosed contracts (optional). */ disclosedContracts: zod_1.z.array(zod_1.z.any()).optional(), /** Synchronizer ID (optional). */ synchronizerId: base_1.NonEmptyStringSchema.optional(), /** Package ID selection preference (optional). */ packageIdSelectionPreference: zod_1.z.array(base_1.NonEmptyStringSchema).optional(), /** Prefetch contract keys (optional). */ prefetchContractKeys: zod_1.z.array(zod_1.z.any()).optional(), }); exports.AsyncSubmitReassignmentParamsSchema = zod_1.z.object({ /** Reassignment commands to submit asynchronously. */ reassignmentCommands: zod_1.z.object({ /** Workflow ID (optional). */ workflowId: base_1.NonEmptyStringSchema.optional(), /** User ID submitting the command (optional if using authentication). */ userId: base_1.NonEmptyStringSchema.optional(), /** Unique identifier for the command. */ commandId: base_1.NonEmptyStringSchema, /** Party submitting the command. */ submitter: base_1.NonEmptyStringSchema, /** Submission ID (optional). */ submissionId: base_1.NonEmptyStringSchema.optional(), /** Individual reassignment commands. */ commands: zod_1.z.array(zod_1.z.any()), }), }); exports.CompletionsParamsSchema = zod_1.z.object({ /** User ID to filter completions for. */ userId: base_1.NonEmptyStringSchema, /** Parties whose data should be included. */ parties: zod_1.z.array(base_1.NonEmptyStringSchema), /** Beginning offset for completions (optional). */ beginExclusive: zod_1.z.number().int().min(0).optional(), /** Maximum number of elements to return (optional). */ limit: zod_1.z.number().int().min(1).optional(), /** Timeout for stream completion (optional). */ streamIdleTimeoutMs: zod_1.z.number().int().min(1).optional(), }); //# sourceMappingURL=commands.js.map