UNPKG

@fairmint/canton-node-sdk

Version:
14 lines 779 B
import { type z } from 'zod'; import { type BaseClient } from '../BaseClient'; import { type RequestConfig } from '../types'; import { ApiOperation } from './ApiOperation'; export interface ApiOperationConfig<Params, Response> { paramsSchema: z.ZodSchema<Params>; method: 'GET' | 'POST' | 'DELETE' | 'PATCH'; buildUrl: (params: Params, apiUrl: string, client: BaseClient) => string; buildRequestData?: (params: Params, client: BaseClient) => unknown; requestConfig?: RequestConfig; transformResponse?: (response: Response) => Response; } export declare function createApiOperation<Params, Response>(config: ApiOperationConfig<Params, Response>): new (client: BaseClient) => ApiOperation<Params, Response>; //# sourceMappingURL=ApiOperationFactory.d.ts.map