ChainGraph API Documentation / @badaitech/chaingraph-executor / client / useTRPCClient
Variable: useTRPCClient()
useTRPCClient: () =>
TRPCClient<BuiltRouter<{ctx:ExecutorContext;errorShape: {code:TRPC_ERROR_CODE_NUMBER;data: {code:"PARSE_ERROR"|"BAD_REQUEST"|"INTERNAL_SERVER_ERROR"|"NOT_IMPLEMENTED"|"BAD_GATEWAY"|"SERVICE_UNAVAILABLE"|"GATEWAY_TIMEOUT"|"UNAUTHORIZED"|"PAYMENT_REQUIRED"|"FORBIDDEN"|"NOT_FOUND"|"METHOD_NOT_SUPPORTED"|"TIMEOUT"|"CONFLICT"|"PRECONDITION_FAILED"|"PAYLOAD_TOO_LARGE"|"UNSUPPORTED_MEDIA_TYPE"|"UNPROCESSABLE_CONTENT"|"PRECONDITION_REQUIRED"|"TOO_MANY_REQUESTS"|"CLIENT_CLOSED_REQUEST";httpStatus:number;path?:string;stack?:string;zodError:typeToFlattenedError<any,string> |null; };message:string; };meta:object;transformer:true; },DecorateCreateRouterOptions<{create:MutationProcedure<{input: {events?:object[];flowId:string;integration?:objectInputType<{archai: ...;external: ...;wallet: ...; },ZodAny,"strip">;options?: {breakpoints?: ... | ...;debug?: ... | ... | ...;execution?: ... | ...; }; };meta:object;output: {executionId:string; }; }>;getExecutionDetails:QueryProcedure<{input: {executionId:string; };meta:object;output: {completedAt:Date|null;createdAt:Date;errorMessage:string|null;errorNodeId:string|null;executionDepth:number;externalEvents:object[] |null;failureCount:number;flowId:string;id:string;integration:object&object|null;lastFailureAt:Date|null;lastFailureReason:string|null;options: {breakpoints?: ... | ...;debug?: ... | ... | ...;execution?: ... | ...; } |null;ownerId:string;parentExecutionId:string|null;processingStartedAt:Date|null;processingWorkerId:string|null;rootExecutionId:string|null;startedAt:Date|null;status:ExecutionStatus;updatedAt:Date; }; }>;getExecutionsTree:QueryProcedure<{input: {executionId:string; };meta:object;output:ExecutionTreeNode[]; }>;getRootExecutions:QueryProcedure<{input: {after?:Date;flowId:string;limit?:number; };meta:object;output:RootExecution[]; }>;pause:MutationProcedure<{input: {executionId:string;reason?:string; };meta:object;output: {success:boolean; }; }>;resume:MutationProcedure<{input: {executionId:string; };meta:object;output: {success:boolean; }; }>;start:MutationProcedure<{input: {executionId:string; };meta:object;output: {success:boolean; }; }>;stop:MutationProcedure<{input: {executionId:string;reason?:string; };meta:object;output: {success:boolean; }; }>;subscribeToExecutionEvents:SubscriptionProcedure<{input: {batchSize?:number;batchTimeoutMs?:number;eventTypes?:string[];executionId:string;fromIndex?:number; };meta:object;output:AsyncIterable<ExecutionEventImpl<ExecutionEventEnum>[]>; }>; }>>>
Defined in: packages/chaingraph-executor/client/trpc.ts:111
Returns
TRPCClient<BuiltRouter<{ ctx: ExecutorContext; errorShape: { code: TRPC_ERROR_CODE_NUMBER; data: { code: "PARSE_ERROR" | "BAD_REQUEST" | "INTERNAL_SERVER_ERROR" | "NOT_IMPLEMENTED" | "BAD_GATEWAY" | "SERVICE_UNAVAILABLE" | "GATEWAY_TIMEOUT" | "UNAUTHORIZED" | "PAYMENT_REQUIRED" | "FORBIDDEN" | "NOT_FOUND" | "METHOD_NOT_SUPPORTED" | "TIMEOUT" | "CONFLICT" | "PRECONDITION_FAILED" | "PAYLOAD_TOO_LARGE" | "UNSUPPORTED_MEDIA_TYPE" | "UNPROCESSABLE_CONTENT" | "PRECONDITION_REQUIRED" | "TOO_MANY_REQUESTS" | "CLIENT_CLOSED_REQUEST"; httpStatus: number; path?: string; stack?: string; zodError: typeToFlattenedError<any, string> | null; }; message: string; }; meta: object; transformer: true; }, DecorateCreateRouterOptions<{ create: MutationProcedure<{ input: { events?: object[]; flowId: string; integration?: objectInputType<{ archai: ...; external: ...; wallet: ...; }, ZodAny, "strip">; options?: { breakpoints?: ... | ...; debug?: ... | ... | ...; execution?: ... | ...; }; }; meta: object; output: { executionId: string; }; }>; getExecutionDetails: QueryProcedure<{ input: { executionId: string; }; meta: object; output: { completedAt: Date | null; createdAt: Date; errorMessage: string | null; errorNodeId: string | null; executionDepth: number; externalEvents: object[] | null; failureCount: number; flowId: string; id: string; integration: object & object | null; lastFailureAt: Date | null; lastFailureReason: string | null; options: { breakpoints?: ... | ...; debug?: ... | ... | ...; execution?: ... | ...; } | null; ownerId: string; parentExecutionId: string | null; processingStartedAt: Date | null; processingWorkerId: string | null; rootExecutionId: string | null; startedAt: Date | null; status: ExecutionStatus; updatedAt: Date; }; }>; getExecutionsTree: QueryProcedure<{ input: { executionId: string; }; meta: object; output: ExecutionTreeNode[]; }>; getRootExecutions: QueryProcedure<{ input: { after?: Date; flowId: string; limit?: number; }; meta: object; output: RootExecution[]; }>; pause: MutationProcedure<{ input: { executionId: string; reason?: string; }; meta: object; output: { success: boolean; }; }>; resume: MutationProcedure<{ input: { executionId: string; }; meta: object; output: { success: boolean; }; }>; start: MutationProcedure<{ input: { executionId: string; }; meta: object; output: { success: boolean; }; }>; stop: MutationProcedure<{ input: { executionId: string; reason?: string; }; meta: object; output: { success: boolean; }; }>; subscribeToExecutionEvents: SubscriptionProcedure<{ input: { batchSize?: number; batchTimeoutMs?: number; eventTypes?: string[]; executionId: string; fromIndex?: number; }; meta: object; output: AsyncIterable<ExecutionEventImpl<ExecutionEventEnum>[]>; }>; }>>>