@kubb/plugin-svelte-query 3.5.1 → 3.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/chunk-4S7R5Q4P.js +552 -0
  2. package/dist/chunk-4S7R5Q4P.js.map +1 -0
  3. package/dist/{chunk-EE3OWZ2P.js → chunk-KYRMPWIG.js} +16 -8
  4. package/dist/chunk-KYRMPWIG.js.map +1 -0
  5. package/dist/chunk-LWISIPQK.cjs +559 -0
  6. package/dist/chunk-LWISIPQK.cjs.map +1 -0
  7. package/dist/{chunk-5E5RFWUM.cjs → chunk-O6G62ZNB.cjs} +16 -6
  8. package/dist/chunk-O6G62ZNB.cjs.map +1 -0
  9. package/dist/components.cjs +6 -6
  10. package/dist/components.js +1 -1
  11. package/dist/generators.cjs +4 -4
  12. package/dist/generators.js +2 -2
  13. package/dist/index.cjs +5 -5
  14. package/dist/index.js +2 -2
  15. package/package.json +11 -11
  16. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +1 -1
  17. package/src/generators/__snapshots__/clientGetImportPath.ts +1 -1
  18. package/src/generators/__snapshots__/clientPostImportPath.ts +1 -1
  19. package/src/generators/__snapshots__/findByTags.ts +1 -1
  20. package/src/generators/__snapshots__/findByTagsObject.ts +1 -1
  21. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +1 -1
  22. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +1 -1
  23. package/src/generators/__snapshots__/findByTagsWithZod.ts +1 -1
  24. package/src/generators/__snapshots__/postAsQuery.ts +1 -1
  25. package/src/generators/__snapshots__/updatePetById.ts +1 -1
  26. package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +1 -1
  27. package/src/generators/mutationGenerator.tsx +27 -17
  28. package/src/generators/queryGenerator.tsx +28 -16
  29. package/dist/chunk-5E5RFWUM.cjs.map +0 -1
  30. package/dist/chunk-7GM4ILPD.cjs +0 -273
  31. package/dist/chunk-7GM4ILPD.cjs.map +0 -1
  32. package/dist/chunk-AKSVF5YB.js +0 -270
  33. package/dist/chunk-AKSVF5YB.js.map +0 -1
  34. package/dist/chunk-EE3OWZ2P.js.map +0 -1
@@ -0,0 +1,552 @@
1
+ import { Url, Client, Operations, QueryKey, QueryOptions, Query, MutationKey, Mutation } from './chunk-KYRMPWIG.js';
2
+ import path from 'node:path';
3
+ import { createPlugin, FileManager, PluginManager } from '@kubb/core';
4
+ import { camelCase } from '@kubb/core/transformers';
5
+ import { createReactGenerator, pluginOasName, OperationGenerator } from '@kubb/plugin-oas';
6
+ import { pluginZodName } from '@kubb/plugin-zod';
7
+ import { useOas, useOperationManager } from '@kubb/plugin-oas/hooks';
8
+ import { getBanner, getFooter } from '@kubb/plugin-oas/utils';
9
+ import { pluginTsName } from '@kubb/plugin-ts';
10
+ import { useApp, File, Function } from '@kubb/react';
11
+ import { jsxs, jsx, Fragment } from '@kubb/react/jsx-runtime';
12
+ import { difference } from 'remeda';
13
+
14
+ var clientGenerator = createReactGenerator({
15
+ name: "client",
16
+ Operation({ options, operation }) {
17
+ const {
18
+ plugin: {
19
+ options: { output }
20
+ }
21
+ } = useApp();
22
+ const oas = useOas();
23
+ const { getSchemas, getName, getFile } = useOperationManager();
24
+ const client = {
25
+ name: getName(operation, { type: "function" }),
26
+ file: getFile(operation)
27
+ };
28
+ const url = {
29
+ name: getName(operation, { type: "function", suffix: "url", prefix: "get" }),
30
+ file: getFile(operation)
31
+ };
32
+ const type = {
33
+ file: getFile(operation, { pluginKey: [pluginTsName] }),
34
+ schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: "type" })
35
+ };
36
+ const zod = {
37
+ file: getFile(operation, { pluginKey: [pluginZodName] }),
38
+ schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: "function" })
39
+ };
40
+ return /* @__PURE__ */ jsxs(
41
+ File,
42
+ {
43
+ baseName: client.file.baseName,
44
+ path: client.file.path,
45
+ meta: client.file.meta,
46
+ banner: getBanner({ oas, output }),
47
+ footer: getFooter({ oas, output }),
48
+ children: [
49
+ /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.importPath }),
50
+ /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.importPath, isTypeOnly: true }),
51
+ options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: client.file.path, path: zod.file.path }),
52
+ /* @__PURE__ */ jsx(
53
+ File.Import,
54
+ {
55
+ name: [
56
+ type.schemas.request?.name,
57
+ type.schemas.response.name,
58
+ type.schemas.pathParams?.name,
59
+ type.schemas.queryParams?.name,
60
+ type.schemas.headerParams?.name,
61
+ ...type.schemas.statusCodes?.map((item) => item.name) || []
62
+ ].filter(Boolean),
63
+ root: client.file.path,
64
+ path: type.file.path,
65
+ isTypeOnly: true
66
+ }
67
+ ),
68
+ /* @__PURE__ */ jsx(
69
+ Url,
70
+ {
71
+ name: url.name,
72
+ baseURL: options.baseURL,
73
+ pathParamsType: options.pathParamsType,
74
+ paramsCasing: options.paramsCasing,
75
+ paramsType: options.paramsType,
76
+ typeSchemas: type.schemas,
77
+ operation
78
+ }
79
+ ),
80
+ /* @__PURE__ */ jsx(
81
+ Client,
82
+ {
83
+ name: client.name,
84
+ urlName: url.name,
85
+ baseURL: options.baseURL,
86
+ dataReturnType: options.dataReturnType,
87
+ pathParamsType: options.pathParamsType,
88
+ paramsCasing: options.paramsCasing,
89
+ paramsType: options.paramsType,
90
+ typeSchemas: type.schemas,
91
+ operation,
92
+ parser: options.parser,
93
+ zodSchemas: zod.schemas
94
+ }
95
+ )
96
+ ]
97
+ }
98
+ );
99
+ }
100
+ });
101
+ var operationsGenerator = createReactGenerator({
102
+ name: "client",
103
+ Operations({ operations }) {
104
+ const {
105
+ pluginManager,
106
+ plugin: {
107
+ key: pluginKey,
108
+ options: { output }
109
+ }
110
+ } = useApp();
111
+ const oas = useOas();
112
+ const name = "operations";
113
+ const file = pluginManager.getFile({ name, extname: ".ts", pluginKey });
114
+ return /* @__PURE__ */ jsx(File, { baseName: file.baseName, path: file.path, meta: file.meta, banner: getBanner({ oas, output }), footer: getFooter({ oas, output }), children: /* @__PURE__ */ jsx(Operations, { name, operations }) });
115
+ }
116
+ });
117
+ var groupedClientGenerator = createReactGenerator({
118
+ name: "groupedClient",
119
+ Operations({ operations }) {
120
+ const {
121
+ pluginManager,
122
+ plugin: { options, key: pluginKey }
123
+ } = useApp();
124
+ const oas = useOas();
125
+ const { getName, getFile, getGroup } = useOperationManager();
126
+ const controllers = operations.reduce(
127
+ (acc, operation) => {
128
+ if (options.group?.type === "tag") {
129
+ const group = getGroup(operation);
130
+ const name = group?.tag ? options.group?.name?.({ group: camelCase(group.tag) }) : void 0;
131
+ if (!group?.tag || !name) {
132
+ return acc;
133
+ }
134
+ const file = pluginManager.getFile({
135
+ name,
136
+ extname: ".ts",
137
+ pluginKey,
138
+ options: { group }
139
+ });
140
+ const client = {
141
+ name: getName(operation, { type: "function" }),
142
+ file: getFile(operation)
143
+ };
144
+ const previousFile = acc.find((item) => item.file.path === file.path);
145
+ if (previousFile) {
146
+ previousFile.clients.push(client);
147
+ } else {
148
+ acc.push({ name, file, clients: [client] });
149
+ }
150
+ }
151
+ return acc;
152
+ },
153
+ []
154
+ );
155
+ return controllers.map(({ name, file, clients }) => {
156
+ return /* @__PURE__ */ jsxs(
157
+ File,
158
+ {
159
+ baseName: file.baseName,
160
+ path: file.path,
161
+ meta: file.meta,
162
+ banner: getBanner({ oas, output: options.output }),
163
+ footer: getFooter({ oas, output: options.output }),
164
+ children: [
165
+ clients.map((client) => /* @__PURE__ */ jsx(File.Import, { name: [client.name], root: file.path, path: client.file.path }, client.name)),
166
+ /* @__PURE__ */ jsx(File.Source, { name, isExportable: true, isIndexable: true, children: /* @__PURE__ */ jsx(Function, { export: true, name, children: `return { ${clients.map((client) => client.name).join(", ")} }` }) })
167
+ ]
168
+ },
169
+ file.path
170
+ );
171
+ });
172
+ }
173
+ });
174
+
175
+ // ../plugin-client/src/plugin.ts
176
+ var pluginClientName = "plugin-client";
177
+ createPlugin((options) => {
178
+ const {
179
+ output = { path: "clients", barrelType: "named" },
180
+ group,
181
+ exclude = [],
182
+ include,
183
+ override = [],
184
+ transformers = {},
185
+ dataReturnType = "data",
186
+ pathParamsType = "inline",
187
+ paramsType = "inline",
188
+ operations = false,
189
+ baseURL,
190
+ paramsCasing,
191
+ generators = [clientGenerator, group ? groupedClientGenerator : void 0, operations ? operationsGenerator : void 0].filter(Boolean),
192
+ parser = "client",
193
+ client = "axios",
194
+ importPath = client === "fetch" ? "@kubb/plugin-client/clients/fetch" : "@kubb/plugin-client/clients/axios"
195
+ } = options;
196
+ return {
197
+ name: pluginClientName,
198
+ options: {
199
+ output,
200
+ group,
201
+ parser,
202
+ dataReturnType,
203
+ importPath,
204
+ paramsType,
205
+ paramsCasing,
206
+ pathParamsType: paramsType === "object" ? "object" : pathParamsType,
207
+ baseURL
208
+ },
209
+ pre: [pluginOasName, parser === "zod" ? pluginZodName : void 0].filter(Boolean),
210
+ resolvePath(baseName, pathMode, options2) {
211
+ const root = path.resolve(this.config.root, this.config.output.path);
212
+ const mode = pathMode ?? FileManager.getMode(path.resolve(root, output.path));
213
+ if (mode === "single") {
214
+ return path.resolve(root, output.path);
215
+ }
216
+ if (group && (options2?.group?.path || options2?.group?.tag)) {
217
+ const groupName = group?.name ? group.name : (ctx) => {
218
+ if (group?.type === "path") {
219
+ return `${ctx.group.split("/")[1]}`;
220
+ }
221
+ return `${camelCase(ctx.group)}Controller`;
222
+ };
223
+ return path.resolve(
224
+ root,
225
+ output.path,
226
+ groupName({
227
+ group: group.type === "path" ? options2.group.path : options2.group.tag
228
+ }),
229
+ baseName
230
+ );
231
+ }
232
+ return path.resolve(root, output.path, baseName);
233
+ },
234
+ resolveName(name, type) {
235
+ const resolvedName = camelCase(name, { isFile: type === "file" });
236
+ if (type) {
237
+ return transformers?.name?.(resolvedName, type) || resolvedName;
238
+ }
239
+ return resolvedName;
240
+ },
241
+ async buildStart() {
242
+ const [swaggerPlugin] = PluginManager.getDependedPlugins(this.plugins, [pluginOasName]);
243
+ const oas = await swaggerPlugin.context.getOas();
244
+ const root = path.resolve(this.config.root, this.config.output.path);
245
+ const mode = FileManager.getMode(path.resolve(root, output.path));
246
+ const baseURL2 = await swaggerPlugin.context.getBaseURL();
247
+ const operationGenerator = new OperationGenerator(
248
+ baseURL2 ? {
249
+ ...this.plugin.options,
250
+ baseURL: baseURL2
251
+ } : this.plugin.options,
252
+ {
253
+ oas,
254
+ pluginManager: this.pluginManager,
255
+ plugin: this.plugin,
256
+ contentType: swaggerPlugin.context.contentType,
257
+ exclude,
258
+ include,
259
+ override,
260
+ mode
261
+ }
262
+ );
263
+ const files = await operationGenerator.build(...generators);
264
+ await this.addFile(...files);
265
+ const barrelFiles = await this.fileManager.getBarrelFiles({
266
+ type: output.barrelType ?? "named",
267
+ root,
268
+ output,
269
+ files: this.fileManager.files,
270
+ meta: {
271
+ pluginKey: this.plugin.key
272
+ },
273
+ logger: this.logger
274
+ });
275
+ await this.addFile(...barrelFiles);
276
+ }
277
+ };
278
+ });
279
+ var queryGenerator = createReactGenerator({
280
+ name: "svelte-query",
281
+ Operation({ options, operation }) {
282
+ const {
283
+ plugin: {
284
+ options: { output }
285
+ },
286
+ pluginManager
287
+ } = useApp();
288
+ const oas = useOas();
289
+ const { getSchemas, getName, getFile } = useOperationManager();
290
+ const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
291
+ const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(
292
+ (method) => operation.method === method
293
+ );
294
+ const importPath = options.query ? options.query.importPath : "@tanstack/svelte-query";
295
+ const query = {
296
+ name: getName(operation, { type: "function", prefix: "create" }),
297
+ typeName: getName(operation, { type: "type" }),
298
+ file: getFile(operation, { prefix: "create" })
299
+ };
300
+ const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName]);
301
+ const client = {
302
+ name: hasClientPlugin ? getName(operation, {
303
+ type: "function",
304
+ pluginKey: [pluginClientName]
305
+ }) : getName(operation, {
306
+ type: "function"
307
+ }),
308
+ file: getFile(operation, { pluginKey: [pluginClientName] })
309
+ };
310
+ const queryOptions = {
311
+ name: getName(operation, { type: "function", suffix: "QueryOptions" })
312
+ };
313
+ const queryKey = {
314
+ name: getName(operation, { type: "const", suffix: "QueryKey" }),
315
+ typeName: getName(operation, { type: "type", suffix: "QueryKey" })
316
+ };
317
+ const type = {
318
+ file: getFile(operation, { pluginKey: [pluginTsName] }),
319
+ //todo remove type?
320
+ schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: "type" })
321
+ };
322
+ const zod = {
323
+ file: getFile(operation, { pluginKey: [pluginZodName] }),
324
+ schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: "function" })
325
+ };
326
+ if (!isQuery || isMutation) {
327
+ return null;
328
+ }
329
+ return /* @__PURE__ */ jsxs(
330
+ File,
331
+ {
332
+ baseName: query.file.baseName,
333
+ path: query.file.path,
334
+ meta: query.file.meta,
335
+ banner: getBanner({ oas, output }),
336
+ footer: getFooter({ oas, output }),
337
+ children: [
338
+ options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
339
+ !hasClientPlugin && /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
340
+ !!hasClientPlugin && /* @__PURE__ */ jsx(File.Import, { name: [client.name], root: query.file.path, path: client.file.path }),
341
+ /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
342
+ options.client.dataReturnType === "full" && /* @__PURE__ */ jsx(File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
343
+ /* @__PURE__ */ jsx(
344
+ File.Import,
345
+ {
346
+ name: [
347
+ type.schemas.request?.name,
348
+ type.schemas.response.name,
349
+ type.schemas.pathParams?.name,
350
+ type.schemas.queryParams?.name,
351
+ type.schemas.headerParams?.name,
352
+ ...type.schemas.statusCodes?.map((item) => item.name) || []
353
+ ].filter(Boolean),
354
+ root: query.file.path,
355
+ path: type.file.path,
356
+ isTypeOnly: true
357
+ }
358
+ ),
359
+ /* @__PURE__ */ jsx(
360
+ QueryKey,
361
+ {
362
+ name: queryKey.name,
363
+ typeName: queryKey.typeName,
364
+ operation,
365
+ pathParamsType: options.pathParamsType,
366
+ typeSchemas: type.schemas,
367
+ paramsCasing: options.paramsCasing,
368
+ transformer: options.queryKey
369
+ }
370
+ ),
371
+ !hasClientPlugin && /* @__PURE__ */ jsx(
372
+ Client,
373
+ {
374
+ name: client.name,
375
+ baseURL: options.client.baseURL,
376
+ operation,
377
+ typeSchemas: type.schemas,
378
+ zodSchemas: zod.schemas,
379
+ dataReturnType: options.client.dataReturnType,
380
+ paramsCasing: options.paramsCasing,
381
+ paramsType: options.paramsType,
382
+ pathParamsType: options.pathParamsType,
383
+ parser: options.parser
384
+ }
385
+ ),
386
+ /* @__PURE__ */ jsx(File.Import, { name: ["queryOptions"], path: importPath }),
387
+ /* @__PURE__ */ jsx(
388
+ QueryOptions,
389
+ {
390
+ name: queryOptions.name,
391
+ clientName: client.name,
392
+ queryKeyName: queryKey.name,
393
+ typeSchemas: type.schemas,
394
+ paramsCasing: options.paramsCasing,
395
+ paramsType: options.paramsType,
396
+ pathParamsType: options.pathParamsType,
397
+ dataReturnType: options.client.dataReturnType
398
+ }
399
+ ),
400
+ options.query && /* @__PURE__ */ jsxs(Fragment, { children: [
401
+ /* @__PURE__ */ jsx(File.Import, { name: ["createQuery"], path: importPath }),
402
+ /* @__PURE__ */ jsx(File.Import, { name: ["QueryKey", "CreateBaseQueryOptions", "CreateQueryResult"], path: importPath, isTypeOnly: true }),
403
+ /* @__PURE__ */ jsx(
404
+ Query,
405
+ {
406
+ name: query.name,
407
+ queryOptionsName: queryOptions.name,
408
+ typeSchemas: type.schemas,
409
+ pathParamsType: options.pathParamsType,
410
+ operation,
411
+ paramsCasing: options.paramsCasing,
412
+ paramsType: options.paramsType,
413
+ dataReturnType: options.client.dataReturnType,
414
+ queryKeyName: queryKey.name,
415
+ queryKeyTypeName: queryKey.typeName
416
+ }
417
+ )
418
+ ] })
419
+ ]
420
+ }
421
+ );
422
+ }
423
+ });
424
+ var mutationGenerator = createReactGenerator({
425
+ name: "svelte-query",
426
+ Operation({ options, operation }) {
427
+ const {
428
+ plugin: {
429
+ options: { output }
430
+ },
431
+ pluginManager
432
+ } = useApp();
433
+ const oas = useOas();
434
+ const { getSchemas, getName, getFile } = useOperationManager();
435
+ const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method);
436
+ const isMutation = !isQuery && difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method);
437
+ const importPath = options.mutation ? options.mutation.importPath : "@tanstack/svelte-query";
438
+ const mutation = {
439
+ name: getName(operation, { type: "function", prefix: "create" }),
440
+ typeName: getName(operation, { type: "type" }),
441
+ file: getFile(operation, { prefix: "create" })
442
+ };
443
+ const type = {
444
+ file: getFile(operation, { pluginKey: [pluginTsName] }),
445
+ //todo remove type?
446
+ schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: "type" })
447
+ };
448
+ const zod = {
449
+ file: getFile(operation, { pluginKey: [pluginZodName] }),
450
+ schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: "function" })
451
+ };
452
+ const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName]);
453
+ const client = {
454
+ name: hasClientPlugin ? getName(operation, {
455
+ type: "function",
456
+ pluginKey: [pluginClientName]
457
+ }) : getName(operation, {
458
+ type: "function"
459
+ }),
460
+ file: getFile(operation, { pluginKey: [pluginClientName] })
461
+ };
462
+ const mutationKey = {
463
+ name: getName(operation, { type: "const", suffix: "MutationKey" }),
464
+ typeName: getName(operation, { type: "type", suffix: "MutationKey" })
465
+ };
466
+ if (!isMutation) {
467
+ return null;
468
+ }
469
+ return /* @__PURE__ */ jsxs(
470
+ File,
471
+ {
472
+ baseName: mutation.file.baseName,
473
+ path: mutation.file.path,
474
+ meta: mutation.file.meta,
475
+ banner: getBanner({ oas, output }),
476
+ footer: getFooter({ oas, output }),
477
+ children: [
478
+ options.parser === "zod" && /* @__PURE__ */ jsx(File.Import, { name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
479
+ !hasClientPlugin && /* @__PURE__ */ jsx(File.Import, { name: "client", path: options.client.importPath }),
480
+ !!hasClientPlugin && /* @__PURE__ */ jsx(File.Import, { name: [client.name], root: mutation.file.path, path: client.file.path }),
481
+ /* @__PURE__ */ jsx(File.Import, { name: ["RequestConfig", "ResponseConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
482
+ /* @__PURE__ */ jsx(
483
+ File.Import,
484
+ {
485
+ name: [
486
+ type.schemas.request?.name,
487
+ type.schemas.response.name,
488
+ type.schemas.pathParams?.name,
489
+ type.schemas.queryParams?.name,
490
+ type.schemas.headerParams?.name,
491
+ ...type.schemas.statusCodes?.map((item) => item.name) || []
492
+ ].filter(Boolean),
493
+ root: mutation.file.path,
494
+ path: type.file.path,
495
+ isTypeOnly: true
496
+ }
497
+ ),
498
+ /* @__PURE__ */ jsx(
499
+ MutationKey,
500
+ {
501
+ name: mutationKey.name,
502
+ typeName: mutationKey.typeName,
503
+ operation,
504
+ paramsCasing: options.paramsCasing,
505
+ pathParamsType: options.pathParamsType,
506
+ typeSchemas: type.schemas,
507
+ transformer: options.mutationKey
508
+ }
509
+ ),
510
+ !hasClientPlugin && /* @__PURE__ */ jsx(
511
+ Client,
512
+ {
513
+ name: client.name,
514
+ baseURL: options.client.baseURL,
515
+ operation,
516
+ typeSchemas: type.schemas,
517
+ zodSchemas: zod.schemas,
518
+ dataReturnType: options.client.dataReturnType,
519
+ paramsCasing: options.paramsCasing,
520
+ paramsType: options.paramsType,
521
+ pathParamsType: options.pathParamsType,
522
+ parser: options.parser
523
+ }
524
+ ),
525
+ options.mutation && /* @__PURE__ */ jsxs(Fragment, { children: [
526
+ /* @__PURE__ */ jsx(File.Import, { name: ["createMutation"], path: importPath }),
527
+ /* @__PURE__ */ jsx(File.Import, { name: ["CreateMutationOptions", "CreateMutationResult"], path: importPath, isTypeOnly: true }),
528
+ /* @__PURE__ */ jsx(
529
+ Mutation,
530
+ {
531
+ name: mutation.name,
532
+ clientName: client.name,
533
+ typeName: mutation.typeName,
534
+ typeSchemas: type.schemas,
535
+ operation,
536
+ paramsCasing: options.paramsCasing,
537
+ dataReturnType: options.client.dataReturnType,
538
+ paramsType: options.paramsType,
539
+ pathParamsType: options.pathParamsType,
540
+ mutationKeyName: mutationKey.name
541
+ }
542
+ )
543
+ ] })
544
+ ]
545
+ }
546
+ );
547
+ }
548
+ });
549
+
550
+ export { mutationGenerator, queryGenerator };
551
+ //# sourceMappingURL=chunk-4S7R5Q4P.js.map
552
+ //# sourceMappingURL=chunk-4S7R5Q4P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../plugin-client/src/generators/clientGenerator.tsx","../../plugin-client/src/generators/operationsGenerator.tsx","../../plugin-client/src/generators/groupedClientGenerator.tsx","../../plugin-client/src/plugin.ts","../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx"],"names":["createReactGenerator","useApp","useOas","jsx","File","getBanner","getFooter","useOperationManager","jsxs","pluginZodName","options","camelCase","baseURL","pluginTsName","difference","Fragment"],"mappings":";;;;;;;;;;;;;AAUO,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;AAAA;AACpB,QACE,MAAqB,EAAA;AACzB,IAAA,MAAM,MAAM,MAAO,EAAA;AACnB,IAAA,MAAM,EAAE,UAAA,EAAY,OAAS,EAAA,OAAA,KAAY,mBAAoB,EAAA;AAE7D,IAAA,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gB,OAAQ,CAAA,cAAA;AAAA,cACxB,QAAQ,OAAQ,CAAA;AAAA;AAAA,WAClB;AAAA,UAED,OAAQ,CAAA,QAAA,oBACPK,IAAAA,CAAAO,UAAA,EACE,QAAA,EAAA;AAAA,4BAAAZ,GAAAA,CAACC,KAAK,MAAL,EAAA,EAAY,MAAM,CAAC,gBAAgB,CAAG,EAAA,IAAA,EAAM,UAAY,EAAA,CAAA;AAAA,4BACzDD,GAAAA,CAACC,IAAK,CAAA,MAAA,EAAL,EAAY,IAAA,EAAM,CAAC,uBAAA,EAAyB,sBAAsB,CAAA,EAAG,IAAM,EAAA,UAAA,EAAY,YAAU,IAAC,EAAA,CAAA;AAAA,4BACnGD,GAAAA;AAAA,cAAC,QAAA;AAAA,cAAA;AAAA,gBACC,MAAM,QAAS,CAAA,IAAA;AAAA,gBACf,YAAY,MAAO,CAAA,IAAA;AAAA,gBACnB,UAAU,QAAS,CAAA,QAAA;AAAA,gBACnB,aAAa,IAAK,CAAA,OAAA;AAAA,gBAClB,SAAA;AAAA,gBACA,cAAc,OAAQ,CAAA,YAAA;AAAA,gBACtB,cAAA,EAAgB,QAAQ,MAAO,CAAA,cAAA;AAAA,gBAC/B,YAAY,OAAQ,CAAA,UAAA;AAAA,gBACpB,gBAAgB,OAAQ,CAAA,cAAA;AAAA,gBACxB,iBAAiB,WAAY,CAAA;AAAA;AAAA;AAC/B,WACF,EAAA;AAAA;AAAA;AAAA,KAEJ;AAAA;AAGN,CAAC","file":"chunk-4S7R5Q4P.js","sourcesContent":["import { createReactGenerator } from '@kubb/plugin-oas'\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, useApp } from '@kubb/react'\nimport { Client } from '../components/Client'\nimport { Url } from '../components/Url.tsx'\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 oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const url = {\n name: getName(operation, { type: 'function', suffix: 'url', prefix: 'get' }),\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\n baseName={client.file.baseName}\n path={client.file.path}\n meta={client.file.meta}\n banner={getBanner({ oas, output })}\n footer={getFooter({ oas, output })}\n >\n <File.Import name={'client'} path={options.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} 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 <Url\n name={url.name}\n baseURL={options.baseURL}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n />\n\n <Client\n name={client.name}\n urlName={url.name}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n typeSchemas={type.schemas}\n operation={operation}\n parser={options.parser}\n zodSchemas={zod.schemas}\n />\n </File>\n )\n },\n})\n","import { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\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 key: pluginKey,\n options: { output },\n },\n } = useApp<PluginClient>()\n const oas = useOas()\n\n const name = 'operations'\n const file = pluginManager.getFile({ name, extname: '.ts', pluginKey })\n\n return (\n <File baseName={file.baseName} path={file.path} meta={file.meta} banner={getBanner({ oas, output })} footer={getFooter({ oas, output })}>\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import { camelCase } from '@kubb/core/transformers'\nimport type * as KubbFile from '@kubb/fs/types'\n\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Function, useApp } from '@kubb/react'\nimport type { PluginClient } from '../types'\n\nexport const groupedClientGenerator = createReactGenerator<PluginClient>({\n name: 'groupedClient',\n Operations({ operations }) {\n const {\n pluginManager,\n plugin: { options, key: pluginKey },\n } = useApp<PluginClient>()\n const oas = useOas()\n const { getName, getFile, getGroup } = useOperationManager()\n\n const controllers = operations.reduce(\n (acc, operation) => {\n if (options.group?.type === 'tag') {\n const group = getGroup(operation)\n const name = group?.tag ? options.group?.name?.({ group: camelCase(group.tag) }) : undefined\n\n if (!group?.tag || !name) {\n return acc\n }\n\n const file = pluginManager.getFile({\n name,\n extname: '.ts',\n pluginKey,\n options: { group },\n })\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const previousFile = acc.find((item) => item.file.path === file.path)\n\n if (previousFile) {\n previousFile.clients.push(client)\n } else {\n acc.push({ name, file, clients: [client] })\n }\n }\n\n return acc\n },\n [] as Array<{ name: string; file: KubbFile.File; clients: Array<{ name: string; file: KubbFile.File }> }>,\n )\n\n return controllers.map(({ name, file, clients }) => {\n return (\n <File\n key={file.path}\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output: options.output })}\n footer={getFooter({ oas, output: options.output })}\n >\n {clients.map((client) => (\n <File.Import key={client.name} name={[client.name]} root={file.path} path={client.file.path} />\n ))}\n\n <File.Source name={name} isExportable isIndexable>\n <Function export name={name}>\n {`return { ${clients.map((client) => client.name).join(', ')} }`}\n </Function>\n </File.Source>\n </File>\n )\n })\n },\n})\n","import path from 'node:path'\n\nimport { FileManager, type Group, PluginManager, createPlugin } from '@kubb/core'\nimport { camelCase } from '@kubb/core/transformers'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\n\nimport type { Plugin } from '@kubb/core'\nimport type { PluginOas as SwaggerPluginOptions } from '@kubb/plugin-oas'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { operationsGenerator } from './generators'\nimport { clientGenerator } from './generators/clientGenerator.tsx'\nimport { groupedClientGenerator } from './generators/groupedClientGenerator.tsx'\nimport type { PluginClient } from './types.ts'\n\nexport const pluginClientName = 'plugin-client' satisfies PluginClient['name']\n\nexport const pluginClient = createPlugin<PluginClient>((options) => {\n const {\n output = { path: 'clients', barrelType: 'named' },\n group,\n exclude = [],\n include,\n override = [],\n transformers = {},\n dataReturnType = 'data',\n pathParamsType = 'inline',\n paramsType = 'inline',\n operations = false,\n baseURL,\n paramsCasing,\n generators = [clientGenerator, group ? groupedClientGenerator : undefined, operations ? operationsGenerator : undefined].filter(Boolean),\n parser = 'client',\n client = 'axios',\n importPath = client === 'fetch' ? '@kubb/plugin-client/clients/fetch' : '@kubb/plugin-client/clients/axios',\n } = options\n\n return {\n name: pluginClientName,\n options: {\n output,\n group,\n parser,\n dataReturnType,\n importPath,\n paramsType,\n paramsCasing,\n pathParamsType: paramsType === 'object' ? 'object' : pathParamsType,\n baseURL,\n },\n pre: [pluginOasName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? FileManager.getMode(path.resolve(root, output.path))\n\n if (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 (group && (options?.group?.path || options?.group?.tag)) {\n const groupName: Group['name'] = group?.name\n ? group.name\n : (ctx) => {\n if (group?.type === 'path') {\n return `${ctx.group.split('/')[1]}`\n }\n return `${camelCase(ctx.group)}Controller`\n }\n\n return path.resolve(\n root,\n output.path,\n groupName({\n group: group.type === 'path' ? options.group.path! : options.group.tag!,\n }),\n baseName,\n )\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n const resolvedName = camelCase(name, { isFile: type === 'file' })\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async buildStart() {\n const [swaggerPlugin]: [Plugin<SwaggerPluginOptions>] = PluginManager.getDependedPlugins<SwaggerPluginOptions>(this.plugins, [pluginOasName])\n\n const oas = await swaggerPlugin.context.getOas()\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = FileManager.getMode(path.resolve(root, output.path))\n const baseURL = await swaggerPlugin.context.getBaseURL()\n\n const operationGenerator = new OperationGenerator(\n baseURL\n ? {\n ...this.plugin.options,\n baseURL,\n }\n : this.plugin.options,\n {\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType: swaggerPlugin.context.contentType,\n exclude,\n include,\n override,\n mode,\n },\n )\n\n const files = await operationGenerator.build(...generators)\n\n await this.addFile(...files)\n\n const barrelFiles = await this.fileManager.getBarrelFiles({\n type: output.barrelType ?? 'named',\n root,\n output,\n files: this.fileManager.files,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.addFile(...barrelFiles)\n },\n }\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { 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, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginSvelteQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginSvelteQuery>({\n name: 'svelte-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n pluginManager,\n } = useApp<PluginSvelteQuery>()\n const oas = useOas()\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 = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const importPath = options.query ? options.query.importPath : '@tanstack/svelte-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { 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 || 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 })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n {!hasClientPlugin && <File.Import name={'client'} path={options.client.importPath} />}\n {!!hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} 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 paramsCasing={options.paramsCasing}\n transformer={options.queryKey}\n />\n\n {!hasClientPlugin && (\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}\n 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.query && (\n <>\n <File.Import name={['createQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'CreateBaseQueryOptions', 'CreateQueryResult']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { 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, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginSvelteQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginSvelteQuery>({\n name: 'svelte-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n pluginManager,\n } = useApp<PluginSvelteQuery>()\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\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/svelte-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\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 hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation) {\n return null\n }\n\n return (\n <File\n baseName={mutation.file.baseName}\n path={mutation.file.path}\n meta={mutation.file.meta}\n banner={getBanner({ oas, output })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={mutation.file.path} path={zod.file.path} />}\n {!hasClientPlugin && <File.Import name={'client'} path={options.client.importPath} />}\n {!!hasClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseConfig', 'ResponseErrorConfig']} 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\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.mutationKey}\n />\n {!hasClientPlugin && (\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}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.mutation && (\n <>\n <File.Import name={['createMutation']} path={importPath} />\n <File.Import name={['CreateMutationOptions', 'CreateMutationResult']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n paramsCasing={options.paramsCasing}\n dataReturnType={options.client.dataReturnType}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n"]}