UNPKG

@kubb/plugin-svelte-query

Version:

Svelte Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Svelte applications.

176 lines (175 loc) 5.08 kB
import { a as OperationSchemas, n as PluginSvelteQuery, r as Transformer, s as Operation } from "./types-DcgExwIp.js"; import { FunctionParams } from "@kubb/react-fabric"; import { KubbNode } from "@kubb/react-fabric/types"; //#region src/components/Mutation.d.ts type Props$4 = { /** * Name of the function */ name: string; typeName: string; clientName: string; mutationKeyName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginSvelteQuery['resolvedOptions']['paramsCasing']; paramsType: PluginSvelteQuery['resolvedOptions']['paramsType']; dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType']; pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; }; declare function Mutation({ name, clientName, paramsCasing, paramsType, pathParamsType, dataReturnType, typeSchemas, operation, mutationKeyName }: Props$4): KubbNode; //#endregion //#region src/components/MutationKey.d.ts type Props$3 = { name: string; typeName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginSvelteQuery['resolvedOptions']['paramsCasing']; pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; transformer: Transformer | undefined; }; type GetParamsProps$3 = { pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; }; declare function MutationKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer }: Props$3): KubbNode; declare namespace MutationKey { var getParams: ({}: GetParamsProps$3) => FunctionParams; var getTransformer: Transformer; } //#endregion //#region src/components/Query.d.ts type Props$2 = { /** * Name of the function */ name: string; queryOptionsName: string; queryKeyName: string; queryKeyTypeName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginSvelteQuery['resolvedOptions']['paramsCasing']; paramsType: PluginSvelteQuery['resolvedOptions']['paramsType']; pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType']; }; type GetParamsProps$2 = { paramsCasing: PluginSvelteQuery['resolvedOptions']['paramsCasing']; paramsType: PluginSvelteQuery['resolvedOptions']['paramsType']; pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType']; typeSchemas: OperationSchemas; }; declare function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas, operation }: Props$2): KubbNode; declare namespace Query { var getParams: ({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }: GetParamsProps$2) => FunctionParams; } //#endregion //#region src/components/QueryKey.d.ts type Props$1 = { name: string; typeName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginSvelteQuery['resolvedOptions']['paramsCasing']; pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; transformer: Transformer | undefined; }; type GetParamsProps$1 = { paramsCasing: PluginSvelteQuery['resolvedOptions']['paramsCasing']; pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; }; declare function QueryKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer }: Props$1): KubbNode; declare namespace QueryKey { var getParams: ({ pathParamsType, paramsCasing, typeSchemas }: GetParamsProps$1) => FunctionParams; var getTransformer: Transformer; } //#endregion //#region src/components/QueryOptions.d.ts type Props = { name: string; clientName: string; queryKeyName: string; typeSchemas: OperationSchemas; paramsCasing: PluginSvelteQuery['resolvedOptions']['paramsCasing']; paramsType: PluginSvelteQuery['resolvedOptions']['paramsType']; pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginSvelteQuery['resolvedOptions']['client']['dataReturnType']; }; type GetParamsProps = { paramsCasing: PluginSvelteQuery['resolvedOptions']['paramsCasing']; paramsType: PluginSvelteQuery['resolvedOptions']['paramsType']; pathParamsType: PluginSvelteQuery['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; }; declare function QueryOptions({ name, clientName, typeSchemas, paramsCasing, paramsType, dataReturnType, pathParamsType, queryKeyName }: Props): KubbNode; declare namespace QueryOptions { var getParams: ({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) => FunctionParams; } //#endregion export { Mutation, MutationKey, Query, QueryKey, QueryOptions }; //# sourceMappingURL=components.d.ts.map