@kubb/plugin-react-query 3.3.4 → 3.4.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.
Files changed (45) hide show
  1. package/dist/{chunk-E3OIYQYU.cjs → chunk-5YNH6XF6.cjs} +91 -50
  2. package/dist/chunk-5YNH6XF6.cjs.map +1 -0
  3. package/dist/{chunk-E2B6N4YU.js → chunk-7R7Q7R3I.js} +12 -9
  4. package/dist/chunk-7R7Q7R3I.js.map +1 -0
  5. package/dist/{chunk-2DRP6UH5.js → chunk-HAEHUITJ.js} +91 -50
  6. package/dist/chunk-HAEHUITJ.js.map +1 -0
  7. package/dist/{chunk-IEUCUNMI.cjs → chunk-KWKS56G3.cjs} +27 -24
  8. package/dist/chunk-KWKS56G3.cjs.map +1 -0
  9. package/dist/components.cjs +9 -9
  10. package/dist/components.d.cts +2 -1
  11. package/dist/components.d.ts +2 -1
  12. package/dist/components.js +1 -1
  13. package/dist/generators.cjs +6 -6
  14. package/dist/generators.js +2 -2
  15. package/dist/index.cjs +5 -5
  16. package/dist/index.js +2 -2
  17. package/package.json +12 -12
  18. package/src/components/InfiniteQuery.tsx +5 -3
  19. package/src/components/InfiniteQueryOptions.tsx +5 -2
  20. package/src/components/Mutation.tsx +4 -6
  21. package/src/components/Query.tsx +5 -3
  22. package/src/components/QueryOptions.tsx +6 -4
  23. package/src/components/SuspenseQuery.tsx +5 -3
  24. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +10 -5
  25. package/src/generators/__snapshots__/clientGetImportPath.ts +5 -5
  26. package/src/generators/__snapshots__/clientPostImportPath.ts +4 -4
  27. package/src/generators/__snapshots__/findByTags.ts +5 -5
  28. package/src/generators/__snapshots__/findByTagsObject.ts +5 -5
  29. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +5 -5
  30. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +5 -5
  31. package/src/generators/__snapshots__/findByTagsWithZod.ts +5 -5
  32. package/src/generators/__snapshots__/findInfiniteByTags.ts +5 -5
  33. package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +5 -5
  34. package/src/generators/__snapshots__/getPetIdCamelCase.ts +9 -5
  35. package/src/generators/__snapshots__/postAsQuery.ts +5 -5
  36. package/src/generators/__snapshots__/updatePetById.ts +4 -4
  37. package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +4 -4
  38. package/src/generators/infiniteQueryGenerator.tsx +1 -1
  39. package/src/generators/mutationGenerator.tsx +1 -2
  40. package/src/generators/queryGenerator.tsx +2 -2
  41. package/src/generators/suspenseQueryGenerator.tsx +4 -1
  42. package/dist/chunk-2DRP6UH5.js.map +0 -1
  43. package/dist/chunk-E2B6N4YU.js.map +0 -1
  44. package/dist/chunk-E3OIYQYU.cjs.map +0 -1
  45. package/dist/chunk-IEUCUNMI.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { QueryKey, Client, QueryOptions, Query, MutationKey, Mutation, InfiniteQueryOptions, InfiniteQuery, SuspenseQuery } from './chunk-2DRP6UH5.js';
1
+ import { QueryKey, Client, QueryOptions, Query, MutationKey, Mutation, InfiniteQueryOptions, InfiniteQuery, SuspenseQuery } from './chunk-HAEHUITJ.js';
2
2
  import { createReactGenerator } from '@kubb/plugin-oas';
3
3
  import { useOperationManager } from '@kubb/plugin-oas/hooks';
4
4
  import { pluginTsName } from '@kubb/plugin-ts';
@@ -51,7 +51,7 @@ var queryGenerator = createReactGenerator({
51
51
  return /* @__PURE__ */ jsxs(File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
52
52
  options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
53
53
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
54
- /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig"], path: options.client.importPath, isTypeOnly: true }),
54
+ /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
55
55
  options.client.dataReturnType === "full" && /* @__PURE__ */ jsx(File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
56
56
  /* @__PURE__ */ jsx(
57
57
  File.Import,
@@ -108,7 +108,8 @@ var queryGenerator = createReactGenerator({
108
108
  typeSchemas: type.schemas,
109
109
  paramsCasing: options.paramsCasing,
110
110
  paramsType: options.paramsType,
111
- pathParamsType: options.pathParamsType
111
+ pathParamsType: options.pathParamsType,
112
+ dataReturnType: options.client.dataReturnType
112
113
  }
113
114
  ),
114
115
  options.query && /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -172,7 +173,7 @@ var mutationGenerator = createReactGenerator({
172
173
  return /* @__PURE__ */ jsxs(File, { baseName: mutation.file.baseName, path: mutation.file.path, meta: mutation.file.meta, banner: output?.banner, footer: output?.footer, children: [
173
174
  options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
174
175
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
175
- /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig", "ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
176
+ /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig", "ResponseConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
176
177
  /* @__PURE__ */ jsx(
177
178
  File.Import,
178
179
  {
@@ -285,7 +286,7 @@ var infiniteQueryGenerator = createReactGenerator({
285
286
  return /* @__PURE__ */ jsxs(File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
286
287
  options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
287
288
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
288
- /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig"], path: options.client.importPath, isTypeOnly: true }),
289
+ /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
289
290
  options.client.dataReturnType === "full" && /* @__PURE__ */ jsx(File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
290
291
  /* @__PURE__ */ jsx(
291
292
  File.Import,
@@ -419,7 +420,7 @@ var suspenseQueryGenerator = createReactGenerator({
419
420
  return /* @__PURE__ */ jsxs(File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
420
421
  options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
421
422
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
422
- /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig"], path: options.client.importPath, isTypeOnly: true }),
423
+ /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
423
424
  options.client.dataReturnType === "full" && /* @__PURE__ */ jsx(File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
424
425
  /* @__PURE__ */ jsx(
425
426
  File.Import,
@@ -476,12 +477,14 @@ var suspenseQueryGenerator = createReactGenerator({
476
477
  typeSchemas: type.schemas,
477
478
  paramsCasing: options.paramsCasing,
478
479
  paramsType: options.paramsType,
479
- pathParamsType: options.pathParamsType
480
+ pathParamsType: options.pathParamsType,
481
+ dataReturnType: options.client.dataReturnType
480
482
  }
481
483
  ),
482
484
  options.suspense && /* @__PURE__ */ jsxs(Fragment, { children: [
483
485
  /* @__PURE__ */ jsx(File.Import, { name: ["useSuspenseQuery"], path: importPath }),
484
486
  /* @__PURE__ */ jsx(File.Import, { name: ["QueryKey", "UseSuspenseQueryOptions", "UseSuspenseQueryResult"], path: importPath, isTypeOnly: true }),
487
+ options.client.dataReturnType === "full" && /* @__PURE__ */ jsx(File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
485
488
  /* @__PURE__ */ jsx(
486
489
  SuspenseQuery,
487
490
  {
@@ -503,5 +506,5 @@ var suspenseQueryGenerator = createReactGenerator({
503
506
  });
504
507
 
505
508
  export { infiniteQueryGenerator, mutationGenerator, queryGenerator, suspenseQueryGenerator };
506
- //# sourceMappingURL=chunk-E2B6N4YU.js.map
507
- //# sourceMappingURL=chunk-E2B6N4YU.js.map
509
+ //# sourceMappingURL=chunk-7R7Q7R3I.js.map
510
+ //# sourceMappingURL=chunk-7R7Q7R3I.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx","../src/generators/suspenseQueryGenerator.tsx"],"names":["createReactGenerator","useApp","useOperationManager","difference","pluginTsName","pluginZodName","jsxs","File","jsx","Fragment"],"mappings":";;;;;;;;;AAUO,IAAM,iBAAiB,oBAAuC,CAAA;AAAA,EACnE,IAAM,EAAA,aAAA;AAAA,EACN,SAAU,CAAA,EAAE,OAAS,EAAA,SAAA,EAAa,EAAA;AAChC,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,OAAA,EAAS,EAAE,MAAO;AAAA;AACpB,QACE,MAAyB,EAAA;AAC7B,IAAA,MAAM,EAAE,UAAA,EAAY,OAAS,EAAA,OAAA,KAAY,mBAAoB,EAAA;AAE7D,IAAA,MAAM,OAAU,GAAA,OAAO,OAAQ,CAAA,KAAA,KAAU,YAAY,IAAO,GAAA,OAAA,CAAQ,KAAO,EAAA,OAAA,CAAQ,IAAK,CAAA,CAAC,MAAW,KAAA,SAAA,CAAU,WAAW,MAAM,CAAA;AAC/H,IAAA,MAAM,aAAa,UAAW,CAAA,OAAA,CAAQ,QAAW,GAAA,OAAA,CAAQ,SAAS,OAAU,GAAA,EAAI,EAAA,OAAA,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C,UAAY,EAAA,yBAAA,EAA2B,wBAAwB,CAAA,EAAG,IAAM,EAAA,UAAA,EAAY,YAAU,IAAC,EAAA,CAAA;AAAA,QAClH,QAAQ,MAAO,CAAA,cAAA,KAAmB,0BAAUC,GAAAA,CAACD,KAAK,MAAL,EAAA,EAAY,IAAM,EAAA,CAAC,gBAAgB,CAAG,EAAA,IAAA,EAAM,QAAQ,MAAO,CAAA,UAAA,EAAY,YAAU,IAAC,EAAA,CAAA;AAAA,wBAEhIC,GAAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,MAAM,KAAM,CAAA,IAAA;AAAA,YACZ,kBAAkB,YAAa,CAAA,IAAA;AAAA,YAC/B,aAAa,IAAK,CAAA,OAAA;AAAA,YAClB,YAAY,OAAQ,CAAA,UAAA;AAAA,YACpB,cAAc,OAAQ,CAAA,YAAA;AAAA,YACtB,gBAAgB,OAAQ,CAAA,cAAA;AAAA,YACxB,SAAA;AAAA,YACA,cAAA,EAAgB,QAAQ,MAAO,CAAA,cAAA;AAAA,YAC/B,cAAc,QAAS,CAAA,IAAA;AAAA,YACvB,kBAAkB,QAAS,CAAA;AAAA;AAAA;AAC7B,OACF,EAAA;AAAA,KAEJ,EAAA,CAAA;AAAA;AAGN,CAAC","file":"chunk-7R7Q7R3I.js","sourcesContent":["import { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginReactQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function' }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'QueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'QueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'QueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || isMutation) {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.queryKey}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryObserverOptions', 'UseQueryResult']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginReactQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/react-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function' }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation) {\n return null\n }\n\n return (\n <File baseName={mutation.file.baseName} path={mutation.file.path} meta={mutation.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={mutation.file.path} path={zod.file.path} />}\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.mutationKey}\n />\n\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['UseMutationOptions']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-infinite-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginReactQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const isInfinite = !!options.infinite\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function' }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'InfiniteQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'InfiniteQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'InfiniteQueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || isMutation || !isInfinite) {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n {options.infinite && (\n <>\n <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n cursorParam={options.infinite.cursorParam}\n initialPageParam={options.infinite.initialPageParam}\n queryParam={options.infinite.queryParam}\n />\n </>\n )}\n {options.infinite && (\n <>\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryResult']} path={importPath} isTypeOnly />\n <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { QueryKey, QueryOptions, SuspenseQuery } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const suspenseQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-suspense-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginReactQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const isSuspense = !!options.suspense\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'suspense' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'suspense' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function' }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'SuspenseQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'SuspenseQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'SuspenseQueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || isMutation || !isSuspense) {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.suspense && (\n <>\n <File.Import name={['useSuspenseQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'UseSuspenseQueryOptions', 'UseSuspenseQueryResult']} path={importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n\n <SuspenseQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"]}
@@ -6,6 +6,31 @@ import { jsx, jsxs, Fragment } from '@kubb/react/jsx-runtime';
6
6
 
7
7
  // src/components/Mutation.tsx
8
8
  function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
9
+ if (paramsType === "object") {
10
+ return FunctionParams.factory({
11
+ data: {
12
+ mode: "object",
13
+ children: {
14
+ ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing })
15
+ }
16
+ }
17
+ });
18
+ }
19
+ return FunctionParams.factory({
20
+ pathParams: typeSchemas.pathParams?.name ? {
21
+ mode: pathParamsType === "object" ? "object" : "inlineSpread",
22
+ children: getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
23
+ optional: isOptional(typeSchemas.pathParams?.schema)
24
+ } : void 0
25
+ });
26
+ }
27
+ function Url({ name, isExportable = true, isIndexable = true, typeSchemas, baseURL, paramsType, paramsCasing, pathParamsType, operation }) {
28
+ const path = new URLPath(operation.path, { casing: paramsCasing });
29
+ const params = getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas });
30
+ return /* @__PURE__ */ jsx(File.Source, { name, isExportable, isIndexable, children: /* @__PURE__ */ jsx(Function, { name, export: isExportable, params: params.toConstructor(), children: baseURL ? `return new URL(${path.template.toString()}, '${baseURL}')` : `return new URL(${path.template.toString()})` }) });
31
+ }
32
+ Url.getParams = getParams;
33
+ function getParams2({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
9
34
  if (paramsType === "object") {
10
35
  return FunctionParams.factory({
11
36
  data: {
@@ -68,7 +93,8 @@ function Client({
68
93
  paramsType,
69
94
  paramsCasing,
70
95
  pathParamsType,
71
- operation
96
+ operation,
97
+ urlName
72
98
  }) {
73
99
  const path = new URLPath(operation.path, { casing: paramsCasing });
74
100
  const contentType = operation.getContentType();
@@ -77,12 +103,15 @@ function Client({
77
103
  contentType !== "application/json" ? `'Content-Type': '${contentType}'` : void 0,
78
104
  typeSchemas.headerParams?.name ? "...headers" : void 0
79
105
  ].filter(Boolean);
80
- const generics = [
81
- typeSchemas.response.name,
82
- typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error",
83
- typeSchemas.request?.name || "unknown"
84
- ].filter(Boolean);
85
- const params = getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas });
106
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
107
+ const generics = [typeSchemas.response.name, TError, typeSchemas.request?.name || "unknown"].filter(Boolean);
108
+ const params = getParams2({ paramsType, paramsCasing, pathParamsType, typeSchemas });
109
+ const urlParams = Url.getParams({
110
+ paramsType,
111
+ paramsCasing,
112
+ pathParamsType,
113
+ typeSchemas
114
+ });
86
115
  const clientParams = FunctionParams.factory({
87
116
  config: {
88
117
  mode: "object",
@@ -91,9 +120,9 @@ function Client({
91
120
  value: JSON.stringify(operation.method.toUpperCase())
92
121
  },
93
122
  url: {
94
- value: path.template
123
+ value: urlName ? `${urlName}(${urlParams.toCall()}).toString()` : path.template
95
124
  },
96
- baseURL: baseURL ? {
125
+ baseURL: baseURL && !urlName ? {
97
126
  value: JSON.stringify(baseURL)
98
127
  } : void 0,
99
128
  params: typeSchemas.queryParams?.name ? {} : void 0,
@@ -142,8 +171,8 @@ function Client({
142
171
  }
143
172
  ) });
144
173
  }
145
- Client.getParams = getParams;
146
- function getParams2({}) {
174
+ Client.getParams = getParams2;
175
+ function getParams3({}) {
147
176
  return FunctionParams.factory({});
148
177
  }
149
178
  var getTransformer = ({ operation, casing }) => {
@@ -151,16 +180,16 @@ var getTransformer = ({ operation, casing }) => {
151
180
  return [JSON.stringify({ url: path.path })].filter(Boolean);
152
181
  };
153
182
  function MutationKey({ name, typeSchemas, pathParamsType, paramsCasing, operation, typeName, transformer = getTransformer }) {
154
- const params = getParams2({ pathParamsType, typeSchemas });
183
+ const params = getParams3({ pathParamsType, typeSchemas });
155
184
  const keys = transformer({ operation, schemas: typeSchemas, casing: paramsCasing });
156
185
  return /* @__PURE__ */ jsxs(Fragment, { children: [
157
186
  /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function.Arrow, { name, export: true, params: params.toConstructor(), singleLine: true, children: `[${keys.join(", ")}] as const` }) }),
158
187
  /* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` }) })
159
188
  ] });
160
189
  }
161
- MutationKey.getParams = getParams2;
190
+ MutationKey.getParams = getParams3;
162
191
  MutationKey.getTransformer = getTransformer;
163
- function getParams3({ paramsCasing, dataReturnType, typeSchemas }) {
192
+ function getParams4({ paramsCasing, dataReturnType, typeSchemas }) {
164
193
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
165
194
  const mutationParams = FunctionParams.factory({
166
195
  ...getPathParams(typeSchemas.pathParams, { typed: true, casing: paramsCasing }),
@@ -178,7 +207,8 @@ function getParams3({ paramsCasing, dataReturnType, typeSchemas }) {
178
207
  } : void 0
179
208
  });
180
209
  const TRequest = mutationParams.toConstructor({ valueAsType: true });
181
- const generics = [TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", TRequest ? `{${TRequest}}` : void 0].filter(Boolean).join(", ");
210
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
211
+ const generics = [TData, TError, TRequest ? `{${TRequest}}` : void 0].filter(Boolean).join(", ");
182
212
  return FunctionParams.factory({
183
213
  options: {
184
214
  type: `
@@ -206,7 +236,7 @@ function Mutation({
206
236
  pathParamsType,
207
237
  typeSchemas
208
238
  });
209
- const params = getParams3({
239
+ const params = getParams4({
210
240
  paramsCasing,
211
241
  pathParamsType,
212
242
  dataReturnType,
@@ -251,7 +281,8 @@ function Mutation({
251
281
  });
252
282
  const TRequest = mutationParams.toConstructor({ valueAsType: true });
253
283
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
254
- const generics = [TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", TRequest ? `{${TRequest}}` : void 0].filter(Boolean).join(", ");
284
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
285
+ const generics = [TData, TError, TRequest ? `{${TRequest}}` : void 0].filter(Boolean).join(", ");
255
286
  return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(
256
287
  Function,
257
288
  {
@@ -276,7 +307,7 @@ function Mutation({
276
307
  }
277
308
  ) });
278
309
  }
279
- function getParams4({ pathParamsType, paramsCasing, typeSchemas }) {
310
+ function getParams5({ pathParamsType, paramsCasing, typeSchemas }) {
280
311
  return FunctionParams.factory({
281
312
  pathParams: {
282
313
  mode: pathParamsType === "object" ? "object" : "inlineSpread",
@@ -305,7 +336,7 @@ var getTransformer2 = ({ operation, schemas, casing }) => {
305
336
  return keys;
306
337
  };
307
338
  function QueryKey({ name, typeSchemas, paramsCasing, pathParamsType, operation, typeName, transformer = getTransformer2 }) {
308
- const params = getParams4({ pathParamsType, typeSchemas, paramsCasing });
339
+ const params = getParams5({ pathParamsType, typeSchemas, paramsCasing });
309
340
  const keys = transformer({
310
341
  operation,
311
342
  schemas: typeSchemas,
@@ -316,9 +347,9 @@ function QueryKey({ name, typeSchemas, paramsCasing, pathParamsType, operation,
316
347
  /* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` }) })
317
348
  ] });
318
349
  }
319
- QueryKey.getParams = getParams4;
350
+ QueryKey.getParams = getParams5;
320
351
  QueryKey.getTransformer = getTransformer2;
321
- function getParams5({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
352
+ function getParams6({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
322
353
  if (paramsType === "object") {
323
354
  return FunctionParams.factory({
324
355
  data: {
@@ -369,8 +400,10 @@ function getParams5({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
369
400
  }
370
401
  });
371
402
  }
372
- function QueryOptions({ name, clientName, typeSchemas, paramsCasing, paramsType, pathParamsType, queryKeyName }) {
373
- const params = getParams5({ paramsType, paramsCasing, pathParamsType, typeSchemas });
403
+ function QueryOptions({ name, clientName, dataReturnType, typeSchemas, paramsCasing, paramsType, pathParamsType, queryKeyName }) {
404
+ const params = getParams6({ paramsType, paramsCasing, pathParamsType, typeSchemas });
405
+ const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
406
+ const TError = typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error";
374
407
  const clientParams = Client.getParams({
375
408
  typeSchemas,
376
409
  paramsCasing,
@@ -386,7 +419,7 @@ function QueryOptions({ name, clientName, typeSchemas, paramsCasing, paramsType,
386
419
  const enabledText = enabled ? `enabled: !!(${enabled}),` : "";
387
420
  return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, params: params.toConstructor(), children: `
388
421
  const queryKey = ${queryKeyName}(${queryKeyParams.toCall()})
389
- return queryOptions({
422
+ return queryOptions<${TData}, ResponseErrorConfig<${TError}>, ${TData}, typeof queryKey>({
390
423
  ${enabledText}
391
424
  queryKey,
392
425
  queryFn: async ({ signal }) => {
@@ -396,9 +429,10 @@ function QueryOptions({ name, clientName, typeSchemas, paramsCasing, paramsType,
396
429
  })
397
430
  ` }) });
398
431
  }
399
- QueryOptions.getParams = getParams5;
400
- function getParams6({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }) {
432
+ QueryOptions.getParams = getParams6;
433
+ function getParams7({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }) {
401
434
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
435
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
402
436
  if (paramsType === "object") {
403
437
  return FunctionParams.factory({
404
438
  data: {
@@ -422,7 +456,7 @@ function getParams6({ paramsType, paramsCasing, pathParamsType, dataReturnType,
422
456
  options: {
423
457
  type: `
424
458
  {
425
- query?: Partial<QueryObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
459
+ query?: Partial<QueryObserverOptions<${[TData, TError, "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
426
460
  client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
427
461
  }
428
462
  `,
@@ -451,7 +485,7 @@ function getParams6({ paramsType, paramsCasing, pathParamsType, dataReturnType,
451
485
  options: {
452
486
  type: `
453
487
  {
454
- query?: Partial<QueryObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
488
+ query?: Partial<QueryObserverOptions<${[TData, TError, "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
455
489
  client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
456
490
  }
457
491
  `,
@@ -472,7 +506,8 @@ function Query({
472
506
  operation
473
507
  }) {
474
508
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
475
- const returnType = `UseQueryResult<${["TData", typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"].join(", ")}> & { queryKey: TQueryKey }`;
509
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
510
+ const returnType = `UseQueryResult<${["TData", TError].join(", ")}> & { queryKey: TQueryKey }`;
476
511
  const generics = [`TData = ${TData}`, `TQueryData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`];
477
512
  const queryKeyParams = QueryKey.getParams({
478
513
  pathParamsType,
@@ -485,7 +520,7 @@ function Query({
485
520
  typeSchemas,
486
521
  paramsCasing
487
522
  });
488
- const params = getParams6({
523
+ const params = getParams7({
489
524
  paramsCasing,
490
525
  paramsType,
491
526
  pathParamsType,
@@ -520,8 +555,8 @@ function Query({
520
555
  }
521
556
  ) });
522
557
  }
523
- Query.getParams = getParams6;
524
- function getParams7({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
558
+ Query.getParams = getParams7;
559
+ function getParams8({ paramsType, paramsCasing, pathParamsType, typeSchemas }) {
525
560
  if (paramsType === "object") {
526
561
  return FunctionParams.factory({
527
562
  data: {
@@ -585,7 +620,9 @@ function InfiniteQueryOptions({
585
620
  queryParam,
586
621
  queryKeyName
587
622
  }) {
588
- const params = getParams7({ paramsType, paramsCasing, pathParamsType, typeSchemas });
623
+ const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
624
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
625
+ const params = getParams8({ paramsType, paramsCasing, pathParamsType, typeSchemas });
589
626
  const clientParams = Client.getParams({
590
627
  paramsCasing,
591
628
  typeSchemas,
@@ -614,7 +651,7 @@ function InfiniteQueryOptions({
614
651
  if (infiniteOverrideParams) {
615
652
  return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, params: params.toConstructor(), children: `
616
653
  const queryKey = ${queryKeyName}(${queryKeyParams.toCall()})
617
- return infiniteQueryOptions({
654
+ return infiniteQueryOptions<${TData}, ${TError}, ${TData}, typeof queryKey, number>({
618
655
  ${enabledText}
619
656
  queryKey,
620
657
  queryFn: async ({ signal, pageParam }) => {
@@ -628,7 +665,7 @@ function InfiniteQueryOptions({
628
665
  }
629
666
  return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, params: params.toConstructor(), children: `
630
667
  const queryKey = ${queryKeyName}(${queryKeyParams.toCall()})
631
- return infiniteQueryOptions({
668
+ return infiniteQueryOptions<${TData}, ${TError}, ${TData}, typeof queryKey>({
632
669
  ${enabledText}
633
670
  queryKey,
634
671
  queryFn: async ({ signal }) => {
@@ -639,9 +676,10 @@ function InfiniteQueryOptions({
639
676
  })
640
677
  ` }) });
641
678
  }
642
- InfiniteQueryOptions.getParams = getParams7;
643
- function getParams8({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }) {
679
+ InfiniteQueryOptions.getParams = getParams8;
680
+ function getParams9({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }) {
644
681
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
682
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
645
683
  if (paramsType === "object") {
646
684
  return FunctionParams.factory({
647
685
  data: {
@@ -665,7 +703,7 @@ function getParams8({ paramsType, paramsCasing, pathParamsType, dataReturnType,
665
703
  options: {
666
704
  type: `
667
705
  {
668
- query?: Partial<InfiniteQueryObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
706
+ query?: Partial<InfiniteQueryObserverOptions<${[TData, TError, "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
669
707
  client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
670
708
  }
671
709
  `,
@@ -694,7 +732,7 @@ function getParams8({ paramsType, paramsCasing, pathParamsType, dataReturnType,
694
732
  options: {
695
733
  type: `
696
734
  {
697
- query?: Partial<InfiniteQueryObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
735
+ query?: Partial<InfiniteQueryObserverOptions<${[TData, TError, "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
698
736
  client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
699
737
  }
700
738
  `,
@@ -715,7 +753,8 @@ function InfiniteQuery({
715
753
  operation
716
754
  }) {
717
755
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
718
- const returnType = `UseInfiniteQueryResult<${["TData", typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"].join(", ")}> & { queryKey: TQueryKey }`;
756
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
757
+ const returnType = `UseInfiniteQueryResult<${["TData", TError].join(", ")}> & { queryKey: TQueryKey }`;
719
758
  const generics = [`TData = InfiniteData<${TData}>`, `TQueryData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`];
720
759
  const queryKeyParams = QueryKey.getParams({
721
760
  pathParamsType,
@@ -728,7 +767,7 @@ function InfiniteQuery({
728
767
  typeSchemas,
729
768
  paramsCasing
730
769
  });
731
- const params = getParams8({
770
+ const params = getParams9({
732
771
  paramsCasing,
733
772
  paramsType,
734
773
  pathParamsType,
@@ -763,9 +802,10 @@ function InfiniteQuery({
763
802
  }
764
803
  ) });
765
804
  }
766
- InfiniteQuery.getParams = getParams8;
767
- function getParams9({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }) {
805
+ InfiniteQuery.getParams = getParams9;
806
+ function getParams10({ paramsType, paramsCasing, pathParamsType, dataReturnType, typeSchemas }) {
768
807
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
808
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
769
809
  if (paramsType === "object") {
770
810
  return FunctionParams.factory({
771
811
  data: {
@@ -789,7 +829,7 @@ function getParams9({ paramsType, paramsCasing, pathParamsType, dataReturnType,
789
829
  options: {
790
830
  type: `
791
831
  {
792
- query?: Partial<UseSuspenseQueryOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", "TData", "TQueryKey"].join(", ")}>>,
832
+ query?: Partial<UseSuspenseQueryOptions<${[TData, TError, "TData", "TQueryKey"].join(", ")}>>,
793
833
  client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
794
834
  }
795
835
  `,
@@ -818,7 +858,7 @@ function getParams9({ paramsType, paramsCasing, pathParamsType, dataReturnType,
818
858
  options: {
819
859
  type: `
820
860
  {
821
- query?: Partial<UseSuspenseQueryOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", "TData", "TQueryKey"].join(", ")}>>,
861
+ query?: Partial<UseSuspenseQueryOptions<${[TData, TError, "TData", "TQueryKey"].join(", ")}>>,
822
862
  client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
823
863
  }
824
864
  `,
@@ -839,7 +879,8 @@ function SuspenseQuery({
839
879
  operation
840
880
  }) {
841
881
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
842
- const returnType = `UseSuspenseQueryResult<${["TData", typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"].join(", ")}> & { queryKey: TQueryKey }`;
882
+ const TError = `ResponseErrorConfig<${typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error"}>`;
883
+ const returnType = `UseSuspenseQueryResult<${["TData", TError].join(", ")}> & { queryKey: TQueryKey }`;
843
884
  const generics = [`TData = ${TData}`, `TQueryData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`];
844
885
  const queryKeyParams = QueryKey.getParams({
845
886
  pathParamsType,
@@ -852,7 +893,7 @@ function SuspenseQuery({
852
893
  pathParamsType,
853
894
  typeSchemas
854
895
  });
855
- const params = getParams9({
896
+ const params = getParams10({
856
897
  paramsCasing,
857
898
  paramsType,
858
899
  pathParamsType,
@@ -887,8 +928,8 @@ function SuspenseQuery({
887
928
  }
888
929
  ) });
889
930
  }
890
- SuspenseQuery.getParams = getParams9;
931
+ SuspenseQuery.getParams = getParams10;
891
932
 
892
933
  export { Client, InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions, SuspenseQuery };
893
- //# sourceMappingURL=chunk-2DRP6UH5.js.map
894
- //# sourceMappingURL=chunk-2DRP6UH5.js.map
934
+ //# sourceMappingURL=chunk-HAEHUITJ.js.map
935
+ //# sourceMappingURL=chunk-HAEHUITJ.js.map