UNPKG

@alwaysai/cloud-api

Version:

A library for defining the alwaysAI Cloud API

26 lines 672 B
import * as t from 'io-ts'; export declare const rpcRequestCodec: t.TypeC<{ methodName: t.StringC; args: t.UnknownArrayC; }>; export declare type RpcRequest = t.TypeOf<typeof rpcRequestCodec>; export declare type RpcResult = { result: any; }; export declare type RpcError = { message: string; code?: string | number | null; data?: any; stack?: string; }; export declare type RpcMethodSpec<T, U> = { description: string; argsCodec: T; resultCodec: U; }; export declare function RpcMethodSpec<T, U>(opts: { description: string; argsCodec: T; resultCodec: U; }): RpcMethodSpec<T, U>; //# sourceMappingURL=rpc-types.d.ts.map