@kubb/plugin-react-query 3.0.0-alpha.4 → 3.0.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-JFX7DCS7.cjs → chunk-GTVJ55F2.cjs} +116 -150
- package/dist/chunk-GTVJ55F2.cjs.map +1 -0
- package/dist/{chunk-5IL6M74X.js → chunk-IVMTW4XS.js} +168 -202
- package/dist/chunk-IVMTW4XS.js.map +1 -0
- package/dist/components.cjs +2 -4
- package/dist/components.cjs.map +1 -1
- package/dist/components.d.cts +1 -2
- package/dist/components.d.ts +1 -2
- package/dist/components.js +1 -3
- package/dist/{index-C9fwRDH7.d.cts → index-5kpkk-7M.d.cts} +7 -41
- package/dist/{index-C9fwRDH7.d.ts → index-5kpkk-7M.d.ts} +7 -41
- package/dist/index.cjs +19 -59
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +7 -47
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
- package/src/OperationGenerator.tsx +0 -29
- package/src/__snapshots__/mutateAsQuery/updatePetWithForm.ts +11 -6
- package/src/__snapshots__/pathParamsTypeInline/getPetById.ts +11 -6
- package/src/__snapshots__/pathParamsTypeObject/getPetById.ts +11 -6
- package/src/__snapshots__/queryOptions/getPetById.ts +9 -5
- package/src/__snapshots__/queryWithoutQueryOptions/getPetById.ts +9 -5
- package/src/__snapshots__/upload/UploadFile.ts +11 -6
- package/src/__snapshots__/uploadMutation/UploadFile.ts +9 -5
- package/src/__snapshots__/variablesTypeMutate/deletePet.ts +7 -4
- package/src/components/Mutation.tsx +30 -30
- package/src/components/Query.tsx +74 -78
- package/src/components/QueryKey.tsx +11 -8
- package/src/components/QueryOptions.tsx +21 -13
- package/src/components/SchemaType.tsx +9 -5
- package/src/components/__snapshots__/gen/showPetById.ts +58 -48
- package/src/components/__snapshots__/gen/useCreatePets.ts +36 -36
- package/src/components/__snapshots__/gen/useCreatePetsMutate.ts +36 -37
- package/src/components/index.ts +0 -1
- package/src/plugin.ts +8 -29
- package/src/types.ts +0 -3
- package/dist/chunk-5IL6M74X.js.map +0 -1
- package/dist/chunk-JFX7DCS7.cjs.map +0 -1
- package/src/components/Operations.tsx +0 -74
|
@@ -3,12 +3,12 @@ import transformers from "@kubb/core/transformers";
|
|
|
3
3
|
import { FunctionParams, URLPath } from "@kubb/core/utils";
|
|
4
4
|
import { useOperation as useOperation2, useOperationManager as useOperationManager2 } from "@kubb/plugin-oas/hooks";
|
|
5
5
|
import { getASTParams, getComments } from "@kubb/plugin-oas/utils";
|
|
6
|
-
import { File, Function,
|
|
6
|
+
import { File as File2, Function, useApp as useApp2 } from "@kubb/react";
|
|
7
7
|
import { pluginTsName as pluginTsName2 } from "@kubb/plugin-ts";
|
|
8
8
|
|
|
9
9
|
// src/components/SchemaType.tsx
|
|
10
10
|
import { useOperation, useOperationManager } from "@kubb/plugin-oas/hooks";
|
|
11
|
-
import { Type, useApp } from "@kubb/react";
|
|
11
|
+
import { File, Type, useApp } from "@kubb/react";
|
|
12
12
|
import { pluginTsName } from "@kubb/plugin-ts";
|
|
13
13
|
import { Fragment, jsx, jsxs } from "@kubb/react/jsx-runtime";
|
|
14
14
|
function SchemaType() {
|
|
@@ -33,8 +33,8 @@ function SchemaType() {
|
|
|
33
33
|
const clientType = `${factoryName}Client`;
|
|
34
34
|
const isFormData = operation.getContentType() === "multipart/form-data";
|
|
35
35
|
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: `
|
|
36
|
+
/* @__PURE__ */ jsx(File.Source, { name: clientType, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: clientType, children: `typeof client<${TResponse}, ${TError}, ${isFormData ? "FormData" : TRequest}>` }) }),
|
|
37
|
+
/* @__PURE__ */ jsx(File.Source, { name: factoryName, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: factoryName, children: `
|
|
38
38
|
{
|
|
39
39
|
data: ${TData}
|
|
40
40
|
error: ${TError}
|
|
@@ -48,7 +48,7 @@ function SchemaType() {
|
|
|
48
48
|
return: Awaited<ReturnType<${clientType}>>
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
` })
|
|
51
|
+
` }) })
|
|
52
52
|
] });
|
|
53
53
|
}
|
|
54
54
|
|
|
@@ -83,7 +83,7 @@ ${transformers.createIndent(4)}`)}`;
|
|
|
83
83
|
})
|
|
84
84
|
}
|
|
85
85
|
` : void 0;
|
|
86
|
-
return /* @__PURE__ */ jsx2(Function, { export: true, name, params, JSDoc, children: `
|
|
86
|
+
return /* @__PURE__ */ jsx2(File2.Source, { name, isExportable: true, children: /* @__PURE__ */ jsx2(Function, { export: true, name, params, JSDoc, children: `
|
|
87
87
|
const { mutation: mutationOptions, client: clientOptions = {} } = options ?? {}
|
|
88
88
|
|
|
89
89
|
return ${hook.name}({
|
|
@@ -97,7 +97,7 @@ ${transformers.createIndent(4)}`)}`;
|
|
|
97
97
|
return ${dataReturnType === "data" ? "res.data" : "res"}
|
|
98
98
|
},
|
|
99
99
|
...mutationOptions
|
|
100
|
-
})` });
|
|
100
|
+
})` }) });
|
|
101
101
|
}
|
|
102
102
|
function RootTemplate({ children }) {
|
|
103
103
|
const {
|
|
@@ -113,11 +113,11 @@ function RootTemplate({ children }) {
|
|
|
113
113
|
const schemas = getSchemas(operation, { pluginKey: [pluginTsName2], type: "type" });
|
|
114
114
|
const file = getFile(operation);
|
|
115
115
|
const fileType = getFile(operation, { pluginKey: [pluginTsName2] });
|
|
116
|
-
return /* @__PURE__ */
|
|
117
|
-
/* @__PURE__ */ jsx2(
|
|
118
|
-
/* @__PURE__ */ jsx2(
|
|
116
|
+
return /* @__PURE__ */ jsxs2(File2, { baseName: file.baseName, path: file.path, meta: file.meta, children: [
|
|
117
|
+
/* @__PURE__ */ jsx2(File2.Import, { name: "client", path: importPath }),
|
|
118
|
+
/* @__PURE__ */ jsx2(File2.Import, { name: ["ResponseConfig"], path: importPath, isTypeOnly: true }),
|
|
119
119
|
/* @__PURE__ */ jsx2(
|
|
120
|
-
|
|
120
|
+
File2.Import,
|
|
121
121
|
{
|
|
122
122
|
name: [
|
|
123
123
|
schemas.request?.name,
|
|
@@ -133,19 +133,19 @@ function RootTemplate({ children }) {
|
|
|
133
133
|
}
|
|
134
134
|
),
|
|
135
135
|
/* @__PURE__ */ jsx2(
|
|
136
|
-
|
|
136
|
+
File2.Import,
|
|
137
137
|
{
|
|
138
138
|
name: ["UseMutationOptions", "UseMutationResult"],
|
|
139
139
|
path: typeof mutate !== "boolean" && mutate.importPath ? mutate.importPath : "@tanstack/react-query",
|
|
140
140
|
isTypeOnly: true
|
|
141
141
|
}
|
|
142
142
|
),
|
|
143
|
-
/* @__PURE__ */ jsx2(
|
|
144
|
-
|
|
145
|
-
] })
|
|
143
|
+
/* @__PURE__ */ jsx2(File2.Import, { name: ["useMutation"], path: typeof mutate !== "boolean" && mutate.importPath ? mutate.importPath : "@tanstack/react-query" }),
|
|
144
|
+
children
|
|
145
|
+
] });
|
|
146
146
|
}
|
|
147
147
|
var defaultTemplates = { default: Template, root: RootTemplate };
|
|
148
|
-
function Mutation({ Template:
|
|
148
|
+
function Mutation({ Template: Template6 = defaultTemplates.default }) {
|
|
149
149
|
const {
|
|
150
150
|
plugin: {
|
|
151
151
|
options: { dataReturnType, mutate }
|
|
@@ -266,7 +266,7 @@ function Mutation({ Template: Template7 = defaultTemplates.default }) {
|
|
|
266
266
|
return null;
|
|
267
267
|
}
|
|
268
268
|
return /* @__PURE__ */ jsx2(Fragment2, { children: /* @__PURE__ */ jsx2(
|
|
269
|
-
|
|
269
|
+
Template6,
|
|
270
270
|
{
|
|
271
271
|
name,
|
|
272
272
|
JSDoc: { comments: getComments(operation) },
|
|
@@ -280,51 +280,20 @@ function Mutation({ Template: Template7 = defaultTemplates.default }) {
|
|
|
280
280
|
}
|
|
281
281
|
Mutation.File = function({ ...props }) {
|
|
282
282
|
const templates = { ...defaultTemplates, ...props.templates };
|
|
283
|
-
const
|
|
284
|
-
const
|
|
285
|
-
return /* @__PURE__ */ jsxs2(
|
|
283
|
+
const Template6 = templates.default;
|
|
284
|
+
const RootTemplate2 = templates.root;
|
|
285
|
+
return /* @__PURE__ */ jsxs2(RootTemplate2, { children: [
|
|
286
286
|
/* @__PURE__ */ jsx2(SchemaType, {}),
|
|
287
|
-
/* @__PURE__ */ jsx2(Mutation, { Template:
|
|
287
|
+
/* @__PURE__ */ jsx2(Mutation, { Template: Template6 })
|
|
288
288
|
] });
|
|
289
289
|
};
|
|
290
290
|
Mutation.templates = defaultTemplates;
|
|
291
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
292
|
// src/components/Query.tsx
|
|
324
293
|
import { PackageManager as PackageManager4 } from "@kubb/core";
|
|
325
294
|
import transformers3 from "@kubb/core/transformers";
|
|
326
295
|
import { FunctionParams as FunctionParams4, URLPath as URLPath4 } from "@kubb/core/utils";
|
|
327
|
-
import {
|
|
296
|
+
import { File as File6, Function as Function4, useApp as useApp5 } from "@kubb/react";
|
|
328
297
|
import { pluginTsName as pluginTsName5 } from "@kubb/plugin-ts";
|
|
329
298
|
import { pluginZodName as pluginZodName2 } from "@kubb/plugin-zod";
|
|
330
299
|
import { useOperation as useOperation5, useOperationManager as useOperationManager5 } from "@kubb/plugin-oas/hooks";
|
|
@@ -428,23 +397,23 @@ function getImportNames() {
|
|
|
428
397
|
// src/components/QueryImports.tsx
|
|
429
398
|
import { PackageManager as PackageManager2 } from "@kubb/core";
|
|
430
399
|
import { File as File3 } from "@kubb/react";
|
|
431
|
-
import { Fragment as Fragment3, jsx as
|
|
432
|
-
function
|
|
400
|
+
import { Fragment as Fragment3, jsx as jsx3, jsxs as jsxs3 } from "@kubb/react/jsx-runtime";
|
|
401
|
+
function Template2({ path, hookPath = path, isInfinite, hookName, queryOptions, optionsType, resultType }) {
|
|
433
402
|
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
434
|
-
/* @__PURE__ */
|
|
435
|
-
/* @__PURE__ */
|
|
436
|
-
queryOptions && /* @__PURE__ */
|
|
437
|
-
/* @__PURE__ */
|
|
403
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: [optionsType, resultType], path, isTypeOnly: true }),
|
|
404
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: [hookName], path: hookPath }),
|
|
405
|
+
queryOptions && /* @__PURE__ */ jsx3(File3.Import, { name: [queryOptions].filter(Boolean), path }),
|
|
406
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: ["QueryKey", "WithRequired", isInfinite ? "InfiniteData" : void 0].filter(Boolean), path, isTypeOnly: true })
|
|
438
407
|
] });
|
|
439
408
|
}
|
|
440
|
-
var
|
|
409
|
+
var defaultTemplates2 = {
|
|
441
410
|
get react() {
|
|
442
411
|
return function({ context, hookPath, ...rest }) {
|
|
443
412
|
const importNames = getImportNames();
|
|
444
413
|
const isV5 = new PackageManager2().isValidSync(reactQueryDepRegex, ">=5");
|
|
445
414
|
const { isInfinite, isSuspense } = context;
|
|
446
|
-
return /* @__PURE__ */
|
|
447
|
-
|
|
415
|
+
return /* @__PURE__ */ jsx3(
|
|
416
|
+
Template2,
|
|
448
417
|
{
|
|
449
418
|
isInfinite,
|
|
450
419
|
...isSuspense ? importNames.querySuspense.react : isInfinite ? importNames.queryInfinite.react : importNames.query.react,
|
|
@@ -460,8 +429,8 @@ var defaultTemplates3 = {
|
|
|
460
429
|
const importNames = getImportNames();
|
|
461
430
|
const isV5 = new PackageManager2().isValidSync(reactQueryDepRegex, ">=5");
|
|
462
431
|
const { isInfinite } = context;
|
|
463
|
-
return /* @__PURE__ */
|
|
464
|
-
|
|
432
|
+
return /* @__PURE__ */ jsx3(
|
|
433
|
+
Template2,
|
|
465
434
|
{
|
|
466
435
|
isInfinite,
|
|
467
436
|
...isInfinite ? importNames.queryInfinite.solid : importNames.query.solid,
|
|
@@ -477,8 +446,8 @@ var defaultTemplates3 = {
|
|
|
477
446
|
const importNames = getImportNames();
|
|
478
447
|
const isV5 = new PackageManager2().isValidSync(reactQueryDepRegex, ">=5");
|
|
479
448
|
const { isInfinite } = context;
|
|
480
|
-
return /* @__PURE__ */
|
|
481
|
-
|
|
449
|
+
return /* @__PURE__ */ jsx3(
|
|
450
|
+
Template2,
|
|
482
451
|
{
|
|
483
452
|
isInfinite,
|
|
484
453
|
...isInfinite ? importNames.queryInfinite.svelte : importNames.query.svelte,
|
|
@@ -497,8 +466,8 @@ var defaultTemplates3 = {
|
|
|
497
466
|
const path = "@tanstack/vue-query";
|
|
498
467
|
return /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
499
468
|
isV5 && /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
500
|
-
/* @__PURE__ */
|
|
501
|
-
|
|
469
|
+
/* @__PURE__ */ jsx3(
|
|
470
|
+
Template2,
|
|
502
471
|
{
|
|
503
472
|
isInfinite,
|
|
504
473
|
...isInfinite ? importNames.queryInfinite.vue : importNames.query.vue,
|
|
@@ -507,28 +476,28 @@ var defaultTemplates3 = {
|
|
|
507
476
|
...rest
|
|
508
477
|
}
|
|
509
478
|
),
|
|
510
|
-
/* @__PURE__ */
|
|
479
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: ["QueryObserverOptions"], path, isTypeOnly: true })
|
|
511
480
|
] }),
|
|
512
481
|
!isV5 && isInfinite && /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
513
|
-
/* @__PURE__ */
|
|
514
|
-
/* @__PURE__ */
|
|
515
|
-
/* @__PURE__ */
|
|
482
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: [importNames.queryInfinite.vue.resultType], path, isTypeOnly: true }),
|
|
483
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: [importNames.queryInfinite.vue.optionsType], path: "@tanstack/vue-query/build/lib/types", isTypeOnly: true }),
|
|
484
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: [importNames.queryInfinite.vue.hookName], path })
|
|
516
485
|
] }),
|
|
517
486
|
!isV5 && !isInfinite && /* @__PURE__ */ jsxs3(Fragment3, { children: [
|
|
518
|
-
/* @__PURE__ */
|
|
519
|
-
/* @__PURE__ */
|
|
520
|
-
/* @__PURE__ */
|
|
487
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: [importNames.query.vue.resultType], path, isTypeOnly: true }),
|
|
488
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: [importNames.query.vue.optionsType], path: "@tanstack/vue-query/build/lib/types", isTypeOnly: true }),
|
|
489
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: [importNames.query.vue.hookName], path })
|
|
521
490
|
] }),
|
|
522
|
-
/* @__PURE__ */
|
|
523
|
-
/* @__PURE__ */
|
|
524
|
-
/* @__PURE__ */
|
|
491
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: ["unref"], path: "vue" }),
|
|
492
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
493
|
+
/* @__PURE__ */ jsx3(File3.Import, { name: ["QueryKey", "WithRequired"], path, isTypeOnly: true })
|
|
525
494
|
] });
|
|
526
495
|
};
|
|
527
496
|
}
|
|
528
497
|
};
|
|
529
|
-
function QueryImports({ hookPath, isInfinite, isSuspense, Template:
|
|
530
|
-
return /* @__PURE__ */
|
|
531
|
-
|
|
498
|
+
function QueryImports({ hookPath, isInfinite, isSuspense, Template: Template6 = defaultTemplates2.react }) {
|
|
499
|
+
return /* @__PURE__ */ jsx3(
|
|
500
|
+
Template6,
|
|
532
501
|
{
|
|
533
502
|
hookPath,
|
|
534
503
|
context: {
|
|
@@ -538,36 +507,36 @@ function QueryImports({ hookPath, isInfinite, isSuspense, Template: Template7 =
|
|
|
538
507
|
}
|
|
539
508
|
);
|
|
540
509
|
}
|
|
541
|
-
QueryImports.templates =
|
|
510
|
+
QueryImports.templates = defaultTemplates2;
|
|
542
511
|
|
|
543
512
|
// src/components/QueryKey.tsx
|
|
544
513
|
import { FunctionParams as FunctionParams2, URLPath as URLPath2 } from "@kubb/core/utils";
|
|
545
|
-
import { Function as Function2, Type as Type2, useApp as
|
|
514
|
+
import { Function as Function2, Type as Type2, File as File4, useApp as useApp3 } from "@kubb/react";
|
|
546
515
|
import { useOperation as useOperation3, useOperationManager as useOperationManager3 } from "@kubb/plugin-oas/hooks";
|
|
547
516
|
import { getASTParams as getASTParams2 } from "@kubb/plugin-oas/utils";
|
|
548
517
|
import { isRequired as isRequired2 } from "@kubb/oas";
|
|
549
518
|
import { pluginTsName as pluginTsName3 } from "@kubb/plugin-ts";
|
|
550
|
-
import { Fragment as Fragment4, jsx as
|
|
551
|
-
function
|
|
519
|
+
import { Fragment as Fragment4, jsx as jsx4, jsxs as jsxs4 } from "@kubb/react/jsx-runtime";
|
|
520
|
+
function Template3({ name, typeName, params, generics, returnType, JSDoc, keys }) {
|
|
552
521
|
return /* @__PURE__ */ jsxs4(Fragment4, { children: [
|
|
553
|
-
/* @__PURE__ */
|
|
554
|
-
/* @__PURE__ */
|
|
522
|
+
/* @__PURE__ */ jsx4(File4.Source, { name, isExportable: true, children: /* @__PURE__ */ jsx4(Function2.Arrow, { name, export: true, generics, params, returnType, singleLine: true, JSDoc, children: `[${keys}] as const` }) }),
|
|
523
|
+
/* @__PURE__ */ jsx4(File4.Source, { name, isExportable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx4(Type2, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` }) })
|
|
555
524
|
] });
|
|
556
525
|
}
|
|
557
|
-
var
|
|
526
|
+
var defaultTemplates3 = {
|
|
558
527
|
get react() {
|
|
559
528
|
return function(props) {
|
|
560
|
-
return /* @__PURE__ */
|
|
529
|
+
return /* @__PURE__ */ jsx4(Template3, { ...props });
|
|
561
530
|
};
|
|
562
531
|
},
|
|
563
532
|
get solid() {
|
|
564
533
|
return function(props) {
|
|
565
|
-
return /* @__PURE__ */
|
|
534
|
+
return /* @__PURE__ */ jsx4(Template3, { ...props });
|
|
566
535
|
};
|
|
567
536
|
},
|
|
568
537
|
get svelte() {
|
|
569
538
|
return function(props) {
|
|
570
|
-
return /* @__PURE__ */
|
|
539
|
+
return /* @__PURE__ */ jsx4(Template3, { ...props });
|
|
571
540
|
};
|
|
572
541
|
},
|
|
573
542
|
get vue() {
|
|
@@ -577,7 +546,7 @@ var defaultTemplates4 = {
|
|
|
577
546
|
plugin: {
|
|
578
547
|
options: { pathParamsType, query }
|
|
579
548
|
}
|
|
580
|
-
} =
|
|
549
|
+
} = useApp3();
|
|
581
550
|
const { getSchemas } = useOperationManager3();
|
|
582
551
|
const operation = useOperation3();
|
|
583
552
|
const schemas = getSchemas(operation, { pluginKey: [pluginTsName3], type: "type" });
|
|
@@ -623,16 +592,16 @@ var defaultTemplates4 = {
|
|
|
623
592
|
withQueryParams ? "...(params ? [params] : [])" : void 0,
|
|
624
593
|
withRequest ? "...(request ? [request] : [])" : void 0
|
|
625
594
|
].filter(Boolean);
|
|
626
|
-
return /* @__PURE__ */
|
|
595
|
+
return /* @__PURE__ */ jsx4(Template3, { ...rest, params: params.toString(), keys: keys.join(", ") });
|
|
627
596
|
};
|
|
628
597
|
}
|
|
629
598
|
};
|
|
630
|
-
function QueryKey({ name, typeName, factory, keysFn, Template:
|
|
599
|
+
function QueryKey({ name, typeName, factory, keysFn, Template: Template6 = defaultTemplates3.react }) {
|
|
631
600
|
const {
|
|
632
601
|
plugin: {
|
|
633
602
|
options: { pathParamsType }
|
|
634
603
|
}
|
|
635
|
-
} =
|
|
604
|
+
} = useApp3();
|
|
636
605
|
const { getSchemas } = useOperationManager3();
|
|
637
606
|
const operation = useOperation3();
|
|
638
607
|
const schemas = getSchemas(operation, { pluginKey: [pluginTsName3], type: "type" });
|
|
@@ -663,9 +632,9 @@ function QueryKey({ name, typeName, factory, keysFn, Template: Template7 = defau
|
|
|
663
632
|
withQueryParams ? "...(params ? [params] : [])" : void 0,
|
|
664
633
|
withRequest ? "...(data ? [data] : [])" : void 0
|
|
665
634
|
].filter(Boolean);
|
|
666
|
-
return /* @__PURE__ */
|
|
635
|
+
return /* @__PURE__ */ jsx4(Template6, { typeName, name, params: params.toString(), keys: keysFn(keys).join(", "), context: { factory } });
|
|
667
636
|
}
|
|
668
|
-
QueryKey.templates =
|
|
637
|
+
QueryKey.templates = defaultTemplates3;
|
|
669
638
|
|
|
670
639
|
// src/components/QueryOptions.tsx
|
|
671
640
|
import { PackageManager as PackageManager3 } from "@kubb/core";
|
|
@@ -673,12 +642,12 @@ import transformers2 from "@kubb/core/transformers";
|
|
|
673
642
|
import { FunctionParams as FunctionParams3, URLPath as URLPath3 } from "@kubb/core/utils";
|
|
674
643
|
import { useOperation as useOperation4, useOperationManager as useOperationManager4 } from "@kubb/plugin-oas/hooks";
|
|
675
644
|
import { getASTParams as getASTParams3 } from "@kubb/plugin-oas/utils";
|
|
676
|
-
import { Function as Function3, useApp as
|
|
645
|
+
import { Function as Function3, useApp as useApp4, File as File5 } from "@kubb/react";
|
|
677
646
|
import { pluginZodName } from "@kubb/plugin-zod";
|
|
678
647
|
import { isRequired as isRequired3 } from "@kubb/oas";
|
|
679
648
|
import { pluginTsName as pluginTsName4 } from "@kubb/plugin-ts";
|
|
680
|
-
import { jsx as
|
|
681
|
-
function
|
|
649
|
+
import { jsx as jsx5 } from "@kubb/react/jsx-runtime";
|
|
650
|
+
function Template4({ name, params, generics, returnType, JSDoc, hook, client, infinite, dataReturnType, parser }) {
|
|
682
651
|
const isV5 = new PackageManager3().isValidSync(reactQueryDepRegex, ">=5");
|
|
683
652
|
const isFormData = client.contentType === "multipart/form-data";
|
|
684
653
|
const headers = [
|
|
@@ -728,7 +697,7 @@ ${transformers2.createIndent(4)}`)}`;
|
|
|
728
697
|
` : void 0;
|
|
729
698
|
if (infinite) {
|
|
730
699
|
if (isV5) {
|
|
731
|
-
return /* @__PURE__ */
|
|
700
|
+
return /* @__PURE__ */ jsx5(File5.Source, { name, isExportable: true, children: /* @__PURE__ */ jsx5(Function3, { name, export: true, params, JSDoc, children: `
|
|
732
701
|
const queryKey = ${hook.queryKey}
|
|
733
702
|
|
|
734
703
|
return infiniteQueryOptions({
|
|
@@ -745,9 +714,9 @@ ${transformers2.createIndent(4)}`)}`;
|
|
|
745
714
|
${resolvedQueryOptions}
|
|
746
715
|
})
|
|
747
716
|
|
|
748
|
-
` });
|
|
717
|
+
` }) });
|
|
749
718
|
}
|
|
750
|
-
return /* @__PURE__ */
|
|
719
|
+
return /* @__PURE__ */ jsx5(File5.Source, { name, isExportable: true, children: /* @__PURE__ */ jsx5(Function3, { name, export: true, generics, returnType, params, JSDoc, children: `
|
|
751
720
|
const queryKey = ${hook.queryKey}
|
|
752
721
|
|
|
753
722
|
return {
|
|
@@ -764,10 +733,10 @@ ${transformers2.createIndent(4)}`)}`;
|
|
|
764
733
|
${resolvedQueryOptions}
|
|
765
734
|
}
|
|
766
735
|
|
|
767
|
-
` });
|
|
736
|
+
` }) });
|
|
768
737
|
}
|
|
769
738
|
if (isV5) {
|
|
770
|
-
return /* @__PURE__ */
|
|
739
|
+
return /* @__PURE__ */ jsx5(File5.Source, { name, isExportable: true, children: /* @__PURE__ */ jsx5(Function3, { name, export: true, params, JSDoc, children: `
|
|
771
740
|
const queryKey = ${hook.queryKey}
|
|
772
741
|
|
|
773
742
|
return queryOptions({
|
|
@@ -784,9 +753,9 @@ ${transformers2.createIndent(4)}`)}`;
|
|
|
784
753
|
${resolvedQueryOptions}
|
|
785
754
|
})
|
|
786
755
|
|
|
787
|
-
` });
|
|
756
|
+
` }) });
|
|
788
757
|
}
|
|
789
|
-
return /* @__PURE__ */
|
|
758
|
+
return /* @__PURE__ */ jsx5(File5.Source, { name, isExportable: true, children: /* @__PURE__ */ jsx5(Function3, { name, export: true, generics, returnType, params, JSDoc, children: `
|
|
790
759
|
const queryKey = ${hook.queryKey}
|
|
791
760
|
|
|
792
761
|
return {
|
|
@@ -803,22 +772,22 @@ ${transformers2.createIndent(4)}`)}`;
|
|
|
803
772
|
${resolvedQueryOptions}
|
|
804
773
|
}
|
|
805
774
|
|
|
806
|
-
` });
|
|
775
|
+
` }) });
|
|
807
776
|
}
|
|
808
|
-
var
|
|
777
|
+
var defaultTemplates4 = {
|
|
809
778
|
get react() {
|
|
810
779
|
return function(props) {
|
|
811
|
-
return /* @__PURE__ */
|
|
780
|
+
return /* @__PURE__ */ jsx5(Template4, { ...props });
|
|
812
781
|
};
|
|
813
782
|
},
|
|
814
783
|
get solid() {
|
|
815
784
|
return function(props) {
|
|
816
|
-
return /* @__PURE__ */
|
|
785
|
+
return /* @__PURE__ */ jsx5(Template4, { ...props });
|
|
817
786
|
};
|
|
818
787
|
},
|
|
819
788
|
get svelte() {
|
|
820
789
|
return function(props) {
|
|
821
|
-
return /* @__PURE__ */
|
|
790
|
+
return /* @__PURE__ */ jsx5(Template4, { ...props });
|
|
822
791
|
};
|
|
823
792
|
},
|
|
824
793
|
get vue() {
|
|
@@ -828,7 +797,7 @@ var defaultTemplates5 = {
|
|
|
828
797
|
plugin: {
|
|
829
798
|
options: { pathParamsType }
|
|
830
799
|
}
|
|
831
|
-
} =
|
|
800
|
+
} = useApp4();
|
|
832
801
|
const { getSchemas } = useOperationManager4();
|
|
833
802
|
const operation = useOperation4();
|
|
834
803
|
const schemas = getSchemas(operation, { pluginKey: [pluginTsName4], type: "type" });
|
|
@@ -908,18 +877,18 @@ var defaultTemplates5 = {
|
|
|
908
877
|
queryKey: `${queryKey}(${queryKeyParams.toString()})`,
|
|
909
878
|
children: unrefs
|
|
910
879
|
};
|
|
911
|
-
return /* @__PURE__ */
|
|
880
|
+
return /* @__PURE__ */ jsx5(Template4, { ...rest, params: params.toString(), hook, client });
|
|
912
881
|
};
|
|
913
882
|
}
|
|
914
883
|
};
|
|
915
|
-
function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType, Template:
|
|
884
|
+
function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType, Template: Template6 = defaultTemplates4.react }) {
|
|
916
885
|
const {
|
|
917
886
|
pluginManager,
|
|
918
887
|
plugin: {
|
|
919
888
|
key: pluginKey,
|
|
920
889
|
options: { parser, pathParamsType, queryOptions }
|
|
921
890
|
}
|
|
922
|
-
} =
|
|
891
|
+
} = useApp4();
|
|
923
892
|
const { getSchemas } = useOperationManager4();
|
|
924
893
|
const operation = useOperation4();
|
|
925
894
|
const contentType = operation.getContentType();
|
|
@@ -997,8 +966,8 @@ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType,
|
|
|
997
966
|
if (!queryOptions) {
|
|
998
967
|
return null;
|
|
999
968
|
}
|
|
1000
|
-
return /* @__PURE__ */
|
|
1001
|
-
|
|
969
|
+
return /* @__PURE__ */ jsx5(
|
|
970
|
+
Template6,
|
|
1002
971
|
{
|
|
1003
972
|
name: queryOptionsName,
|
|
1004
973
|
params: params.toString(),
|
|
@@ -1016,16 +985,16 @@ function QueryOptions({ factory, infinite, suspense, resultType, dataReturnType,
|
|
|
1016
985
|
}
|
|
1017
986
|
);
|
|
1018
987
|
}
|
|
1019
|
-
QueryOptions.templates =
|
|
988
|
+
QueryOptions.templates = defaultTemplates4;
|
|
1020
989
|
|
|
1021
990
|
// src/components/Query.tsx
|
|
1022
991
|
import { isRequired as isRequired4 } from "@kubb/oas";
|
|
1023
|
-
import { Fragment as Fragment5, jsx as
|
|
1024
|
-
function
|
|
992
|
+
import { Fragment as Fragment5, jsx as jsx6, jsxs as jsxs5 } from "@kubb/react/jsx-runtime";
|
|
993
|
+
function Template5({ name, generics, returnType, params, JSDoc, hook, infinite }) {
|
|
1025
994
|
const isV5 = new PackageManager4().isValidSync(reactQueryDepRegex, ">=5");
|
|
1026
995
|
const resolvedReturnType = `${returnType} & { queryKey: TQueryKey }`;
|
|
1027
996
|
if (isV5) {
|
|
1028
|
-
return /* @__PURE__ */
|
|
997
|
+
return /* @__PURE__ */ jsx6(File6.Source, { name, isExportable: true, children: /* @__PURE__ */ jsx6(Function4, { name, export: true, generics, returnType: resolvedReturnType, params, JSDoc, children: `
|
|
1029
998
|
const { query: queryOptions, client: clientOptions = {} } = options ?? {}
|
|
1030
999
|
const queryKey = queryOptions?.queryKey ?? ${hook.queryKey}
|
|
1031
1000
|
|
|
@@ -1041,7 +1010,7 @@ function Template6({ name, generics, returnType, params, JSDoc, hook, infinite }
|
|
|
1041
1010
|
|
|
1042
1011
|
` }) });
|
|
1043
1012
|
}
|
|
1044
|
-
return /* @__PURE__ */
|
|
1013
|
+
return /* @__PURE__ */ jsx6(File6.Source, { name, isExportable: true, children: /* @__PURE__ */ jsx6(Function4, { name, export: true, generics, returnType: resolvedReturnType, params, JSDoc, children: `
|
|
1045
1014
|
const { query: queryOptions, client: clientOptions = {} } = options ?? {}
|
|
1046
1015
|
const queryKey = queryOptions?.queryKey ?? ${hook.queryKey}
|
|
1047
1016
|
|
|
@@ -1057,20 +1026,20 @@ function Template6({ name, generics, returnType, params, JSDoc, hook, infinite }
|
|
|
1057
1026
|
|
|
1058
1027
|
` }) });
|
|
1059
1028
|
}
|
|
1060
|
-
var
|
|
1029
|
+
var defaultTemplates5 = {
|
|
1061
1030
|
get react() {
|
|
1062
1031
|
return function(props) {
|
|
1063
|
-
return /* @__PURE__ */
|
|
1032
|
+
return /* @__PURE__ */ jsx6(Template5, { ...props });
|
|
1064
1033
|
};
|
|
1065
1034
|
},
|
|
1066
1035
|
get solid() {
|
|
1067
1036
|
return function(props) {
|
|
1068
|
-
return /* @__PURE__ */
|
|
1037
|
+
return /* @__PURE__ */ jsx6(Template5, { ...props });
|
|
1069
1038
|
};
|
|
1070
1039
|
},
|
|
1071
1040
|
get svelte() {
|
|
1072
1041
|
return function(props) {
|
|
1073
|
-
return /* @__PURE__ */
|
|
1042
|
+
return /* @__PURE__ */ jsx6(Template5, { ...props });
|
|
1074
1043
|
};
|
|
1075
1044
|
},
|
|
1076
1045
|
get vue() {
|
|
@@ -1082,7 +1051,7 @@ var defaultTemplates6 = {
|
|
|
1082
1051
|
key: pluginKey,
|
|
1083
1052
|
options: { pathParamsType }
|
|
1084
1053
|
}
|
|
1085
|
-
} =
|
|
1054
|
+
} = useApp5();
|
|
1086
1055
|
const operation = useOperation5();
|
|
1087
1056
|
const { getSchemas } = useOperationManager5();
|
|
1088
1057
|
const importNames = getImportNames();
|
|
@@ -1198,8 +1167,8 @@ var defaultTemplates6 = {
|
|
|
1198
1167
|
required: isRequired4(schemas.request?.schema)
|
|
1199
1168
|
}
|
|
1200
1169
|
]);
|
|
1201
|
-
return /* @__PURE__ */
|
|
1202
|
-
|
|
1170
|
+
return /* @__PURE__ */ jsx6(
|
|
1171
|
+
Template5,
|
|
1203
1172
|
{
|
|
1204
1173
|
...rest,
|
|
1205
1174
|
params: params.toString(),
|
|
@@ -1220,7 +1189,7 @@ function Query({
|
|
|
1220
1189
|
optionsType,
|
|
1221
1190
|
hookName,
|
|
1222
1191
|
resultType,
|
|
1223
|
-
Template:
|
|
1192
|
+
Template: Template6 = defaultTemplates5.react,
|
|
1224
1193
|
QueryKeyTemplate = QueryKey.templates.react,
|
|
1225
1194
|
QueryOptionsTemplate = QueryOptions.templates.react,
|
|
1226
1195
|
...props
|
|
@@ -1231,7 +1200,7 @@ function Query({
|
|
|
1231
1200
|
key: pluginKey,
|
|
1232
1201
|
options: { dataReturnType, pathParamsType }
|
|
1233
1202
|
}
|
|
1234
|
-
} =
|
|
1203
|
+
} = useApp5();
|
|
1235
1204
|
const operation = useOperation5();
|
|
1236
1205
|
const { getSchemas, getName } = useOperationManager5();
|
|
1237
1206
|
const schemas = getSchemas(operation, { pluginKey: [pluginTsName5], type: "type" });
|
|
@@ -1344,7 +1313,7 @@ function Query({
|
|
|
1344
1313
|
queryKey: `${queryKey}(${queryKeyParams.toString()})`
|
|
1345
1314
|
};
|
|
1346
1315
|
return /* @__PURE__ */ jsxs5(Fragment5, { children: [
|
|
1347
|
-
/* @__PURE__ */
|
|
1316
|
+
/* @__PURE__ */ jsx6(
|
|
1348
1317
|
QueryKey,
|
|
1349
1318
|
{
|
|
1350
1319
|
keysFn: props.query ? props.query.queryKey : (keys) => keys,
|
|
@@ -1354,7 +1323,7 @@ function Query({
|
|
|
1354
1323
|
typeName: queryKeyType
|
|
1355
1324
|
}
|
|
1356
1325
|
),
|
|
1357
|
-
props.queryOptions && /* @__PURE__ */
|
|
1326
|
+
props.queryOptions && /* @__PURE__ */ jsx6(
|
|
1358
1327
|
QueryOptions,
|
|
1359
1328
|
{
|
|
1360
1329
|
Template: QueryOptionsTemplate,
|
|
@@ -1365,8 +1334,8 @@ function Query({
|
|
|
1365
1334
|
suspense: props.suspense
|
|
1366
1335
|
}
|
|
1367
1336
|
),
|
|
1368
|
-
props.query && /* @__PURE__ */
|
|
1369
|
-
|
|
1337
|
+
props.query && /* @__PURE__ */ jsx6(
|
|
1338
|
+
Template6,
|
|
1370
1339
|
{
|
|
1371
1340
|
name: [name, props.infinite ? "Infinite" : void 0, props.suspense ? "Suspense" : void 0].filter(Boolean).join(""),
|
|
1372
1341
|
generics: generics.toString(),
|
|
@@ -1395,7 +1364,7 @@ Query.File = function({ templates }) {
|
|
|
1395
1364
|
parser
|
|
1396
1365
|
}
|
|
1397
1366
|
}
|
|
1398
|
-
} =
|
|
1367
|
+
} = useApp5();
|
|
1399
1368
|
const { getSchemas, getFile, getName } = useOperationManager5();
|
|
1400
1369
|
const operation = useOperation5();
|
|
1401
1370
|
const schemas = getSchemas(operation, { pluginKey: [pluginTsName5], type: "type" });
|
|
@@ -1408,19 +1377,19 @@ Query.File = function({ templates }) {
|
|
|
1408
1377
|
const factoryName = getName(operation, { type: "type" });
|
|
1409
1378
|
const importNames = getImportNames();
|
|
1410
1379
|
const isV5 = new PackageManager4().isValidSync(reactQueryDepRegex, ">=5");
|
|
1411
|
-
const
|
|
1380
|
+
const Template6 = templates?.query["react"] || defaultTemplates5["react"];
|
|
1412
1381
|
const QueryOptionsTemplate = templates?.queryOptions["react"] || QueryOptions.templates["react"];
|
|
1413
1382
|
const QueryKeyTemplate = templates?.queryKey["react"] || QueryKey.templates["react"];
|
|
1414
1383
|
const Import = templates?.queryImports["react"] || QueryImports.templates["react"];
|
|
1415
1384
|
const factory = {
|
|
1416
1385
|
name: factoryName
|
|
1417
1386
|
};
|
|
1418
|
-
return /* @__PURE__ */
|
|
1419
|
-
parser === "zod" && /* @__PURE__ */
|
|
1420
|
-
/* @__PURE__ */
|
|
1421
|
-
/* @__PURE__ */
|
|
1422
|
-
/* @__PURE__ */
|
|
1423
|
-
|
|
1387
|
+
return /* @__PURE__ */ jsxs5(File6, { baseName: file.baseName, path: file.path, meta: file.meta, children: [
|
|
1388
|
+
parser === "zod" && /* @__PURE__ */ jsx6(File6.Import, { name: [zodSchemas.response?.name], root: file.path, path: fileZodSchemas.path }),
|
|
1389
|
+
/* @__PURE__ */ jsx6(File6.Import, { name: "client", path: importPath }),
|
|
1390
|
+
/* @__PURE__ */ jsx6(File6.Import, { name: ["ResponseConfig"], path: importPath, isTypeOnly: true }),
|
|
1391
|
+
/* @__PURE__ */ jsx6(
|
|
1392
|
+
File6.Import,
|
|
1424
1393
|
{
|
|
1425
1394
|
name: [
|
|
1426
1395
|
schemas.request?.name,
|
|
@@ -1435,70 +1404,67 @@ Query.File = function({ templates }) {
|
|
|
1435
1404
|
isTypeOnly: true
|
|
1436
1405
|
}
|
|
1437
1406
|
),
|
|
1438
|
-
/* @__PURE__ */
|
|
1439
|
-
!!infinite && /* @__PURE__ */
|
|
1440
|
-
!!suspense && isV5 && /* @__PURE__ */
|
|
1441
|
-
/* @__PURE__ */
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1482
|
-
|
|
1483
|
-
|
|
1484
|
-
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
] })
|
|
1492
|
-
] }) });
|
|
1407
|
+
/* @__PURE__ */ jsx6(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: false, isSuspense: false }),
|
|
1408
|
+
!!infinite && /* @__PURE__ */ jsx6(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: true, isSuspense: false }),
|
|
1409
|
+
!!suspense && isV5 && /* @__PURE__ */ jsx6(QueryImports, { hookPath: typeof query !== "boolean" ? query.importPath : void 0, Template: Import, isInfinite: false, isSuspense: true }),
|
|
1410
|
+
/* @__PURE__ */ jsx6(SchemaType, {}),
|
|
1411
|
+
/* @__PURE__ */ jsx6(
|
|
1412
|
+
Query,
|
|
1413
|
+
{
|
|
1414
|
+
factory,
|
|
1415
|
+
Template: Template6,
|
|
1416
|
+
QueryKeyTemplate,
|
|
1417
|
+
QueryOptionsTemplate,
|
|
1418
|
+
infinite: false,
|
|
1419
|
+
suspense: false,
|
|
1420
|
+
query,
|
|
1421
|
+
queryOptions,
|
|
1422
|
+
hookName: importNames.query["react"].hookName,
|
|
1423
|
+
resultType: importNames.query["react"].resultType,
|
|
1424
|
+
optionsType: importNames.query["react"].optionsType
|
|
1425
|
+
}
|
|
1426
|
+
),
|
|
1427
|
+
!!infinite && /* @__PURE__ */ jsx6(
|
|
1428
|
+
Query,
|
|
1429
|
+
{
|
|
1430
|
+
factory,
|
|
1431
|
+
Template: Template6,
|
|
1432
|
+
QueryKeyTemplate,
|
|
1433
|
+
QueryOptionsTemplate,
|
|
1434
|
+
infinite,
|
|
1435
|
+
suspense: false,
|
|
1436
|
+
query,
|
|
1437
|
+
queryOptions,
|
|
1438
|
+
hookName: importNames.queryInfinite["react"].hookName,
|
|
1439
|
+
resultType: importNames.queryInfinite["react"].resultType,
|
|
1440
|
+
optionsType: importNames.queryInfinite["react"].optionsType
|
|
1441
|
+
}
|
|
1442
|
+
),
|
|
1443
|
+
!!suspense && isV5 && /* @__PURE__ */ jsx6(
|
|
1444
|
+
Query,
|
|
1445
|
+
{
|
|
1446
|
+
factory,
|
|
1447
|
+
Template: Template6,
|
|
1448
|
+
QueryKeyTemplate,
|
|
1449
|
+
QueryOptionsTemplate,
|
|
1450
|
+
infinite: false,
|
|
1451
|
+
suspense,
|
|
1452
|
+
query,
|
|
1453
|
+
queryOptions,
|
|
1454
|
+
hookName: importNames.querySuspense["react"].hookName,
|
|
1455
|
+
resultType: importNames.querySuspense["react"].resultType,
|
|
1456
|
+
optionsType: importNames.querySuspense["react"].optionsType
|
|
1457
|
+
}
|
|
1458
|
+
)
|
|
1459
|
+
] });
|
|
1493
1460
|
};
|
|
1494
|
-
Query.templates =
|
|
1461
|
+
Query.templates = defaultTemplates5;
|
|
1495
1462
|
|
|
1496
1463
|
export {
|
|
1497
1464
|
Mutation,
|
|
1498
|
-
Operations,
|
|
1499
1465
|
QueryImports,
|
|
1500
1466
|
QueryKey,
|
|
1501
1467
|
QueryOptions,
|
|
1502
1468
|
Query
|
|
1503
1469
|
};
|
|
1504
|
-
//# sourceMappingURL=chunk-
|
|
1470
|
+
//# sourceMappingURL=chunk-IVMTW4XS.js.map
|