@kubb/plugin-react-query 4.0.0 → 4.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components-DzT-kLe8.cjs → components-DkiO4xNZ.cjs} +283 -229
- package/dist/components-DkiO4xNZ.cjs.map +1 -0
- package/dist/{components-C51l7G1u.js → components-Dz_s6t75.js} +276 -228
- package/dist/components-Dz_s6t75.js.map +1 -0
- package/dist/components.cjs +2 -1
- package/dist/components.d.cts +136 -106
- package/dist/components.d.ts +136 -106
- package/dist/components.js +2 -2
- package/dist/{generators-Bko771xm.cjs → generators-BiW_MevM.cjs} +27 -9
- package/dist/generators-BiW_MevM.cjs.map +1 -0
- package/dist/{generators-B3xZ2QoY.js → generators-ByqomtgH.js} +25 -7
- package/dist/generators-ByqomtgH.js.map +1 -0
- package/dist/generators.cjs +2 -2
- package/dist/generators.js +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.js +2 -2
- package/package.json +9 -10
- package/src/components/InfiniteQuery.tsx +21 -14
- package/src/components/InfiniteQueryOptions.tsx +19 -7
- package/src/components/Mutation.tsx +12 -40
- package/src/components/MutationOptions.tsx +113 -0
- package/src/components/index.ts +4 -3
- package/src/generators/__snapshots__/clientPostImportPath.ts +25 -12
- package/src/generators/__snapshots__/findInfiniteByTags.ts +14 -8
- package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +14 -8
- package/src/generators/__snapshots__/updatePetById.ts +25 -12
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +25 -12
- package/src/generators/infiniteQueryGenerator.tsx +1 -0
- package/src/generators/mutationGenerator.tsx +18 -2
- package/dist/components-C51l7G1u.js.map +0 -1
- package/dist/components-DzT-kLe8.cjs.map +0 -1
- package/dist/generators-B3xZ2QoY.js.map +0 -1
- package/dist/generators-Bko771xm.cjs.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components-Dz_s6t75.js","names":["getParams","getTransformer: Transformer","getTransformer","getParams","getParams","getParams","getParams","getTransformer: Transformer","getParams","getParams","getParams"],"sources":["../src/components/QueryKey.tsx","../src/components/QueryOptions.tsx","../src/components/InfiniteQuery.tsx","../src/components/InfiniteQueryOptions.tsx","../src/components/MutationKey.tsx","../src/components/MutationOptions.tsx","../src/components/Mutation.tsx","../src/components/Query.tsx","../src/components/SuspenseQuery.tsx"],"sourcesContent":["import { URLPath } from '@kubb/core/utils'\nimport { getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams, Type } from '@kubb/react'\n\nimport { type Operation, isOptional } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport type { ReactNode } from 'react'\nimport type { PluginReactQuery, Transformer } from '../types'\n\ntype Props = {\n name: string\n typeName: string\n typeSchemas: OperationSchemas\n operation: Operation\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n transformer: Transformer | undefined\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ pathParamsType, paramsCasing, typeSchemas }: GetParamsProps) {\n return FunctionParams.factory({\n pathParams: {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n },\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n })\n}\n\nconst getTransformer: Transformer = ({ operation, schemas, casing }) => {\n const path = new URLPath(operation.path, { casing })\n const keys = [\n path.toObject({\n type: 'path',\n stringify: true,\n }),\n schemas.queryParams?.name ? '...(params ? [params] : [])' : undefined,\n schemas.request?.name ? '...(data ? [data] : [])' : undefined,\n ].filter(Boolean)\n\n return keys\n}\n\nexport function QueryKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer = getTransformer }: Props): ReactNode {\n const params = getParams({ pathParamsType, typeSchemas, paramsCasing })\n const keys = transformer({\n operation,\n schemas: typeSchemas,\n casing: paramsCasing,\n })\n\n return (\n <>\n <File.Source name={name} isExportable isIndexable>\n <Function.Arrow name={name} export params={params.toConstructor()} singleLine>\n {`[${keys.join(', ')}] as const`}\n </Function.Arrow>\n </File.Source>\n <File.Source name={typeName} isExportable isIndexable isTypeOnly>\n <Type name={typeName} export>\n {`ReturnType<typeof ${name}>`}\n </Type>\n </File.Source>\n </>\n )\n}\n\nQueryKey.getParams = getParams\nQueryKey.getTransformer = getTransformer\n","import { getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\n\nimport { isOptional } from '@kubb/oas'\nimport { Client } from '@kubb/plugin-client/components'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport type { PluginReactQuery } from '../types.ts'\nimport { QueryKey } from './QueryKey.tsx'\n\ntype Props = {\n name: string\n clientName: string\n queryKeyName: string\n typeSchemas: OperationSchemas\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {\n if (paramsType === 'object') {\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n config: {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\n default: '{}',\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n optional: isOptional(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n config: {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\n default: '{}',\n },\n })\n}\n\nexport function QueryOptions({ name, clientName, dataReturnType, typeSchemas, paramsCasing, paramsType, pathParamsType, queryKeyName }: Props) {\n const params = getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas })\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'\n\n const clientParams = Client.getParams({\n typeSchemas,\n paramsCasing,\n paramsType,\n pathParamsType,\n isConfigurable: true,\n })\n const queryKeyParams = QueryKey.getParams({\n pathParamsType,\n typeSchemas,\n paramsCasing,\n })\n\n const enabled = Object.entries(queryKeyParams.flatParams)\n .map(([key, item]) => (item && !item.optional ? key : undefined))\n .filter(Boolean)\n .join('&& ')\n\n const enabledText = enabled ? `enabled: !!(${enabled}),` : ''\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function name={name} export params={params.toConstructor()}>\n {`\n const queryKey = ${queryKeyName}(${queryKeyParams.toCall()})\n return queryOptions<${TData}, ResponseErrorConfig<${TError}>, ${TData}, typeof queryKey>({\n ${enabledText}\n queryKey,\n queryFn: async ({ signal }) => {\n config.signal = signal\n return ${clientName}(${clientParams.toCall({})})\n },\n })\n`}\n </Function>\n </File.Source>\n )\n}\n\nQueryOptions.getParams = getParams\n","import { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\nimport type { ReactNode } from 'react'\nimport type { Infinite, PluginReactQuery } from '../types.ts'\nimport { QueryKey } from './QueryKey.tsx'\nimport { QueryOptions } from './QueryOptions.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n queryOptionsName: string\n queryKeyName: string\n queryKeyTypeName: string\n typeSchemas: OperationSchemas\n operation: Operation\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n queryParam?: Infinite['queryParam']\n}\n\ntype GetParamsProps = {\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n pageParamGeneric: string\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas, pageParamGeneric }: GetParamsProps) {\n if (paramsType === 'object') {\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n options: {\n type: `\n{\n query?: Partial<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, ${pageParamGeneric}>> & { client?: QueryClient },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'}\n}\n`,\n default: '{}',\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n optional: isOptional(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n options: {\n type: `\n{\n query?: Partial<InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, ${pageParamGeneric}>> & { client?: QueryClient },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'}\n}\n`,\n default: '{}',\n },\n })\n}\n\nexport function InfiniteQuery({\n name,\n queryKeyTypeName,\n queryOptionsName,\n queryKeyName,\n paramsType,\n paramsCasing,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n operation,\n queryParam,\n}: Props): ReactNode {\n const responseType = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const errorType = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n const explicitPageParamType = queryParam && typeSchemas.queryParams?.name ? `NonNullable<${typeSchemas.queryParams?.name}['${queryParam}']>` : undefined\n const pageParamType = explicitPageParamType ?? 'number'\n const returnType = 'UseInfiniteQueryResult<TData, TError> & { queryKey: TQueryKey }'\n const generics = [\n `TQueryFnData = ${responseType}`,\n `TError = ${errorType}`,\n 'TData = InfiniteData<TQueryFnData>',\n `TQueryKey extends QueryKey = ${queryKeyTypeName}`,\n `TPageParam = ${pageParamType}`,\n ]\n\n const queryKeyParams = QueryKey.getParams({\n pathParamsType,\n typeSchemas,\n paramsCasing,\n })\n const queryOptionsParams = QueryOptions.getParams({\n paramsType,\n pathParamsType,\n typeSchemas,\n paramsCasing,\n })\n const params = getParams({\n paramsCasing,\n paramsType,\n pathParamsType,\n typeSchemas,\n pageParamGeneric: 'TPageParam',\n })\n\n const queryOptions = `${queryOptionsName}(${queryOptionsParams.toCall()})`\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function\n name={name}\n export\n generics={generics.join(', ')}\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n >\n {`\n const { query: queryConfig = {}, client: config = {} } = options ?? {}\n const { client: queryClient, ...queryOptions } = queryConfig\n const queryKey = queryOptions?.queryKey ?? ${queryKeyName}(${queryKeyParams.toCall()})\n\n const query = useInfiniteQuery({\n ...${queryOptions},\n queryKey,\n ...queryOptions\n } as unknown as InfiniteQueryObserverOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, queryClient) as ${returnType}\n\n query.queryKey = queryKey as TQueryKey\n\n return query\n `}\n </Function>\n </File.Source>\n )\n}\n\nInfiniteQuery.getParams = getParams\n","import { isOptional } from '@kubb/oas'\nimport { Client } from '@kubb/plugin-client/components'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\nimport type { ReactNode } from 'react'\nimport type { Infinite, PluginReactQuery } from '../types.ts'\nimport { QueryKey } from './QueryKey.tsx'\n\ntype Props = {\n name: string\n clientName: string\n queryKeyName: string\n typeSchemas: OperationSchemas\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n initialPageParam: Infinite['initialPageParam']\n cursorParam: Infinite['cursorParam']\n queryParam: Infinite['queryParam']\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: GetParamsProps) {\n if (paramsType === 'object') {\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n config: {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\n default: '{}',\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, {\n typed: true,\n casing: paramsCasing,\n }),\n optional: isOptional(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n config: {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\n default: '{}',\n },\n })\n}\n\nexport function InfiniteQueryOptions({\n name,\n clientName,\n initialPageParam,\n cursorParam,\n typeSchemas,\n paramsCasing,\n paramsType,\n dataReturnType,\n pathParamsType,\n queryParam,\n queryKeyName,\n}: Props): ReactNode {\n const queryFnDataType = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const errorType = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n const pageParamType = queryParam && typeSchemas.queryParams?.name ? `NonNullable<${typeSchemas.queryParams?.name}['${queryParam}']>` : 'number'\n\n const params = getParams({\n paramsType,\n paramsCasing,\n pathParamsType,\n typeSchemas,\n })\n const clientParams = Client.getParams({\n paramsCasing,\n typeSchemas,\n paramsType,\n pathParamsType,\n isConfigurable: true,\n })\n const queryKeyParams = QueryKey.getParams({\n pathParamsType,\n typeSchemas,\n paramsCasing,\n })\n\n const queryOptions = [\n `initialPageParam: ${typeof initialPageParam === 'string' ? JSON.stringify(initialPageParam) : initialPageParam}`,\n cursorParam ? `getNextPageParam: (lastPage) => lastPage['${cursorParam}']` : undefined,\n cursorParam ? `getPreviousPageParam: (firstPage) => firstPage['${cursorParam}']` : undefined,\n !cursorParam && dataReturnType === 'full'\n ? 'getNextPageParam: (lastPage, _allPages, lastPageParam) => Array.isArray(lastPage.data) && lastPage.data.length === 0 ? undefined : lastPageParam + 1'\n : undefined,\n !cursorParam && dataReturnType === 'data'\n ? 'getNextPageParam: (lastPage, _allPages, lastPageParam) => Array.isArray(lastPage) && lastPage.length === 0 ? undefined : lastPageParam + 1'\n : undefined,\n !cursorParam ? 'getPreviousPageParam: (_firstPage, _allPages, firstPageParam) => firstPageParam <= 1 ? undefined : firstPageParam - 1' : undefined,\n ].filter(Boolean)\n\n const infiniteOverrideParams =\n queryParam && typeSchemas.queryParams?.name\n ? `\n if (!params) {\n params = { }\n }\n params['${queryParam}'] = pageParam as unknown as ${typeSchemas.queryParams?.name}['${queryParam}']`\n : ''\n\n const enabled = Object.entries(queryKeyParams.flatParams)\n .map(([key, item]) => (item && !item.optional ? key : undefined))\n .filter(Boolean)\n .join('&& ')\n\n const enabledText = enabled ? `enabled: !!(${enabled}),` : ''\n\n if (infiniteOverrideParams) {\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function name={name} export params={params.toConstructor()}>\n {`\n const queryKey = ${queryKeyName}(${queryKeyParams.toCall()})\n return infiniteQueryOptions<${queryFnDataType}, ${errorType}, InfiniteData<${queryFnDataType}>, typeof queryKey, ${pageParamType}>({\n ${enabledText}\n queryKey,\n queryFn: async ({ signal, pageParam }) => {\n config.signal = signal\n ${infiniteOverrideParams}\n return ${clientName}(${clientParams.toCall()})\n },\n ${queryOptions.join(',\\n')}\n })\n`}\n </Function>\n </File.Source>\n )\n }\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function name={name} export params={params.toConstructor()}>\n {`\n const queryKey = ${queryKeyName}(${queryKeyParams.toCall()})\n return infiniteQueryOptions<${queryFnDataType}, ${errorType}, InfiniteData<${queryFnDataType}>, typeof queryKey, ${pageParamType}>({\n ${enabledText}\n queryKey,\n queryFn: async ({ signal }) => {\n config.signal = signal\n return ${clientName}(${clientParams.toCall()})\n },\n ${queryOptions.join(',\\n')}\n })\n`}\n </Function>\n </File.Source>\n )\n}\n\nInfiniteQueryOptions.getParams = getParams\n","import { URLPath } from '@kubb/core/utils'\nimport type { Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { File, Function, FunctionParams, Type } from '@kubb/react'\nimport type { ReactNode } from 'react'\nimport type { PluginReactQuery, Transformer } from '../types'\n\ntype Props = {\n name: string\n typeName: string\n typeSchemas: OperationSchemas\n operation: Operation\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n transformer: Transformer | undefined\n}\n\ntype GetParamsProps = {\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({}: GetParamsProps) {\n return FunctionParams.factory({})\n}\n\nconst getTransformer: Transformer = ({ operation, casing }) => {\n const path = new URLPath(operation.path, { casing })\n\n return [`{ url: '${path.toURLPath()}' }`]\n}\n\nexport function MutationKey({ name, typeSchemas, pathParamsType, paramsCasing, operation, typeName, transformer = getTransformer }: Props): ReactNode {\n const params = getParams({ pathParamsType, typeSchemas })\n const keys = transformer({ operation, schemas: typeSchemas, casing: paramsCasing })\n\n return (\n <>\n <File.Source name={name} isExportable isIndexable>\n <Function.Arrow name={name} export params={params.toConstructor()} singleLine>\n {`[${keys.join(', ')}] as const`}\n </Function.Arrow>\n </File.Source>\n <File.Source name={typeName} isExportable isIndexable isTypeOnly>\n <Type name={typeName} export>\n {`ReturnType<typeof ${name}>`}\n </Type>\n </File.Source>\n </>\n )\n}\n\nMutationKey.getParams = getParams\nMutationKey.getTransformer = getTransformer\n","import { isOptional } from '@kubb/oas'\nimport { Client } from '@kubb/plugin-client/components'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\nimport type { Params } from '@kubb/react/types'\nimport type { PluginReactQuery } from '../types.ts'\nimport { MutationKey } from './MutationKey.tsx'\n\ntype Props = {\n name: string\n clientName: string\n mutationKeyName: string\n typeSchemas: OperationSchemas\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n}\n\ntype GetParamsProps = {\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ typeSchemas }: GetParamsProps) {\n return FunctionParams.factory({\n config: {\n type: typeSchemas.request?.name\n ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }`\n : 'Partial<RequestConfig> & { client?: typeof fetch }',\n default: '{}',\n },\n })\n}\n\nexport function MutationOptions({ name, clientName, dataReturnType, typeSchemas, paramsCasing, paramsType, pathParamsType, mutationKeyName }: Props) {\n const params = getParams({ typeSchemas })\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'\n\n const clientParams = Client.getParams({\n typeSchemas,\n paramsCasing,\n paramsType,\n pathParamsType,\n isConfigurable: true,\n })\n\n const mutationKeyParams = MutationKey.getParams({\n pathParamsType,\n typeSchemas,\n })\n\n const mutationParams = FunctionParams.factory({\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n })\n\n const dataParams = FunctionParams.factory({\n data: {\n // No use of pathParams because useMutation can only take one argument in object form,\n // see https://tanstack.com/query/latest/docs/framework/react/reference/useMutation#usemutation\n mode: 'object',\n children: Object.entries(mutationParams.params).reduce((acc, [key, value]) => {\n if (value) {\n acc[key] = {\n ...value,\n type: undefined,\n }\n }\n\n return acc\n }, {} as Params),\n },\n })\n\n const TRequest = mutationParams.toConstructor()\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function name={name} export params={params.toConstructor()}>\n {`\n const mutationKey = ${mutationKeyName}(${mutationKeyParams.toCall()})\n return mutationOptions<${TData}, ResponseErrorConfig<${TError}>, ${TRequest ? `{${TRequest}}` : 'void'}, typeof mutationKey>({\n mutationKey,\n mutationFn: async(${dataParams.toConstructor()}) => {\n return ${clientName}(${clientParams.toCall()})\n },\n })\n`}\n </Function>\n </File.Source>\n )\n}\n\nMutationOptions.getParams = getParams\n","import { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\nimport type { ReactNode } from 'react'\nimport type { PluginReactQuery } from '../types.ts'\nimport { MutationKey } from './MutationKey.tsx'\nimport { MutationOptions } from './MutationOptions.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n typeName: string\n mutationOptionsName: string\n mutationKeyName: string\n typeSchemas: OperationSchemas\n operation: Operation\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsCasing, dataReturnType, typeSchemas }: GetParamsProps) {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const mutationParams = FunctionParams.factory({\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n })\n const TRequest = mutationParams.toConstructor()\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n const generics = [TData, TError, TRequest ? `{${TRequest}}` : 'void', 'TContext'].join(', ')\n\n return FunctionParams.factory({\n options: {\n type: `\n{\n mutation?: UseMutationOptions<${generics}> & { client?: QueryClient },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'},\n}\n`,\n default: '{}',\n },\n })\n}\n\nexport function Mutation({\n name,\n mutationOptionsName,\n paramsCasing,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n operation,\n mutationKeyName,\n}: Props): ReactNode {\n const mutationKeyParams = MutationKey.getParams({\n pathParamsType,\n typeSchemas,\n })\n\n const params = getParams({\n paramsCasing,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n })\n\n const mutationParams = FunctionParams.factory({\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n })\n\n const mutationOptionsParams = MutationOptions.getParams({ typeSchemas })\n\n const TRequest = mutationParams.toConstructor()\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n const returnType = `UseMutationOptions<${[TData, TError, TRequest ? `{${TRequest}}` : 'void', 'TContext'].join(', ')}>`\n\n const mutationOptions = `${mutationOptionsName}(${mutationOptionsParams.toCall()})`\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function\n name={name}\n export\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n generics={['TContext']}\n >\n {`\n const { mutation = {}, client: config = {} } = options ?? {}\n const { client: queryClient, ...mutationOptions } = mutation;\n const mutationKey = mutationOptions.mutationKey ?? ${mutationKeyName}(${mutationKeyParams.toCall()})\n\n return useMutation({\n ...${mutationOptions},\n mutationKey,\n ...mutationOptions\n } as unknown as UseMutationOptions, queryClient) as ${returnType}\n `}\n </Function>\n </File.Source>\n )\n}\n","import { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\nimport type { ReactNode } from 'react'\nimport type { PluginReactQuery } from '../types.ts'\nimport { QueryKey } from './QueryKey.tsx'\nimport { QueryOptions } from './QueryOptions.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n queryOptionsName: string\n queryKeyName: string\n queryKeyTypeName: string\n typeSchemas: OperationSchemas\n operation: Operation\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }: GetParamsProps) {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n if (paramsType === 'object') {\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n options: {\n type: `\n{\n query?: Partial<QueryObserverOptions<${[TData, TError, 'TData', 'TQueryData', 'TQueryKey'].join(', ')}>> & { client?: QueryClient },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'}\n}\n`,\n default: '{}',\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n optional: isOptional(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n options: {\n type: `\n{\n query?: Partial<QueryObserverOptions<${[TData, TError, 'TData', 'TQueryData', 'TQueryKey'].join(', ')}>> & { client?: QueryClient },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'}\n}\n`,\n default: '{}',\n },\n })\n}\n\nexport function Query({\n name,\n queryKeyTypeName,\n queryOptionsName,\n queryKeyName,\n paramsType,\n paramsCasing,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n operation,\n}: Props): ReactNode {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n const returnType = `UseQueryResult<${['TData', TError].join(', ')}> & { queryKey: TQueryKey }`\n const generics = [`TData = ${TData}`, `TQueryData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`]\n\n const queryKeyParams = QueryKey.getParams({\n pathParamsType,\n typeSchemas,\n paramsCasing,\n })\n const queryOptionsParams = QueryOptions.getParams({\n paramsType,\n pathParamsType,\n typeSchemas,\n paramsCasing,\n })\n const params = getParams({\n paramsCasing,\n paramsType,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n })\n\n const queryOptions = `${queryOptionsName}(${queryOptionsParams.toCall()})`\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function\n name={name}\n export\n generics={generics.join(', ')}\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n >\n {`\n const { query: queryConfig = {}, client: config = {} } = options ?? {}\n const { client: queryClient, ...queryOptions } = queryConfig\n const queryKey = queryOptions?.queryKey ?? ${queryKeyName}(${queryKeyParams.toCall()})\n\n const query = useQuery({\n ...${queryOptions},\n queryKey,\n ...queryOptions\n } as unknown as QueryObserverOptions, queryClient) as ${returnType}\n\n query.queryKey = queryKey as TQueryKey\n\n return query\n `}\n </Function>\n </File.Source>\n )\n}\n\nQuery.getParams = getParams\n","import { isOptional, type Operation } from '@kubb/oas'\nimport type { OperationSchemas } from '@kubb/plugin-oas'\nimport { getComments, getPathParams } from '@kubb/plugin-oas/utils'\nimport { File, Function, FunctionParams } from '@kubb/react'\nimport type { ReactNode } from 'react'\nimport type { PluginReactQuery } from '../types.ts'\nimport { QueryKey } from './QueryKey.tsx'\nimport { QueryOptions } from './QueryOptions.tsx'\n\ntype Props = {\n /**\n * Name of the function\n */\n name: string\n queryOptionsName: string\n queryKeyName: string\n queryKeyTypeName: string\n typeSchemas: OperationSchemas\n operation: Operation\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n}\n\ntype GetParamsProps = {\n paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing']\n paramsType: PluginReactQuery['resolvedOptions']['paramsType']\n pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType']\n dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType']\n typeSchemas: OperationSchemas\n}\n\nfunction getParams({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }: GetParamsProps) {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n\n if (paramsType === 'object') {\n return FunctionParams.factory({\n data: {\n mode: 'object',\n children: {\n ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n },\n },\n options: {\n type: `\n{\n query?: Partial<UseSuspenseQueryOptions<${[TData, TError, 'TData', 'TQueryKey'].join(', ')}>> & { client?: QueryClient },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'}\n}\n`,\n default: '{}',\n },\n })\n }\n\n return FunctionParams.factory({\n pathParams: typeSchemas.pathParams?.name\n ? {\n mode: pathParamsType === 'object' ? 'object' : 'inlineSpread',\n children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),\n optional: isOptional(typeSchemas.pathParams?.schema),\n }\n : undefined,\n data: typeSchemas.request?.name\n ? {\n type: typeSchemas.request?.name,\n optional: isOptional(typeSchemas.request?.schema),\n }\n : undefined,\n params: typeSchemas.queryParams?.name\n ? {\n type: typeSchemas.queryParams?.name,\n optional: isOptional(typeSchemas.queryParams?.schema),\n }\n : undefined,\n headers: typeSchemas.headerParams?.name\n ? {\n type: typeSchemas.headerParams?.name,\n optional: isOptional(typeSchemas.headerParams?.schema),\n }\n : undefined,\n options: {\n type: `\n{\n query?: Partial<UseSuspenseQueryOptions<${[TData, TError, 'TData', 'TQueryKey'].join(', ')}>> & { client?: QueryClient },\n client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>> & { client?: typeof fetch }` : 'Partial<RequestConfig> & { client?: typeof fetch }'}\n}\n`,\n default: '{}',\n },\n })\n}\n\n/**\n * Generates a strongly-typed React Query Suspense hook function for an OpenAPI operation.\n *\n * The generated function wraps `useSuspenseQuery`, providing type-safe parameters and return types based on the supplied OpenAPI schemas and configuration.\n *\n * @returns A React component source node containing the generated query function.\n */\nexport function SuspenseQuery({\n name,\n queryKeyTypeName,\n queryOptionsName,\n queryKeyName,\n paramsType,\n paramsCasing,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n operation,\n}: Props): ReactNode {\n const TData = dataReturnType === 'data' ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`\n const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(' | ') || 'Error'}>`\n const returnType = `UseSuspenseQueryResult<${['TData', TError].join(', ')}> & { queryKey: TQueryKey }`\n const generics = [`TData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`]\n\n const queryKeyParams = QueryKey.getParams({\n pathParamsType,\n typeSchemas,\n paramsCasing,\n })\n const queryOptionsParams = QueryOptions.getParams({\n paramsCasing,\n paramsType,\n pathParamsType,\n typeSchemas,\n })\n const params = getParams({\n paramsCasing,\n paramsType,\n pathParamsType,\n dataReturnType,\n typeSchemas,\n })\n\n const queryOptions = `${queryOptionsName}(${queryOptionsParams.toCall()})`\n\n return (\n <File.Source name={name} isExportable isIndexable>\n <Function\n name={name}\n export\n generics={generics.join(', ')}\n params={params.toConstructor()}\n JSDoc={{\n comments: getComments(operation),\n }}\n >\n {`\n const { query: queryConfig = {}, client: config = {} } = options ?? {}\n const { client: queryClient, ...queryOptions } = queryConfig\n const queryKey = queryOptions?.queryKey ?? ${queryKeyName}(${queryKeyParams.toCall()})\n\n const query = useSuspenseQuery({\n ...${queryOptions},\n queryKey,\n ...queryOptions\n } as unknown as UseSuspenseQueryOptions, queryClient) as ${returnType}\n\n query.queryKey = queryKey as TQueryKey\n\n return query\n `}\n </Function>\n </File.Source>\n )\n}\n\nSuspenseQuery.getParams = getParams\n"],"mappings":";;;;;;;;AAyBA,SAASA,YAAU,EAAE,gBAAgB,cAAc,eAA+B;AAChF,QAAO,eAAe,QAAQ;EAC5B,YAAY;GACV,MAAM,mBAAmB,WAAW,WAAW;GAC/C,UAAU,cAAc,YAAY,YAAY;IAAE,OAAO;IAAM,QAAQ;IAAc,CAAC;GACvF;EACD,MAAM,YAAY,SAAS,OACvB;GACE,MAAM,YAAY,SAAS;GAC3B,UAAU,WAAW,YAAY,SAAS,OAAO;GAClD,GACD;EACJ,QAAQ,YAAY,aAAa,OAC7B;GACE,MAAM,YAAY,aAAa;GAC/B,UAAU,WAAW,YAAY,aAAa,OAAO;GACtD,GACD;EACL,CAAC;;AAGJ,MAAMC,oBAA+B,EAAE,WAAW,SAAS,aAAa;AAWtE,QATa;EADA,IAAI,QAAQ,UAAU,MAAM,EAAE,QAAQ,CAAC,CAE7C,SAAS;GACZ,MAAM;GACN,WAAW;GACZ,CAAC;EACF,QAAQ,aAAa,OAAO,gCAAgC;EAC5D,QAAQ,SAAS,OAAO,4BAA4B;EACrD,CAAC,OAAO,QAAQ;;AAKnB,SAAgB,SAAS,EAAE,MAAM,aAAa,cAAc,gBAAgB,WAAW,UAAU,cAAcC,oBAAoC;CACjJ,MAAM,SAASF,YAAU;EAAE;EAAgB;EAAa;EAAc,CAAC;CACvE,MAAM,OAA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;IAM5D;GACC;;AAIlB,cAAc,YAAY"}
|
package/dist/components.cjs
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
const require_components = require('./components-
|
|
1
|
+
const require_components = require('./components-DkiO4xNZ.cjs');
|
|
2
2
|
|
|
3
3
|
exports.InfiniteQuery = require_components.InfiniteQuery;
|
|
4
4
|
exports.InfiniteQueryOptions = require_components.InfiniteQueryOptions;
|
|
5
5
|
exports.Mutation = require_components.Mutation;
|
|
6
6
|
exports.MutationKey = require_components.MutationKey;
|
|
7
|
+
exports.MutationOptions = require_components.MutationOptions;
|
|
7
8
|
exports.Query = require_components.Query;
|
|
8
9
|
exports.QueryKey = require_components.QueryKey;
|
|
9
10
|
exports.QueryOptions = require_components.QueryOptions;
|
package/dist/components.d.cts
CHANGED
|
@@ -45,80 +45,122 @@ declare class FunctionParams {
|
|
|
45
45
|
toConstructor(): string;
|
|
46
46
|
}
|
|
47
47
|
//#endregion
|
|
48
|
-
//#region src/components/
|
|
49
|
-
type Props$
|
|
48
|
+
//#region src/components/InfiniteQuery.d.ts
|
|
49
|
+
type Props$8 = {
|
|
50
50
|
/**
|
|
51
51
|
* Name of the function
|
|
52
52
|
*/
|
|
53
53
|
name: string;
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
54
|
+
queryOptionsName: string;
|
|
55
|
+
queryKeyName: string;
|
|
56
|
+
queryKeyTypeName: string;
|
|
57
57
|
typeSchemas: OperationSchemas;
|
|
58
58
|
operation: Operation;
|
|
59
|
-
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
60
59
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
61
60
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
62
61
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
62
|
+
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
63
|
+
queryParam?: Infinite['queryParam'];
|
|
63
64
|
};
|
|
64
|
-
|
|
65
|
+
type GetParamsProps$7 = {
|
|
66
|
+
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
67
|
+
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
68
|
+
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
69
|
+
typeSchemas: OperationSchemas;
|
|
70
|
+
pageParamGeneric: string;
|
|
71
|
+
};
|
|
72
|
+
declare function InfiniteQuery({
|
|
65
73
|
name,
|
|
66
|
-
|
|
67
|
-
|
|
74
|
+
queryKeyTypeName,
|
|
75
|
+
queryOptionsName,
|
|
76
|
+
queryKeyName,
|
|
68
77
|
paramsType,
|
|
78
|
+
paramsCasing,
|
|
69
79
|
pathParamsType,
|
|
70
80
|
dataReturnType,
|
|
71
81
|
typeSchemas,
|
|
72
82
|
operation,
|
|
73
|
-
|
|
74
|
-
}: Props$
|
|
83
|
+
queryParam
|
|
84
|
+
}: Props$8): ReactNode;
|
|
85
|
+
declare namespace InfiniteQuery {
|
|
86
|
+
var getParams: ({
|
|
87
|
+
paramsType,
|
|
88
|
+
paramsCasing,
|
|
89
|
+
pathParamsType,
|
|
90
|
+
typeSchemas,
|
|
91
|
+
pageParamGeneric
|
|
92
|
+
}: GetParamsProps$7) => FunctionParams;
|
|
93
|
+
}
|
|
75
94
|
//#endregion
|
|
76
|
-
//#region src/components/
|
|
77
|
-
type Props$
|
|
78
|
-
/**
|
|
79
|
-
* Name of the function
|
|
80
|
-
*/
|
|
95
|
+
//#region src/components/InfiniteQueryOptions.d.ts
|
|
96
|
+
type Props$7 = {
|
|
81
97
|
name: string;
|
|
82
|
-
|
|
98
|
+
clientName: string;
|
|
83
99
|
queryKeyName: string;
|
|
84
|
-
queryKeyTypeName: string;
|
|
85
100
|
typeSchemas: OperationSchemas;
|
|
86
|
-
operation: Operation;
|
|
87
101
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
88
102
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
89
103
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
90
104
|
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
105
|
+
initialPageParam: Infinite['initialPageParam'];
|
|
106
|
+
cursorParam: Infinite['cursorParam'];
|
|
107
|
+
queryParam: Infinite['queryParam'];
|
|
91
108
|
};
|
|
92
109
|
type GetParamsProps$6 = {
|
|
93
110
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
94
111
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
95
112
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
96
|
-
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
97
113
|
typeSchemas: OperationSchemas;
|
|
98
114
|
};
|
|
99
|
-
declare function
|
|
115
|
+
declare function InfiniteQueryOptions({
|
|
100
116
|
name,
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
117
|
+
clientName,
|
|
118
|
+
initialPageParam,
|
|
119
|
+
cursorParam,
|
|
120
|
+
typeSchemas,
|
|
105
121
|
paramsCasing,
|
|
106
|
-
|
|
122
|
+
paramsType,
|
|
107
123
|
dataReturnType,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
124
|
+
pathParamsType,
|
|
125
|
+
queryParam,
|
|
126
|
+
queryKeyName
|
|
127
|
+
}: Props$7): ReactNode;
|
|
128
|
+
declare namespace InfiniteQueryOptions {
|
|
112
129
|
var getParams: ({
|
|
113
130
|
paramsType,
|
|
114
131
|
paramsCasing,
|
|
115
132
|
pathParamsType,
|
|
116
|
-
dataReturnType,
|
|
117
133
|
typeSchemas
|
|
118
134
|
}: GetParamsProps$6) => FunctionParams;
|
|
119
135
|
}
|
|
120
136
|
//#endregion
|
|
121
|
-
//#region src/components/
|
|
137
|
+
//#region src/components/Mutation.d.ts
|
|
138
|
+
type Props$6 = {
|
|
139
|
+
/**
|
|
140
|
+
* Name of the function
|
|
141
|
+
*/
|
|
142
|
+
name: string;
|
|
143
|
+
typeName: string;
|
|
144
|
+
mutationOptionsName: string;
|
|
145
|
+
mutationKeyName: string;
|
|
146
|
+
typeSchemas: OperationSchemas;
|
|
147
|
+
operation: Operation;
|
|
148
|
+
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
149
|
+
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
150
|
+
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
151
|
+
};
|
|
152
|
+
declare function Mutation({
|
|
153
|
+
name,
|
|
154
|
+
mutationOptionsName,
|
|
155
|
+
paramsCasing,
|
|
156
|
+
pathParamsType,
|
|
157
|
+
dataReturnType,
|
|
158
|
+
typeSchemas,
|
|
159
|
+
operation,
|
|
160
|
+
mutationKeyName
|
|
161
|
+
}: Props$6): ReactNode;
|
|
162
|
+
//#endregion
|
|
163
|
+
//#region src/components/MutationKey.d.ts
|
|
122
164
|
type Props$5 = {
|
|
123
165
|
name: string;
|
|
124
166
|
typeName: string;
|
|
@@ -129,62 +171,64 @@ type Props$5 = {
|
|
|
129
171
|
transformer: Transformer | undefined;
|
|
130
172
|
};
|
|
131
173
|
type GetParamsProps$5 = {
|
|
132
|
-
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
133
174
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
134
175
|
typeSchemas: OperationSchemas;
|
|
135
176
|
};
|
|
136
|
-
declare function
|
|
177
|
+
declare function MutationKey({
|
|
137
178
|
name,
|
|
138
179
|
typeSchemas,
|
|
139
|
-
paramsCasing,
|
|
140
180
|
pathParamsType,
|
|
181
|
+
paramsCasing,
|
|
141
182
|
operation,
|
|
142
183
|
typeName,
|
|
143
184
|
transformer
|
|
144
185
|
}: Props$5): ReactNode;
|
|
145
|
-
declare namespace
|
|
146
|
-
var getParams: ({
|
|
147
|
-
pathParamsType,
|
|
148
|
-
paramsCasing,
|
|
149
|
-
typeSchemas
|
|
150
|
-
}: GetParamsProps$5) => FunctionParams;
|
|
186
|
+
declare namespace MutationKey {
|
|
187
|
+
var getParams: ({}: GetParamsProps$5) => FunctionParams;
|
|
151
188
|
var getTransformer: Transformer;
|
|
152
189
|
}
|
|
153
190
|
//#endregion
|
|
154
|
-
//#region src/components/
|
|
191
|
+
//#region src/components/MutationOptions.d.ts
|
|
155
192
|
type Props$4 = {
|
|
156
193
|
name: string;
|
|
157
|
-
|
|
194
|
+
clientName: string;
|
|
195
|
+
mutationKeyName: string;
|
|
158
196
|
typeSchemas: OperationSchemas;
|
|
159
|
-
operation: Operation;
|
|
160
197
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
198
|
+
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
161
199
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
162
|
-
|
|
200
|
+
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
163
201
|
};
|
|
164
202
|
type GetParamsProps$4 = {
|
|
165
|
-
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
166
203
|
typeSchemas: OperationSchemas;
|
|
167
204
|
};
|
|
168
|
-
declare function
|
|
205
|
+
declare function MutationOptions({
|
|
169
206
|
name,
|
|
207
|
+
clientName,
|
|
208
|
+
dataReturnType,
|
|
170
209
|
typeSchemas,
|
|
171
|
-
pathParamsType,
|
|
172
210
|
paramsCasing,
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
}: Props$4):
|
|
177
|
-
declare namespace
|
|
178
|
-
var getParams: ({
|
|
179
|
-
|
|
211
|
+
paramsType,
|
|
212
|
+
pathParamsType,
|
|
213
|
+
mutationKeyName
|
|
214
|
+
}: Props$4): any;
|
|
215
|
+
declare namespace MutationOptions {
|
|
216
|
+
var getParams: ({
|
|
217
|
+
typeSchemas
|
|
218
|
+
}: GetParamsProps$4) => FunctionParams;
|
|
180
219
|
}
|
|
181
220
|
//#endregion
|
|
182
|
-
//#region src/components/
|
|
221
|
+
//#region src/components/Query.d.ts
|
|
183
222
|
type Props$3 = {
|
|
223
|
+
/**
|
|
224
|
+
* Name of the function
|
|
225
|
+
*/
|
|
184
226
|
name: string;
|
|
185
|
-
|
|
227
|
+
queryOptionsName: string;
|
|
186
228
|
queryKeyName: string;
|
|
229
|
+
queryKeyTypeName: string;
|
|
187
230
|
typeSchemas: OperationSchemas;
|
|
231
|
+
operation: Operation;
|
|
188
232
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
189
233
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
190
234
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
@@ -194,110 +238,96 @@ type GetParamsProps$3 = {
|
|
|
194
238
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
195
239
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
196
240
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
241
|
+
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
197
242
|
typeSchemas: OperationSchemas;
|
|
198
243
|
};
|
|
199
|
-
declare function
|
|
244
|
+
declare function Query({
|
|
200
245
|
name,
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
paramsCasing,
|
|
246
|
+
queryKeyTypeName,
|
|
247
|
+
queryOptionsName,
|
|
248
|
+
queryKeyName,
|
|
205
249
|
paramsType,
|
|
250
|
+
paramsCasing,
|
|
206
251
|
pathParamsType,
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
252
|
+
dataReturnType,
|
|
253
|
+
typeSchemas,
|
|
254
|
+
operation
|
|
255
|
+
}: Props$3): ReactNode;
|
|
256
|
+
declare namespace Query {
|
|
210
257
|
var getParams: ({
|
|
211
258
|
paramsType,
|
|
212
259
|
paramsCasing,
|
|
213
260
|
pathParamsType,
|
|
261
|
+
dataReturnType,
|
|
214
262
|
typeSchemas
|
|
215
263
|
}: GetParamsProps$3) => FunctionParams;
|
|
216
264
|
}
|
|
217
265
|
//#endregion
|
|
218
|
-
//#region src/components/
|
|
266
|
+
//#region src/components/QueryKey.d.ts
|
|
219
267
|
type Props$2 = {
|
|
220
268
|
name: string;
|
|
221
|
-
|
|
222
|
-
queryKeyName: string;
|
|
269
|
+
typeName: string;
|
|
223
270
|
typeSchemas: OperationSchemas;
|
|
271
|
+
operation: Operation;
|
|
224
272
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
225
|
-
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
226
273
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
227
|
-
|
|
228
|
-
initialPageParam: Infinite['initialPageParam'];
|
|
229
|
-
cursorParam: Infinite['cursorParam'];
|
|
230
|
-
queryParam: Infinite['queryParam'];
|
|
274
|
+
transformer: Transformer | undefined;
|
|
231
275
|
};
|
|
232
276
|
type GetParamsProps$2 = {
|
|
233
277
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
234
|
-
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
235
278
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
236
279
|
typeSchemas: OperationSchemas;
|
|
237
280
|
};
|
|
238
|
-
declare function
|
|
281
|
+
declare function QueryKey({
|
|
239
282
|
name,
|
|
240
|
-
clientName,
|
|
241
|
-
initialPageParam,
|
|
242
|
-
cursorParam,
|
|
243
283
|
typeSchemas,
|
|
244
284
|
paramsCasing,
|
|
245
|
-
paramsType,
|
|
246
|
-
dataReturnType,
|
|
247
285
|
pathParamsType,
|
|
248
|
-
|
|
249
|
-
|
|
286
|
+
operation,
|
|
287
|
+
typeName,
|
|
288
|
+
transformer
|
|
250
289
|
}: Props$2): ReactNode;
|
|
251
|
-
declare namespace
|
|
290
|
+
declare namespace QueryKey {
|
|
252
291
|
var getParams: ({
|
|
253
|
-
paramsType,
|
|
254
|
-
paramsCasing,
|
|
255
292
|
pathParamsType,
|
|
293
|
+
paramsCasing,
|
|
256
294
|
typeSchemas
|
|
257
295
|
}: GetParamsProps$2) => FunctionParams;
|
|
296
|
+
var getTransformer: Transformer;
|
|
258
297
|
}
|
|
259
298
|
//#endregion
|
|
260
|
-
//#region src/components/
|
|
299
|
+
//#region src/components/QueryOptions.d.ts
|
|
261
300
|
type Props$1 = {
|
|
262
|
-
/**
|
|
263
|
-
* Name of the function
|
|
264
|
-
*/
|
|
265
301
|
name: string;
|
|
266
|
-
|
|
302
|
+
clientName: string;
|
|
267
303
|
queryKeyName: string;
|
|
268
|
-
queryKeyTypeName: string;
|
|
269
304
|
typeSchemas: OperationSchemas;
|
|
270
|
-
operation: Operation;
|
|
271
305
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
272
306
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
273
307
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
274
308
|
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
275
309
|
};
|
|
276
310
|
type GetParamsProps$1 = {
|
|
277
|
-
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
278
311
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
312
|
+
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
279
313
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
280
|
-
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
281
314
|
typeSchemas: OperationSchemas;
|
|
282
315
|
};
|
|
283
|
-
declare function
|
|
316
|
+
declare function QueryOptions({
|
|
284
317
|
name,
|
|
285
|
-
|
|
286
|
-
queryOptionsName,
|
|
287
|
-
queryKeyName,
|
|
288
|
-
paramsType,
|
|
289
|
-
paramsCasing,
|
|
290
|
-
pathParamsType,
|
|
318
|
+
clientName,
|
|
291
319
|
dataReturnType,
|
|
292
320
|
typeSchemas,
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
321
|
+
paramsCasing,
|
|
322
|
+
paramsType,
|
|
323
|
+
pathParamsType,
|
|
324
|
+
queryKeyName
|
|
325
|
+
}: Props$1): any;
|
|
326
|
+
declare namespace QueryOptions {
|
|
296
327
|
var getParams: ({
|
|
297
328
|
paramsType,
|
|
298
329
|
paramsCasing,
|
|
299
330
|
pathParamsType,
|
|
300
|
-
dataReturnType,
|
|
301
331
|
typeSchemas
|
|
302
332
|
}: GetParamsProps$1) => FunctionParams;
|
|
303
333
|
}
|
|
@@ -354,5 +384,5 @@ declare namespace SuspenseQuery {
|
|
|
354
384
|
}: GetParamsProps) => FunctionParams;
|
|
355
385
|
}
|
|
356
386
|
//#endregion
|
|
357
|
-
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions, SuspenseQuery };
|
|
387
|
+
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, MutationOptions, Query, QueryKey, QueryOptions, SuspenseQuery };
|
|
358
388
|
//# sourceMappingURL=components.d.cts.map
|