UNPKG

@kubb/plugin-client

Version:

API client generator plugin for Kubb, creating type-safe HTTP clients (Axios, Fetch) from OpenAPI specifications for making API requests.

165 lines (164 loc) 4.37 kB
import { i as OperationSchemas, n as PluginClient, o as Operation } from "./types-CeY3kW8u.js"; import { FunctionParams } from "@kubb/react-fabric"; import { KubbNode } from "@kubb/react-fabric/types"; //#region src/components/ClassClient.d.ts type Props$2 = { /** * Name of the class */ name: string; isExportable?: boolean; isIndexable?: boolean; operations: Array<{ operation: Operation; name: string; typeSchemas: OperationSchemas; zodSchemas: OperationSchemas | undefined; }>; baseURL: string | undefined; dataReturnType: PluginClient['resolvedOptions']['dataReturnType']; paramsCasing: PluginClient['resolvedOptions']['paramsCasing']; paramsType: PluginClient['resolvedOptions']['pathParamsType']; pathParamsType: PluginClient['resolvedOptions']['pathParamsType']; parser: PluginClient['resolvedOptions']['parser'] | undefined; children?: KubbNode; }; declare function ClassClient({ name, isExportable, isIndexable, operations, baseURL, dataReturnType, parser, paramsType, paramsCasing, pathParamsType, children }: Props$2): KubbNode; declare namespace ClassClient { var getParams: ({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable }: { paramsCasing: PluginClient["resolvedOptions"]["paramsCasing"]; paramsType: PluginClient["resolvedOptions"]["paramsType"]; pathParamsType: PluginClient["resolvedOptions"]["pathParamsType"]; typeSchemas: OperationSchemas; isConfigurable: boolean; }) => FunctionParams; } //#endregion //#region src/components/Client.d.ts type Props$1 = { /** * Name of the function */ name: string; urlName?: string; isExportable?: boolean; isIndexable?: boolean; isConfigurable?: boolean; returnType?: string; baseURL: string | undefined; dataReturnType: PluginClient['resolvedOptions']['dataReturnType']; paramsCasing: PluginClient['resolvedOptions']['paramsCasing']; paramsType: PluginClient['resolvedOptions']['pathParamsType']; pathParamsType: PluginClient['resolvedOptions']['pathParamsType']; parser: PluginClient['resolvedOptions']['parser'] | undefined; typeSchemas: OperationSchemas; zodSchemas: OperationSchemas | undefined; operation: Operation; children?: KubbNode; }; type GetParamsProps$1 = { paramsCasing: PluginClient['resolvedOptions']['paramsCasing']; paramsType: PluginClient['resolvedOptions']['paramsType']; pathParamsType: PluginClient['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; isConfigurable: boolean; }; declare function Client({ name, isExportable, isIndexable, returnType, typeSchemas, baseURL, dataReturnType, parser, zodSchemas, paramsType, paramsCasing, pathParamsType, operation, urlName, children, isConfigurable }: Props$1): KubbNode; declare namespace Client { var getParams: ({ paramsType, paramsCasing, pathParamsType, typeSchemas, isConfigurable }: GetParamsProps$1) => FunctionParams; } //#endregion //#region src/components/Operations.d.ts type OperationsProps = { name: string; operations: Array<Operation>; }; declare function Operations({ name, operations }: OperationsProps): KubbNode; //#endregion //#region src/components/Url.d.ts type Props = { /** * Name of the function */ name: string; isExportable?: boolean; isIndexable?: boolean; baseURL: string | undefined; paramsCasing: PluginClient['resolvedOptions']['paramsCasing']; paramsType: PluginClient['resolvedOptions']['pathParamsType']; pathParamsType: PluginClient['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; operation: Operation; }; type GetParamsProps = { paramsCasing: PluginClient['resolvedOptions']['paramsCasing']; paramsType: PluginClient['resolvedOptions']['paramsType']; pathParamsType: PluginClient['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; }; declare function Url({ name, isExportable, isIndexable, typeSchemas, baseURL, paramsType, paramsCasing, pathParamsType, operation }: Props): KubbNode; declare namespace Url { var getParams: ({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) => FunctionParams; } //#endregion export { ClassClient, Client, Operations, Url }; //# sourceMappingURL=components.d.ts.map