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.

216 lines (215 loc) 5.9 kB
import { t as __name } from "./chunk-DKWOrOAv.js"; import { r as PluginClient } from "./types-nY6q8qQK.js"; import { OperationSchemas } from "@kubb/plugin-oas"; import { FunctionParams } from "@kubb/react-fabric"; import { Operation } from "@kubb/oas"; import { FabricReactNode } from "@kubb/react-fabric/types"; //#region src/components/ClassClient.d.ts type Props$3 = { /** * 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?: FabricReactNode; }; declare function ClassClient({ name, isExportable, isIndexable, operations, baseURL, dataReturnType, parser, paramsType, paramsCasing, pathParamsType, children }: Props$3): FabricReactNode; 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$2 = { /** * 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?: FabricReactNode; }; 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$2): FabricReactNode; 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): FabricReactNode; //#endregion //#region src/components/StaticClassClient.d.ts type Props$1 = { 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?: FabricReactNode; }; declare function StaticClassClient({ name, isExportable, isIndexable, operations, baseURL, dataReturnType, parser, paramsType, paramsCasing, pathParamsType, children }: Props$1): FabricReactNode; declare namespace StaticClassClient { 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/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): FabricReactNode; declare namespace Url { var getParams: ({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) => FunctionParams; } //#endregion export { ClassClient, Client, Operations, StaticClassClient, Url }; //# sourceMappingURL=components.d.ts.map