@kubb/plugin-react-query 3.0.0-alpha.29 → 3.0.0-alpha.30

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.
@@ -1,5 +1,5 @@
1
1
  import { Client, Operations, QueryKey, QueryOptions, Query, MutationKey, Mutation, InfiniteQueryOptions, InfiniteQuery, SuspenseQuery } from './chunk-Y3DM2P6L.js';
2
- import transformers, { camelCase } from '@kubb/core/transformers';
2
+ import { camelCase } from '@kubb/core/transformers';
3
3
  import path from 'node:path';
4
4
  import { createPlugin, FileManager, PluginManager } from '@kubb/core';
5
5
  import { renderTemplate } from '@kubb/core/utils';
@@ -34,11 +34,10 @@ var clientGenerator = createReactGenerator({
34
34
  return /* @__PURE__ */ jsxs(File, { baseName: client.file.baseName, path: client.file.path, meta: client.file.meta, banner: output?.banner, footer: output?.footer, children: [
35
35
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.importPath }),
36
36
  /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig"], path: options.importPath, isTypeOnly: true }),
37
- options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: client.file.path, path: zod.file.path }),
37
+ options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: client.file.path, path: zod.file.path }),
38
38
  /* @__PURE__ */ jsx(
39
39
  File.Import,
40
40
  {
41
- extName: output?.extName,
42
41
  name: [
43
42
  type.schemas.request?.name,
44
43
  type.schemas.response.name,
@@ -78,7 +77,7 @@ var operationsGenerator = createReactGenerator({
78
77
  }
79
78
  } = useApp();
80
79
  const name = "operations";
81
- const file = pluginManager.getFile({ name, extName: ".ts", pluginKey: [pluginClientName] });
80
+ const file = pluginManager.getFile({ name, extname: ".ts", pluginKey: [pluginClientName] });
82
81
  return /* @__PURE__ */ jsx(File, { baseName: file.baseName, path: file.path, meta: file.meta, banner: output?.banner, footer: output?.footer, children: /* @__PURE__ */ jsx(Operations, { name, operations }) });
83
82
  }
84
83
  });
@@ -87,7 +86,7 @@ var operationsGenerator = createReactGenerator({
87
86
  var pluginClientName = "plugin-client";
88
87
  createPlugin((options) => {
89
88
  const {
90
- output = { path: "clients" },
89
+ output = { path: "clients", barrelType: "named" },
91
90
  group,
92
91
  exclude = [],
93
92
  include,
@@ -105,7 +104,6 @@ createPlugin((options) => {
105
104
  name: pluginClientName,
106
105
  options: {
107
106
  output: {
108
- exportType: "barrelNamed",
109
107
  ...output
110
108
  },
111
109
  parser,
@@ -158,18 +156,17 @@ createPlugin((options) => {
158
156
  );
159
157
  const files = await operationGenerator.build(...generators);
160
158
  await this.addFile(...files);
161
- if (this.config.output.exportType) {
162
- const barrelFiles = await this.fileManager.getBarrelFiles({
163
- root,
164
- output,
165
- files: this.fileManager.files,
166
- meta: {
167
- pluginKey: this.plugin.key
168
- },
169
- logger: this.logger
170
- });
171
- await this.addFile(...barrelFiles);
172
- }
159
+ const barrelFiles = await this.fileManager.getBarrelFiles({
160
+ type: output.barrelType ?? "named",
161
+ root,
162
+ output,
163
+ files: this.fileManager.files,
164
+ meta: {
165
+ pluginKey: this.plugin.key
166
+ },
167
+ logger: this.logger
168
+ });
169
+ await this.addFile(...barrelFiles);
173
170
  }
174
171
  };
175
172
  });
@@ -193,11 +190,11 @@ var queryGenerator = createReactGenerator({
193
190
  name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
194
191
  };
195
192
  const queryOptions = {
196
- name: transformers.camelCase(`${operation.getOperationId()} QueryOptions`)
193
+ name: getName(operation, { type: "function", suffix: "QueryOptions" })
197
194
  };
198
195
  const queryKey = {
199
- name: transformers.camelCase(`${operation.getOperationId()} QueryKey`),
200
- typeName: transformers.pascalCase(`${operation.getOperationId()} QueryKey`)
196
+ name: getName(operation, { type: "const", suffix: "QueryKey" }),
197
+ typeName: getName(operation, { type: "type", suffix: "QueryKey" })
201
198
  };
202
199
  const type = {
203
200
  file: getFile(operation, { pluginKey: [pluginTsName] }),
@@ -212,7 +209,7 @@ var queryGenerator = createReactGenerator({
212
209
  return null;
213
210
  }
214
211
  return /* @__PURE__ */ jsxs(File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
215
- options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
212
+ options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
216
213
  /* @__PURE__ */ jsx(File.Import, { name: ["useQuery", "queryOptions"], path: options.query.importPath }),
217
214
  /* @__PURE__ */ jsx(File.Import, { name: ["QueryKey", "WithRequired", "QueryObserverOptions", "UseQueryResult"], path: options.query.importPath, isTypeOnly: true }),
218
215
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
@@ -221,7 +218,6 @@ var queryGenerator = createReactGenerator({
221
218
  /* @__PURE__ */ jsx(
222
219
  File.Import,
223
220
  {
224
- extName: output?.extName,
225
221
  name: [
226
222
  type.schemas.request?.name,
227
223
  type.schemas.response.name,
@@ -316,14 +312,14 @@ var mutationGenerator = createReactGenerator({
316
312
  name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
317
313
  };
318
314
  const mutationKey = {
319
- name: transformers.camelCase(`${operation.getOperationId()} MutationKey`),
320
- typeName: transformers.pascalCase(`${operation.getOperationId()} MutationKey`)
315
+ name: getName(operation, { type: "const", suffix: "MutationKey" }),
316
+ typeName: getName(operation, { type: "type", suffix: "MutationKey" })
321
317
  };
322
318
  if (!isMutation || typeof options.mutation === "boolean") {
323
319
  return null;
324
320
  }
325
321
  return /* @__PURE__ */ jsxs(File, { baseName: mutation.file.baseName, path: mutation.file.path, meta: mutation.file.meta, banner: output?.banner, footer: output?.footer, children: [
326
- options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
322
+ options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
327
323
  /* @__PURE__ */ jsx(File.Import, { name: ["useMutation"], path: options.mutation.importPath }),
328
324
  /* @__PURE__ */ jsx(File.Import, { name: ["UseMutationOptions"], path: options.mutation.importPath, isTypeOnly: true }),
329
325
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
@@ -331,7 +327,6 @@ var mutationGenerator = createReactGenerator({
331
327
  /* @__PURE__ */ jsx(
332
328
  File.Import,
333
329
  {
334
- extName: output?.extName,
335
330
  name: [
336
331
  type.schemas.request?.name,
337
332
  type.schemas.response.name,
@@ -407,11 +402,11 @@ var infiniteQueryGenerator = createReactGenerator({
407
402
  name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
408
403
  };
409
404
  const queryOptions = {
410
- name: transformers.camelCase(`${operation.getOperationId()} InfiniteQueryOptions`)
405
+ name: getName(operation, { type: "function", suffix: "InfiniteQueryOptions" })
411
406
  };
412
407
  const queryKey = {
413
- name: transformers.camelCase(`${operation.getOperationId()} InfiniteQueryKey`),
414
- typeName: transformers.pascalCase(`${operation.getOperationId()} InfiniteQueryKey`)
408
+ name: getName(operation, { type: "const", suffix: "InfiniteQueryKey" }),
409
+ typeName: getName(operation, { type: "type", suffix: "InfiniteQueryKey" })
415
410
  };
416
411
  const type = {
417
412
  file: getFile(operation, { pluginKey: [pluginTsName] }),
@@ -426,7 +421,7 @@ var infiniteQueryGenerator = createReactGenerator({
426
421
  return null;
427
422
  }
428
423
  return /* @__PURE__ */ jsxs(File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
429
- options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
424
+ options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
430
425
  /* @__PURE__ */ jsx(File.Import, { name: ["useInfiniteQuery", "infiniteQueryOptions"], path: options.query.importPath }),
431
426
  /* @__PURE__ */ jsx(File.Import, { name: ["QueryKey", "WithRequired", "InfiniteQueryObserverOptions", "UseInfiniteQueryResult"], path: options.query.importPath, isTypeOnly: true }),
432
427
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
@@ -435,7 +430,6 @@ var infiniteQueryGenerator = createReactGenerator({
435
430
  /* @__PURE__ */ jsx(
436
431
  File.Import,
437
432
  {
438
- extName: output?.extName,
439
433
  name: [
440
434
  type.schemas.request?.name,
441
435
  type.schemas.response.name,
@@ -525,11 +519,11 @@ var suspenseQueryGenerator = createReactGenerator({
525
519
  name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
526
520
  };
527
521
  const queryOptions = {
528
- name: transformers.camelCase(`${operation.getOperationId()} SuspenseQueryOptions`)
522
+ name: getName(operation, { type: "function", suffix: "SuspenseQueryOptions" })
529
523
  };
530
524
  const queryKey = {
531
- name: transformers.camelCase(`${operation.getOperationId()} SuspenseQueryKey`),
532
- typeName: transformers.pascalCase(`${operation.getOperationId()} SuspenseQueryKey`)
525
+ name: getName(operation, { type: "const", suffix: "SuspenseQueryKey" }),
526
+ typeName: getName(operation, { type: "type", suffix: "SuspenseQueryKey" })
533
527
  };
534
528
  const type = {
535
529
  file: getFile(operation, { pluginKey: [pluginTsName] }),
@@ -544,7 +538,7 @@ var suspenseQueryGenerator = createReactGenerator({
544
538
  return null;
545
539
  }
546
540
  return /* @__PURE__ */ jsxs(File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
547
- options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
541
+ options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
548
542
  /* @__PURE__ */ jsx(File.Import, { name: ["useSuspenseQuery", "queryOptions"], path: options.query.importPath }),
549
543
  /* @__PURE__ */ jsx(File.Import, { name: ["QueryKey", "WithRequired", "UseSuspenseQueryOptions", "UseSuspenseQueryResult"], path: options.query.importPath, isTypeOnly: true }),
550
544
  /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
@@ -553,7 +547,6 @@ var suspenseQueryGenerator = createReactGenerator({
553
547
  /* @__PURE__ */ jsx(
554
548
  File.Import,
555
549
  {
556
- extName: output?.extName,
557
550
  name: [
558
551
  type.schemas.request?.name,
559
552
  type.schemas.response.name,
@@ -621,5 +614,5 @@ var suspenseQueryGenerator = createReactGenerator({
621
614
  });
622
615
 
623
616
  export { infiniteQueryGenerator, mutationGenerator, queryGenerator, suspenseQueryGenerator };
624
- //# sourceMappingURL=chunk-ZX7YSD2Z.js.map
625
- //# sourceMappingURL=chunk-ZX7YSD2Z.js.map
617
+ //# sourceMappingURL=chunk-2D27Y6L5.js.map
618
+ //# sourceMappingURL=chunk-2D27Y6L5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../plugin-client/src/generators/clientGenerator.tsx","../../plugin-client/src/generators/operationsGenerator.tsx","../../plugin-client/src/plugin.ts","../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx","../src/generators/suspenseQueryGenerator.tsx"],"names":["createReactGenerator","useApp","jsx","File","transformers","pluginZodName","options","useOperationManager","pluginTsName","jsxs"],"mappings":";;;;;;;;;;;;AAQO,IAAM,kBAAkB,oBAAmC,CAAA;AAAA,EAChE,IAAM,EAAA,QAAA;AAAA,EACN,SAAU,CAAA,EAAE,OAAS,EAAA,SAAA,EAAa,EAAA;AAChC,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,OAAA,EAAS,EAAE,MAAO,EAAA;AAAA,OACpB;AAAA,QACE,MAAqB,EAAA,CAAA;AACzB,IAAA,MAAM,EAAE,UAAA,EAAY,OA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,OAC1B;AAAA,sBACAA,GAAAA;AAAA,QAAC,aAAA;AAAA,QAAA;AAAA,UACC,MAAM,KAAM,CAAA,IAAA;AAAA,UACZ,kBAAkB,YAAa,CAAA,IAAA;AAAA,UAC/B,aAAa,IAAK,CAAA,OAAA;AAAA,UAClB,gBAAgB,OAAQ,CAAA,cAAA;AAAA,UACxB,SAAA;AAAA,UACA,cAAA,EAAgB,QAAQ,MAAO,CAAA,cAAA;AAAA,UAC/B,cAAc,QAAS,CAAA,IAAA;AAAA,UACvB,kBAAkB,QAAS,CAAA,QAAA;AAAA,SAAA;AAAA,OAC7B;AAAA,KACF,EAAA,CAAA,CAAA;AAAA,GAEJ;AACF,CAAC","file":"chunk-2D27Y6L5.js","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 typeSchemas={type.schemas}\n operation={operation}\n parser={options.parser}\n zodSchemas={zod.schemas}\n />\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { File, useApp } from '@kubb/react'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations }) {\n const {\n pluginManager,\n plugin: {\n options: { output },\n },\n } = useApp<PluginClient>()\n\n const name = 'operations'\n const file = pluginManager.getFile({ name, extname: '.ts', pluginKey: [pluginClientName] })\n\n return (\n <File baseName={file.baseName} path={file.path} meta={file.meta} banner={output?.banner} footer={output?.footer}>\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import path from 'node:path'\n\nimport { FileManager, PluginManager, createPlugin } from '@kubb/core'\nimport { camelCase } from '@kubb/core/transformers'\nimport { renderTemplate } from '@kubb/core/utils'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\n\nimport type { Plugin } from '@kubb/core'\nimport type { PluginOas as SwaggerPluginOptions } from '@kubb/plugin-oas'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { operationsGenerator } from './generators'\nimport { clientGenerator } from './generators/clientGenerator.tsx'\nimport type { PluginClient } from './types.ts'\n\nexport const pluginClientName = 'plugin-client' satisfies PluginClient['name']\n\nexport const pluginClient = createPlugin<PluginClient>((options) => {\n const {\n output = { path: 'clients', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n transformers = {},\n dataReturnType = 'data',\n pathParamsType = 'inline',\n operations = false,\n generators = [clientGenerator, operations ? operationsGenerator : undefined].filter(Boolean),\n importPath = '@kubb/plugin-client/client',\n parser = 'client',\n } = options\n\n const template = group?.output ? group.output : `${output.path}/{{tag}}Controller`\n\n return {\n name: pluginClientName,\n options: {\n output: {\n ...output,\n },\n parser,\n dataReturnType,\n importPath,\n pathParamsType,\n baseURL: undefined,\n },\n pre: [pluginOasName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? FileManager.getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (options?.tag && group?.type === 'tag') {\n const tag = camelCase(options.tag)\n\n return path.resolve(root, renderTemplate(template, { tag }), baseName)\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n const resolvedName = camelCase(name, { isFile: type === 'file' })\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async buildStart() {\n const [swaggerPlugin]: [Plugin<SwaggerPluginOptions>] = PluginManager.getDependedPlugins<SwaggerPluginOptions>(this.plugins, [pluginOasName])\n\n const oas = await swaggerPlugin.context.getOas()\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = FileManager.getMode(path.resolve(root, output.path))\n const baseURL = await swaggerPlugin.context.getBaseURL()\n\n const operationGenerator = new OperationGenerator(\n {\n ...this.plugin.options,\n baseURL,\n },\n {\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType: swaggerPlugin.context.contentType,\n exclude,\n include,\n override,\n mode,\n },\n )\n\n const files = await operationGenerator.build(...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 transformers from '@kubb/core/transformers'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginReactQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method)\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: 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 || typeof options.query === 'boolean') {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['useQuery', 'queryOptions']} path={options.query.importPath} />\n <File.Import name={['QueryKey', 'WithRequired', 'QueryObserverOptions', 'UseQueryResult']} path={options.query.importPath} 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\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n keysFn={options.query.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </File>\n )\n },\n})\n","import transformers from '@kubb/core/transformers'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginReactQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method)\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation || typeof options.mutation === 'boolean') {\n return null\n }\n\n return (\n <File baseName={mutation.file.baseName} path={mutation.file.path} meta={mutation.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={mutation.file.path} path={zod.file.path} />}\n <File.Import name={['useMutation']} path={options.mutation.importPath} />\n <File.Import name={['UseMutationOptions']} path={options.mutation.importPath} 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 keysFn={options.mutation.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </File>\n )\n },\n})\n","import transformers from '@kubb/core/transformers'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-infinite-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginReactQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n const isQuery = typeof options.query === 'boolean' ? options.query : !!options.query.methods?.some((method) => operation.method === method)\n const isInfinite = isQuery && !!options.infinite\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\n }\n\n const client = {\n name: getName(operation, { type: 'function', pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: 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 || typeof options.query === 'boolean' || typeof options.infinite === 'boolean') {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['useInfiniteQuery', 'infiniteQueryOptions']} path={options.query.importPath} />\n <File.Import name={['QueryKey', 'WithRequired', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryResult']} path={options.query.importPath} 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\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n keysFn={options.query.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n cursorParam={options.infinite.cursorParam}\n initialPageParam={options.infinite.initialPageParam}\n queryParam={options.infinite.queryParam}\n />\n <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </File>\n )\n },\n})\n","import transformers from '@kubb/core/transformers'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { QueryKey, QueryOptions, SuspenseQuery } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const suspenseQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-suspense-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginReactQuery>()\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 isSuspense = isQuery && !!options.suspense\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'suspense' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'suspense' }),\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: 'SuspenseQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'SuspenseQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'SuspenseQueryKey' }),\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 || !isSuspense || typeof options.query === 'boolean') {\n return null\n }\n\n return (\n <File baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['useSuspenseQuery', 'queryOptions']} path={options.query.importPath} />\n <File.Import name={['QueryKey', 'WithRequired', 'UseSuspenseQueryOptions', 'UseSuspenseQueryResult']} path={options.query.importPath} 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\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n keysFn={options.query.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n />\n <SuspenseQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </File>\n )\n },\n})\n"]}
@@ -14,7 +14,6 @@ var jsxRuntime = require('@kubb/react/jsx-runtime');
14
14
 
15
15
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
16
16
 
17
- var transformers__default = /*#__PURE__*/_interopDefault(transformers);
18
17
  var path__default = /*#__PURE__*/_interopDefault(path);
19
18
 
20
19
  var clientGenerator = pluginOas.createReactGenerator({
@@ -41,11 +40,10 @@ var clientGenerator = pluginOas.createReactGenerator({
41
40
  return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: client.file.baseName, path: client.file.path, meta: client.file.meta, banner: output?.banner, footer: output?.footer, children: [
42
41
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.importPath }),
43
42
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig"], path: options.importPath, isTypeOnly: true }),
44
- options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: client.file.path, path: zod.file.path }),
43
+ options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: client.file.path, path: zod.file.path }),
45
44
  /* @__PURE__ */ jsxRuntime.jsx(
46
45
  react.File.Import,
47
46
  {
48
- extName: output?.extName,
49
47
  name: [
50
48
  type.schemas.request?.name,
51
49
  type.schemas.response.name,
@@ -85,7 +83,7 @@ var operationsGenerator = pluginOas.createReactGenerator({
85
83
  }
86
84
  } = react.useApp();
87
85
  const name = "operations";
88
- const file = pluginManager.getFile({ name, extName: ".ts", pluginKey: [pluginClientName] });
86
+ const file = pluginManager.getFile({ name, extname: ".ts", pluginKey: [pluginClientName] });
89
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(chunkC2H3KPHM_cjs.Operations, { name, operations }) });
90
88
  }
91
89
  });
@@ -94,7 +92,7 @@ var operationsGenerator = pluginOas.createReactGenerator({
94
92
  var pluginClientName = "plugin-client";
95
93
  core.createPlugin((options) => {
96
94
  const {
97
- output = { path: "clients" },
95
+ output = { path: "clients", barrelType: "named" },
98
96
  group,
99
97
  exclude = [],
100
98
  include,
@@ -112,7 +110,6 @@ core.createPlugin((options) => {
112
110
  name: pluginClientName,
113
111
  options: {
114
112
  output: {
115
- exportType: "barrelNamed",
116
113
  ...output
117
114
  },
118
115
  parser,
@@ -165,18 +162,17 @@ core.createPlugin((options) => {
165
162
  );
166
163
  const files = await operationGenerator.build(...generators);
167
164
  await this.addFile(...files);
168
- if (this.config.output.exportType) {
169
- const barrelFiles = await this.fileManager.getBarrelFiles({
170
- root,
171
- output,
172
- files: this.fileManager.files,
173
- meta: {
174
- pluginKey: this.plugin.key
175
- },
176
- logger: this.logger
177
- });
178
- await this.addFile(...barrelFiles);
179
- }
165
+ const barrelFiles = await this.fileManager.getBarrelFiles({
166
+ type: output.barrelType ?? "named",
167
+ root,
168
+ output,
169
+ files: this.fileManager.files,
170
+ meta: {
171
+ pluginKey: this.plugin.key
172
+ },
173
+ logger: this.logger
174
+ });
175
+ await this.addFile(...barrelFiles);
180
176
  }
181
177
  };
182
178
  });
@@ -200,11 +196,11 @@ var queryGenerator = pluginOas.createReactGenerator({
200
196
  name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
201
197
  };
202
198
  const queryOptions = {
203
- name: transformers__default.default.camelCase(`${operation.getOperationId()} QueryOptions`)
199
+ name: getName(operation, { type: "function", suffix: "QueryOptions" })
204
200
  };
205
201
  const queryKey = {
206
- name: transformers__default.default.camelCase(`${operation.getOperationId()} QueryKey`),
207
- typeName: transformers__default.default.pascalCase(`${operation.getOperationId()} QueryKey`)
202
+ name: getName(operation, { type: "const", suffix: "QueryKey" }),
203
+ typeName: getName(operation, { type: "type", suffix: "QueryKey" })
208
204
  };
209
205
  const type = {
210
206
  file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
@@ -219,7 +215,7 @@ var queryGenerator = pluginOas.createReactGenerator({
219
215
  return null;
220
216
  }
221
217
  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: [
222
- options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
218
+ options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
223
219
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useQuery", "queryOptions"], path: options.query.importPath }),
224
220
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "WithRequired", "QueryObserverOptions", "UseQueryResult"], path: options.query.importPath, isTypeOnly: true }),
225
221
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
@@ -228,7 +224,6 @@ var queryGenerator = pluginOas.createReactGenerator({
228
224
  /* @__PURE__ */ jsxRuntime.jsx(
229
225
  react.File.Import,
230
226
  {
231
- extName: output?.extName,
232
227
  name: [
233
228
  type.schemas.request?.name,
234
229
  type.schemas.response.name,
@@ -323,14 +318,14 @@ var mutationGenerator = pluginOas.createReactGenerator({
323
318
  name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
324
319
  };
325
320
  const mutationKey = {
326
- name: transformers__default.default.camelCase(`${operation.getOperationId()} MutationKey`),
327
- typeName: transformers__default.default.pascalCase(`${operation.getOperationId()} MutationKey`)
321
+ name: getName(operation, { type: "const", suffix: "MutationKey" }),
322
+ typeName: getName(operation, { type: "type", suffix: "MutationKey" })
328
323
  };
329
324
  if (!isMutation || typeof options.mutation === "boolean") {
330
325
  return null;
331
326
  }
332
327
  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: [
333
- options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
328
+ options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
334
329
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useMutation"], path: options.mutation.importPath }),
335
330
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["UseMutationOptions"], path: options.mutation.importPath, isTypeOnly: true }),
336
331
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
@@ -338,7 +333,6 @@ var mutationGenerator = pluginOas.createReactGenerator({
338
333
  /* @__PURE__ */ jsxRuntime.jsx(
339
334
  react.File.Import,
340
335
  {
341
- extName: output?.extName,
342
336
  name: [
343
337
  type.schemas.request?.name,
344
338
  type.schemas.response.name,
@@ -414,11 +408,11 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
414
408
  name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
415
409
  };
416
410
  const queryOptions = {
417
- name: transformers__default.default.camelCase(`${operation.getOperationId()} InfiniteQueryOptions`)
411
+ name: getName(operation, { type: "function", suffix: "InfiniteQueryOptions" })
418
412
  };
419
413
  const queryKey = {
420
- name: transformers__default.default.camelCase(`${operation.getOperationId()} InfiniteQueryKey`),
421
- typeName: transformers__default.default.pascalCase(`${operation.getOperationId()} InfiniteQueryKey`)
414
+ name: getName(operation, { type: "const", suffix: "InfiniteQueryKey" }),
415
+ typeName: getName(operation, { type: "type", suffix: "InfiniteQueryKey" })
422
416
  };
423
417
  const type = {
424
418
  file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
@@ -433,7 +427,7 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
433
427
  return null;
434
428
  }
435
429
  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: [
436
- options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
430
+ options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
437
431
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useInfiniteQuery", "infiniteQueryOptions"], path: options.query.importPath }),
438
432
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "WithRequired", "InfiniteQueryObserverOptions", "UseInfiniteQueryResult"], path: options.query.importPath, isTypeOnly: true }),
439
433
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
@@ -442,7 +436,6 @@ var infiniteQueryGenerator = pluginOas.createReactGenerator({
442
436
  /* @__PURE__ */ jsxRuntime.jsx(
443
437
  react.File.Import,
444
438
  {
445
- extName: output?.extName,
446
439
  name: [
447
440
  type.schemas.request?.name,
448
441
  type.schemas.response.name,
@@ -532,11 +525,11 @@ var suspenseQueryGenerator = pluginOas.createReactGenerator({
532
525
  name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
533
526
  };
534
527
  const queryOptions = {
535
- name: transformers__default.default.camelCase(`${operation.getOperationId()} SuspenseQueryOptions`)
528
+ name: getName(operation, { type: "function", suffix: "SuspenseQueryOptions" })
536
529
  };
537
530
  const queryKey = {
538
- name: transformers__default.default.camelCase(`${operation.getOperationId()} SuspenseQueryKey`),
539
- typeName: transformers__default.default.pascalCase(`${operation.getOperationId()} SuspenseQueryKey`)
531
+ name: getName(operation, { type: "const", suffix: "SuspenseQueryKey" }),
532
+ typeName: getName(operation, { type: "type", suffix: "SuspenseQueryKey" })
540
533
  };
541
534
  const type = {
542
535
  file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
@@ -551,7 +544,7 @@ var suspenseQueryGenerator = pluginOas.createReactGenerator({
551
544
  return null;
552
545
  }
553
546
  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: [
554
- options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
547
+ options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
555
548
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useSuspenseQuery", "queryOptions"], path: options.query.importPath }),
556
549
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "WithRequired", "UseSuspenseQueryOptions", "UseSuspenseQueryResult"], path: options.query.importPath, isTypeOnly: true }),
557
550
  /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
@@ -560,7 +553,6 @@ var suspenseQueryGenerator = pluginOas.createReactGenerator({
560
553
  /* @__PURE__ */ jsxRuntime.jsx(
561
554
  react.File.Import,
562
555
  {
563
- extName: output?.extName,
564
556
  name: [
565
557
  type.schemas.request?.name,
566
558
  type.schemas.response.name,
@@ -631,5 +623,5 @@ exports.infiniteQueryGenerator = infiniteQueryGenerator;
631
623
  exports.mutationGenerator = mutationGenerator;
632
624
  exports.queryGenerator = queryGenerator;
633
625
  exports.suspenseQueryGenerator = suspenseQueryGenerator;
634
- //# sourceMappingURL=chunk-3YF2GYGX.cjs.map
635
- //# sourceMappingURL=chunk-3YF2GYGX.cjs.map
626
+ //# sourceMappingURL=chunk-JW3GZUSC.cjs.map
627
+ //# sourceMappingURL=chunk-JW3GZUSC.cjs.map