@kubb/plugin-vue-query 3.0.0-beta.10 → 3.0.0-beta.12

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 (49) hide show
  1. package/dist/{chunk-PGNSMLGU.cjs → chunk-A7SD37VK.cjs} +103 -97
  2. package/dist/chunk-A7SD37VK.cjs.map +1 -0
  3. package/dist/{chunk-DWWRCRGY.js → chunk-DHJLKFYS.js} +22 -10
  4. package/dist/chunk-DHJLKFYS.js.map +1 -0
  5. package/dist/{chunk-5MY3SE2R.cjs → chunk-J4RZRRHQ.cjs} +22 -10
  6. package/dist/chunk-J4RZRRHQ.cjs.map +1 -0
  7. package/dist/{chunk-YQOJHRKU.js → chunk-O4EGNKUX.js} +95 -89
  8. package/dist/chunk-O4EGNKUX.js.map +1 -0
  9. package/dist/components.cjs +8 -8
  10. package/dist/components.d.cts +7 -5
  11. package/dist/components.d.ts +7 -5
  12. package/dist/components.js +1 -1
  13. package/dist/generators.cjs +5 -5
  14. package/dist/generators.d.cts +1 -1
  15. package/dist/generators.d.ts +1 -1
  16. package/dist/generators.js +2 -2
  17. package/dist/index.cjs +20 -22
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +19 -21
  22. package/dist/index.js.map +1 -1
  23. package/dist/{types-Dx6yZliF.d.cts → types-C8LfCZUP.d.cts} +187 -22
  24. package/dist/{types-Dx6yZliF.d.ts → types-C8LfCZUP.d.ts} +187 -22
  25. package/package.json +11 -11
  26. package/src/components/MutationKey.tsx +11 -5
  27. package/src/components/QueryKey.tsx +17 -7
  28. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +1 -1
  29. package/src/generators/__snapshots__/clientGetImportPath.ts +1 -1
  30. package/src/generators/__snapshots__/clientPostImportPath.ts +2 -2
  31. package/src/generators/__snapshots__/findByTags.ts +1 -1
  32. package/src/generators/__snapshots__/findByTagsObject.ts +1 -1
  33. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +1 -1
  34. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +2 -2
  35. package/src/generators/__snapshots__/findByTagsWithZod.ts +1 -1
  36. package/src/generators/__snapshots__/findInfiniteByTags.ts +1 -1
  37. package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +1 -1
  38. package/src/generators/__snapshots__/postAsQuery.ts +1 -1
  39. package/src/generators/__snapshots__/updatePetById.ts +2 -2
  40. package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +2 -2
  41. package/src/generators/infiniteQueryGenerator.tsx +38 -33
  42. package/src/generators/mutationGenerator.tsx +22 -16
  43. package/src/generators/queryGenerator.tsx +22 -18
  44. package/src/plugin.ts +18 -19
  45. package/src/types.ts +26 -13
  46. package/dist/chunk-5MY3SE2R.cjs.map +0 -1
  47. package/dist/chunk-DWWRCRGY.js.map +0 -1
  48. package/dist/chunk-PGNSMLGU.cjs.map +0 -1
  49. package/dist/chunk-YQOJHRKU.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk5MY3SE2R_cjs = require('./chunk-5MY3SE2R.cjs');
3
+ var chunkJ4RZRRHQ_cjs = require('./chunk-J4RZRRHQ.cjs');
4
4
  var path = require('path');
5
5
  var core = require('@kubb/core');
6
6
  var transformers = require('@kubb/core/transformers');
@@ -57,7 +57,7 @@ var clientGenerator = pluginOas.createReactGenerator({
57
57
  }
58
58
  ),
59
59
  /* @__PURE__ */ jsxRuntime.jsx(
60
- chunk5MY3SE2R_cjs.Client,
60
+ chunkJ4RZRRHQ_cjs.Client,
61
61
  {
62
62
  name: client.name,
63
63
  baseURL: options.baseURL,
@@ -84,7 +84,7 @@ var operationsGenerator = pluginOas.createReactGenerator({
84
84
  } = react.useApp();
85
85
  const name = "operations";
86
86
  const file = pluginManager.getFile({ name, extname: ".ts", pluginKey: [pluginClientName] });
87
- 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(chunk5MY3SE2R_cjs.Operations, { name, operations }) });
87
+ 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(chunkJ4RZRRHQ_cjs.Operations, { name, operations }) });
88
88
  }
89
89
  });
90
90
  var groupedClientGenerator = pluginOas.createReactGenerator({
@@ -147,6 +147,7 @@ core.createPlugin((options) => {
147
147
  pathParamsType = "inline",
148
148
  paramsType = "inline",
149
149
  operations = false,
150
+ baseURL,
150
151
  generators = [clientGenerator, group ? groupedClientGenerator : void 0, operations ? operationsGenerator : void 0].filter(Boolean),
151
152
  importPath = "@kubb/plugin-client/client",
152
153
  parser = "client"
@@ -161,7 +162,7 @@ core.createPlugin((options) => {
161
162
  importPath,
162
163
  paramsType,
163
164
  pathParamsType: paramsType === "object" ? "object" : pathParamsType,
164
- baseURL: void 0
165
+ baseURL
165
166
  },
166
167
  pre: [pluginOas.pluginOasName, parser === "zod" ? pluginZod.pluginZodName : void 0].filter(Boolean),
167
168
  resolvePath(baseName, pathMode, options2) {
@@ -188,12 +189,12 @@ core.createPlugin((options) => {
188
189
  const oas = await swaggerPlugin.context.getOas();
189
190
  const root = path__default.default.resolve(this.config.root, this.config.output.path);
190
191
  const mode = core.FileManager.getMode(path__default.default.resolve(root, output.path));
191
- const baseURL = await swaggerPlugin.context.getBaseURL();
192
+ const baseURL2 = await swaggerPlugin.context.getBaseURL();
192
193
  const operationGenerator = new pluginOas.OperationGenerator(
193
- {
194
+ baseURL2 ? {
194
195
  ...this.plugin.options,
195
- baseURL
196
- },
196
+ baseURL: baseURL2
197
+ } : this.plugin.options,
197
198
  {
198
199
  oas,
199
200
  pluginManager: this.pluginManager,
@@ -231,7 +232,7 @@ var queryGenerator = pluginOas.createReactGenerator({
231
232
  } = react.useApp();
232
233
  const { getSchemas, getName, getFile } = hooks.useOperationManager();
233
234
  const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
234
- !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method);
235
+ const importPath = options.query ? options.query.importPath : "@tanstack/vue-query";
235
236
  const query = {
236
237
  name: getName(operation, { type: "function", prefix: "use" }),
237
238
  typeName: getName(operation, { type: "type" }),
@@ -256,13 +257,11 @@ var queryGenerator = pluginOas.createReactGenerator({
256
257
  file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
257
258
  schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
258
259
  };
259
- if (!isQuery || typeof options.query === "boolean") {
260
+ if (!isQuery) {
260
261
  return null;
261
262
  }
262
263
  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: [
263
264
  options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
264
- /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useQuery", "queryOptions"], path: options.query.importPath }),
265
- /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "WithRequired", "QueryObserverOptions", "UseQueryReturnType"], path: options.query.importPath, isTypeOnly: true }),
266
265
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["unref"], path: "vue" }),
267
266
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
268
267
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
@@ -285,23 +284,23 @@ var queryGenerator = pluginOas.createReactGenerator({
285
284
  }
286
285
  ),
287
286
  /* @__PURE__ */ jsxRuntime.jsx(
288
- chunk5MY3SE2R_cjs.QueryKey,
287
+ chunkJ4RZRRHQ_cjs.QueryKey,
289
288
  {
290
289
  name: queryKey.name,
291
290
  typeName: queryKey.typeName,
292
291
  operation,
293
292
  pathParamsType: options.pathParamsType,
294
293
  typeSchemas: type.schemas,
295
- keysFn: options.query.key
294
+ transformer: options.queryKey
296
295
  }
297
296
  ),
298
297
  /* @__PURE__ */ jsxRuntime.jsx(
299
- chunk5MY3SE2R_cjs.Client,
298
+ chunkJ4RZRRHQ_cjs.Client,
300
299
  {
301
300
  name: client.name,
302
301
  isExportable: false,
303
302
  isIndexable: false,
304
- baseURL: options.baseURL,
303
+ baseURL: options.client.baseURL,
305
304
  operation,
306
305
  typeSchemas: type.schemas,
307
306
  zodSchemas: zod.schemas,
@@ -311,8 +310,9 @@ var queryGenerator = pluginOas.createReactGenerator({
311
310
  parser: options.parser
312
311
  }
313
312
  ),
313
+ /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["queryOptions"], path: importPath }),
314
314
  /* @__PURE__ */ jsxRuntime.jsx(
315
- chunk5MY3SE2R_cjs.QueryOptions,
315
+ chunkJ4RZRRHQ_cjs.QueryOptions,
316
316
  {
317
317
  name: queryOptions.name,
318
318
  clientName: client.name,
@@ -322,20 +322,24 @@ var queryGenerator = pluginOas.createReactGenerator({
322
322
  pathParamsType: options.pathParamsType
323
323
  }
324
324
  ),
325
- /* @__PURE__ */ jsxRuntime.jsx(
326
- chunk5MY3SE2R_cjs.Query,
327
- {
328
- name: query.name,
329
- queryOptionsName: queryOptions.name,
330
- typeSchemas: type.schemas,
331
- paramsType: options.paramsType,
332
- pathParamsType: options.pathParamsType,
333
- operation,
334
- dataReturnType: options.client.dataReturnType,
335
- queryKeyName: queryKey.name,
336
- queryKeyTypeName: queryKey.typeName
337
- }
338
- )
325
+ options.query && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
326
+ /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useQuery"], path: importPath }),
327
+ /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "QueryObserverOptions", "UseQueryReturnType"], path: importPath, isTypeOnly: true }),
328
+ /* @__PURE__ */ jsxRuntime.jsx(
329
+ chunkJ4RZRRHQ_cjs.Query,
330
+ {
331
+ name: query.name,
332
+ queryOptionsName: queryOptions.name,
333
+ typeSchemas: type.schemas,
334
+ paramsType: options.paramsType,
335
+ pathParamsType: options.pathParamsType,
336
+ operation,
337
+ dataReturnType: options.client.dataReturnType,
338
+ queryKeyName: queryKey.name,
339
+ queryKeyTypeName: queryKey.typeName
340
+ }
341
+ )
342
+ ] })
339
343
  ] });
340
344
  }
341
345
  });
@@ -350,6 +354,7 @@ var mutationGenerator = pluginOas.createReactGenerator({
350
354
  const { getSchemas, getName, getFile } = hooks.useOperationManager();
351
355
  const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
352
356
  const isMutation = !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method);
357
+ const importPath = options.mutation ? options.mutation.importPath : "@tanstack/vue-query";
353
358
  const mutation = {
354
359
  name: getName(operation, { type: "function", prefix: "use" }),
355
360
  typeName: getName(operation, { type: "type" }),
@@ -371,13 +376,11 @@ var mutationGenerator = pluginOas.createReactGenerator({
371
376
  name: getName(operation, { type: "const", suffix: "MutationKey" }),
372
377
  typeName: getName(operation, { type: "type", suffix: "MutationKey" })
373
378
  };
374
- if (!isMutation || typeof options.mutation === "boolean") {
379
+ if (!isMutation) {
375
380
  return null;
376
381
  }
377
382
  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: [
378
383
  options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
379
- /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useMutation"], path: options.mutation.importPath }),
380
- /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MutationObserverOptions"], path: options.mutation.importPath, isTypeOnly: true }),
381
384
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
382
385
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
383
386
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
@@ -398,23 +401,23 @@ var mutationGenerator = pluginOas.createReactGenerator({
398
401
  }
399
402
  ),
400
403
  /* @__PURE__ */ jsxRuntime.jsx(
401
- chunk5MY3SE2R_cjs.MutationKey,
404
+ chunkJ4RZRRHQ_cjs.MutationKey,
402
405
  {
403
406
  name: mutationKey.name,
404
407
  typeName: mutationKey.typeName,
405
408
  operation,
406
409
  pathParamsType: options.pathParamsType,
407
410
  typeSchemas: type.schemas,
408
- keysFn: options.mutation.key
411
+ transformer: options.mutationKey
409
412
  }
410
413
  ),
411
414
  /* @__PURE__ */ jsxRuntime.jsx(
412
- chunk5MY3SE2R_cjs.Client,
415
+ chunkJ4RZRRHQ_cjs.Client,
413
416
  {
414
417
  name: client.name,
415
418
  isExportable: false,
416
419
  isIndexable: false,
417
- baseURL: options.baseURL,
420
+ baseURL: options.client.baseURL,
418
421
  operation,
419
422
  typeSchemas: type.schemas,
420
423
  zodSchemas: zod.schemas,
@@ -424,20 +427,24 @@ var mutationGenerator = pluginOas.createReactGenerator({
424
427
  parser: options.parser
425
428
  }
426
429
  ),
427
- /* @__PURE__ */ jsxRuntime.jsx(
428
- chunk5MY3SE2R_cjs.Mutation,
429
- {
430
- name: mutation.name,
431
- clientName: client.name,
432
- typeName: mutation.typeName,
433
- typeSchemas: type.schemas,
434
- operation,
435
- dataReturnType: options.client.dataReturnType,
436
- paramsType: options.paramsType,
437
- pathParamsType: options.pathParamsType,
438
- mutationKeyName: mutationKey.name
439
- }
440
- )
430
+ options.mutation && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
431
+ /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useMutation"], path: importPath }),
432
+ /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MutationObserverOptions"], path: importPath, isTypeOnly: true }),
433
+ /* @__PURE__ */ jsxRuntime.jsx(
434
+ chunkJ4RZRRHQ_cjs.Mutation,
435
+ {
436
+ name: mutation.name,
437
+ clientName: client.name,
438
+ typeName: mutation.typeName,
439
+ typeSchemas: type.schemas,
440
+ operation,
441
+ dataReturnType: options.client.dataReturnType,
442
+ paramsType: options.paramsType,
443
+ pathParamsType: options.pathParamsType,
444
+ mutationKeyName: mutationKey.name
445
+ }
446
+ )
447
+ ] })
441
448
  ] });
442
449
  }
443
450
  });
@@ -452,6 +459,7 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
452
459
  const { getSchemas, getName, getFile } = hooks.useOperationManager();
453
460
  const isQuery = typeof options.query === "boolean" ? options.query : !!options.query.methods?.some((method) => operation.method === method);
454
461
  const isInfinite = isQuery && !!options.infinite;
462
+ const importPath = options.query ? options.query.importPath : "@tanstack/vue-query";
455
463
  const query = {
456
464
  name: getName(operation, { type: "function", prefix: "use", suffix: "infinite" }),
457
465
  typeName: getName(operation, { type: "type" }),
@@ -476,20 +484,11 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
476
484
  file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
477
485
  schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
478
486
  };
479
- if (!isQuery || !isInfinite || typeof options.query === "boolean" || typeof options.infinite === "boolean") {
487
+ if (!isQuery || !isInfinite) {
480
488
  return null;
481
489
  }
482
490
  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: [
483
491
  options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
484
- /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useInfiniteQuery", "infiniteQueryOptions"], path: options.query.importPath }),
485
- /* @__PURE__ */ jsxRuntime.jsx(
486
- react.File.Import,
487
- {
488
- name: ["QueryKey", "WithRequired", "InfiniteQueryObserverOptions", "UseInfiniteQueryReturnType"],
489
- path: options.query.importPath,
490
- isTypeOnly: true
491
- }
492
- ),
493
492
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["unref"], path: "vue" }),
494
493
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
495
494
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
@@ -512,23 +511,23 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
512
511
  }
513
512
  ),
514
513
  /* @__PURE__ */ jsxRuntime.jsx(
515
- chunk5MY3SE2R_cjs.QueryKey,
514
+ chunkJ4RZRRHQ_cjs.QueryKey,
516
515
  {
517
516
  name: queryKey.name,
518
517
  typeName: queryKey.typeName,
519
518
  operation,
520
519
  pathParamsType: options.pathParamsType,
521
520
  typeSchemas: type.schemas,
522
- keysFn: options.query.key
521
+ transformer: options.queryKey
523
522
  }
524
523
  ),
525
524
  /* @__PURE__ */ jsxRuntime.jsx(
526
- chunk5MY3SE2R_cjs.Client,
525
+ chunkJ4RZRRHQ_cjs.Client,
527
526
  {
528
527
  name: client.name,
529
528
  isExportable: false,
530
529
  isIndexable: false,
531
- baseURL: options.baseURL,
530
+ baseURL: options.client.baseURL,
532
531
  operation,
533
532
  typeSchemas: type.schemas,
534
533
  zodSchemas: zod.schemas,
@@ -538,35 +537,42 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
538
537
  parser: options.parser
539
538
  }
540
539
  ),
541
- /* @__PURE__ */ jsxRuntime.jsx(
542
- chunk5MY3SE2R_cjs.InfiniteQueryOptions,
543
- {
544
- name: queryOptions.name,
545
- clientName: client.name,
546
- queryKeyName: queryKey.name,
547
- typeSchemas: type.schemas,
548
- paramsType: options.paramsType,
549
- pathParamsType: options.pathParamsType,
550
- dataReturnType: options.client.dataReturnType,
551
- cursorParam: options.infinite.cursorParam,
552
- initialPageParam: options.infinite.initialPageParam,
553
- queryParam: options.infinite.queryParam
554
- }
555
- ),
556
- /* @__PURE__ */ jsxRuntime.jsx(
557
- chunk5MY3SE2R_cjs.InfiniteQuery,
558
- {
559
- name: query.name,
560
- queryOptionsName: queryOptions.name,
561
- typeSchemas: type.schemas,
562
- paramsType: options.paramsType,
563
- pathParamsType: options.pathParamsType,
564
- operation,
565
- dataReturnType: options.client.dataReturnType,
566
- queryKeyName: queryKey.name,
567
- queryKeyTypeName: queryKey.typeName
568
- }
569
- )
540
+ options.infinite && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
541
+ /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["infiniteQueryOptions"], path: importPath }),
542
+ /* @__PURE__ */ jsxRuntime.jsx(
543
+ chunkJ4RZRRHQ_cjs.InfiniteQueryOptions,
544
+ {
545
+ name: queryOptions.name,
546
+ clientName: client.name,
547
+ queryKeyName: queryKey.name,
548
+ typeSchemas: type.schemas,
549
+ paramsType: options.paramsType,
550
+ pathParamsType: options.pathParamsType,
551
+ dataReturnType: options.client.dataReturnType,
552
+ cursorParam: options.infinite.cursorParam,
553
+ initialPageParam: options.infinite.initialPageParam,
554
+ queryParam: options.infinite.queryParam
555
+ }
556
+ )
557
+ ] }),
558
+ options.infinite && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
559
+ /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useInfiniteQuery"], path: importPath }),
560
+ /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "InfiniteQueryObserverOptions", "UseInfiniteQueryReturnType"], path: importPath, isTypeOnly: true }),
561
+ /* @__PURE__ */ jsxRuntime.jsx(
562
+ chunkJ4RZRRHQ_cjs.InfiniteQuery,
563
+ {
564
+ name: query.name,
565
+ queryOptionsName: queryOptions.name,
566
+ typeSchemas: type.schemas,
567
+ paramsType: options.paramsType,
568
+ pathParamsType: options.pathParamsType,
569
+ operation,
570
+ dataReturnType: options.client.dataReturnType,
571
+ queryKeyName: queryKey.name,
572
+ queryKeyTypeName: queryKey.typeName
573
+ }
574
+ )
575
+ ] })
570
576
  ] });
571
577
  }
572
578
  });
@@ -574,5 +580,5 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
574
580
  exports.infiniteQueryGenerator = infiniteQueryGenerator;
575
581
  exports.mutationGenerator = mutationGenerator;
576
582
  exports.queryGenerator = queryGenerator;
577
- //# sourceMappingURL=chunk-PGNSMLGU.cjs.map
578
- //# sourceMappingURL=chunk-PGNSMLGU.cjs.map
583
+ //# sourceMappingURL=chunk-A7SD37VK.cjs.map
584
+ //# sourceMappingURL=chunk-A7SD37VK.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../plugin-client/src/generators/clientGenerator.tsx","../../plugin-client/src/generators/operationsGenerator.tsx","../../plugin-client/src/generators/groupedClientGenerator.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","camelCase","jsxs","Function","createPlugin","transformers","pluginOasName","options","path","FileManager","PluginManager","baseURL","OperationGenerator","QueryKey","QueryOptions","Fragment","Query","MutationKey","Mutation","InfiniteQueryOptions","InfiniteQuery"],"mappings":";;;;;;;;;;;;;;;;;AAQO,IAAM,kBAAkBA,8BAAmC,CAAA;AAAA,EAChE,IAAM,EAAA,QAAA;AAAA,EACN,SAAU,CAAA,EAAE,OAAS,EAAA,SAAA,EAAa,EAAA;AAChC,IAAM,MAAA;AAAA,MACJ,MAA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qBAAA,EACE,QAAA,EAAA;AAAA,wBAAAjB,cAAAA,CAACD,WAAK,MAAL,EAAA,EAAY,MAAM,CAAC,kBAAkB,CAAG,EAAA,IAAA,EAAM,UAAY,EAAA,CAAA;AAAA,wBAC3DC,cAAAA,CAACD,UAAK,CAAA,MAAA,EAAL,EAAY,IAAM,EAAA,CAAC,UAAY,EAAA,8BAAA,EAAgC,4BAA4B,CAAA,EAAG,IAAM,EAAA,UAAA,EAAY,YAAU,IAAC,EAAA,CAAA;AAAA,wBAC5HC,cAAAA;AAAA,UAACsB,+BAAA;AAAA,UAAA;AAAA,YACC,MAAM,KAAM,CAAA,IAAA;AAAA,YACZ,kBAAkB,YAAa,CAAA,IAAA;AAAA,YAC/B,aAAa,IAAK,CAAA,OAAA;AAAA,YAClB,YAAY,OAAQ,CAAA,UAAA;AAAA,YACpB,gBAAgB,OAAQ,CAAA,cAAA;AAAA,YACxB,SAAA;AAAA,YACA,cAAA,EAAgB,QAAQ,MAAO,CAAA,cAAA;AAAA,YAC/B,cAAc,QAAS,CAAA,IAAA;AAAA,YACvB,kBAAkB,QAAS,CAAA;AAAA;AAAA;AAC7B,OACF,EAAA;AAAA,KAEJ,EAAA,CAAA;AAAA;AAGN,CAAC","file":"chunk-A7SD37VK.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 name={[zod.schemas.response.name]} root={client.file.path} path={zod.file.path} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={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 paramsType={options.paramsType}\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 { camelCase } from '@kubb/core/transformers'\nimport type * as KubbFile from '@kubb/fs/types'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { File, Function, useApp } from '@kubb/react'\nimport type { PluginClient } from '../types'\n\nexport const groupedClientGenerator = createReactGenerator<PluginClient>({\n name: 'groupedClient',\n Operations({ operations }) {\n const {\n pluginManager,\n plugin: { options },\n } = useApp<PluginClient>()\n const { getName, getFile } = useOperationManager()\n\n const controllers = operations.reduce(\n (acc, operation) => {\n if (options.group?.type === 'tag') {\n const tag = operation.getTags().at(0)?.name\n const name = tag ? options.group?.name?.({ group: camelCase(tag) }) : undefined\n\n if (!tag || !name) {\n return acc\n }\n\n const file = pluginManager.getFile({\n name,\n extname: '.ts',\n pluginKey: [pluginClientName],\n options: { tag },\n })\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.clients.push(client)\n } else {\n acc.push({ name, file, clients: [client] })\n }\n }\n\n return acc\n },\n [] as Array<{ name: string; file: KubbFile.File; clients: Array<{ name: string; file: KubbFile.File }> }>,\n )\n\n return controllers.map(({ name, file, clients }) => {\n return (\n <File key={file.path} baseName={file.baseName} path={file.path} meta={file.meta} banner={options.output?.banner} footer={options.output?.footer}>\n {clients.map((client) => (\n <File.Import key={client.name} name={[client.name]} root={file.path} path={client.file.path} />\n ))}\n\n <File.Source name={name} isExportable isIndexable>\n <Function export name={name}>\n {`return { ${clients.map((client) => client.name).join(', ')} }`}\n </Function>\n </File.Source>\n </File>\n )\n })\n },\n})\n","import path from 'node:path'\n\nimport { FileManager, type Group, PluginManager, createPlugin } from '@kubb/core'\nimport { camelCase } from '@kubb/core/transformers'\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 { groupedClientGenerator } from './generators/groupedClientGenerator.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', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n transformers = {},\n dataReturnType = 'data',\n pathParamsType = 'inline',\n paramsType = 'inline',\n operations = false,\n baseURL,\n generators = [clientGenerator, group ? groupedClientGenerator : undefined, operations ? operationsGenerator : undefined].filter(Boolean),\n importPath = '@kubb/plugin-client/client',\n parser = 'client',\n } = options\n\n return {\n name: pluginClientName,\n options: {\n output,\n group,\n parser,\n dataReturnType,\n importPath,\n paramsType,\n pathParamsType: paramsType === 'object' ? 'object' : pathParamsType,\n baseURL,\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 (options?.tag && group?.type === 'tag') {\n const groupName: Group['name'] = group?.name ? group.name : (ctx) => `${ctx.group}Controller`\n\n return path.resolve(root, output.path, groupName({ group: camelCase(options.tag) }), baseName)\n }\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 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 baseURL\n ? {\n ...this.plugin.options,\n baseURL,\n }\n : this.plugin.options,\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(...generators)\n\n await this.addFile(...files)\n\n const barrelFiles = await this.fileManager.getBarrelFiles({\n type: output.barrelType ?? 'named',\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","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { 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 importPath = options.query ? options.query.importPath : '@tanstack/vue-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'QueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'QueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'QueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery) {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['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 name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryObserverOptions', 'UseQueryReturnType']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { 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 importPath = options.mutation ? options.mutation.importPath : '@tanstack/vue-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation) {\n return null\n }\n\n return (\n <File baseName={mutation.file.baseName} path={mutation.file.path} meta={mutation.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={mutation.file.path} path={zod.file.path} />}\n <File.Import name={['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 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 transformer={options.mutationKey}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['MutationObserverOptions']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { 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 const importPath = options.query ? options.query.importPath : '@tanstack/vue-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'InfiniteQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'InfiniteQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'InfiniteQueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || !isInfinite) {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['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 name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n {options.infinite && (\n <>\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n cursorParam={options.infinite.cursorParam}\n initialPageParam={options.infinite.initialPageParam}\n queryParam={options.infinite.queryParam}\n />\n </>\n )}\n {options.infinite && (\n <>\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryReturnType']} path={importPath} isTypeOnly />\n <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"]}
@@ -156,16 +156,20 @@ function Operations({ name, operations }) {
156
156
  function getParams2({}) {
157
157
  return FunctionParams.factory({});
158
158
  }
159
- function MutationKey({ name, typeSchemas, pathParamsType, operation, typeName, keysFn = (name2) => name2 }) {
159
+ var getTransformer = ({ operation }) => {
160
160
  const path = new URLPath(operation.path);
161
+ return [JSON.stringify({ url: path.path })].filter(Boolean);
162
+ };
163
+ function MutationKey({ name, typeSchemas, pathParamsType, operation, typeName, transformer = getTransformer }) {
161
164
  const params = getParams2({ pathParamsType, typeSchemas });
162
- const keys = [JSON.stringify({ url: path.path })].filter(Boolean);
165
+ const keys = transformer({ operation, schemas: typeSchemas });
163
166
  return /* @__PURE__ */ jsxs(Fragment, { children: [
164
- /* @__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` }) }),
167
+ /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function.Arrow, { name, export: true, params: params.toConstructor(), singleLine: true, children: `[${keys.join(", ")}] as const` }) }),
165
168
  /* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` }) })
166
169
  ] });
167
170
  }
168
171
  MutationKey.getParams = getParams2;
172
+ MutationKey.getTransformer = getTransformer;
169
173
  function getParams3({ dataReturnType, typeSchemas }) {
170
174
  const TData = dataReturnType === "data" ? typeSchemas.response.name : `ResponseConfig<${typeSchemas.response.name}>`;
171
175
  const mutationParams = FunctionParams.factory({
@@ -301,23 +305,31 @@ function getParams4({ pathParamsType, typeSchemas }) {
301
305
  } : void 0
302
306
  });
303
307
  }
304
- function QueryKey({ name, typeSchemas, pathParamsType, operation, typeName, keysFn = (name2) => name2 }) {
308
+ var getTransformer2 = ({ operation, schemas }) => {
305
309
  const path = new URLPath(operation.path);
306
- const params = getParams4({ pathParamsType, typeSchemas });
307
310
  const keys = [
308
311
  path.toObject({
309
312
  type: "path",
310
313
  stringify: true
311
314
  }),
312
- typeSchemas.queryParams?.name ? "...(params ? [params] : [])" : void 0,
313
- typeSchemas.request?.name ? "...(data ? [data] : [])" : void 0
315
+ schemas.queryParams?.name ? "...(params ? [params] : [])" : void 0,
316
+ schemas.request?.name ? "...(data ? [data] : [])" : void 0
314
317
  ].filter(Boolean);
318
+ return keys;
319
+ };
320
+ function QueryKey({ name, typeSchemas, pathParamsType, operation, typeName, transformer = getTransformer2 }) {
321
+ const params = getParams4({ pathParamsType, typeSchemas });
322
+ const keys = transformer({
323
+ operation,
324
+ schemas: typeSchemas
325
+ });
315
326
  return /* @__PURE__ */ jsxs(Fragment, { children: [
316
- /* @__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` }) }),
327
+ /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function.Arrow, { name, export: true, params: params.toConstructor(), singleLine: true, children: `[${keys.join(", ")}] as const` }) }),
317
328
  /* @__PURE__ */ jsx(File.Source, { name: typeName, isExportable: true, isIndexable: true, isTypeOnly: true, children: /* @__PURE__ */ jsx(Type, { name: typeName, export: true, children: `ReturnType<typeof ${name}>` }) })
318
329
  ] });
319
330
  }
320
331
  QueryKey.getParams = getParams4;
332
+ QueryKey.getTransformer = getTransformer2;
321
333
  function getParams5({ paramsType, pathParamsType, typeSchemas }) {
322
334
  if (paramsType === "object") {
323
335
  return FunctionParams.factory({
@@ -811,5 +823,5 @@ function InfiniteQuery({
811
823
  InfiniteQuery.getParams = getParams8;
812
824
 
813
825
  export { Client, InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Operations, Query, QueryKey, QueryOptions };
814
- //# sourceMappingURL=chunk-DWWRCRGY.js.map
815
- //# sourceMappingURL=chunk-DWWRCRGY.js.map
826
+ //# sourceMappingURL=chunk-DHJLKFYS.js.map
827
+ //# sourceMappingURL=chunk-DHJLKFYS.js.map