UNPKG

@kubb/plugin-vue-query

Version:

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

165 lines (156 loc) 7.26 kB
import { Operation } from '@kubb/oas'; import { OperationSchemas } from '@kubb/plugin-oas'; import { ReactNode } from 'react'; import { P as PluginVueQuery, T as Transformer, I as Infinite } from './types-CDzVWC17.cjs'; import { FunctionParams } from '@kubb/react'; import '@kubb/core'; import '@kubb/plugin-client'; type Props$6 = { /** * Name of the function */ name: string; typeName: string; clientName: string; mutationKeyName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; }; declare function Mutation({ name, clientName, paramsCasing, paramsType, pathParamsType, dataReturnType, typeSchemas, operation, mutationKeyName, }: Props$6): ReactNode; type Props$5 = { /** * Name of the function */ name: string; queryOptionsName: string; queryKeyName: string; queryKeyTypeName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType']; }; type GetParamsProps$5 = { paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType']; typeSchemas: OperationSchemas; }; declare function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas, operation, }: Props$5): ReactNode; declare namespace Query { var getParams: ({ paramsCasing, paramsType, pathParamsType, dataReturnType, typeSchemas }: GetParamsProps$5) => FunctionParams; } type Props$4 = { name: string; typeName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; transformer: Transformer | undefined; }; type GetParamsProps$4 = { paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; }; declare function QueryKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer }: Props$4): ReactNode; declare namespace QueryKey { var getParams: ({ pathParamsType, paramsCasing, typeSchemas }: GetParamsProps$4) => FunctionParams; var getTransformer: Transformer; } type Props$3 = { name: string; clientName: string; queryKeyName: string; typeSchemas: OperationSchemas; paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType']; }; type GetParamsProps$3 = { paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; }; declare function QueryOptions({ name, clientName, dataReturnType, typeSchemas, paramsCasing, paramsType, pathParamsType, queryKeyName }: Props$3): ReactNode; declare namespace QueryOptions { var getParams: ({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps$3) => FunctionParams; } type Props$2 = { name: string; clientName: string; queryKeyName: string; typeSchemas: OperationSchemas; paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType']; initialPageParam: Infinite['initialPageParam']; cursorParam: Infinite['cursorParam']; queryParam: Infinite['queryParam']; }; type GetParamsProps$2 = { paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; }; declare function InfiniteQueryOptions({ name, clientName, initialPageParam, cursorParam, typeSchemas, paramsType, paramsCasing, dataReturnType, pathParamsType, queryParam, queryKeyName, }: Props$2): ReactNode; declare namespace InfiniteQueryOptions { var getParams: ({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps$2) => FunctionParams; } type Props$1 = { /** * Name of the function */ name: string; queryOptionsName: string; queryKeyName: string; queryKeyTypeName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType']; }; type GetParamsProps$1 = { paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; paramsType: PluginVueQuery['resolvedOptions']['paramsType']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType']; typeSchemas: OperationSchemas; }; declare function InfiniteQuery({ name, queryKeyTypeName, queryOptionsName, queryKeyName, paramsType, pathParamsType, paramsCasing, dataReturnType, typeSchemas, operation, }: Props$1): ReactNode; declare namespace InfiniteQuery { var getParams: ({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }: GetParamsProps$1) => FunctionParams; } type Props = { name: string; typeName: string; typeSchemas: OperationSchemas; operation: Operation; paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing']; pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; transformer: Transformer | undefined; }; type GetParamsProps = { pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType']; typeSchemas: OperationSchemas; }; declare function MutationKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer }: Props): ReactNode; declare namespace MutationKey { var getParams: ({}: GetParamsProps) => FunctionParams; var getTransformer: Transformer; } export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions };