@fairmint/canton-node-sdk
Version:
Canton Node SDK
292 lines • 12.8 kB
TypeScript
import { z } from 'zod';
export declare const ErrorResponseSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodUnknown;
}, z.core.$strip>;
export declare const BadRequestErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<400>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const UnauthorizedErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<401>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const ForbiddenErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<403>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const NotFoundErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<404>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const ConflictErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<409>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const UnprocessableEntityErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<422>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const TooManyRequestsErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<429>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const InternalServerErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<500>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
export declare const ServiceUnavailableErrorSchema: z.ZodObject<{
error: z.ZodString;
details: z.ZodOptional<z.ZodObject<{
name: z.ZodOptional<z.ZodString>;
message: z.ZodString;
status: z.ZodOptional<z.ZodLiteral<503>>;
code: z.ZodOptional<z.ZodString>;
response: z.ZodOptional<z.ZodUnknown>;
}, z.core.$strip>>;
}, z.core.$strip>;
/**
* Error code kind (oneOf all error code types).
*/
export declare const JsErrorCodeKindSchema: z.ZodUnion<readonly [z.ZodObject<{
JsAborted: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsContractNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsDisconnected: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsDuplicateCommand: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInconsistent: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInvalidArgument: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInvalidLedgerTime: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsOutOfQuota: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsPartyNotKnownOnLedger: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsResourceExhausted: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsSubmitterCannotActViaParticipant: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTemplateNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTimedOut: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTransactionNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnauthenticated: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnknown: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnsupported: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUserManagement: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsValueNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>]>;
/**
* Error code details.
*/
export declare const JsErrorCodeSchema: z.ZodObject<{
kind: z.ZodUnion<readonly [z.ZodObject<{
JsAborted: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsContractNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsDisconnected: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsDuplicateCommand: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInconsistent: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInvalidArgument: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInvalidLedgerTime: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsOutOfQuota: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsPartyNotKnownOnLedger: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsResourceExhausted: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsSubmitterCannotActViaParticipant: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTemplateNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTimedOut: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTransactionNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnauthenticated: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnknown: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnsupported: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUserManagement: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsValueNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>]>;
}, z.core.$strip>;
/**
* Canton error details.
*/
export declare const JsCantonErrorSchema: z.ZodObject<{
code: z.ZodObject<{
kind: z.ZodUnion<readonly [z.ZodObject<{
JsAborted: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsContractNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsDisconnected: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsDuplicateCommand: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInconsistent: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInvalidArgument: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInvalidLedgerTime: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsOutOfQuota: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsPartyNotKnownOnLedger: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsResourceExhausted: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsSubmitterCannotActViaParticipant: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTemplateNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTimedOut: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTransactionNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnauthenticated: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnknown: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnsupported: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUserManagement: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsValueNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>]>;
}, z.core.$strip>;
message: z.ZodString;
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, z.core.$strip>;
/**
* Generic error details.
*/
export declare const JsErrorSchema: z.ZodObject<{
code: z.ZodObject<{
kind: z.ZodUnion<readonly [z.ZodObject<{
JsAborted: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsContractNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsDisconnected: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsDuplicateCommand: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInconsistent: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInvalidArgument: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsInvalidLedgerTime: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsOutOfQuota: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsPartyNotKnownOnLedger: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsResourceExhausted: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsSubmitterCannotActViaParticipant: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTemplateNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTimedOut: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsTransactionNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnauthenticated: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnknown: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUnsupported: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsUserManagement: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>, z.ZodObject<{
JsValueNotFound: z.ZodObject<{}, z.core.$strip>;
}, z.core.$strip>]>;
}, z.core.$strip>;
message: z.ZodString;
details: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
}, z.core.$strip>;
export type ErrorResponse = z.infer<typeof ErrorResponseSchema>;
export type BadRequestError = z.infer<typeof BadRequestErrorSchema>;
export type UnauthorizedError = z.infer<typeof UnauthorizedErrorSchema>;
export type ForbiddenError = z.infer<typeof ForbiddenErrorSchema>;
export type NotFoundError = z.infer<typeof NotFoundErrorSchema>;
export type ConflictError = z.infer<typeof ConflictErrorSchema>;
export type UnprocessableEntityError = z.infer<typeof UnprocessableEntityErrorSchema>;
export type TooManyRequestsError = z.infer<typeof TooManyRequestsErrorSchema>;
export type InternalServerError = z.infer<typeof InternalServerErrorSchema>;
export type ServiceUnavailableError = z.infer<typeof ServiceUnavailableErrorSchema>;
export type JsErrorCodeKind = z.infer<typeof JsErrorCodeKindSchema>;
export type JsErrorCode = z.infer<typeof JsErrorCodeSchema>;
export type JsCantonError = z.infer<typeof JsCantonErrorSchema>;
export type JsError = z.infer<typeof JsErrorSchema>;
//# sourceMappingURL=errors.d.ts.map