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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -18,8 +18,8 @@ let remeda = require("remeda");
18
18
  const customHookOptionsFileGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
19
19
  name: "react-query-custom-hook-options-file",
20
20
  Operations({ operations, generator, plugin, config }) {
21
- const { options, options: { output }, key: pluginKey } = plugin;
22
- const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
21
+ const { options, options: { output }, name: pluginName } = plugin;
22
+ const driver = (0, _kubb_core_hooks.usePluginDriver)();
23
23
  const { getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
24
24
  if (!options.customOptions) return null;
25
25
  const override = output.override ?? config.output.override ?? false;
@@ -29,10 +29,10 @@ const customHookOptionsFileGenerator = (0, _kubb_plugin_oas_generators.createRea
29
29
  const getHookFilePath = (operations) => {
30
30
  const firstOperation = operations[0];
31
31
  if (firstOperation != null) return getFile(firstOperation, { prefix: "use" }).path;
32
- return pluginManager.getFile({
32
+ return driver.getFile({
33
33
  name: "index",
34
34
  extname: ".ts",
35
- pluginKey
35
+ pluginName
36
36
  }).path;
37
37
  };
38
38
  const ensureExtension = (filePath, extname) => {
@@ -104,16 +104,16 @@ const customHookOptionsFileGenerator = (0, _kubb_plugin_oas_generators.createRea
104
104
  const hookOptionsGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
105
105
  name: "react-query-hook-options",
106
106
  Operations({ operations, plugin, generator }) {
107
- const { options, options: { output }, key: pluginKey } = plugin;
108
- const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
107
+ const { options, options: { output }, name: pluginName } = plugin;
108
+ const driver = (0, _kubb_core_hooks.usePluginDriver)();
109
109
  const oas = (0, _kubb_plugin_oas_hooks.useOas)();
110
110
  const { getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
111
111
  if (!options.customOptions) return null;
112
112
  const name = "HookOptions";
113
- const file = pluginManager.getFile({
113
+ const file = driver.getFile({
114
114
  name,
115
115
  extname: ".ts",
116
- pluginKey
116
+ pluginName
117
117
  });
118
118
  const getOperationOptions = (operation) => {
119
119
  const operationOptions = generator.getOptions(operation, operation.method);
@@ -277,7 +277,7 @@ const hookOptionsGenerator = (0, _kubb_plugin_oas_generators.createReactGenerato
277
277
  banner: (0, _kubb_plugin_oas_utils.getBanner)({
278
278
  oas,
279
279
  output,
280
- config: pluginManager.config
280
+ config: driver.config
281
281
  }),
282
282
  footer: (0, _kubb_plugin_oas_utils.getFooter)({
283
283
  oas,
@@ -303,7 +303,7 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
303
303
  name: "react-infinite-query",
304
304
  Operation({ config, operation, generator, plugin }) {
305
305
  const { options, options: { output } } = plugin;
306
- const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
306
+ const driver = (0, _kubb_core_hooks.usePluginDriver)();
307
307
  const oas = (0, _kubb_plugin_oas_hooks.useOas)();
308
308
  const { getSchemas, getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
309
309
  const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
@@ -322,16 +322,16 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
322
322
  suffix: "infinite"
323
323
  })
324
324
  };
325
- const shouldUseClientPlugin = !!pluginManager.getPluginByKey([_kubb_plugin_client.pluginClientName]) && options.client.clientType !== "class";
325
+ const shouldUseClientPlugin = !!driver.getPluginByName(_kubb_plugin_client.pluginClientName) && options.client.clientType !== "class";
326
326
  const client = {
327
327
  name: shouldUseClientPlugin ? getName(operation, {
328
328
  type: "function",
329
- pluginKey: [_kubb_plugin_client.pluginClientName]
329
+ pluginName: _kubb_plugin_client.pluginClientName
330
330
  }) : getName(operation, {
331
331
  type: "function",
332
332
  suffix: "infinite"
333
333
  }),
334
- file: getFile(operation, { pluginKey: [_kubb_plugin_client.pluginClientName] })
334
+ file: getFile(operation, { pluginName: _kubb_plugin_client.pluginClientName })
335
335
  };
336
336
  const queryOptions = { name: getName(operation, {
337
337
  type: "function",
@@ -348,16 +348,16 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
348
348
  })
349
349
  };
350
350
  const type = {
351
- file: getFile(operation, { pluginKey: [_kubb_plugin_ts.pluginTsName] }),
351
+ file: getFile(operation, { pluginName: _kubb_plugin_ts.pluginTsName }),
352
352
  schemas: getSchemas(operation, {
353
- pluginKey: [_kubb_plugin_ts.pluginTsName],
353
+ pluginName: _kubb_plugin_ts.pluginTsName,
354
354
  type: "type"
355
355
  })
356
356
  };
357
357
  const zod = {
358
- file: getFile(operation, { pluginKey: [_kubb_plugin_zod.pluginZodName] }),
358
+ file: getFile(operation, { pluginName: _kubb_plugin_zod.pluginZodName }),
359
359
  schemas: getSchemas(operation, {
360
- pluginKey: [_kubb_plugin_zod.pluginZodName],
360
+ pluginName: _kubb_plugin_zod.pluginZodName,
361
361
  type: "function"
362
362
  })
363
363
  };
@@ -377,7 +377,7 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
377
377
  banner: (0, _kubb_plugin_oas_utils.getBanner)({
378
378
  oas,
379
379
  output,
380
- config: pluginManager.config
380
+ config: driver.config
381
381
  }),
382
382
  footer: (0, _kubb_plugin_oas_utils.getFooter)({
383
383
  oas,
@@ -546,7 +546,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
546
546
  name: "react-query",
547
547
  Operation({ config, plugin, operation, generator }) {
548
548
  const { options, options: { output } } = plugin;
549
- const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
549
+ const driver = (0, _kubb_core_hooks.usePluginDriver)();
550
550
  const oas = (0, _kubb_plugin_oas_hooks.useOas)();
551
551
  const { getSchemas, getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
552
552
  const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method);
@@ -561,26 +561,26 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
561
561
  file: getFile(operation, { prefix: "use" })
562
562
  };
563
563
  const type = {
564
- file: getFile(operation, { pluginKey: [_kubb_plugin_ts.pluginTsName] }),
564
+ file: getFile(operation, { pluginName: _kubb_plugin_ts.pluginTsName }),
565
565
  schemas: getSchemas(operation, {
566
- pluginKey: [_kubb_plugin_ts.pluginTsName],
566
+ pluginName: _kubb_plugin_ts.pluginTsName,
567
567
  type: "type"
568
568
  })
569
569
  };
570
570
  const zod = {
571
- file: getFile(operation, { pluginKey: [_kubb_plugin_zod.pluginZodName] }),
571
+ file: getFile(operation, { pluginName: _kubb_plugin_zod.pluginZodName }),
572
572
  schemas: getSchemas(operation, {
573
- pluginKey: [_kubb_plugin_zod.pluginZodName],
573
+ pluginName: _kubb_plugin_zod.pluginZodName,
574
574
  type: "function"
575
575
  })
576
576
  };
577
- const shouldUseClientPlugin = !!pluginManager.getPluginByKey([_kubb_plugin_client.pluginClientName]) && options.client.clientType !== "class";
577
+ const shouldUseClientPlugin = !!driver.getPluginByName(_kubb_plugin_client.pluginClientName) && options.client.clientType !== "class";
578
578
  const client = {
579
579
  name: shouldUseClientPlugin ? getName(operation, {
580
580
  type: "function",
581
- pluginKey: [_kubb_plugin_client.pluginClientName]
581
+ pluginName: _kubb_plugin_client.pluginClientName
582
582
  }) : getName(operation, { type: "function" }),
583
- file: getFile(operation, { pluginKey: [_kubb_plugin_client.pluginClientName] })
583
+ file: getFile(operation, { pluginName: _kubb_plugin_client.pluginClientName })
584
584
  };
585
585
  const mutationOptions = { name: getName(operation, {
586
586
  type: "function",
@@ -604,7 +604,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
604
604
  banner: (0, _kubb_plugin_oas_utils.getBanner)({
605
605
  oas,
606
606
  output,
607
- config: pluginManager.config
607
+ config: driver.config
608
608
  }),
609
609
  footer: (0, _kubb_plugin_oas_utils.getFooter)({
610
610
  oas,
@@ -757,7 +757,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
757
757
  name: "react-query",
758
758
  Operation({ config, plugin, operation, generator }) {
759
759
  const { options, options: { output } } = plugin;
760
- const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
760
+ const driver = (0, _kubb_core_hooks.usePluginDriver)();
761
761
  const oas = (0, _kubb_plugin_oas_hooks.useOas)();
762
762
  const { getSchemas, getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
763
763
  const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
@@ -771,13 +771,13 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
771
771
  typeName: getName(operation, { type: "type" }),
772
772
  file: getFile(operation, { prefix: "use" })
773
773
  };
774
- const shouldUseClientPlugin = !!pluginManager.getPluginByKey([_kubb_plugin_client.pluginClientName]) && options.client.clientType !== "class";
774
+ const shouldUseClientPlugin = !!driver.getPluginByName(_kubb_plugin_client.pluginClientName) && options.client.clientType !== "class";
775
775
  const client = {
776
776
  name: shouldUseClientPlugin ? getName(operation, {
777
777
  type: "function",
778
- pluginKey: [_kubb_plugin_client.pluginClientName]
778
+ pluginName: _kubb_plugin_client.pluginClientName
779
779
  }) : getName(operation, { type: "function" }),
780
- file: getFile(operation, { pluginKey: [_kubb_plugin_client.pluginClientName] })
780
+ file: getFile(operation, { pluginName: _kubb_plugin_client.pluginClientName })
781
781
  };
782
782
  const queryOptions = { name: getName(operation, {
783
783
  type: "function",
@@ -794,16 +794,16 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
794
794
  })
795
795
  };
796
796
  const type = {
797
- file: getFile(operation, { pluginKey: [_kubb_plugin_ts.pluginTsName] }),
797
+ file: getFile(operation, { pluginName: _kubb_plugin_ts.pluginTsName }),
798
798
  schemas: getSchemas(operation, {
799
- pluginKey: [_kubb_plugin_ts.pluginTsName],
799
+ pluginName: _kubb_plugin_ts.pluginTsName,
800
800
  type: "type"
801
801
  })
802
802
  };
803
803
  const zod = {
804
- file: getFile(operation, { pluginKey: [_kubb_plugin_zod.pluginZodName] }),
804
+ file: getFile(operation, { pluginName: _kubb_plugin_zod.pluginZodName }),
805
805
  schemas: getSchemas(operation, {
806
- pluginKey: [_kubb_plugin_zod.pluginZodName],
806
+ pluginName: _kubb_plugin_zod.pluginZodName,
807
807
  type: "function"
808
808
  })
809
809
  };
@@ -815,7 +815,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
815
815
  banner: (0, _kubb_plugin_oas_utils.getBanner)({
816
816
  oas,
817
817
  output,
818
- config: pluginManager.config
818
+ config: driver.config
819
819
  }),
820
820
  footer: (0, _kubb_plugin_oas_utils.getFooter)({
821
821
  oas,
@@ -971,7 +971,7 @@ const suspenseInfiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createRea
971
971
  name: "react-suspense-infinite-query",
972
972
  Operation({ config, operation, generator, plugin }) {
973
973
  const { options, options: { output } } = plugin;
974
- const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
974
+ const driver = (0, _kubb_core_hooks.usePluginDriver)();
975
975
  const oas = (0, _kubb_plugin_oas_hooks.useOas)();
976
976
  const { getSchemas, getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
977
977
  const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
@@ -991,16 +991,16 @@ const suspenseInfiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createRea
991
991
  suffix: "suspenseInfinite"
992
992
  })
993
993
  };
994
- const shouldUseClientPlugin = !!pluginManager.getPluginByKey([_kubb_plugin_client.pluginClientName]) && options.client.clientType !== "class";
994
+ const shouldUseClientPlugin = !!driver.getPluginByName(_kubb_plugin_client.pluginClientName) && options.client.clientType !== "class";
995
995
  const client = {
996
996
  name: shouldUseClientPlugin ? getName(operation, {
997
997
  type: "function",
998
- pluginKey: [_kubb_plugin_client.pluginClientName]
998
+ pluginName: _kubb_plugin_client.pluginClientName
999
999
  }) : getName(operation, {
1000
1000
  type: "function",
1001
1001
  suffix: "suspenseInfinite"
1002
1002
  }),
1003
- file: getFile(operation, { pluginKey: [_kubb_plugin_client.pluginClientName] })
1003
+ file: getFile(operation, { pluginName: _kubb_plugin_client.pluginClientName })
1004
1004
  };
1005
1005
  const queryOptions = { name: getName(operation, {
1006
1006
  type: "function",
@@ -1017,16 +1017,16 @@ const suspenseInfiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createRea
1017
1017
  })
1018
1018
  };
1019
1019
  const type = {
1020
- file: getFile(operation, { pluginKey: [_kubb_plugin_ts.pluginTsName] }),
1020
+ file: getFile(operation, { pluginName: _kubb_plugin_ts.pluginTsName }),
1021
1021
  schemas: getSchemas(operation, {
1022
- pluginKey: [_kubb_plugin_ts.pluginTsName],
1022
+ pluginName: _kubb_plugin_ts.pluginTsName,
1023
1023
  type: "type"
1024
1024
  })
1025
1025
  };
1026
1026
  const zod = {
1027
- file: getFile(operation, { pluginKey: [_kubb_plugin_zod.pluginZodName] }),
1027
+ file: getFile(operation, { pluginName: _kubb_plugin_zod.pluginZodName }),
1028
1028
  schemas: getSchemas(operation, {
1029
- pluginKey: [_kubb_plugin_zod.pluginZodName],
1029
+ pluginName: _kubb_plugin_zod.pluginZodName,
1030
1030
  type: "function"
1031
1031
  })
1032
1032
  };
@@ -1038,7 +1038,7 @@ const suspenseInfiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createRea
1038
1038
  banner: (0, _kubb_plugin_oas_utils.getBanner)({
1039
1039
  oas,
1040
1040
  output,
1041
- config: pluginManager.config
1041
+ config: driver.config
1042
1042
  }),
1043
1043
  footer: (0, _kubb_plugin_oas_utils.getFooter)({
1044
1044
  oas,
@@ -1207,7 +1207,7 @@ const suspenseQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
1207
1207
  name: "react-suspense-query",
1208
1208
  Operation({ config, operation, generator, plugin }) {
1209
1209
  const { options, options: { output } } = plugin;
1210
- const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
1210
+ const driver = (0, _kubb_core_hooks.usePluginDriver)();
1211
1211
  const oas = (0, _kubb_plugin_oas_hooks.useOas)();
1212
1212
  const { getSchemas, getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
1213
1213
  const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
@@ -1226,16 +1226,16 @@ const suspenseQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
1226
1226
  suffix: "suspense"
1227
1227
  })
1228
1228
  };
1229
- const shouldUseClientPlugin = !!pluginManager.getPluginByKey([_kubb_plugin_client.pluginClientName]) && options.client.clientType !== "class";
1229
+ const shouldUseClientPlugin = !!driver.getPluginByName(_kubb_plugin_client.pluginClientName) && options.client.clientType !== "class";
1230
1230
  const client = {
1231
1231
  name: shouldUseClientPlugin ? getName(operation, {
1232
1232
  type: "function",
1233
- pluginKey: [_kubb_plugin_client.pluginClientName]
1233
+ pluginName: _kubb_plugin_client.pluginClientName
1234
1234
  }) : getName(operation, {
1235
1235
  type: "function",
1236
1236
  suffix: "suspense"
1237
1237
  }),
1238
- file: getFile(operation, { pluginKey: [_kubb_plugin_client.pluginClientName] })
1238
+ file: getFile(operation, { pluginName: _kubb_plugin_client.pluginClientName })
1239
1239
  };
1240
1240
  const queryOptions = { name: getName(operation, {
1241
1241
  type: "function",
@@ -1252,16 +1252,16 @@ const suspenseQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
1252
1252
  })
1253
1253
  };
1254
1254
  const type = {
1255
- file: getFile(operation, { pluginKey: [_kubb_plugin_ts.pluginTsName] }),
1255
+ file: getFile(operation, { pluginName: _kubb_plugin_ts.pluginTsName }),
1256
1256
  schemas: getSchemas(operation, {
1257
- pluginKey: [_kubb_plugin_ts.pluginTsName],
1257
+ pluginName: _kubb_plugin_ts.pluginTsName,
1258
1258
  type: "type"
1259
1259
  })
1260
1260
  };
1261
1261
  const zod = {
1262
- file: getFile(operation, { pluginKey: [_kubb_plugin_zod.pluginZodName] }),
1262
+ file: getFile(operation, { pluginName: _kubb_plugin_zod.pluginZodName }),
1263
1263
  schemas: getSchemas(operation, {
1264
- pluginKey: [_kubb_plugin_zod.pluginZodName],
1264
+ pluginName: _kubb_plugin_zod.pluginZodName,
1265
1265
  type: "function"
1266
1266
  })
1267
1267
  };
@@ -1273,7 +1273,7 @@ const suspenseQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
1273
1273
  banner: (0, _kubb_plugin_oas_utils.getBanner)({
1274
1274
  oas,
1275
1275
  output,
1276
- config: pluginManager.config
1276
+ config: driver.config
1277
1277
  }),
1278
1278
  footer: (0, _kubb_plugin_oas_utils.getFooter)({
1279
1279
  oas,
@@ -1466,4 +1466,4 @@ Object.defineProperty(exports, "suspenseQueryGenerator", {
1466
1466
  }
1467
1467
  });
1468
1468
 
1469
- //# sourceMappingURL=generators-W_darhpm.cjs.map
1469
+ //# sourceMappingURL=generators-DP07m3rH.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators-DP07m3rH.cjs","names":["path","fs","File","Function","File","Type","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","InfiniteQueryOptions","InfiniteQuery","pluginTsName","pluginZodName","pluginClientName","File","path","MutationKey","Client","MutationOptions","Mutation","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","QueryOptions","Query","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","SuspenseInfiniteQueryOptions","SuspenseInfiniteQuery","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","QueryOptions","SuspenseQuery"],"sources":["../src/generators/customHookOptionsFileGenerator.tsx","../src/generators/hookOptionsGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx","../src/generators/suspenseInfiniteQueryGenerator.tsx","../src/generators/suspenseQueryGenerator.tsx"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport type { Operation } from '@kubb/oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { File, Function } from '@kubb/react-fabric'\nimport type { PluginReactQuery } from '../types'\n\nexport const customHookOptionsFileGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query-custom-hook-options-file',\n Operations({ operations, generator, plugin, config }) {\n const {\n options,\n options: { output },\n name: pluginName,\n } = plugin\n const driver = usePluginDriver()\n\n const { getFile } = useOperationManager(generator)\n\n if (!options.customOptions) {\n return null\n }\n\n const override = output.override ?? config.output.override ?? false\n const { importPath, name } = options.customOptions\n\n const root = path.resolve(config.root, config.output.path)\n\n const reactQueryImportPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const getHookFilePath = (operations: Operation[]) => {\n const firstOperation = operations[0]\n if (firstOperation != null) {\n // Get the file of the first generated hook\n return getFile(firstOperation, { prefix: 'use' }).path\n }\n // Get the index file of the hooks directory\n return driver.getFile({ name: 'index', extname: '.ts', pluginName }).path\n }\n\n const ensureExtension = (filePath: string, extname: string) => {\n if (path.extname(filePath) === '') {\n return filePath + extname\n }\n return filePath\n }\n\n const getExternalFile = (filePath: string, rootPath: string) => {\n const actualFilePath = ensureExtension(filePath, '.ts')\n return {\n baseName: path.basename(actualFilePath) as `${string}.${string}`,\n name: path.basename(actualFilePath, path.extname(actualFilePath)),\n path: path.resolve(rootPath, actualFilePath),\n }\n }\n\n const basePath = path.dirname(getHookFilePath(operations))\n const file = getExternalFile(importPath, basePath)\n\n if (fs.existsSync(file.path) && !override) {\n return null\n }\n\n return (\n <File baseName={file.baseName} path={file.path}>\n <File.Import name={['QueryClient']} path={reactQueryImportPath} isTypeOnly />\n <File.Import name={['useQueryClient']} path={reactQueryImportPath} />\n <File.Import name={['HookOptions']} root={file.path} path={path.resolve(root, './index.ts')} />\n <File.Source name={file.name} isExportable isIndexable>\n <Function name=\"getCustomHookOptions\" params=\"{ queryClient }: { queryClient: QueryClient }\" returnType=\"Partial<HookOptions>\">\n {`return {\n // TODO: Define custom hook options here\n // Example:\n // useUpdatePetHook: {\n // onSuccess: () => {\n // void queryClient.invalidateQueries({ queryKey: ['pet'] })\n // }\n // }\n }`}\n </Function>\n <Function\n name={name}\n generics=\"T extends keyof HookOptions\"\n params=\"{ hookName, operationId }: { hookName: T, operationId: string }\"\n returnType=\"HookOptions[T]\"\n export\n >\n {`const queryClient = useQueryClient()\n const customOptions = getCustomHookOptions({ queryClient })\n return customOptions[hookName] ?? {}`}\n </Function>\n </File.Source>\n </File>\n )\n },\n})\n","import { usePluginDriver } from '@kubb/core/hooks'\nimport type { Operation } from '@kubb/oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Type } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport type { PluginReactQuery } from '../types'\n\nexport const hookOptionsGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query-hook-options',\n Operations({ operations, plugin, generator }) {\n const {\n options,\n options: { output },\n name: pluginName,\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getName, getFile } = useOperationManager(generator)\n\n if (!options.customOptions) {\n return null\n }\n\n const name = 'HookOptions'\n const file = driver.getFile({ name, extname: '.ts', pluginName })\n\n const getOperationOptions = (operation: Operation) => {\n const operationOptions = generator.getOptions(operation, operation.method)\n return { ...options, ...operationOptions }\n }\n\n const isQuery = (operation: Operation) => {\n const operationOptions = getOperationOptions(operation)\n return typeof operationOptions.query === 'boolean' ? true : operationOptions.query?.methods.some((method) => operation.method === method)\n }\n\n const isMutation = (operation: Operation) => {\n const operationOptions = getOperationOptions(operation)\n return (\n operationOptions.mutation !== false &&\n !isQuery(operation) &&\n difference(operationOptions.mutation ? operationOptions.mutation.methods : [], operationOptions.query ? operationOptions.query.methods : []).some(\n (method) => operation.method === method,\n )\n )\n }\n\n const isSuspense = (operation: Operation) => {\n const operationOptions = getOperationOptions(operation)\n return !!operationOptions.suspense\n }\n\n const isInfinite = (operation: Operation) => {\n const operationOptions = getOperationOptions(operation)\n const infiniteOptions = operationOptions.infinite && typeof operationOptions.infinite === 'object' ? operationOptions.infinite : undefined\n return !!infiniteOptions\n }\n\n // Query/mutation hooks\n const getHookName = (operation: Operation) => {\n return getName(operation, { type: 'function', prefix: 'use' })\n }\n\n const getHookFile = (operation: Operation) => {\n return getFile(operation, { prefix: 'use' })\n }\n\n // Query hooks\n const getQueryHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'QueryOptions' })\n }\n\n const getQueryHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getQueryHookOptions(operation)]} root={file.path} path={getHookFile(operation).path} />\n }\n\n // Mutation hooks\n const getMutationHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'MutationOptions' })\n }\n\n const getMutationHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getMutationHookOptions(operation)]} root={file.path} path={getHookFile(operation).path} />\n }\n\n // Suspense hooks\n const getSuspenseHookName = (operation: Operation) => {\n return getName(operation, { type: 'function', prefix: 'use', suffix: 'suspense' })\n }\n\n const getSuspenseHookFile = (operation: Operation) => {\n return getFile(operation, { prefix: 'use', suffix: 'suspense' })\n }\n\n const getSuspenseHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'SuspenseQueryOptions' })\n }\n\n const getSuspenseHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getSuspenseHookOptions(operation)]} root={file.path} path={getSuspenseHookFile(operation).path} />\n }\n\n // Infinite hooks\n const getInfiniteHookName = (operation: Operation) => {\n return getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' })\n }\n\n const getInfiniteHookFile = (operation: Operation) => {\n return getFile(operation, { prefix: 'use', suffix: 'infinite' })\n }\n\n const getInfiniteHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'InfiniteQueryOptions' })\n }\n\n const getInfiniteHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getInfiniteHookOptions(operation)]} root={file.path} path={getInfiniteHookFile(operation).path} />\n }\n\n // Suspense infinite hooks\n const getSuspenseInfiniteHookName = (operation: Operation) => {\n return getName(operation, { type: 'function', prefix: 'use', suffix: 'suspenseInfinite' })\n }\n\n const getSuspenseInfiniteHookFile = (operation: Operation) => {\n return getFile(operation, { prefix: 'use', suffix: 'suspenseInfinite' })\n }\n\n const getSuspenseInfiniteHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'SuspenseInfiniteQueryOptions' })\n }\n\n const getSuspenseInfiniteHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getSuspenseInfiniteHookOptions(operation)]} root={file.path} path={getSuspenseInfiniteHookFile(operation).path} />\n }\n\n const imports = operations\n .flatMap((operation) => {\n if (isQuery(operation)) {\n return [\n getQueryHookOptionsImport(operation),\n isSuspense(operation) ? getSuspenseHookOptionsImport(operation) : undefined,\n isInfinite(operation) ? getInfiniteHookOptionsImport(operation) : undefined,\n isSuspense(operation) && isInfinite(operation) ? getSuspenseInfiniteHookOptionsImport(operation) : undefined,\n ].filter(Boolean)\n }\n if (isMutation(operation)) {\n return [getMutationHookOptionsImport(operation)]\n }\n return []\n })\n .filter(Boolean)\n\n const hookOptions = operations.reduce(\n (acc, operation) => {\n if (isQuery(operation)) {\n acc[getHookName(operation)] = `Partial<ReturnType<typeof ${getQueryHookOptions(operation)}>>`\n if (isSuspense(operation)) {\n acc[getSuspenseHookName(operation)] = `Partial<ReturnType<typeof ${getSuspenseHookOptions(operation)}>>`\n }\n if (isInfinite(operation)) {\n acc[getInfiniteHookName(operation)] = `Partial<ReturnType<typeof ${getInfiniteHookOptions(operation)}>>`\n }\n if (isSuspense(operation) && isInfinite(operation)) {\n acc[getSuspenseInfiniteHookName(operation)] = `Partial<ReturnType<typeof ${getSuspenseInfiniteHookOptions(operation)}>>`\n }\n }\n if (isMutation(operation)) {\n acc[getHookName(operation)] = `Partial<ReturnType<typeof ${getMutationHookOptions(operation)}>>`\n }\n return acc\n },\n {} as Record<string, string>,\n )\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {imports}\n <File.Source name={name} isExportable isIndexable isTypeOnly>\n <Type export name={name}>\n {`{ ${Object.keys(hookOptions).map((key) => `${JSON.stringify(key)}: ${hookOptions[key]}`)} }`}\n </Type>\n </File.Source>\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-infinite-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const infiniteOptions = options.infinite && typeof options.infinite === 'object' ? options.infinite : undefined\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\n }\n\n const hasClientPlugin = !!driver.getPluginByName(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n suffix: 'infinite',\n }),\n file: getFile(operation, { pluginName: 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, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n if (!isQuery || isMutation || !infiniteOptions) {\n return null\n }\n\n const normalizeKey = (key?: string | null) => (key ?? '').replace(/\\?$/, '')\n const queryParam = infiniteOptions.queryParam\n const cursorParam = infiniteOptions.cursorParam\n const queryParamKeys = type.schemas.queryParams?.keys ?? []\n const responseKeys = [...(type.schemas.responses?.flatMap((item) => item.keys ?? []) ?? []), ...(type.schemas.response?.keys ?? [])]\n\n const hasQueryParam = queryParam ? queryParamKeys.some((key) => normalizeKey(key) === queryParam) : false\n const hasCursorParam = cursorParam ? responseKeys.some((key) => normalizeKey(key) === cursorParam) : true\n\n if (!hasQueryParam || !hasCursorParam) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && (\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n )}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.client?.paramsCasing || options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n {infiniteOptions && (\n <>\n <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n cursorParam={infiniteOptions.cursorParam}\n nextParam={infiniteOptions.nextParam}\n previousParam={infiniteOptions.previousParam}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryResult']} path={importPath} isTypeOnly />\n <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n customOptions={options.customOptions}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport { MutationOptions } from '../components/MutationOptions.tsx'\nimport type { PluginReactQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ config, plugin, operation, generator }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n options.mutation !== false &&\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/react-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n const hasClientPlugin = !!driver.getPluginByName(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginName: pluginClientName }),\n }\n\n const mutationOptions = {\n name: getName(operation, { type: 'function', suffix: 'MutationOptions' }),\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\n baseName={mutation.file.baseName}\n path={mutation.file.path}\n meta={mutation.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={mutation.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && (\n <File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n )}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import\n name={['ResponseConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.mutationKey}\n />\n\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.client?.paramsCasing || options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['mutationOptions']} path={importPath} />\n\n <MutationOptions\n name={mutationOptions.name}\n clientName={client.name}\n mutationKeyName={mutationKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n />\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['UseMutationOptions', 'UseMutationResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n mutationOptionsName={mutationOptions.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n customOptions={options.customOptions}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ config, plugin, operation, generator }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const hasClientPlugin = !!driver.getPluginByName(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginName: 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, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, {\n pluginName: pluginTsName,\n type: 'type',\n }),\n }\n\n const zod = {\n // grouping is coming from react-query instead of zod option, we need to pass the options of zod instead\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, {\n pluginName: pluginZodName,\n type: 'function',\n }),\n }\n\n if (!isQuery || isMutation) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && (\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n )}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.queryKey}\n />\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsType={options.paramsType}\n paramsCasing={options.client?.paramsCasing || options.paramsCasing}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'QueryObserverOptions', 'UseQueryResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n customOptions={options.customOptions}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { QueryKey, SuspenseInfiniteQuery, SuspenseInfiniteQueryOptions } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const suspenseInfiniteQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-suspense-infinite-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const isSuspense = !!options.suspense\n const infiniteOptions = options.infinite && typeof options.infinite === 'object' ? options.infinite : undefined\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'suspenseInfinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'suspenseInfinite' }),\n }\n\n const hasClientPlugin = !!driver.getPluginByName(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n suffix: 'suspenseInfinite',\n }),\n file: getFile(operation, { pluginName: pluginClientName }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'SuspenseInfiniteQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'SuspenseInfiniteQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'SuspenseInfiniteQueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginName: pluginTsName, type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, { pluginName: pluginZodName, type: 'function' }),\n }\n\n if (!isQuery || isMutation || !isSuspense || !infiniteOptions) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && (\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n )}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.client?.paramsCasing || options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n <SuspenseInfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n cursorParam={infiniteOptions.cursorParam}\n nextParam={infiniteOptions.nextParam}\n previousParam={infiniteOptions.previousParam}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['useSuspenseInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseSuspenseInfiniteQueryOptions', 'UseSuspenseInfiniteQueryResult']} path={importPath} isTypeOnly />\n <SuspenseInfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n customOptions={options.customOptions}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginDriver } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { QueryKey, QueryOptions, SuspenseQuery } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const suspenseQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-suspense-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const driver = usePluginDriver()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const isSuspense = !!options.suspense\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, {\n type: 'function',\n prefix: 'use',\n suffix: 'suspense',\n }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'suspense' }),\n }\n\n const hasClientPlugin = !!driver.getPluginByName(pluginClientName)\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginName: pluginClientName,\n })\n : getName(operation, {\n type: 'function',\n suffix: 'suspense',\n }),\n file: getFile(operation, { pluginName: pluginClientName }),\n }\n\n const queryOptions = {\n name: getName(operation, {\n type: 'function',\n suffix: 'SuspenseQueryOptions',\n }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'SuspenseQueryKey' }),\n typeName: getName(operation, {\n type: 'type',\n suffix: 'SuspenseQueryKey',\n }),\n }\n\n const type = {\n file: getFile(operation, { pluginName: pluginTsName }),\n //todo remove type?\n schemas: getSchemas(operation, {\n pluginName: pluginTsName,\n type: 'type',\n }),\n }\n\n const zod = {\n file: getFile(operation, { pluginName: pluginZodName }),\n schemas: getSchemas(operation, {\n pluginName: pluginZodName,\n type: 'function',\n }),\n }\n\n if (!isQuery || isMutation || !isSuspense) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: driver.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n {!shouldUseClientPlugin && <File.Import name={'fetch'} path={options.client.importPath} />}\n <File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n {!shouldUseClientPlugin && (\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n )}\n <File.Import\n name={['Client', 'RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.client?.paramsCasing || options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.suspense && (\n <>\n <File.Import name={['useSuspenseQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseSuspenseQueryOptions', 'UseSuspenseQueryResult']} path={importPath} isTypeOnly />\n\n <SuspenseQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n customOptions={options.customOptions}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;AASA,MAAa,kCAAA,GAAA,4BAAA,sBAAwE;CACnF,MAAM;CACN,WAAW,EAAE,YAAY,WAAW,QAAQ,UAAU;EACpD,MAAM,EACJ,SACA,SAAS,EAAE,UACX,MAAM,eACJ;EACJ,MAAM,UAAA,GAAA,iBAAA,kBAA0B;EAEh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