@kubb/plugin-vue-query 3.0.0-alpha.23 → 3.0.0-alpha.25
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-OJJHU4GI.js → chunk-3XVQ56WT.js} +26 -16
- package/dist/chunk-3XVQ56WT.js.map +1 -0
- package/dist/{chunk-VWXCJPSA.cjs → chunk-7KPCYMK3.cjs} +52 -28
- package/dist/chunk-7KPCYMK3.cjs.map +1 -0
- package/dist/{chunk-6JBAYYZS.cjs → chunk-FLCTCPR5.cjs} +38 -28
- package/dist/chunk-FLCTCPR5.cjs.map +1 -0
- package/dist/{chunk-GER2VAF7.js → chunk-UGNGEFWA.js} +52 -29
- package/dist/chunk-UGNGEFWA.js.map +1 -0
- package/dist/components.cjs +11 -7
- package/dist/components.d.cts +43 -24
- package/dist/components.d.ts +43 -24
- package/dist/components.js +1 -1
- package/dist/generators.cjs +5 -5
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/index.cjs +4 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/{types-CmetQDTc.d.cts → types-CXg5kqwt.d.cts} +4 -0
- package/dist/{types-CmetQDTc.d.ts → types-CXg5kqwt.d.ts} +4 -0
- package/package.json +11 -11
- package/src/components/InfiniteQuery.tsx +2 -2
- package/src/components/Mutation.tsx +20 -6
- package/src/components/MutationKey.tsx +48 -0
- package/src/components/Query.tsx +2 -2
- package/src/components/index.ts +1 -0
- package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +2 -2
- package/src/generators/__snapshots__/clientGetImportPath.ts +2 -2
- package/src/generators/__snapshots__/clientPostImportPath.ts +13 -4
- package/src/generators/__snapshots__/findByTags.ts +2 -2
- package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +2 -2
- package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +2 -2
- package/src/generators/__snapshots__/findByTagsWithZod.ts +2 -2
- package/src/generators/__snapshots__/findInfiniteByTags.ts +2 -2
- package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +2 -2
- package/src/generators/__snapshots__/postAsQuery.ts +2 -2
- package/src/generators/__snapshots__/updatePetById.ts +13 -4
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +13 -4
- package/src/generators/infiniteQueryGenerator.tsx +1 -5
- package/src/generators/mutationGenerator.tsx +18 -2
- package/src/generators/queryGenerator.tsx +1 -1
- package/src/plugin.ts +1 -0
- package/src/types.ts +4 -0
- package/dist/chunk-6JBAYYZS.cjs.map +0 -1
- package/dist/chunk-GER2VAF7.js.map +0 -1
- package/dist/chunk-OJJHU4GI.js.map +0 -1
- package/dist/chunk-VWXCJPSA.cjs.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunk7KPCYMK3_cjs = require('./chunk-7KPCYMK3.cjs');
|
|
4
4
|
var transformers = require('@kubb/core/transformers');
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var core = require('@kubb/core');
|
|
@@ -60,7 +60,7 @@ var clientGenerator = pluginOas.createReactGenerator({
|
|
|
60
60
|
}
|
|
61
61
|
),
|
|
62
62
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
-
|
|
63
|
+
chunk7KPCYMK3_cjs.Client,
|
|
64
64
|
{
|
|
65
65
|
name: client.name,
|
|
66
66
|
baseURL: options.baseURL,
|
|
@@ -86,7 +86,7 @@ var operationsGenerator = pluginOas.createReactGenerator({
|
|
|
86
86
|
} = react.useApp();
|
|
87
87
|
const name = "operations";
|
|
88
88
|
const file = pluginManager.getFile({ name, extName: ".ts", pluginKey: [pluginClientName] });
|
|
89
|
-
return /* @__PURE__ */ jsxRuntime.jsx(react.File, { baseName: file.baseName, path: file.path, meta: file.meta, banner: output?.banner, footer: output?.footer, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.File, { baseName: file.baseName, path: file.path, meta: file.meta, banner: output?.banner, footer: output?.footer, children: /* @__PURE__ */ jsxRuntime.jsx(chunk7KPCYMK3_cjs.Operations, { name, operations }) });
|
|
90
90
|
}
|
|
91
91
|
});
|
|
92
92
|
|
|
@@ -99,7 +99,7 @@ core.createPlugin((options) => {
|
|
|
99
99
|
exclude = [],
|
|
100
100
|
include,
|
|
101
101
|
override = [],
|
|
102
|
-
transformers:
|
|
102
|
+
transformers: transformers4 = {},
|
|
103
103
|
dataReturnType = "data",
|
|
104
104
|
pathParamsType = "inline",
|
|
105
105
|
operations = false,
|
|
@@ -136,7 +136,7 @@ core.createPlugin((options) => {
|
|
|
136
136
|
resolveName(name, type) {
|
|
137
137
|
const resolvedName = transformers.camelCase(name, { isFile: type === "file" });
|
|
138
138
|
if (type) {
|
|
139
|
-
return
|
|
139
|
+
return transformers4?.name?.(resolvedName, type) || resolvedName;
|
|
140
140
|
}
|
|
141
141
|
return resolvedName;
|
|
142
142
|
},
|
|
@@ -220,7 +220,7 @@ var queryGenerator = pluginOas.createReactGenerator({
|
|
|
220
220
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
|
|
221
221
|
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
|
|
222
222
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useQuery", "queryOptions"], path: options.query.importPath }),
|
|
223
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "WithRequired", "QueryObserverOptions"
|
|
223
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "WithRequired", "QueryObserverOptions"], path: options.query.importPath, isTypeOnly: true }),
|
|
224
224
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["unref"], path: "vue" }),
|
|
225
225
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
226
226
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
@@ -244,7 +244,7 @@ var queryGenerator = pluginOas.createReactGenerator({
|
|
|
244
244
|
}
|
|
245
245
|
),
|
|
246
246
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
247
|
-
|
|
247
|
+
chunk7KPCYMK3_cjs.QueryKey,
|
|
248
248
|
{
|
|
249
249
|
name: queryKey.name,
|
|
250
250
|
typeName: queryKey.typeName,
|
|
@@ -255,7 +255,7 @@ var queryGenerator = pluginOas.createReactGenerator({
|
|
|
255
255
|
}
|
|
256
256
|
),
|
|
257
257
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
258
|
-
|
|
258
|
+
chunk7KPCYMK3_cjs.Client,
|
|
259
259
|
{
|
|
260
260
|
name: client.name,
|
|
261
261
|
isExportable: false,
|
|
@@ -270,7 +270,7 @@ var queryGenerator = pluginOas.createReactGenerator({
|
|
|
270
270
|
}
|
|
271
271
|
),
|
|
272
272
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
273
|
-
|
|
273
|
+
chunk7KPCYMK3_cjs.QueryOptions,
|
|
274
274
|
{
|
|
275
275
|
name: queryOptions.name,
|
|
276
276
|
clientName: client.name,
|
|
@@ -280,7 +280,7 @@ var queryGenerator = pluginOas.createReactGenerator({
|
|
|
280
280
|
}
|
|
281
281
|
),
|
|
282
282
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
283
|
-
|
|
283
|
+
chunk7KPCYMK3_cjs.Query,
|
|
284
284
|
{
|
|
285
285
|
name: query.name,
|
|
286
286
|
queryOptionsName: queryOptions.name,
|
|
@@ -323,13 +323,17 @@ var mutationGenerator = pluginOas.createReactGenerator({
|
|
|
323
323
|
const client = {
|
|
324
324
|
name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
|
|
325
325
|
};
|
|
326
|
+
const mutationKey = {
|
|
327
|
+
name: transformers__default.default.camelCase(`${operation.getOperationId()} MutationKey`),
|
|
328
|
+
typeName: transformers__default.default.pascalCase(`${operation.getOperationId()} MutationKey`)
|
|
329
|
+
};
|
|
326
330
|
if (!isMutation || typeof options.mutation === "boolean") {
|
|
327
331
|
return null;
|
|
328
332
|
}
|
|
329
333
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: mutation.file.baseName, path: mutation.file.path, meta: mutation.file.meta, banner: output?.banner, footer: output?.footer, children: [
|
|
330
334
|
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
|
|
331
335
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useMutation"], path: options.mutation.importPath }),
|
|
332
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["
|
|
336
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MutationObserverOptions", "MutationKey"], path: options.mutation.importPath, isTypeOnly: true }),
|
|
333
337
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
334
338
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
335
339
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
@@ -351,7 +355,18 @@ var mutationGenerator = pluginOas.createReactGenerator({
|
|
|
351
355
|
}
|
|
352
356
|
),
|
|
353
357
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
354
|
-
|
|
358
|
+
chunk7KPCYMK3_cjs.MutationKey,
|
|
359
|
+
{
|
|
360
|
+
name: mutationKey.name,
|
|
361
|
+
typeName: mutationKey.typeName,
|
|
362
|
+
operation,
|
|
363
|
+
pathParamsType: options.pathParamsType,
|
|
364
|
+
typeSchemas: type.schemas,
|
|
365
|
+
keysFn: options.mutation.key
|
|
366
|
+
}
|
|
367
|
+
),
|
|
368
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
369
|
+
chunk7KPCYMK3_cjs.Client,
|
|
355
370
|
{
|
|
356
371
|
name: client.name,
|
|
357
372
|
isExportable: false,
|
|
@@ -366,7 +381,7 @@ var mutationGenerator = pluginOas.createReactGenerator({
|
|
|
366
381
|
}
|
|
367
382
|
),
|
|
368
383
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
369
|
-
|
|
384
|
+
chunk7KPCYMK3_cjs.Mutation,
|
|
370
385
|
{
|
|
371
386
|
name: mutation.name,
|
|
372
387
|
clientName: client.name,
|
|
@@ -374,7 +389,9 @@ var mutationGenerator = pluginOas.createReactGenerator({
|
|
|
374
389
|
typeSchemas: type.schemas,
|
|
375
390
|
operation,
|
|
376
391
|
dataReturnType: options.client.dataReturnType,
|
|
377
|
-
pathParamsType: options.pathParamsType
|
|
392
|
+
pathParamsType: options.pathParamsType,
|
|
393
|
+
mutationKeyName: mutationKey.name,
|
|
394
|
+
mutationKeyTypeName: mutationKey.typeName
|
|
378
395
|
}
|
|
379
396
|
)
|
|
380
397
|
] });
|
|
@@ -421,14 +438,7 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
|
421
438
|
return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
|
|
422
439
|
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
|
|
423
440
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useInfiniteQuery", "infiniteQueryOptions"], path: options.query.importPath }),
|
|
424
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
425
|
-
react.File.Import,
|
|
426
|
-
{
|
|
427
|
-
name: ["QueryKey", "WithRequired", "InfiniteQueryObserverOptions", "UseInfiniteQueryReturnType"],
|
|
428
|
-
path: options.query.importPath,
|
|
429
|
-
isTypeOnly: true
|
|
430
|
-
}
|
|
431
|
-
),
|
|
441
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "WithRequired", "InfiniteQueryObserverOptions"], path: options.query.importPath, isTypeOnly: true }),
|
|
432
442
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["unref"], path: "vue" }),
|
|
433
443
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
434
444
|
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
@@ -452,7 +462,7 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
|
452
462
|
}
|
|
453
463
|
),
|
|
454
464
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
455
|
-
|
|
465
|
+
chunk7KPCYMK3_cjs.QueryKey,
|
|
456
466
|
{
|
|
457
467
|
name: queryKey.name,
|
|
458
468
|
typeName: queryKey.typeName,
|
|
@@ -463,7 +473,7 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
|
463
473
|
}
|
|
464
474
|
),
|
|
465
475
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
466
|
-
|
|
476
|
+
chunk7KPCYMK3_cjs.Client,
|
|
467
477
|
{
|
|
468
478
|
name: client.name,
|
|
469
479
|
isExportable: false,
|
|
@@ -478,7 +488,7 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
|
478
488
|
}
|
|
479
489
|
),
|
|
480
490
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
481
|
-
|
|
491
|
+
chunk7KPCYMK3_cjs.InfiniteQueryOptions,
|
|
482
492
|
{
|
|
483
493
|
name: queryOptions.name,
|
|
484
494
|
clientName: client.name,
|
|
@@ -492,7 +502,7 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
|
492
502
|
}
|
|
493
503
|
),
|
|
494
504
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
495
|
-
|
|
505
|
+
chunk7KPCYMK3_cjs.InfiniteQuery,
|
|
496
506
|
{
|
|
497
507
|
name: query.name,
|
|
498
508
|
queryOptionsName: queryOptions.name,
|
|
@@ -511,5 +521,5 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
|
511
521
|
exports.infiniteQueryGenerator = infiniteQueryGenerator;
|
|
512
522
|
exports.mutationGenerator = mutationGenerator;
|
|
513
523
|
exports.queryGenerator = queryGenerator;
|
|
514
|
-
//# sourceMappingURL=chunk-
|
|
515
|
-
//# sourceMappingURL=chunk-
|
|
524
|
+
//# sourceMappingURL=chunk-FLCTCPR5.cjs.map
|
|
525
|
+
//# sourceMappingURL=chunk-FLCTCPR5.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../plugin-client/src/generators/clientGenerator.tsx","../../plugin-client/src/generators/operationsGenerator.tsx","../../plugin-client/src/plugin.ts","../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx"],"names":["createReactGenerator","useApp","useOperationManager","pluginTsName","pluginZodName","File","jsx","Client","Operations","createPlugin","transformers","pluginOasName","options","path","FileManager","camelCase","renderTemplate","PluginManager","OperationGenerator","jsxs","QueryKey","QueryOptions","Query","MutationKey","Mutation","InfiniteQueryOptions","InfiniteQuery"],"mappings":";;;;;;;;;;;;;;;;;;;AAQO,IAAM,kBAAkBA,8BAAmC,CAAA;AAAA,EAChE,IAAM,EAAA,QAAA;AAAA,EACN,SAAU,CAAA,EAAE,OAAS,EAAA,SAAA,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CAAA,CAAA;AAAA,GAEJ;AACF,CAAC","file":"chunk-FLCTCPR5.cjs","sourcesContent":["import { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { Client } from '../components/Client'\nimport type { PluginClient } from '../types'\n\nexport const clientGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginClient>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n return (\n <File baseName={client.file.baseName} path={client.file.path} meta={client.file.meta} banner={output?.banner} footer={output?.footer}>\n <File.Import name={'client'} path={options.importPath} />\n <File.Import name={['RequestConfig']} path={options.importPath} isTypeOnly />\n {options.parser === 'zod' && <File.Import extName={output?.extName} name={[zod.schemas.response.name]} root={client.file.path} path={zod.file.path} />}\n <File.Import\n extName={output?.extName}\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={client.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <Client\n name={client.name}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n operation={operation}\n parser={options.parser}\n zodSchemas={zod.schemas}\n />\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { File, useApp } from '@kubb/react'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations }) {\n const {\n pluginManager,\n plugin: {\n options: { output },\n },\n } = useApp<PluginClient>()\n\n const name = 'operations'\n const file = pluginManager.getFile({ name, extName: '.ts', pluginKey: [pluginClientName] })\n\n return (\n <File baseName={file.baseName} path={file.path} meta={file.meta} banner={output?.banner} footer={output?.footer}>\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import path from 'node:path'\n\nimport { FileManager, PluginManager, createPlugin } from '@kubb/core'\nimport { camelCase } from '@kubb/core/transformers'\nimport { renderTemplate } from '@kubb/core/utils'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\n\nimport type { Plugin } from '@kubb/core'\nimport type { PluginOas as SwaggerPluginOptions } from '@kubb/plugin-oas'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { operationsGenerator } from './generators'\nimport { clientGenerator } from './generators/clientGenerator.tsx'\nimport type { PluginClient } from './types.ts'\n\nexport const pluginClientName = 'plugin-client' satisfies PluginClient['name']\n\nexport const pluginClient = createPlugin<PluginClient>((options) => {\n const {\n output = { path: 'clients' },\n group,\n exclude = [],\n include,\n override = [],\n transformers = {},\n dataReturnType = 'data',\n pathParamsType = 'inline',\n operations = false,\n importPath = '@kubb/plugin-client/client',\n parser = 'client',\n } = options\n\n const template = group?.output ? group.output : `${output.path}/{{tag}}Controller`\n\n return {\n name: pluginClientName,\n options: {\n output: {\n exportType: 'barrelNamed',\n ...output,\n },\n parser,\n dataReturnType,\n importPath,\n pathParamsType,\n baseURL: undefined,\n },\n pre: [pluginOasName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? FileManager.getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (options?.tag && group?.type === 'tag') {\n const tag = camelCase(options.tag)\n\n return path.resolve(root, renderTemplate(template, { tag }), baseName)\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n const resolvedName = camelCase(name, { isFile: type === 'file' })\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async buildStart() {\n const [swaggerPlugin]: [Plugin<SwaggerPluginOptions>] = PluginManager.getDependedPlugins<SwaggerPluginOptions>(this.plugins, [pluginOasName])\n\n const oas = await swaggerPlugin.context.getOas()\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = FileManager.getMode(path.resolve(root, output.path))\n const baseURL = await swaggerPlugin.context.getBaseURL()\n\n const operationGenerator = new OperationGenerator(\n {\n ...this.plugin.options,\n baseURL,\n },\n {\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType: swaggerPlugin.context.contentType,\n exclude,\n include,\n override,\n mode,\n },\n )\n\n const files = await operationGenerator.build(...[clientGenerator, operations ? operationsGenerator : undefined].filter(Boolean))\n\n await this.addFile(...files)\n\n if (this.config.output.exportType) {\n const barrelFiles = await this.fileManager.getBarrelFiles({\n root,\n output,\n files: this.fileManager.files,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.addFile(...barrelFiles)\n }\n },\n }\n})\n","import transformers from '@kubb/core/transformers'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method)\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: transformers.camelCase(`${operation.getOperationId()} QueryOptions`),\n }\n\n const queryKey = {\n name: transformers.camelCase(`${operation.getOperationId()} QueryKey`),\n typeName: transformers.pascalCase(`${operation.getOperationId()} QueryKey`),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || typeof options.query === 'boolean') {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import extName={output?.extName} name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['useQuery', 'queryOptions']} path={options.query.importPath} />\n <File.Import name={['QueryKey', 'WithRequired', 'QueryObserverOptions']} path={options.query.importPath} isTypeOnly />\n <File.Import name={['unref']} path=\"vue\" />\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n extName={output?.extName}\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n keysFn={options.query.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </File>\n )\n },\n})\n","import transformers from '@kubb/core/transformers'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method)\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const mutationKey = {\n name: transformers.camelCase(`${operation.getOperationId()} MutationKey`),\n typeName: transformers.pascalCase(`${operation.getOperationId()} MutationKey`),\n }\n\n if (!isMutation || typeof options.mutation === 'boolean') {\n return null\n }\n\n return (\n <File baseName={mutation.file.baseName} path={mutation.file.path} meta={mutation.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && (\n <File.Import extName={output?.extName} name={[zod.schemas.response.name]} root={mutation.file.path} path={zod.file.path} />\n )}\n <File.Import name={['useMutation']} path={options.mutation.importPath} />\n <File.Import name={['MutationObserverOptions', 'MutationKey']} path={options.mutation.importPath} isTypeOnly />\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseConfig']} path={options.client.importPath} isTypeOnly />\n <File.Import\n extName={output?.extName}\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n keysFn={options.mutation.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n mutationKeyTypeName={mutationKey.typeName}\n />\n </File>\n )\n },\n})\n","import transformers from '@kubb/core/transformers'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-infinite-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n const isQuery = typeof options.query === 'boolean' ? options.query : !!options.query.methods?.some((method) => operation.method === method)\n const isInfinite = isQuery && !!options.infinite\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: transformers.camelCase(`${operation.getOperationId()} InfiniteQueryOptions`),\n }\n\n const queryKey = {\n name: transformers.camelCase(`${operation.getOperationId()} InfiniteQueryKey`),\n typeName: transformers.pascalCase(`${operation.getOperationId()} InfiniteQueryKey`),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || !isInfinite || typeof options.query === 'boolean' || typeof options.infinite === 'boolean') {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import extName={output?.extName} name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['useInfiniteQuery', 'infiniteQueryOptions']} path={options.query.importPath} />\n <File.Import name={['QueryKey', 'WithRequired', 'InfiniteQueryObserverOptions']} path={options.query.importPath} isTypeOnly />\n <File.Import name={['unref']} path=\"vue\" />\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n extName={output?.extName}\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n keysFn={options.query.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n cursorParam={options.infinite.cursorParam}\n initialPageParam={options.infinite.initialPageParam}\n queryParam={options.infinite.queryParam}\n />\n <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </File>\n )\n },\n})\n"]}
|
|
@@ -124,7 +124,21 @@ function Operations({ name, operations }) {
|
|
|
124
124
|
});
|
|
125
125
|
return /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Const, { name, export: true, asConst: true, children: JSON.stringify(operationsObject, void 0, 2) }) });
|
|
126
126
|
}
|
|
127
|
-
function getParams2({
|
|
127
|
+
function getParams2({}) {
|
|
128
|
+
return FunctionParams.factory({});
|
|
129
|
+
}
|
|
130
|
+
function MutationKey({ name, typeSchemas, pathParamsType, operation, typeName, keysFn = (name2) => name2 }) {
|
|
131
|
+
const path = new URLPath(operation.path);
|
|
132
|
+
const params = getParams2({ pathParamsType, typeSchemas });
|
|
133
|
+
const keys = [JSON.stringify({ url: path.path })].filter(Boolean);
|
|
134
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
135
|
+
/* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function.Arrow, { name, export: true, params: params.toConstructor(), singleLine: true, children: `[${keysFn(keys).join(", ")}] as const` }) }),
|
|
136
|
+
/* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` }) })
|
|
137
|
+
] });
|
|
138
|
+
}
|
|
139
|
+
MutationKey.getParams = getParams2;
|
|
140
|
+
function getParams3({ dataReturnType, typeSchemas }) {
|
|
141
|
+
const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
|
|
128
142
|
const mutateParams = FunctionParams.factory({
|
|
129
143
|
...getPathParams(typeSchemas.pathParams, {
|
|
130
144
|
typed: true,
|
|
@@ -148,13 +162,12 @@ function getParams2({ dataReturnType, typeSchemas }) {
|
|
|
148
162
|
optional: isOptional(typeSchemas.headerParams?.schema)
|
|
149
163
|
} : void 0
|
|
150
164
|
});
|
|
151
|
-
const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
|
|
152
165
|
const TRequest = mutateParams.toConstructor({ valueAsType: true });
|
|
153
166
|
return FunctionParams.factory({
|
|
154
167
|
options: {
|
|
155
168
|
type: `
|
|
156
169
|
{
|
|
157
|
-
mutation?:
|
|
170
|
+
mutation?: MutationObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", `{${TRequest}}`].join(", ")}>,
|
|
158
171
|
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"},
|
|
159
172
|
}
|
|
160
173
|
`,
|
|
@@ -162,8 +175,13 @@ function getParams2({ dataReturnType, typeSchemas }) {
|
|
|
162
175
|
}
|
|
163
176
|
});
|
|
164
177
|
}
|
|
165
|
-
function Mutation({ name, clientName, pathParamsType, dataReturnType, typeSchemas, operation }) {
|
|
166
|
-
const
|
|
178
|
+
function Mutation({ name, clientName, pathParamsType, dataReturnType, typeSchemas, operation, mutationKeyTypeName, mutationKeyName }) {
|
|
179
|
+
const returnType = "ReturnType<typeof mutation> & { mutationKey: MutationKey }";
|
|
180
|
+
const mutationKeyParams = MutationKey.getParams({
|
|
181
|
+
pathParamsType,
|
|
182
|
+
typeSchemas
|
|
183
|
+
});
|
|
184
|
+
const params = getParams3({
|
|
167
185
|
pathParamsType,
|
|
168
186
|
dataReturnType,
|
|
169
187
|
typeSchemas
|
|
@@ -206,18 +224,23 @@ function Mutation({ name, clientName, pathParamsType, dataReturnType, typeSchema
|
|
|
206
224
|
},
|
|
207
225
|
children: `
|
|
208
226
|
const { mutation: mutationOptions, client: config = {} } = options ?? {}
|
|
227
|
+
const mutationKey = mutationOptions?.mutationKey ?? ${mutationKeyName}(${mutationKeyParams.toCall()})
|
|
209
228
|
|
|
210
|
-
|
|
229
|
+
const mutation = useMutation({
|
|
211
230
|
mutationFn: async(${mutationParams.toConstructor()}) => {
|
|
212
231
|
return ${clientName}(${clientParams.toCall()})
|
|
213
232
|
},
|
|
214
233
|
...mutationOptions
|
|
215
|
-
})
|
|
234
|
+
}) as ${returnType}
|
|
235
|
+
|
|
236
|
+
mutation.mutationKey = mutationKey as MutationKey
|
|
237
|
+
|
|
238
|
+
return mutation
|
|
216
239
|
`
|
|
217
240
|
}
|
|
218
241
|
) });
|
|
219
242
|
}
|
|
220
|
-
function
|
|
243
|
+
function getParams4({ pathParamsType, typeSchemas }) {
|
|
221
244
|
return FunctionParams.factory({
|
|
222
245
|
pathParams: {
|
|
223
246
|
mode: pathParamsType === "object" ? "object" : "inlineSpread",
|
|
@@ -243,7 +266,7 @@ function getParams3({ pathParamsType, typeSchemas }) {
|
|
|
243
266
|
}
|
|
244
267
|
function QueryKey({ name, typeSchemas, pathParamsType, operation, typeName, keysFn = (name2) => name2 }) {
|
|
245
268
|
const path = new URLPath(operation.path);
|
|
246
|
-
const params =
|
|
269
|
+
const params = getParams4({ pathParamsType, typeSchemas });
|
|
247
270
|
const keys = [
|
|
248
271
|
path.toObject({
|
|
249
272
|
type: "path",
|
|
@@ -257,8 +280,8 @@ function QueryKey({ name, typeSchemas, pathParamsType, operation, typeName, keys
|
|
|
257
280
|
/* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` }) })
|
|
258
281
|
] });
|
|
259
282
|
}
|
|
260
|
-
QueryKey.getParams =
|
|
261
|
-
function
|
|
283
|
+
QueryKey.getParams = getParams4;
|
|
284
|
+
function getParams5({ pathParamsType, typeSchemas }) {
|
|
262
285
|
return FunctionParams.factory({
|
|
263
286
|
pathParams: {
|
|
264
287
|
mode: pathParamsType === "object" ? "object" : "inlineSpread",
|
|
@@ -291,7 +314,7 @@ function getParams4({ pathParamsType, typeSchemas }) {
|
|
|
291
314
|
});
|
|
292
315
|
}
|
|
293
316
|
function QueryOptions({ name, clientName, typeSchemas, pathParamsType, queryKeyName }) {
|
|
294
|
-
const params =
|
|
317
|
+
const params = getParams5({ pathParamsType, typeSchemas });
|
|
295
318
|
const clientParams = Client.getParams({
|
|
296
319
|
typeSchemas,
|
|
297
320
|
pathParamsType
|
|
@@ -314,8 +337,8 @@ function QueryOptions({ name, clientName, typeSchemas, pathParamsType, queryKeyN
|
|
|
314
337
|
})
|
|
315
338
|
` }) });
|
|
316
339
|
}
|
|
317
|
-
QueryOptions.getParams =
|
|
318
|
-
function
|
|
340
|
+
QueryOptions.getParams = getParams5;
|
|
341
|
+
function getParams6({ pathParamsType, dataReturnType, typeSchemas }) {
|
|
319
342
|
const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
|
|
320
343
|
return FunctionParams.factory({
|
|
321
344
|
pathParams: {
|
|
@@ -345,7 +368,7 @@ function getParams5({ pathParamsType, dataReturnType, typeSchemas }) {
|
|
|
345
368
|
options: {
|
|
346
369
|
type: `
|
|
347
370
|
{
|
|
348
|
-
query?: Partial<QueryObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "
|
|
371
|
+
query?: Partial<QueryObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
|
|
349
372
|
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
|
|
350
373
|
}
|
|
351
374
|
`,
|
|
@@ -355,7 +378,7 @@ function getParams5({ pathParamsType, dataReturnType, typeSchemas }) {
|
|
|
355
378
|
}
|
|
356
379
|
function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, pathParamsType, dataReturnType, typeSchemas, operation }) {
|
|
357
380
|
const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
|
|
358
|
-
const returnType =
|
|
381
|
+
const returnType = "ReturnType<typeof query> & { queryKey: TQueryKey }";
|
|
359
382
|
const generics = [`TData = ${TData}`, `TQueryData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`];
|
|
360
383
|
const queryKeyParams = QueryKey.getParams({
|
|
361
384
|
pathParamsType,
|
|
@@ -365,7 +388,7 @@ function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, pathPar
|
|
|
365
388
|
pathParamsType,
|
|
366
389
|
typeSchemas
|
|
367
390
|
});
|
|
368
|
-
const params =
|
|
391
|
+
const params = getParams6({
|
|
369
392
|
pathParamsType,
|
|
370
393
|
dataReturnType,
|
|
371
394
|
typeSchemas
|
|
@@ -398,8 +421,8 @@ function Query({ name, queryKeyTypeName, queryOptionsName, queryKeyName, pathPar
|
|
|
398
421
|
}
|
|
399
422
|
) });
|
|
400
423
|
}
|
|
401
|
-
Query.getParams =
|
|
402
|
-
function
|
|
424
|
+
Query.getParams = getParams6;
|
|
425
|
+
function getParams7({ pathParamsType, typeSchemas }) {
|
|
403
426
|
return FunctionParams.factory({
|
|
404
427
|
pathParams: {
|
|
405
428
|
mode: pathParamsType === "object" ? "object" : "inlineSpread",
|
|
@@ -442,7 +465,7 @@ function InfiniteQueryOptions({
|
|
|
442
465
|
queryParam,
|
|
443
466
|
queryKeyName
|
|
444
467
|
}) {
|
|
445
|
-
const params =
|
|
468
|
+
const params = getParams7({ pathParamsType, typeSchemas });
|
|
446
469
|
const clientParams = Client.getParams({
|
|
447
470
|
typeSchemas,
|
|
448
471
|
pathParamsType
|
|
@@ -475,8 +498,8 @@ function InfiniteQueryOptions({
|
|
|
475
498
|
})
|
|
476
499
|
` }) });
|
|
477
500
|
}
|
|
478
|
-
InfiniteQueryOptions.getParams =
|
|
479
|
-
function
|
|
501
|
+
InfiniteQueryOptions.getParams = getParams7;
|
|
502
|
+
function getParams8({ pathParamsType, dataReturnType, typeSchemas }) {
|
|
480
503
|
const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
|
|
481
504
|
return FunctionParams.factory({
|
|
482
505
|
pathParams: {
|
|
@@ -506,7 +529,7 @@ function getParams7({ pathParamsType, dataReturnType, typeSchemas }) {
|
|
|
506
529
|
options: {
|
|
507
530
|
type: `
|
|
508
531
|
{
|
|
509
|
-
query?: Partial<InfiniteQueryObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "
|
|
532
|
+
query?: Partial<InfiniteQueryObserverOptions<${[TData, typeSchemas.errors?.map((item) => item.name).join(" | ") || "Error", "TData", "TQueryData", "TQueryKey"].join(", ")}>>,
|
|
510
533
|
client?: ${typeSchemas.request?.name ? `Partial<RequestConfig<${typeSchemas.request?.name}>>` : "Partial<RequestConfig>"}
|
|
511
534
|
}
|
|
512
535
|
`,
|
|
@@ -525,7 +548,7 @@ function InfiniteQuery({
|
|
|
525
548
|
operation
|
|
526
549
|
}) {
|
|
527
550
|
const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
|
|
528
|
-
const returnType =
|
|
551
|
+
const returnType = "ReturnType<typeof query> & { queryKey: TQueryKey }";
|
|
529
552
|
const generics = [`TData = ${TData}`, `TQueryData = ${TData}`, `TQueryKey extends QueryKey = ${queryKeyTypeName}`];
|
|
530
553
|
const queryKeyParams = QueryKey.getParams({
|
|
531
554
|
pathParamsType,
|
|
@@ -535,7 +558,7 @@ function InfiniteQuery({
|
|
|
535
558
|
pathParamsType,
|
|
536
559
|
typeSchemas
|
|
537
560
|
});
|
|
538
|
-
const params =
|
|
561
|
+
const params = getParams8({
|
|
539
562
|
pathParamsType,
|
|
540
563
|
dataReturnType,
|
|
541
564
|
typeSchemas
|
|
@@ -568,8 +591,8 @@ function InfiniteQuery({
|
|
|
568
591
|
}
|
|
569
592
|
) });
|
|
570
593
|
}
|
|
571
|
-
InfiniteQuery.getParams =
|
|
594
|
+
InfiniteQuery.getParams = getParams8;
|
|
572
595
|
|
|
573
|
-
export { Client, InfiniteQuery, InfiniteQueryOptions, Mutation, Operations, Query, QueryKey, QueryOptions };
|
|
574
|
-
//# sourceMappingURL=chunk-
|
|
575
|
-
//# sourceMappingURL=chunk-
|
|
596
|
+
export { Client, InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Operations, Query, QueryKey, QueryOptions };
|
|
597
|
+
//# sourceMappingURL=chunk-UGNGEFWA.js.map
|
|
598
|
+
//# sourceMappingURL=chunk-UGNGEFWA.js.map
|