@kubb/plugin-react-query 3.0.0-alpha.1 → 3.0.0-alpha.11

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 (43) hide show
  1. package/dist/chunk-7ZODZVKP.cjs +1427 -0
  2. package/dist/chunk-7ZODZVKP.cjs.map +1 -0
  3. package/dist/{chunk-5IL6M74X.js → chunk-ZYTZV43V.js} +295 -382
  4. package/dist/chunk-ZYTZV43V.js.map +1 -0
  5. package/dist/components.cjs +23 -14
  6. package/dist/components.cjs.map +1 -1
  7. package/dist/components.d.cts +1 -2
  8. package/dist/components.d.ts +1 -2
  9. package/dist/components.js +2 -14
  10. package/dist/components.js.map +1 -1
  11. package/dist/{index-C9fwRDH7.d.cts → index-5kpkk-7M.d.cts} +7 -41
  12. package/dist/{index-C9fwRDH7.d.ts → index-5kpkk-7M.d.ts} +7 -41
  13. package/dist/index.cjs +67 -107
  14. package/dist/index.cjs.map +1 -1
  15. package/dist/index.d.cts +1 -2
  16. package/dist/index.d.ts +1 -2
  17. package/dist/index.js +30 -77
  18. package/dist/index.js.map +1 -1
  19. package/package.json +15 -15
  20. package/src/OperationGenerator.tsx +0 -29
  21. package/src/__snapshots__/mutateAsQuery/updatePetWithForm.ts +14 -9
  22. package/src/__snapshots__/pathParamsTypeInline/getPetById.ts +14 -9
  23. package/src/__snapshots__/pathParamsTypeObject/getPetById.ts +14 -9
  24. package/src/__snapshots__/queryOptions/getPetById.ts +9 -5
  25. package/src/__snapshots__/queryWithoutQueryOptions/getPetById.ts +11 -7
  26. package/src/__snapshots__/variablesTypeMutate/deletePet.ts +6 -3
  27. package/src/components/Mutation.tsx +30 -30
  28. package/src/components/Query.tsx +74 -78
  29. package/src/components/QueryKey.tsx +13 -9
  30. package/src/components/QueryOptions.tsx +21 -13
  31. package/src/components/SchemaType.tsx +9 -5
  32. package/src/components/__snapshots__/gen/showPetById.ts +58 -48
  33. package/src/components/__snapshots__/gen/useCreatePets.ts +36 -36
  34. package/src/components/__snapshots__/gen/useCreatePetsMutate.ts +36 -37
  35. package/src/components/index.ts +0 -1
  36. package/src/plugin.ts +16 -34
  37. package/src/types.ts +0 -3
  38. package/dist/chunk-5IL6M74X.js.map +0 -1
  39. package/dist/chunk-JFX7DCS7.cjs +0 -1504
  40. package/dist/chunk-JFX7DCS7.cjs.map +0 -1
  41. package/src/__snapshots__/upload/UploadFile.ts +0 -67
  42. package/src/__snapshots__/uploadMutation/UploadFile.ts +0 -44
  43. package/src/components/Operations.tsx +0 -74
@@ -1,16 +1,15 @@
1
- // src/components/Mutation.tsx
2
- import transformers from "@kubb/core/transformers";
3
- import { FunctionParams, URLPath } from "@kubb/core/utils";
4
- import { useOperation as useOperation2, useOperationManager as useOperationManager2 } from "@kubb/plugin-oas/hooks";
5
- import { getASTParams, getComments } from "@kubb/plugin-oas/utils";
6
- import { File, Function, Parser, useApp as useApp2 } from "@kubb/react";
7
- import { pluginTsName as pluginTsName2 } from "@kubb/plugin-ts";
1
+ import transformers2 from '@kubb/core/transformers';
2
+ import { FunctionParams, URLPath } from '@kubb/core/utils';
3
+ import { useOperation, useOperationManager } from '@kubb/plugin-oas/hooks';
4
+ import { getASTParams, getComments } from '@kubb/plugin-oas/utils';
5
+ import { useApp, File, Type, Function } from '@kubb/react';
6
+ import { pluginTsName } from '@kubb/plugin-ts';
7
+ import { jsx, Fragment, jsxs } from '@kubb/react/jsx-runtime';
8
+ import { isRequired } from '@kubb/oas';
9
+ import { PackageManager } from '@kubb/core';
10
+ import { pluginZodName } from '@kubb/plugin-zod';
8
11
 
9
- // src/components/SchemaType.tsx
10
- import { useOperation, useOperationManager } from "@kubb/plugin-oas/hooks";
11
- import { Type, useApp } from "@kubb/react";
12
- import { pluginTsName } from "@kubb/plugin-ts";
13
- import { Fragment, jsx, jsxs } from "@kubb/react/jsx-runtime";
12
+ // src/components/Mutation.tsx
14
13
  function SchemaType() {
15
14
  const {
16
15
  plugin: {
@@ -33,8 +32,8 @@ function SchemaType() {
33
32
  const clientType = `${factoryName}Client`;
34
33
  const isFormData = operation.getContentType() === "multipart/form-data";
35
34
  return /* @__PURE__ */ jsxs(Fragment, { children: [
36
- /* @__PURE__ */ jsx(Type, { name: clientType, children: `typeof client<${TResponse}, ${TError}, ${isFormData ? "FormData" : TRequest}>` }),
37
- /* @__PURE__ */ jsx(Type, { name: factoryName, children: `
35
+ /* @__PURE__ */ jsx(File.Source, { name: clientType, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: clientType, children: `typeof client<${TResponse}, ${TError}, ${isFormData ? "FormData" : TRequest}>` }) }),
36
+ /* @__PURE__ */ jsx(File.Source, { name: factoryName, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: factoryName, children: `
38
37
  {
39
38
  data: ${TData}
40
39
  error: ${TError}
@@ -48,13 +47,9 @@ function SchemaType() {
48
47
  return: Awaited<ReturnType<${clientType}>>
49
48
  }
50
49
  }
51
- ` })
50
+ ` }) })
52
51
  ] });
53
52
  }
54
-
55
- // src/components/Mutation.tsx
56
- import { isRequired } from "@kubb/oas";
57
- import { Fragment as Fragment2, jsx as jsx2, jsxs as jsxs2 } from "@kubb/react/jsx-runtime";
58
53
  function Template({ name, params, mutateParams, JSDoc, client, hook, dataReturnType }) {
59
54
  const isFormData = client.contentType === "multipart/form-data";
60
55
  const headers = [
@@ -70,8 +65,8 @@ function Template({ name, params, mutateParams, JSDoc, client, hook, dataReturnT
70
65
  headers.length ? `headers: { ${headers}, ...clientOptions.headers }` : void 0,
71
66
  "...clientOptions"
72
67
  ].filter(Boolean);
73
- const resolvedClientOptions = `${transformers.createIndent(4)}${clientOptions.join(`,
74
- ${transformers.createIndent(4)}`)}`;
68
+ const resolvedClientOptions = `${transformers2.createIndent(4)}${clientOptions.join(`,
69
+ ${transformers2.createIndent(4)}`)}`;
75
70
  const formData = isFormData ? `
76
71
  const formData = new FormData()
77
72
  if(data) {
@@ -83,7 +78,7 @@ ${transformers.createIndent(4)}`)}`;
83
78
  })
84
79
  }
85
80
  ` : void 0;
86
- return /* @__PURE__ */ jsx2(Function, { export: true, name, params, JSDoc, children: `
81
+ return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { export: true, name, params, JSDoc, children: `
87
82
  const { mutation: mutationOptions, client: clientOptions = {} } = options ?? {}
88
83
 
89
84
  return ${hook.name}({
@@ -97,7 +92,7 @@ ${transformers.createIndent(4)}`)}`;
97
92
  return ${dataReturnType === "data" ? "res.data" : "res"}
98
93
  },
99
94
  ...mutationOptions
100
- })` });
95
+ })` }) });
101
96
  }
102
97
  function RootTemplate({ children }) {
103
98
  const {
@@ -107,16 +102,16 @@ function RootTemplate({ children }) {
107
102
  mutate
108
103
  }
109
104
  }
110
- } = useApp2();
111
- const { getSchemas, getFile } = useOperationManager2();
112
- const operation = useOperation2();
113
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName2], type: "type" });
105
+ } = useApp();
106
+ const { getSchemas, getFile } = useOperationManager();
107
+ const operation = useOperation();
108
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
114
109
  const file = getFile(operation);
115
- const fileType = getFile(operation, { pluginKey: [pluginTsName2] });
116
- return /* @__PURE__ */ jsx2(Parser, { language: "typescript", children: /* @__PURE__ */ jsxs2(File, { baseName: file.baseName, path: file.path, meta: file.meta, children: [
117
- /* @__PURE__ */ jsx2(File.Import, { name: "client", path: importPath }),
118
- /* @__PURE__ */ jsx2(File.Import, { name: ["ResponseConfig"], path: importPath, isTypeOnly: true }),
119
- /* @__PURE__ */ jsx2(
110
+ const fileType = getFile(operation, { pluginKey: [pluginTsName] });
111
+ return /* @__PURE__ */ jsxs(File, { baseName: file.baseName, path: file.path, meta: file.meta, children: [
112
+ /* @__PURE__ */ jsx(File.Import, { name: "client", path: importPath }),
113
+ /* @__PURE__ */ jsx(File.Import, { name: ["ResponseConfig"], path: importPath, isTypeOnly: true }),
114
+ /* @__PURE__ */ jsx(
120
115
  File.Import,
121
116
  {
122
117
  name: [
@@ -132,7 +127,7 @@ function RootTemplate({ children }) {
132
127
  isTypeOnly: true
133
128
  }
134
129
  ),
135
- /* @__PURE__ */ jsx2(
130
+ /* @__PURE__ */ jsx(
136
131
  File.Import,
137
132
  {
138
133
  name: ["UseMutationOptions", "UseMutationResult"],
@@ -140,21 +135,21 @@ function RootTemplate({ children }) {
140
135
  isTypeOnly: true
141
136
  }
142
137
  ),
143
- /* @__PURE__ */ jsx2(File.Import, { name: ["useMutation"], path: typeof mutate !== "boolean" && mutate.importPath ? mutate.importPath : "@tanstack/react-query" }),
144
- /* @__PURE__ */ jsx2(File.Source, { children })
145
- ] }) });
138
+ /* @__PURE__ */ jsx(File.Import, { name: ["useMutation"], path: typeof mutate !== "boolean" && mutate.importPath ? mutate.importPath : "@tanstack/react-query" }),
139
+ children
140
+ ] });
146
141
  }
147
142
  var defaultTemplates = { default: Template, root: RootTemplate };
148
- function Mutation({ Template: Template7 = defaultTemplates.default }) {
143
+ function Mutation({ Template: Template6 = defaultTemplates.default }) {
149
144
  const {
150
145
  plugin: {
151
146
  options: { dataReturnType, mutate }
152
147
  }
153
- } = useApp2();
154
- const operation = useOperation2();
155
- const { getSchemas, getName } = useOperationManager2();
148
+ } = useApp();
149
+ const operation = useOperation();
150
+ const { getSchemas, getName } = useOperationManager();
156
151
  const name = getName(operation, { type: "function" });
157
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName2], type: "type" });
152
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
158
153
  const contentType = operation.getContentType();
159
154
  const params = new FunctionParams();
160
155
  const mutateParams = new FunctionParams();
@@ -265,8 +260,8 @@ function Mutation({ Template: Template7 = defaultTemplates.default }) {
265
260
  if (!mutate) {
266
261
  return null;
267
262
  }
268
- return /* @__PURE__ */ jsx2(Fragment2, { children: /* @__PURE__ */ jsx2(
269
- Template7,
263
+ return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(
264
+ Template6,
270
265
  {
271
266
  name,
272
267
  JSDoc: { comments: getComments(operation) },
@@ -280,58 +275,14 @@ function Mutation({ Template: Template7 = defaultTemplates.default }) {
280
275
  }
281
276
  Mutation.File = function({ ...props }) {
282
277
  const templates = { ...defaultTemplates, ...props.templates };
283
- const Template7 = templates.default;
284
- const RootTemplate3 = templates.root;
285
- return /* @__PURE__ */ jsxs2(RootTemplate3, { children: [
286
- /* @__PURE__ */ jsx2(SchemaType, {}),
287
- /* @__PURE__ */ jsx2(Mutation, { Template: Template7 })
278
+ const Template6 = templates.default;
279
+ const RootTemplate2 = templates.root;
280
+ return /* @__PURE__ */ jsxs(RootTemplate2, { children: [
281
+ /* @__PURE__ */ jsx(SchemaType, {}),
282
+ /* @__PURE__ */ jsx(Mutation, { Template: Template6 })
288
283
  ] });
289
284
  };
290
285
  Mutation.templates = defaultTemplates;
291
-
292
- // src/components/Operations.tsx
293
- import { Parser as Parser2, File as File2, useApp as useApp3 } from "@kubb/react";
294
- import { jsx as jsx3 } from "@kubb/react/jsx-runtime";
295
- function Template2({}) {
296
- return null;
297
- }
298
- function RootTemplate2({ children }) {
299
- const {
300
- pluginManager,
301
- plugin: { key: pluginKey }
302
- } = useApp3();
303
- const file = pluginManager.getFile({
304
- name: "operations",
305
- mode: "split",
306
- extName: ".ts",
307
- pluginKey
308
- });
309
- return /* @__PURE__ */ jsx3(Parser2, { language: "typescript", children: /* @__PURE__ */ jsx3(File2, { baseName: file.baseName, path: file.path, meta: file.meta, children: /* @__PURE__ */ jsx3(File2.Source, { children }) }) });
310
- }
311
- var defaultTemplates2 = { default: Template2, root: RootTemplate2 };
312
- function Operations({ Template: Template7 = defaultTemplates2.default }) {
313
- return /* @__PURE__ */ jsx3(Template7, {});
314
- }
315
- Operations.File = function(props) {
316
- const templates = { ...defaultTemplates2, ...props.templates };
317
- const Template7 = templates.default;
318
- const RootTemplate3 = templates.root;
319
- return /* @__PURE__ */ jsx3(RootTemplate3, { children: /* @__PURE__ */ jsx3(Operations, { Template: Template7 }) });
320
- };
321
- Operations.templates = defaultTemplates2;
322
-
323
- // src/components/Query.tsx
324
- import { PackageManager as PackageManager4 } from "@kubb/core";
325
- import transformers3 from "@kubb/core/transformers";
326
- import { FunctionParams as FunctionParams4, URLPath as URLPath4 } from "@kubb/core/utils";
327
- import { Parser as Parser3, File as File4, Function as Function4, useApp as useApp6 } from "@kubb/react";
328
- import { pluginTsName as pluginTsName5 } from "@kubb/plugin-ts";
329
- import { pluginZodName as pluginZodName2 } from "@kubb/plugin-zod";
330
- import { useOperation as useOperation5, useOperationManager as useOperationManager5 } from "@kubb/plugin-oas/hooks";
331
- import { getASTParams as getASTParams4, getComments as getComments2 } from "@kubb/plugin-oas/utils";
332
-
333
- // src/utils.ts
334
- import { PackageManager } from "@kubb/core";
335
286
  var reactQueryDepRegex = /@tanstack\/(react|solid|vue|svelte)-query/;
336
287
  function getImportNames() {
337
288
  const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
@@ -424,27 +375,22 @@ function getImportNames() {
424
375
  }
425
376
  };
426
377
  }
427
-
428
- // src/components/QueryImports.tsx
429
- import { PackageManager as PackageManager2 } from "@kubb/core";
430
- import { File as File3 } from "@kubb/react";
431
- import { Fragment as Fragment3, jsx as jsx4, jsxs as jsxs3 } from "@kubb/react/jsx-runtime";
432
- function Template3({ path, hookPath = path, isInfinite, hookName, queryOptions, optionsType, resultType }) {
433
- return /* @__PURE__ */ jsxs3(Fragment3, { children: [
434
- /* @__PURE__ */ jsx4(File3.Import, { name: [optionsType, resultType], path, isTypeOnly: true }),
435
- /* @__PURE__ */ jsx4(File3.Import, { name: [hookName], path: hookPath }),
436
- queryOptions && /* @__PURE__ */ jsx4(File3.Import, { name: [queryOptions].filter(Boolean), path }),
437
- /* @__PURE__ */ jsx4(File3.Import, { name: ["QueryKey", "WithRequired", isInfinite ? "InfiniteData" : void 0].filter(Boolean), path, isTypeOnly: true })
378
+ function Template2({ path, hookPath = path, isInfinite, hookName, queryOptions, optionsType, resultType }) {
379
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
380
+ /* @__PURE__ */ jsx(File.Import, { name: [optionsType, resultType], path, isTypeOnly: true }),
381
+ /* @__PURE__ */ jsx(File.Import, { name: [hookName], path: hookPath }),
382
+ queryOptions && /* @__PURE__ */ jsx(File.Import, { name: [queryOptions].filter(Boolean), path }),
383
+ /* @__PURE__ */ jsx(File.Import, { name: ["QueryKey", "WithRequired", isInfinite ? "InfiniteData" : void 0].filter(Boolean), path, isTypeOnly: true })
438
384
  ] });
439
385
  }
440
- var defaultTemplates3 = {
386
+ var defaultTemplates2 = {
441
387
  get react() {
442
388
  return function({ context, hookPath, ...rest }) {
443
389
  const importNames = getImportNames();
444
- const isV5 = new PackageManager2().isValidSync(reactQueryDepRegex, ">=5");
390
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
445
391
  const { isInfinite, isSuspense } = context;
446
- return /* @__PURE__ */ jsx4(
447
- Template3,
392
+ return /* @__PURE__ */ jsx(
393
+ Template2,
448
394
  {
449
395
  isInfinite,
450
396
  ...isSuspense ? importNames.querySuspense.react : isInfinite ? importNames.queryInfinite.react : importNames.query.react,
@@ -458,10 +404,10 @@ var defaultTemplates3 = {
458
404
  get solid() {
459
405
  return function({ context, hookPath, ...rest }) {
460
406
  const importNames = getImportNames();
461
- const isV5 = new PackageManager2().isValidSync(reactQueryDepRegex, ">=5");
407
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
462
408
  const { isInfinite } = context;
463
- return /* @__PURE__ */ jsx4(
464
- Template3,
409
+ return /* @__PURE__ */ jsx(
410
+ Template2,
465
411
  {
466
412
  isInfinite,
467
413
  ...isInfinite ? importNames.queryInfinite.solid : importNames.query.solid,
@@ -475,10 +421,10 @@ var defaultTemplates3 = {
475
421
  get svelte() {
476
422
  return function({ context, hookPath, ...rest }) {
477
423
  const importNames = getImportNames();
478
- const isV5 = new PackageManager2().isValidSync(reactQueryDepRegex, ">=5");
424
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
479
425
  const { isInfinite } = context;
480
- return /* @__PURE__ */ jsx4(
481
- Template3,
426
+ return /* @__PURE__ */ jsx(
427
+ Template2,
482
428
  {
483
429
  isInfinite,
484
430
  ...isInfinite ? importNames.queryInfinite.svelte : importNames.query.svelte,
@@ -492,13 +438,13 @@ var defaultTemplates3 = {
492
438
  get vue() {
493
439
  return function({ context, hookPath, ...rest }) {
494
440
  const importNames = getImportNames();
495
- const isV5 = new PackageManager2().isValidSync(reactQueryDepRegex, ">=5");
441
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
496
442
  const { isInfinite } = context;
497
443
  const path = "@tanstack/vue-query";
498
- return /* @__PURE__ */ jsxs3(Fragment3, { children: [
499
- isV5 && /* @__PURE__ */ jsxs3(Fragment3, { children: [
500
- /* @__PURE__ */ jsx4(
501
- Template3,
444
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
445
+ isV5 && /* @__PURE__ */ jsxs(Fragment, { children: [
446
+ /* @__PURE__ */ jsx(
447
+ Template2,
502
448
  {
503
449
  isInfinite,
504
450
  ...isInfinite ? importNames.queryInfinite.vue : importNames.query.vue,
@@ -507,28 +453,28 @@ var defaultTemplates3 = {
507
453
  ...rest
508
454
  }
509
455
  ),
510
- /* @__PURE__ */ jsx4(File3.Import, { name: ["QueryObserverOptions"], path, isTypeOnly: true })
456
+ /* @__PURE__ */ jsx(File.Import, { name: ["QueryObserverOptions"], path, isTypeOnly: true })
511
457
  ] }),
512
- !isV5 && isInfinite && /* @__PURE__ */ jsxs3(Fragment3, { children: [
513
- /* @__PURE__ */ jsx4(File3.Import, { name: [importNames.queryInfinite.vue.resultType], path, isTypeOnly: true }),
514
- /* @__PURE__ */ jsx4(File3.Import, { name: [importNames.queryInfinite.vue.optionsType], path: "@tanstack/vue-query/build/lib/types", isTypeOnly: true }),
515
- /* @__PURE__ */ jsx4(File3.Import, { name: [importNames.queryInfinite.vue.hookName], path })
458
+ !isV5 && isInfinite && /* @__PURE__ */ jsxs(Fragment, { children: [
459
+ /* @__PURE__ */ jsx(File.Import, { name: [importNames.queryInfinite.vue.resultType], path, isTypeOnly: true }),
460
+ /* @__PURE__ */ jsx(File.Import, { name: [importNames.queryInfinite.vue.optionsType], path: "@tanstack/vue-query/build/lib/types", isTypeOnly: true }),
461
+ /* @__PURE__ */ jsx(File.Import, { name: [importNames.queryInfinite.vue.hookName], path })
516
462
  ] }),
517
- !isV5 && !isInfinite && /* @__PURE__ */ jsxs3(Fragment3, { children: [
518
- /* @__PURE__ */ jsx4(File3.Import, { name: [importNames.query.vue.resultType], path, isTypeOnly: true }),
519
- /* @__PURE__ */ jsx4(File3.Import, { name: [importNames.query.vue.optionsType], path: "@tanstack/vue-query/build/lib/types", isTypeOnly: true }),
520
- /* @__PURE__ */ jsx4(File3.Import, { name: [importNames.query.vue.hookName], path })
463
+ !isV5 && !isInfinite && /* @__PURE__ */ jsxs(Fragment, { children: [
464
+ /* @__PURE__ */ jsx(File.Import, { name: [importNames.query.vue.resultType], path, isTypeOnly: true }),
465
+ /* @__PURE__ */ jsx(File.Import, { name: [importNames.query.vue.optionsType], path: "@tanstack/vue-query/build/lib/types", isTypeOnly: true }),
466
+ /* @__PURE__ */ jsx(File.Import, { name: [importNames.query.vue.hookName], path })
521
467
  ] }),
522
- /* @__PURE__ */ jsx4(File3.Import, { name: ["unref"], path: "vue" }),
523
- /* @__PURE__ */ jsx4(File3.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
524
- /* @__PURE__ */ jsx4(File3.Import, { name: ["QueryKey", "WithRequired"], path, isTypeOnly: true })
468
+ /* @__PURE__ */ jsx(File.Import, { name: ["unref"], path: "vue" }),
469
+ /* @__PURE__ */ jsx(File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
470
+ /* @__PURE__ */ jsx(File.Import, { name: ["QueryKey", "WithRequired"], path, isTypeOnly: true })
525
471
  ] });
526
472
  };
527
473
  }
528
474
  };
529
- function QueryImports({ hookPath, isInfinite, isSuspense, Template: Template7 = defaultTemplates3.react }) {
530
- return /* @__PURE__ */ jsx4(
531
- Template7,
475
+ function QueryImports({ hookPath, isInfinite, isSuspense, Template: Template6 = defaultTemplates2.react }) {
476
+ return /* @__PURE__ */ jsx(
477
+ Template6,
532
478
  {
533
479
  hookPath,
534
480
  context: {
@@ -538,36 +484,27 @@ function QueryImports({ hookPath, isInfinite, isSuspense, Template: Template7 =
538
484
  }
539
485
  );
540
486
  }
541
- QueryImports.templates = defaultTemplates3;
542
-
543
- // src/components/QueryKey.tsx
544
- import { FunctionParams as FunctionParams2, URLPath as URLPath2 } from "@kubb/core/utils";
545
- import { Function as Function2, Type as Type2, useApp as useApp4 } from "@kubb/react";
546
- import { useOperation as useOperation3, useOperationManager as useOperationManager3 } from "@kubb/plugin-oas/hooks";
547
- import { getASTParams as getASTParams2 } from "@kubb/plugin-oas/utils";
548
- import { isRequired as isRequired2 } from "@kubb/oas";
549
- import { pluginTsName as pluginTsName3 } from "@kubb/plugin-ts";
550
- import { Fragment as Fragment4, jsx as jsx5, jsxs as jsxs4 } from "@kubb/react/jsx-runtime";
551
- function Template4({ name, typeName, params, generics, returnType, JSDoc, keys }) {
552
- return /* @__PURE__ */ jsxs4(Fragment4, { children: [
553
- /* @__PURE__ */ jsx5(Function2.Arrow, { name, export: true, generics, params, returnType, singleLine: true, JSDoc, children: `[${keys}] as const` }),
554
- /* @__PURE__ */ jsx5(Type2, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` })
487
+ QueryImports.templates = defaultTemplates2;
488
+ function Template3({ name, typeName, params, generics, returnType, JSDoc, keys }) {
489
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
490
+ /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function.Arrow, { name, export: true, generics, params, returnType, singleLine: true, JSDoc, children: `[${keys}] as const` }) }),
491
+ /* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` }) })
555
492
  ] });
556
493
  }
557
- var defaultTemplates4 = {
494
+ var defaultTemplates3 = {
558
495
  get react() {
559
496
  return function(props) {
560
- return /* @__PURE__ */ jsx5(Template4, { ...props });
497
+ return /* @__PURE__ */ jsx(Template3, { ...props });
561
498
  };
562
499
  },
563
500
  get solid() {
564
501
  return function(props) {
565
- return /* @__PURE__ */ jsx5(Template4, { ...props });
502
+ return /* @__PURE__ */ jsx(Template3, { ...props });
566
503
  };
567
504
  },
568
505
  get svelte() {
569
506
  return function(props) {
570
- return /* @__PURE__ */ jsx5(Template4, { ...props });
507
+ return /* @__PURE__ */ jsx(Template3, { ...props });
571
508
  };
572
509
  },
573
510
  get vue() {
@@ -577,24 +514,24 @@ var defaultTemplates4 = {
577
514
  plugin: {
578
515
  options: { pathParamsType, query }
579
516
  }
580
- } = useApp4();
581
- const { getSchemas } = useOperationManager3();
582
- const operation = useOperation3();
583
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName3], type: "type" });
584
- const path = new URLPath2(operation.path);
585
- const params = new FunctionParams2();
517
+ } = useApp();
518
+ const { getSchemas } = useOperationManager();
519
+ const operation = useOperation();
520
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
521
+ const path = new URLPath(operation.path);
522
+ const params = new FunctionParams();
586
523
  const withQueryParams = !!schemas.queryParams?.name;
587
524
  const withRequest = !!schemas.request?.name;
588
525
  params.add([
589
526
  ...pathParamsType === "object" ? [
590
- getASTParams2(schemas.pathParams, {
527
+ getASTParams(schemas.pathParams, {
591
528
  typed: true,
592
529
  override: (item) => ({
593
530
  ...item,
594
531
  type: `MaybeRef<${item.type}>`
595
532
  })
596
533
  })
597
- ] : getASTParams2(schemas.pathParams, {
534
+ ] : getASTParams(schemas.pathParams, {
598
535
  typed: true,
599
536
  override: (item) => ({
600
537
  ...item,
@@ -605,13 +542,13 @@ var defaultTemplates4 = {
605
542
  name: "params",
606
543
  type: `MaybeRef<${`${factory.name}["queryParams"]`}>`,
607
544
  enabled: withQueryParams,
608
- required: isRequired2(schemas.queryParams?.schema)
545
+ required: isRequired(schemas.queryParams?.schema)
609
546
  },
610
547
  {
611
548
  name: "request",
612
549
  type: `MaybeRef<${`${factory.name}["request"]`}>`,
613
550
  enabled: withRequest,
614
- required: isRequired2(schemas.request?.schema)
551
+ required: isRequired(schemas.request?.schema)
615
552
  }
616
553
  ]);
617
554
  const keys = [
@@ -623,36 +560,36 @@ var defaultTemplates4 = {
623
560
  withQueryParams ? "...(params ? [params] : [])" : void 0,
624
561
  withRequest ? "...(request ? [request] : [])" : void 0
625
562
  ].filter(Boolean);
626
- return /* @__PURE__ */ jsx5(Template4, { ...rest, params: params.toString(), keys: keys.join(", ") });
563
+ return /* @__PURE__ */ jsx(Template3, { ...rest, params: params.toString(), keys: keys.join(", ") });
627
564
  };
628
565
  }
629
566
  };
630
- function QueryKey({ name, typeName, factory, keysFn, Template: Template7 = defaultTemplates4.react }) {
567
+ function QueryKey({ name, typeName, factory, keysFn, Template: Template6 = defaultTemplates3.react }) {
631
568
  const {
632
569
  plugin: {
633
570
  options: { pathParamsType }
634
571
  }
635
- } = useApp4();
636
- const { getSchemas } = useOperationManager3();
637
- const operation = useOperation3();
638
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName3], type: "type" });
639
- const path = new URLPath2(operation.path);
640
- const params = new FunctionParams2();
572
+ } = useApp();
573
+ const { getSchemas } = useOperationManager();
574
+ const operation = useOperation();
575
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
576
+ const path = new URLPath(operation.path);
577
+ const params = new FunctionParams();
641
578
  const withQueryParams = !!schemas.queryParams?.name;
642
579
  const withRequest = !!schemas.request?.name;
643
580
  params.add([
644
- ...pathParamsType === "object" ? [getASTParams2(schemas.pathParams, { typed: true })] : getASTParams2(schemas.pathParams, { typed: true }),
581
+ ...pathParamsType === "object" ? [getASTParams(schemas.pathParams, { typed: true })] : getASTParams(schemas.pathParams, { typed: true }),
645
582
  {
646
583
  name: "params",
647
584
  type: `${factory.name}["queryParams"]`,
648
585
  enabled: withQueryParams,
649
- required: isRequired2(schemas.queryParams?.schema)
586
+ required: isRequired(schemas.queryParams?.schema)
650
587
  },
651
588
  {
652
589
  name: "data",
653
590
  type: `${factory.name}["request"]`,
654
591
  enabled: withRequest,
655
- required: isRequired2(schemas.request?.schema)
592
+ required: isRequired(schemas.request?.schema)
656
593
  }
657
594
  ]);
658
595
  const keys = [
@@ -663,23 +600,11 @@ function QueryKey({ name, typeName, factory, keysFn, Template: Template7 = defau
663
600
  withQueryParams ? "...(params ? [params] : [])" : void 0,
664
601
  withRequest ? "...(data ? [data] : [])" : void 0
665
602
  ].filter(Boolean);
666
- return /* @__PURE__ */ jsx5(Template7, { typeName, name, params: params.toString(), keys: keysFn(keys).join(", "), context: { factory } });
603
+ return /* @__PURE__ */ jsx(Template6, { typeName, name, params: params.toString(), keys: keysFn(keys).join(", "), context: { factory } });
667
604
  }
668
- QueryKey.templates = defaultTemplates4;
669
-
670
- // src/components/QueryOptions.tsx
671
- import { PackageManager as PackageManager3 } from "@kubb/core";
672
- import transformers2 from "@kubb/core/transformers";
673
- import { FunctionParams as FunctionParams3, URLPath as URLPath3 } from "@kubb/core/utils";
674
- import { useOperation as useOperation4, useOperationManager as useOperationManager4 } from "@kubb/plugin-oas/hooks";
675
- import { getASTParams as getASTParams3 } from "@kubb/plugin-oas/utils";
676
- import { Function as Function3, useApp as useApp5 } from "@kubb/react";
677
- import { pluginZodName } from "@kubb/plugin-zod";
678
- import { isRequired as isRequired3 } from "@kubb/oas";
679
- import { pluginTsName as pluginTsName4 } from "@kubb/plugin-ts";
680
- import { jsx as jsx6 } from "@kubb/react/jsx-runtime";
681
- function Template5({ name, params, generics, returnType, JSDoc, hook, client, infinite, dataReturnType, parser }) {
682
- const isV5 = new PackageManager3().isValidSync(reactQueryDepRegex, ">=5");
605
+ QueryKey.templates = defaultTemplates3;
606
+ function Template4({ name, params, generics, returnType, JSDoc, hook, client, infinite, dataReturnType, parser }) {
607
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
683
608
  const isFormData = client.contentType === "multipart/form-data";
684
609
  const headers = [
685
610
  client.contentType !== "application/json" ? `'Content-Type': '${client.contentType}'` : void 0,
@@ -728,7 +653,7 @@ ${transformers2.createIndent(4)}`)}`;
728
653
  ` : void 0;
729
654
  if (infinite) {
730
655
  if (isV5) {
731
- return /* @__PURE__ */ jsx6(Function3, { name, export: true, params, JSDoc, children: `
656
+ return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, params, JSDoc, children: `
732
657
  const queryKey = ${hook.queryKey}
733
658
 
734
659
  return infiniteQueryOptions({
@@ -745,9 +670,9 @@ ${transformers2.createIndent(4)}`)}`;
745
670
  ${resolvedQueryOptions}
746
671
  })
747
672
 
748
- ` });
673
+ ` }) });
749
674
  }
750
- return /* @__PURE__ */ jsx6(Function3, { name, export: true, generics, returnType, params, JSDoc, children: `
675
+ return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, generics, returnType, params, JSDoc, children: `
751
676
  const queryKey = ${hook.queryKey}
752
677
 
753
678
  return {
@@ -764,10 +689,10 @@ ${transformers2.createIndent(4)}`)}`;
764
689
  ${resolvedQueryOptions}
765
690
  }
766
691
 
767
- ` });
692
+ ` }) });
768
693
  }
769
694
  if (isV5) {
770
- return /* @__PURE__ */ jsx6(Function3, { name, export: true, params, JSDoc, children: `
695
+ return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, params, JSDoc, children: `
771
696
  const queryKey = ${hook.queryKey}
772
697
 
773
698
  return queryOptions({
@@ -784,9 +709,9 @@ ${transformers2.createIndent(4)}`)}`;
784
709
  ${resolvedQueryOptions}
785
710
  })
786
711
 
787
- ` });
712
+ ` }) });
788
713
  }
789
- return /* @__PURE__ */ jsx6(Function3, { name, export: true, generics, returnType, params, JSDoc, children: `
714
+ return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, generics, returnType, params, JSDoc, children: `
790
715
  const queryKey = ${hook.queryKey}
791
716
 
792
717
  return {
@@ -803,22 +728,22 @@ ${transformers2.createIndent(4)}`)}`;
803
728
  ${resolvedQueryOptions}
804
729
  }
805
730
 
806
- ` });
731
+ ` }) });
807
732
  }
808
- var defaultTemplates5 = {
733
+ var defaultTemplates4 = {
809
734
  get react() {
810
735
  return function(props) {
811
- return /* @__PURE__ */ jsx6(Template5, { ...props });
736
+ return /* @__PURE__ */ jsx(Template4, { ...props });
812
737
  };
813
738
  },
814
739
  get solid() {
815
740
  return function(props) {
816
- return /* @__PURE__ */ jsx6(Template5, { ...props });
741
+ return /* @__PURE__ */ jsx(Template4, { ...props });
817
742
  };
818
743
  },
819
744
  get svelte() {
820
745
  return function(props) {
821
- return /* @__PURE__ */ jsx6(Template5, { ...props });
746
+ return /* @__PURE__ */ jsx(Template4, { ...props });
822
747
  };
823
748
  },
824
749
  get vue() {
@@ -828,15 +753,15 @@ var defaultTemplates5 = {
828
753
  plugin: {
829
754
  options: { pathParamsType }
830
755
  }
831
- } = useApp5();
832
- const { getSchemas } = useOperationManager4();
833
- const operation = useOperation4();
834
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName4], type: "type" });
835
- const params = new FunctionParams3();
836
- const queryKeyParams = new FunctionParams3();
756
+ } = useApp();
757
+ const { getSchemas } = useOperationManager();
758
+ const operation = useOperation();
759
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
760
+ const params = new FunctionParams();
761
+ const queryKeyParams = new FunctionParams();
837
762
  params.add([
838
763
  ...pathParamsType === "object" ? [
839
- getASTParams3(schemas.pathParams, {
764
+ getASTParams(schemas.pathParams, {
840
765
  typed: true,
841
766
  override: (item) => ({
842
767
  ...item,
@@ -844,7 +769,7 @@ var defaultTemplates5 = {
844
769
  type: `MaybeRef<${item.type}>`
845
770
  })
846
771
  })
847
- ] : getASTParams3(schemas.pathParams, {
772
+ ] : getASTParams(schemas.pathParams, {
848
773
  typed: true,
849
774
  override: (item) => ({
850
775
  ...item,
@@ -856,19 +781,19 @@ var defaultTemplates5 = {
856
781
  name: "refParams",
857
782
  type: `MaybeRef<${schemas.queryParams?.name}>`,
858
783
  enabled: client.withQueryParams,
859
- required: isRequired3(schemas.queryParams?.schema)
784
+ required: isRequired(schemas.queryParams?.schema)
860
785
  },
861
786
  {
862
787
  name: "refHeaders",
863
788
  type: `MaybeRef<${schemas.headerParams?.name}>`,
864
789
  enabled: client.withHeaders,
865
- required: isRequired3(schemas.headerParams?.schema)
790
+ required: isRequired(schemas.headerParams?.schema)
866
791
  },
867
792
  {
868
793
  name: "refData",
869
794
  type: `MaybeRef<${schemas.request?.name}>`,
870
795
  enabled: client.withData,
871
- required: isRequired3(schemas.request?.schema)
796
+ required: isRequired(schemas.request?.schema)
872
797
  },
873
798
  {
874
799
  name: "options",
@@ -878,13 +803,13 @@ var defaultTemplates5 = {
878
803
  ]);
879
804
  queryKeyParams.add([
880
805
  ...pathParamsType === "object" ? [
881
- getASTParams3(schemas.pathParams, {
806
+ getASTParams(schemas.pathParams, {
882
807
  override: (item) => ({
883
808
  ...item,
884
809
  name: item.name ? `ref${transformers2.pascalCase(item.name)}` : void 0
885
810
  })
886
811
  })
887
- ] : getASTParams3(schemas.pathParams, {
812
+ ] : getASTParams(schemas.pathParams, {
888
813
  override: (item) => ({
889
814
  ...item,
890
815
  name: item.name ? `ref${transformers2.pascalCase(item.name)}` : void 0
@@ -893,12 +818,12 @@ var defaultTemplates5 = {
893
818
  {
894
819
  name: "refParams",
895
820
  enabled: client.withQueryParams,
896
- required: isRequired3(schemas.queryParams?.schema)
821
+ required: isRequired(schemas.queryParams?.schema)
897
822
  },
898
823
  {
899
824
  name: "refData",
900
825
  enabled: client.withData,
901
- required: isRequired3(schemas.request?.schema)
826
+ required: isRequired(schemas.request?.schema)
902
827
  }
903
828
  ]);
904
829
  const unrefs = params.items.filter((item) => item.enabled).map((item) => {
@@ -908,22 +833,22 @@ var defaultTemplates5 = {
908
833
  queryKey: `${queryKey}(${queryKeyParams.toString()})`,
909
834
  children: unrefs
910
835
  };
911
- return /* @__PURE__ */ jsx6(Template5, { ...rest, params: params.toString(), hook, client });
836
+ return /* @__PURE__ */ jsx(Template4, { ...rest, params: params.toString(), hook, client });
912
837
  };
913
838
  }
914
839
  };
915
- function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType, Template: Template7 = defaultTemplates5.react }) {
840
+ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType, Template: Template6 = defaultTemplates4.react }) {
916
841
  const {
917
842
  pluginManager,
918
843
  plugin: {
919
844
  key: pluginKey,
920
845
  options: { parser, pathParamsType, queryOptions }
921
846
  }
922
- } = useApp5();
923
- const { getSchemas } = useOperationManager4();
924
- const operation = useOperation4();
847
+ } = useApp();
848
+ const { getSchemas } = useOperationManager();
849
+ const operation = useOperation();
925
850
  const contentType = operation.getContentType();
926
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName4], type: "type" });
851
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
927
852
  const zodSchemas = getSchemas(operation, { pluginKey: [pluginZodName], type: "function" });
928
853
  const queryKey = pluginManager.resolveName({
929
854
  name: [factory.name, infinite ? "Infinite" : void 0, suspense ? "Suspense" : void 0, "QueryKey"].filter(Boolean).join(""),
@@ -933,9 +858,9 @@ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType,
933
858
  name: [factory.name, infinite ? "Infinite" : void 0, suspense ? "Suspense" : void 0, "QueryOptions"].filter(Boolean).join(""),
934
859
  pluginKey
935
860
  });
936
- const generics = new FunctionParams3();
937
- const params = new FunctionParams3();
938
- const queryKeyParams = new FunctionParams3();
861
+ const generics = new FunctionParams();
862
+ const params = new FunctionParams();
863
+ const queryKeyParams = new FunctionParams();
939
864
  const clientGenerics = [`${factory.name}['data']`, `${factory.name}['error']`];
940
865
  const resultGenerics = suspense ? [`${factory.name}['response']`, `${factory.name}["error"]`, "TData"] : [`${factory.name}['response']`, `${factory.name}["error"]`, "TData", "TQueryData"];
941
866
  const client = {
@@ -944,7 +869,7 @@ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType,
944
869
  withPathParams: !!schemas.pathParams?.name,
945
870
  withHeaders: !!schemas.headerParams?.name,
946
871
  method: operation.method,
947
- path: new URLPath3(operation.path),
872
+ path: new URLPath(operation.path),
948
873
  generics: clientGenerics.toString(),
949
874
  contentType
950
875
  };
@@ -953,24 +878,24 @@ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType,
953
878
  suspense ? void 0 : { type: "TQueryData", default: `${factory.name}["response"]` }
954
879
  ]);
955
880
  params.add([
956
- ...pathParamsType === "object" ? [getASTParams3(schemas.pathParams, { typed: true })] : getASTParams3(schemas.pathParams, { typed: true }),
881
+ ...pathParamsType === "object" ? [getASTParams(schemas.pathParams, { typed: true })] : getASTParams(schemas.pathParams, { typed: true }),
957
882
  {
958
883
  name: "params",
959
884
  type: `${factory.name}['queryParams']`,
960
885
  enabled: client.withQueryParams,
961
- required: isRequired3(schemas.queryParams?.schema)
886
+ required: isRequired(schemas.queryParams?.schema)
962
887
  },
963
888
  {
964
889
  name: "headers",
965
890
  type: `${factory.name}['headerParams']`,
966
891
  enabled: client.withHeaders,
967
- required: isRequired3(schemas.headerParams?.schema)
892
+ required: isRequired(schemas.headerParams?.schema)
968
893
  },
969
894
  {
970
895
  name: "data",
971
896
  type: `${factory.name}['request']`,
972
897
  enabled: client.withData,
973
- required: isRequired3(schemas.request?.schema)
898
+ required: isRequired(schemas.request?.schema)
974
899
  },
975
900
  {
976
901
  name: "options",
@@ -979,16 +904,16 @@ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType,
979
904
  }
980
905
  ]);
981
906
  queryKeyParams.add([
982
- ...pathParamsType === "object" ? [getASTParams3(schemas.pathParams)] : getASTParams3(schemas.pathParams),
907
+ ...pathParamsType === "object" ? [getASTParams(schemas.pathParams)] : getASTParams(schemas.pathParams),
983
908
  {
984
909
  name: "params",
985
910
  enabled: client.withQueryParams,
986
- required: isRequired3(schemas.queryParams?.schema)
911
+ required: isRequired(schemas.queryParams?.schema)
987
912
  },
988
913
  {
989
914
  name: "data",
990
915
  enabled: client.withData,
991
- required: isRequired3(schemas.request?.schema)
916
+ required: isRequired(schemas.request?.schema)
992
917
  }
993
918
  ]);
994
919
  const hook = {
@@ -997,8 +922,8 @@ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType,
997
922
  if (!queryOptions) {
998
923
  return null;
999
924
  }
1000
- return /* @__PURE__ */ jsx6(
1001
- Template7,
925
+ return /* @__PURE__ */ jsx(
926
+ Template6,
1002
927
  {
1003
928
  name: queryOptionsName,
1004
929
  params: params.toString(),
@@ -1016,16 +941,12 @@ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType,
1016
941
  }
1017
942
  );
1018
943
  }
1019
- QueryOptions.templates = defaultTemplates5;
1020
-
1021
- // src/components/Query.tsx
1022
- import { isRequired as isRequired4 } from "@kubb/oas";
1023
- import { Fragment as Fragment5, jsx as jsx7, jsxs as jsxs5 } from "@kubb/react/jsx-runtime";
1024
- function Template6({ name, generics, returnType, params, JSDoc, hook, infinite }) {
1025
- const isV5 = new PackageManager4().isValidSync(reactQueryDepRegex, ">=5");
944
+ QueryOptions.templates = defaultTemplates4;
945
+ function Template5({ name, generics, returnType, params, JSDoc, hook, infinite }) {
946
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
1026
947
  const resolvedReturnType = `${returnType} & { queryKey: TQueryKey }`;
1027
948
  if (isV5) {
1028
- return /* @__PURE__ */ jsx7(Fragment5, { children: /* @__PURE__ */ jsx7(Function4, { name, export: true, generics, returnType: resolvedReturnType, params, JSDoc, children: `
949
+ return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, generics, returnType: resolvedReturnType, params, JSDoc, children: `
1029
950
  const { query: queryOptions, client: clientOptions = {} } = options ?? {}
1030
951
  const queryKey = queryOptions?.queryKey ?? ${hook.queryKey}
1031
952
 
@@ -1041,7 +962,7 @@ function Template6({ name, generics, returnType, params, JSDoc, hook, infinite }
1041
962
 
1042
963
  ` }) });
1043
964
  }
1044
- return /* @__PURE__ */ jsx7(Fragment5, { children: /* @__PURE__ */ jsx7(Function4, { name, export: true, generics, returnType: resolvedReturnType, params, JSDoc, children: `
965
+ return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { name, export: true, generics, returnType: resolvedReturnType, params, JSDoc, children: `
1045
966
  const { query: queryOptions, client: clientOptions = {} } = options ?? {}
1046
967
  const queryKey = queryOptions?.queryKey ?? ${hook.queryKey}
1047
968
 
@@ -1057,20 +978,20 @@ function Template6({ name, generics, returnType, params, JSDoc, hook, infinite }
1057
978
 
1058
979
  ` }) });
1059
980
  }
1060
- var defaultTemplates6 = {
981
+ var defaultTemplates5 = {
1061
982
  get react() {
1062
983
  return function(props) {
1063
- return /* @__PURE__ */ jsx7(Template6, { ...props });
984
+ return /* @__PURE__ */ jsx(Template5, { ...props });
1064
985
  };
1065
986
  },
1066
987
  get solid() {
1067
988
  return function(props) {
1068
- return /* @__PURE__ */ jsx7(Template6, { ...props });
989
+ return /* @__PURE__ */ jsx(Template5, { ...props });
1069
990
  };
1070
991
  },
1071
992
  get svelte() {
1072
993
  return function(props) {
1073
- return /* @__PURE__ */ jsx7(Template6, { ...props });
994
+ return /* @__PURE__ */ jsx(Template5, { ...props });
1074
995
  };
1075
996
  },
1076
997
  get vue() {
@@ -1082,9 +1003,9 @@ var defaultTemplates6 = {
1082
1003
  key: pluginKey,
1083
1004
  options: { pathParamsType }
1084
1005
  }
1085
- } = useApp6();
1086
- const operation = useOperation5();
1087
- const { getSchemas } = useOperationManager5();
1006
+ } = useApp();
1007
+ const operation = useOperation();
1008
+ const { getSchemas } = useOperationManager();
1088
1009
  const importNames = getImportNames();
1089
1010
  const queryOptions = pluginManager.resolveName({
1090
1011
  name: `${factory.name}QueryOptions`,
@@ -1093,11 +1014,11 @@ var defaultTemplates6 = {
1093
1014
  const hookName = rest.infinite ? importNames.queryInfinite.vue.hookName : importNames.query.vue.hookName;
1094
1015
  const resultType = rest.infinite ? importNames.queryInfinite.vue.resultType : importNames.query.vue.resultType;
1095
1016
  const optionsType = rest.infinite ? importNames.queryInfinite.vue.optionsType : importNames.query.vue.optionsType;
1096
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName5], type: "type" });
1097
- const isV5 = new PackageManager4().isValidSync(reactQueryDepRegex, ">=5");
1098
- const params = new FunctionParams4();
1099
- const queryParams = new FunctionParams4();
1100
- const queryKeyParams = new FunctionParams4();
1017
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
1018
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
1019
+ const params = new FunctionParams();
1020
+ const queryParams = new FunctionParams();
1021
+ const queryKeyParams = new FunctionParams();
1101
1022
  const client = {
1102
1023
  withQueryParams: !!schemas.queryParams?.name,
1103
1024
  withData: !!schemas.request?.name,
@@ -1109,37 +1030,37 @@ var defaultTemplates6 = {
1109
1030
  const queryOptionsGenerics = ["TData", "TQueryData"];
1110
1031
  params.add([
1111
1032
  ...pathParamsType === "object" ? [
1112
- getASTParams4(schemas.pathParams, {
1033
+ getASTParams(schemas.pathParams, {
1113
1034
  typed: true,
1114
1035
  override: (item) => ({
1115
1036
  ...item,
1116
- name: item.name ? `ref${transformers3.pascalCase(item.name)}` : void 0
1037
+ name: item.name ? `ref${transformers2.pascalCase(item.name)}` : void 0
1117
1038
  })
1118
1039
  })
1119
- ] : getASTParams4(schemas.pathParams, {
1040
+ ] : getASTParams(schemas.pathParams, {
1120
1041
  typed: true,
1121
1042
  override: (item) => ({
1122
1043
  ...item,
1123
- name: item.name ? `ref${transformers3.pascalCase(item.name)}` : void 0
1044
+ name: item.name ? `ref${transformers2.pascalCase(item.name)}` : void 0
1124
1045
  })
1125
1046
  }),
1126
1047
  {
1127
1048
  name: "refParams",
1128
1049
  type: `MaybeRef<${schemas.queryParams?.name}>`,
1129
1050
  enabled: client.withQueryParams,
1130
- required: isRequired4(schemas.queryParams?.schema)
1051
+ required: isRequired(schemas.queryParams?.schema)
1131
1052
  },
1132
1053
  {
1133
1054
  name: "refHeaders",
1134
1055
  type: `MaybeRef<${schemas.headerParams?.name}>`,
1135
1056
  enabled: client.withHeaders,
1136
- required: isRequired4(schemas.headerParams?.schema)
1057
+ required: isRequired(schemas.headerParams?.schema)
1137
1058
  },
1138
1059
  {
1139
1060
  name: "refData",
1140
1061
  type: `MaybeRef<${schemas.request?.name}>`,
1141
1062
  enabled: client.withData,
1142
- required: isRequired4(schemas.request?.schema)
1063
+ required: isRequired(schemas.request?.schema)
1143
1064
  },
1144
1065
  {
1145
1066
  name: "options",
@@ -1151,22 +1072,22 @@ var defaultTemplates6 = {
1151
1072
  }
1152
1073
  ]);
1153
1074
  queryParams.add([
1154
- ...getASTParams4(schemas.pathParams, {
1075
+ ...getASTParams(schemas.pathParams, {
1155
1076
  typed: false,
1156
1077
  override: (item) => ({
1157
1078
  ...item,
1158
- name: item.name ? `ref${transformers3.pascalCase(item.name)}` : void 0
1079
+ name: item.name ? `ref${transformers2.pascalCase(item.name)}` : void 0
1159
1080
  })
1160
1081
  }),
1161
1082
  {
1162
1083
  name: "refParams",
1163
1084
  enabled: client.withQueryParams,
1164
- required: isRequired4(schemas.queryParams?.schema)
1085
+ required: isRequired(schemas.queryParams?.schema)
1165
1086
  },
1166
1087
  {
1167
1088
  name: "refHeaders",
1168
1089
  enabled: client.withHeaders,
1169
- required: isRequired4(schemas.headerParams?.schema)
1090
+ required: isRequired(schemas.headerParams?.schema)
1170
1091
  },
1171
1092
  {
1172
1093
  name: "clientOptions",
@@ -1175,31 +1096,31 @@ var defaultTemplates6 = {
1175
1096
  ]);
1176
1097
  queryKeyParams.add([
1177
1098
  ...pathParamsType === "object" ? [
1178
- getASTParams4(schemas.pathParams, {
1099
+ getASTParams(schemas.pathParams, {
1179
1100
  override: (item) => ({
1180
1101
  ...item,
1181
- name: item.name ? `ref${transformers3.pascalCase(item.name)}` : void 0
1102
+ name: item.name ? `ref${transformers2.pascalCase(item.name)}` : void 0
1182
1103
  })
1183
1104
  })
1184
- ] : getASTParams4(schemas.pathParams, {
1105
+ ] : getASTParams(schemas.pathParams, {
1185
1106
  override: (item) => ({
1186
1107
  ...item,
1187
- name: item.name ? `ref${transformers3.pascalCase(item.name)}` : void 0
1108
+ name: item.name ? `ref${transformers2.pascalCase(item.name)}` : void 0
1188
1109
  })
1189
1110
  }),
1190
1111
  {
1191
1112
  name: "refParams",
1192
1113
  enabled: client.withQueryParams,
1193
- required: isRequired4(schemas.queryParams?.schema)
1114
+ required: isRequired(schemas.queryParams?.schema)
1194
1115
  },
1195
1116
  {
1196
1117
  name: "refData",
1197
1118
  enabled: client.withData,
1198
- required: isRequired4(schemas.request?.schema)
1119
+ required: isRequired(schemas.request?.schema)
1199
1120
  }
1200
1121
  ]);
1201
- return /* @__PURE__ */ jsx7(
1202
- Template6,
1122
+ return /* @__PURE__ */ jsx(
1123
+ Template5,
1203
1124
  {
1204
1125
  ...rest,
1205
1126
  params: params.toString(),
@@ -1220,7 +1141,7 @@ function Query({
1220
1141
  optionsType,
1221
1142
  hookName,
1222
1143
  resultType,
1223
- Template: Template7 = defaultTemplates6.react,
1144
+ Template: Template6 = defaultTemplates5.react,
1224
1145
  QueryKeyTemplate = QueryKey.templates.react,
1225
1146
  QueryOptionsTemplate = QueryOptions.templates.react,
1226
1147
  ...props
@@ -1231,12 +1152,12 @@ function Query({
1231
1152
  key: pluginKey,
1232
1153
  options: { dataReturnType, pathParamsType }
1233
1154
  }
1234
- } = useApp6();
1235
- const operation = useOperation5();
1236
- const { getSchemas, getName } = useOperationManager5();
1237
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName5], type: "type" });
1155
+ } = useApp();
1156
+ const operation = useOperation();
1157
+ const { getSchemas, getName } = useOperationManager();
1158
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
1238
1159
  const name = getName(operation, { type: "function" });
1239
- const isV5 = new PackageManager4().isValidSync(reactQueryDepRegex, ">=5");
1160
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
1240
1161
  const queryKey = pluginManager.resolveName({
1241
1162
  name: [factory.name, props.infinite ? "Infinite" : void 0, props.suspense ? "Suspense" : void 0, "QueryKey"].filter(Boolean).join(""),
1242
1163
  pluginKey
@@ -1250,13 +1171,13 @@ function Query({
1250
1171
  name: [factory.name, props.infinite ? "Infinite" : void 0, props.suspense ? "Suspense" : void 0, "QueryOptions"].filter(Boolean).join(""),
1251
1172
  pluginKey
1252
1173
  });
1253
- const generics = new FunctionParams4();
1254
- const params = new FunctionParams4();
1255
- const queryParams = new FunctionParams4();
1256
- const queryKeyParams = new FunctionParams4();
1174
+ const generics = new FunctionParams();
1175
+ const params = new FunctionParams();
1176
+ const queryParams = new FunctionParams();
1177
+ const queryKeyParams = new FunctionParams();
1257
1178
  const client = {
1258
1179
  method: operation.method,
1259
- path: new URLPath4(operation.path),
1180
+ path: new URLPath(operation.path),
1260
1181
  withQueryParams: !!schemas.queryParams?.name,
1261
1182
  withData: !!schemas.request?.name,
1262
1183
  withPathParams: !!schemas.pathParams?.name,
@@ -1274,24 +1195,24 @@ function Query({
1274
1195
  const queryOptionsOverrideGenerics = props.suspense ? [`${factory.name}['response']`, `${factory.name}['error']`, "TData", "TQueryKey"] : [`${factory.name}['response']`, `${factory.name}['error']`, "TData", "TQueryData", "TQueryKey"];
1275
1196
  const queryOptionsGenerics = props.suspense ? ["TData"] : ["TData", "TQueryData"];
1276
1197
  params.add([
1277
- ...pathParamsType === "object" ? [getASTParams4(schemas.pathParams, { typed: true })] : getASTParams4(schemas.pathParams, { typed: true }),
1198
+ ...pathParamsType === "object" ? [getASTParams(schemas.pathParams, { typed: true })] : getASTParams(schemas.pathParams, { typed: true }),
1278
1199
  {
1279
1200
  name: "params",
1280
1201
  type: `${factory.name}['queryParams']`,
1281
1202
  enabled: client.withQueryParams,
1282
- required: isRequired4(schemas.queryParams?.schema)
1203
+ required: isRequired(schemas.queryParams?.schema)
1283
1204
  },
1284
1205
  {
1285
1206
  name: "headers",
1286
1207
  type: `${factory.name}['headerParams']`,
1287
1208
  enabled: client.withHeaders,
1288
- required: isRequired4(schemas.headerParams?.schema)
1209
+ required: isRequired(schemas.headerParams?.schema)
1289
1210
  },
1290
1211
  {
1291
1212
  name: "data",
1292
1213
  type: `${factory.name}['request']`,
1293
1214
  enabled: client.withData,
1294
- required: isRequired4(schemas.request?.schema)
1215
+ required: isRequired(schemas.request?.schema)
1295
1216
  },
1296
1217
  {
1297
1218
  name: "options",
@@ -1303,21 +1224,21 @@ function Query({
1303
1224
  }
1304
1225
  ]);
1305
1226
  queryParams.add([
1306
- ...pathParamsType === "object" ? [getASTParams4(schemas.pathParams)] : getASTParams4(schemas.pathParams),
1227
+ ...pathParamsType === "object" ? [getASTParams(schemas.pathParams)] : getASTParams(schemas.pathParams),
1307
1228
  {
1308
1229
  name: "params",
1309
1230
  enabled: client.withQueryParams,
1310
- required: isRequired4(schemas.queryParams?.schema)
1231
+ required: isRequired(schemas.queryParams?.schema)
1311
1232
  },
1312
1233
  {
1313
1234
  name: "headers",
1314
1235
  enabled: client.withHeaders,
1315
- required: isRequired4(schemas.headerParams?.schema)
1236
+ required: isRequired(schemas.headerParams?.schema)
1316
1237
  },
1317
1238
  {
1318
1239
  name: "data",
1319
1240
  enabled: client.withData,
1320
- required: isRequired4(schemas.request?.schema)
1241
+ required: isRequired(schemas.request?.schema)
1321
1242
  },
1322
1243
  {
1323
1244
  name: "clientOptions",
@@ -1325,16 +1246,16 @@ function Query({
1325
1246
  }
1326
1247
  ]);
1327
1248
  queryKeyParams.add([
1328
- ...pathParamsType === "object" ? [getASTParams4(schemas.pathParams)] : getASTParams4(schemas.pathParams),
1249
+ ...pathParamsType === "object" ? [getASTParams(schemas.pathParams)] : getASTParams(schemas.pathParams),
1329
1250
  {
1330
1251
  name: "params",
1331
1252
  enabled: client.withQueryParams,
1332
- required: isRequired4(schemas.queryParams?.schema)
1253
+ required: isRequired(schemas.queryParams?.schema)
1333
1254
  },
1334
1255
  {
1335
1256
  name: "data",
1336
1257
  enabled: client.withData,
1337
- required: isRequired4(schemas.request?.schema)
1258
+ required: isRequired(schemas.request?.schema)
1338
1259
  }
1339
1260
  ]);
1340
1261
  const hook = {
@@ -1343,8 +1264,8 @@ function Query({
1343
1264
  queryOptions: isV5 ? `${queryOptions}(${queryParams.toString()})` : `${queryOptions}<${queryOptionsGenerics.join(", ")}>(${queryParams.toString()})`,
1344
1265
  queryKey: `${queryKey}(${queryKeyParams.toString()})`
1345
1266
  };
1346
- return /* @__PURE__ */ jsxs5(Fragment5, { children: [
1347
- /* @__PURE__ */ jsx7(
1267
+ return /* @__PURE__ */ jsxs(Fragment, { children: [
1268
+ /* @__PURE__ */ jsx(
1348
1269
  QueryKey,
1349
1270
  {
1350
1271
  keysFn: props.query ? props.query.queryKey : (keys) => keys,
@@ -1354,7 +1275,7 @@ function Query({
1354
1275
  typeName: queryKeyType
1355
1276
  }
1356
1277
  ),
1357
- props.queryOptions && /* @__PURE__ */ jsx7(
1278
+ props.queryOptions && /* @__PURE__ */ jsx(
1358
1279
  QueryOptions,
1359
1280
  {
1360
1281
  Template: QueryOptionsTemplate,
@@ -1365,12 +1286,12 @@ function Query({
1365
1286
  suspense: props.suspense
1366
1287
  }
1367
1288
  ),
1368
- props.query && /* @__PURE__ */ jsx7(
1369
- Template7,
1289
+ props.query && /* @__PURE__ */ jsx(
1290
+ Template6,
1370
1291
  {
1371
1292
  name: [name, props.infinite ? "Infinite" : void 0, props.suspense ? "Suspense" : void 0].filter(Boolean).join(""),
1372
1293
  generics: generics.toString(),
1373
- JSDoc: { comments: getComments2(operation) },
1294
+ JSDoc: { comments: getComments(operation) },
1374
1295
  params: params.toString(),
1375
1296
  returnType: `${resultType}<${resultGenerics.join(", ")}>`,
1376
1297
  hook,
@@ -1395,32 +1316,32 @@ Query.File = function({ templates }) {
1395
1316
  parser
1396
1317
  }
1397
1318
  }
1398
- } = useApp6();
1399
- const { getSchemas, getFile, getName } = useOperationManager5();
1400
- const operation = useOperation5();
1401
- const schemas = getSchemas(operation, { pluginKey: [pluginTsName5], type: "type" });
1402
- const zodSchemas = getSchemas(operation, { pluginKey: [pluginZodName2], type: "function" });
1319
+ } = useApp();
1320
+ const { getSchemas, getFile, getName } = useOperationManager();
1321
+ const operation = useOperation();
1322
+ const schemas = getSchemas(operation, { pluginKey: [pluginTsName], type: "type" });
1323
+ const zodSchemas = getSchemas(operation, { pluginKey: [pluginZodName], type: "function" });
1403
1324
  const file = getFile(operation);
1404
- const fileType = getFile(operation, { pluginKey: [pluginTsName5] });
1325
+ const fileType = getFile(operation, { pluginKey: [pluginTsName] });
1405
1326
  const fileZodSchemas = getFile(operation, {
1406
- pluginKey: [pluginZodName2]
1327
+ pluginKey: [pluginZodName]
1407
1328
  });
1408
1329
  const factoryName = getName(operation, { type: "type" });
1409
1330
  const importNames = getImportNames();
1410
- const isV5 = new PackageManager4().isValidSync(reactQueryDepRegex, ">=5");
1411
- const Template7 = templates?.query["react"] || defaultTemplates6["react"];
1331
+ const isV5 = new PackageManager().isValidSync(reactQueryDepRegex, ">=5");
1332
+ const Template6 = templates?.query["react"] || defaultTemplates5["react"];
1412
1333
  const QueryOptionsTemplate = templates?.queryOptions["react"] || QueryOptions.templates["react"];
1413
1334
  const QueryKeyTemplate = templates?.queryKey["react"] || QueryKey.templates["react"];
1414
1335
  const Import = templates?.queryImports["react"] || QueryImports.templates["react"];
1415
1336
  const factory = {
1416
1337
  name: factoryName
1417
1338
  };
1418
- return /* @__PURE__ */ jsx7(Parser3, { language: "typescript", children: /* @__PURE__ */ jsxs5(File4, { baseName: file.baseName, path: file.path, meta: file.meta, children: [
1419
- parser === "zod" && /* @__PURE__ */ jsx7(File4.Import, { name: [zodSchemas.response?.name], root: file.path, path: fileZodSchemas.path }),
1420
- /* @__PURE__ */ jsx7(File4.Import, { name: "client", path: importPath }),
1421
- /* @__PURE__ */ jsx7(File4.Import, { name: ["ResponseConfig"], path: importPath, isTypeOnly: true }),
1422
- /* @__PURE__ */ jsx7(
1423
- File4.Import,
1339
+ return /* @__PURE__ */ jsxs(File, { baseName: file.baseName, path: file.path, meta: file.meta, children: [
1340
+ parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zodSchemas.response?.name], root: file.path, path: fileZodSchemas.path }),
1341
+ /* @__PURE__ */ jsx(File.Import, { name: "client", path: importPath }),
1342
+ /* @__PURE__ */ jsx(File.Import, { name: ["ResponseConfig"], path: importPath, isTypeOnly: true }),
1343
+ /* @__PURE__ */ jsx(
1344
+ File.Import,
1424
1345
  {
1425
1346
  name: [
1426
1347
  schemas.request?.name,
@@ -1435,70 +1356,62 @@ Query.File = function({ templates }) {
1435
1356
  isTypeOnly: true
1436
1357
  }
1437
1358
  ),
1438
- /* @__PURE__ */ jsx7(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: false, isSuspense: false }),
1439
- !!infinite && /* @__PURE__ */ jsx7(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: true, isSuspense: false }),
1440
- !!suspense && isV5 && /* @__PURE__ */ jsx7(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: false, isSuspense: true }),
1441
- /* @__PURE__ */ jsxs5(File4.Source, { children: [
1442
- /* @__PURE__ */ jsx7(SchemaType, {}),
1443
- /* @__PURE__ */ jsx7(
1444
- Query,
1445
- {
1446
- factory,
1447
- Template: Template7,
1448
- QueryKeyTemplate,
1449
- QueryOptionsTemplate,
1450
- infinite: false,
1451
- suspense: false,
1452
- query,
1453
- queryOptions,
1454
- hookName: importNames.query["react"].hookName,
1455
- resultType: importNames.query["react"].resultType,
1456
- optionsType: importNames.query["react"].optionsType
1457
- }
1458
- ),
1459
- !!infinite && /* @__PURE__ */ jsx7(
1460
- Query,
1461
- {
1462
- factory,
1463
- Template: Template7,
1464
- QueryKeyTemplate,
1465
- QueryOptionsTemplate,
1466
- infinite,
1467
- suspense: false,
1468
- query,
1469
- queryOptions,
1470
- hookName: importNames.queryInfinite["react"].hookName,
1471
- resultType: importNames.queryInfinite["react"].resultType,
1472
- optionsType: importNames.queryInfinite["react"].optionsType
1473
- }
1474
- ),
1475
- !!suspense && isV5 && /* @__PURE__ */ jsx7(
1476
- Query,
1477
- {
1478
- factory,
1479
- Template: Template7,
1480
- QueryKeyTemplate,
1481
- QueryOptionsTemplate,
1482
- infinite: false,
1483
- suspense,
1484
- query,
1485
- queryOptions,
1486
- hookName: importNames.querySuspense["react"].hookName,
1487
- resultType: importNames.querySuspense["react"].resultType,
1488
- optionsType: importNames.querySuspense["react"].optionsType
1489
- }
1490
- )
1491
- ] })
1492
- ] }) });
1359
+ /* @__PURE__ */ jsx(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: false, isSuspense: false }),
1360
+ !!infinite && /* @__PURE__ */ jsx(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: true, isSuspense: false }),
1361
+ !!suspense && isV5 && /* @__PURE__ */ jsx(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: false, isSuspense: true }),
1362
+ /* @__PURE__ */ jsx(SchemaType, {}),
1363
+ /* @__PURE__ */ jsx(
1364
+ Query,
1365
+ {
1366
+ factory,
1367
+ Template: Template6,
1368
+ QueryKeyTemplate,
1369
+ QueryOptionsTemplate,
1370
+ infinite: false,
1371
+ suspense: false,
1372
+ query,
1373
+ queryOptions,
1374
+ hookName: importNames.query["react"].hookName,
1375
+ resultType: importNames.query["react"].resultType,
1376
+ optionsType: importNames.query["react"].optionsType
1377
+ }
1378
+ ),
1379
+ !!infinite && /* @__PURE__ */ jsx(
1380
+ Query,
1381
+ {
1382
+ factory,
1383
+ Template: Template6,
1384
+ QueryKeyTemplate,
1385
+ QueryOptionsTemplate,
1386
+ infinite,
1387
+ suspense: false,
1388
+ query,
1389
+ queryOptions,
1390
+ hookName: importNames.queryInfinite["react"].hookName,
1391
+ resultType: importNames.queryInfinite["react"].resultType,
1392
+ optionsType: importNames.queryInfinite["react"].optionsType
1393
+ }
1394
+ ),
1395
+ !!suspense && isV5 && /* @__PURE__ */ jsx(
1396
+ Query,
1397
+ {
1398
+ factory,
1399
+ Template: Template6,
1400
+ QueryKeyTemplate,
1401
+ QueryOptionsTemplate,
1402
+ infinite: false,
1403
+ suspense,
1404
+ query,
1405
+ queryOptions,
1406
+ hookName: importNames.querySuspense["react"].hookName,
1407
+ resultType: importNames.querySuspense["react"].resultType,
1408
+ optionsType: importNames.querySuspense["react"].optionsType
1409
+ }
1410
+ )
1411
+ ] });
1493
1412
  };
1494
- Query.templates = defaultTemplates6;
1413
+ Query.templates = defaultTemplates5;
1495
1414
 
1496
- export {
1497
- Mutation,
1498
- Operations,
1499
- QueryImports,
1500
- QueryKey,
1501
- QueryOptions,
1502
- Query
1503
- };
1504
- //# sourceMappingURL=chunk-5IL6M74X.js.map
1415
+ export { Mutation, Query, QueryImports, QueryKey, QueryOptions };
1416
+ //# sourceMappingURL=chunk-ZYTZV43V.js.map
1417
+ //# sourceMappingURL=chunk-ZYTZV43V.js.map