@kubb/plugin-react-query 4.14.1 → 4.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{components-CO636qn3.cjs → components-6nRaAppd.cjs} +19 -13
- package/dist/components-6nRaAppd.cjs.map +1 -0
- package/dist/{components-DQHnoHX_.js → components-B6lqcqgn.js} +18 -12
- package/dist/components-B6lqcqgn.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.cts +15 -5
- package/dist/components.d.ts +15 -5
- package/dist/components.js +1 -1
- package/dist/{generators-BNtUetHy.cjs → generators-CYoqgYAV.cjs} +331 -6
- package/dist/generators-CYoqgYAV.cjs.map +1 -0
- package/dist/{generators-Cz0OG9Qu.js → generators-cZao868O.js} +320 -8
- package/dist/generators-cZao868O.js.map +1 -0
- package/dist/generators.cjs +3 -1
- package/dist/generators.d.cts +8 -2
- package/dist/generators.d.ts +8 -2
- package/dist/generators.js +2 -2
- package/dist/index.cjs +10 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +10 -4
- package/dist/index.js.map +1 -1
- package/dist/{types-Cli5EJ4L.d.ts → types-B9xv5S0R.d.cts} +35 -2
- package/dist/{types-B2aUnqdY.d.cts → types-BAEc42Ae.d.ts} +35 -2
- package/package.json +7 -7
- package/src/components/InfiniteQuery.tsx +4 -1
- package/src/components/Mutation.tsx +4 -1
- package/src/components/MutationOptions.tsx +2 -2
- package/src/components/Query.tsx +4 -1
- package/src/components/SuspenseInfiniteQuery.tsx +4 -1
- package/src/components/SuspenseQuery.tsx +4 -1
- package/src/generators/__snapshots__/clientPostImportPath.ts +4 -2
- package/src/generators/__snapshots__/findByTagsWithCustomOptions.ts +89 -0
- package/src/generators/__snapshots__/findInfiniteByTagsWithCustomOptions.ts +103 -0
- package/src/generators/__snapshots__/findSuspenseByTagsWithCustomOptions.ts +83 -0
- package/src/generators/__snapshots__/findSuspenseInfiniteByTagsWithCustomOptions.ts +103 -0
- package/src/generators/__snapshots__/updatePetById.ts +4 -2
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +4 -2
- package/src/generators/__snapshots__/updatePetByIdWithCustomOptions.ts +107 -0
- package/src/generators/customHookOptionsFileGenerator.tsx +98 -0
- package/src/generators/hookOptionsGenerator.tsx +196 -0
- package/src/generators/index.ts +2 -0
- package/src/generators/infiniteQueryGenerator.tsx +2 -0
- package/src/generators/mutationGenerator.tsx +2 -0
- package/src/generators/queryGenerator.tsx +2 -0
- package/src/generators/suspenseInfiniteQueryGenerator.tsx +2 -0
- package/src/generators/suspenseQueryGenerator.tsx +2 -0
- package/src/plugin.ts +20 -2
- package/src/types.ts +21 -0
- package/dist/components-CO636qn3.cjs.map +0 -1
- package/dist/components-DQHnoHX_.js.map +0 -1
- package/dist/generators-BNtUetHy.cjs.map +0 -1
- package/dist/generators-Cz0OG9Qu.js.map +0 -1
|
@@ -25,7 +25,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
25
25
|
}) : target, mod));
|
|
26
26
|
|
|
27
27
|
//#endregion
|
|
28
|
-
const require_components = require('./components-
|
|
28
|
+
const require_components = require('./components-6nRaAppd.cjs');
|
|
29
29
|
let node_path = require("node:path");
|
|
30
30
|
node_path = __toESM(node_path);
|
|
31
31
|
let _kubb_plugin_client = require("@kubb/plugin-client");
|
|
@@ -35,11 +35,299 @@ let _kubb_plugin_oas_utils = require("@kubb/plugin-oas/utils");
|
|
|
35
35
|
let _kubb_react_fabric = require("@kubb/react-fabric");
|
|
36
36
|
let _kubb_react_fabric_jsx_runtime = require("@kubb/react-fabric/jsx-runtime");
|
|
37
37
|
let _kubb_plugin_client_components = require("@kubb/plugin-client/components");
|
|
38
|
+
let node_fs = require("node:fs");
|
|
39
|
+
node_fs = __toESM(node_fs);
|
|
38
40
|
let _kubb_core_hooks = require("@kubb/core/hooks");
|
|
39
41
|
let _kubb_plugin_oas_generators = require("@kubb/plugin-oas/generators");
|
|
40
42
|
let _kubb_plugin_oas_hooks = require("@kubb/plugin-oas/hooks");
|
|
41
43
|
let remeda = require("remeda");
|
|
42
44
|
|
|
45
|
+
//#region src/generators/customHookOptionsFileGenerator.tsx
|
|
46
|
+
const customHookOptionsFileGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
47
|
+
name: "react-query-custom-hook-options-file",
|
|
48
|
+
Operations({ operations, generator, plugin, config }) {
|
|
49
|
+
const { options, options: { output }, key: pluginKey } = plugin;
|
|
50
|
+
const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
|
|
51
|
+
const { getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
|
|
52
|
+
if (!options.customOptions) return null;
|
|
53
|
+
const override = output.override ?? config.output.override ?? false;
|
|
54
|
+
const { importPath, name } = options.customOptions;
|
|
55
|
+
const root = node_path.default.resolve(config.root, config.output.path);
|
|
56
|
+
const reactQueryImportPath = options.query ? options.query.importPath : "@tanstack/react-query";
|
|
57
|
+
const getHookFilePath = (operations$1) => {
|
|
58
|
+
const firstOperation = operations$1[0];
|
|
59
|
+
if (firstOperation != null) return getFile(firstOperation, { prefix: "use" }).path;
|
|
60
|
+
return pluginManager.getFile({
|
|
61
|
+
name: "index",
|
|
62
|
+
extname: ".ts",
|
|
63
|
+
pluginKey
|
|
64
|
+
}).path;
|
|
65
|
+
};
|
|
66
|
+
const ensureExtension = (filePath, extname) => {
|
|
67
|
+
if (node_path.default.extname(filePath) === "") return filePath + extname;
|
|
68
|
+
return filePath;
|
|
69
|
+
};
|
|
70
|
+
const getExternalFile = (filePath, rootPath) => {
|
|
71
|
+
const actualFilePath = ensureExtension(filePath, ".ts");
|
|
72
|
+
return {
|
|
73
|
+
baseName: node_path.default.basename(actualFilePath),
|
|
74
|
+
name: node_path.default.basename(actualFilePath, node_path.default.extname(actualFilePath)),
|
|
75
|
+
path: node_path.default.resolve(rootPath, actualFilePath)
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
const file = getExternalFile(importPath, node_path.default.dirname(getHookFilePath(operations)));
|
|
79
|
+
if (node_fs.default.existsSync(file.path) && !override) return null;
|
|
80
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric.File, {
|
|
81
|
+
baseName: file.baseName,
|
|
82
|
+
path: file.path,
|
|
83
|
+
children: [
|
|
84
|
+
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
85
|
+
name: ["QueryClient"],
|
|
86
|
+
path: reactQueryImportPath,
|
|
87
|
+
isTypeOnly: true
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
90
|
+
name: ["useQueryClient"],
|
|
91
|
+
path: reactQueryImportPath
|
|
92
|
+
}),
|
|
93
|
+
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
94
|
+
name: ["HookOptions"],
|
|
95
|
+
root: file.path,
|
|
96
|
+
path: node_path.default.resolve(root, "./index.ts")
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric.File.Source, {
|
|
99
|
+
name: file.name,
|
|
100
|
+
isExportable: true,
|
|
101
|
+
isIndexable: true,
|
|
102
|
+
children: [/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Function, {
|
|
103
|
+
name: "getCustomHookOptions",
|
|
104
|
+
params: "{ queryClient }: { queryClient: QueryClient }",
|
|
105
|
+
returnType: "Partial<HookOptions>",
|
|
106
|
+
children: `return {
|
|
107
|
+
// TODO: Define custom hook options here
|
|
108
|
+
// Example:
|
|
109
|
+
// useUpdatePetHook: {
|
|
110
|
+
// onSuccess: () => {
|
|
111
|
+
// void queryClient.invalidateQueries({ queryKey: ['pet'] })
|
|
112
|
+
// }
|
|
113
|
+
// }
|
|
114
|
+
}`
|
|
115
|
+
}), /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Function, {
|
|
116
|
+
name,
|
|
117
|
+
generics: "T extends keyof HookOptions",
|
|
118
|
+
params: "{ hookName, operationId }: { hookName: T, operationId: string }",
|
|
119
|
+
returnType: "HookOptions[T]",
|
|
120
|
+
export: true,
|
|
121
|
+
children: `const queryClient = useQueryClient()
|
|
122
|
+
const customOptions = getCustomHookOptions({ queryClient })
|
|
123
|
+
return customOptions[hookName] ?? {}`
|
|
124
|
+
})]
|
|
125
|
+
})
|
|
126
|
+
]
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region src/generators/hookOptionsGenerator.tsx
|
|
133
|
+
const hookOptionsGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
134
|
+
name: "react-query-hook-options",
|
|
135
|
+
Operations({ operations, plugin, generator }) {
|
|
136
|
+
const { options, options: { output }, key: pluginKey } = plugin;
|
|
137
|
+
const pluginManager = (0, _kubb_core_hooks.usePluginManager)();
|
|
138
|
+
const oas = (0, _kubb_plugin_oas_hooks.useOas)();
|
|
139
|
+
const { getName, getFile } = (0, _kubb_plugin_oas_hooks.useOperationManager)(generator);
|
|
140
|
+
if (!options.customOptions) return null;
|
|
141
|
+
const name = "HookOptions";
|
|
142
|
+
const file = pluginManager.getFile({
|
|
143
|
+
name,
|
|
144
|
+
extname: ".ts",
|
|
145
|
+
pluginKey
|
|
146
|
+
});
|
|
147
|
+
const getOperationOptions = (operation) => {
|
|
148
|
+
const operationOptions = generator.getOptions(operation, operation.method);
|
|
149
|
+
return {
|
|
150
|
+
...options,
|
|
151
|
+
...operationOptions
|
|
152
|
+
};
|
|
153
|
+
};
|
|
154
|
+
const isQuery = (operation) => {
|
|
155
|
+
const operationOptions = getOperationOptions(operation);
|
|
156
|
+
return typeof operationOptions.query === "boolean" ? true : operationOptions.query?.methods.some((method) => operation.method === method);
|
|
157
|
+
};
|
|
158
|
+
const isMutation = (operation) => {
|
|
159
|
+
const operationOptions = getOperationOptions(operation);
|
|
160
|
+
return operationOptions.mutation !== false && !isQuery(operation) && (0, remeda.difference)(operationOptions.mutation ? operationOptions.mutation.methods : [], operationOptions.query ? operationOptions.query.methods : []).some((method) => operation.method === method);
|
|
161
|
+
};
|
|
162
|
+
const isSuspense = (operation) => {
|
|
163
|
+
return !!getOperationOptions(operation).suspense;
|
|
164
|
+
};
|
|
165
|
+
const isInfinite = (operation) => {
|
|
166
|
+
const operationOptions = getOperationOptions(operation);
|
|
167
|
+
return !!(operationOptions.infinite && typeof operationOptions.infinite === "object" ? operationOptions.infinite : void 0);
|
|
168
|
+
};
|
|
169
|
+
const getHookName = (operation) => {
|
|
170
|
+
return getName(operation, {
|
|
171
|
+
type: "function",
|
|
172
|
+
prefix: "use"
|
|
173
|
+
});
|
|
174
|
+
};
|
|
175
|
+
const getHookFile = (operation) => {
|
|
176
|
+
return getFile(operation, { prefix: "use" });
|
|
177
|
+
};
|
|
178
|
+
const getQueryHookOptions = (operation) => {
|
|
179
|
+
return getName(operation, {
|
|
180
|
+
type: "function",
|
|
181
|
+
suffix: "QueryOptions"
|
|
182
|
+
});
|
|
183
|
+
};
|
|
184
|
+
const getQueryHookOptionsImport = (operation) => {
|
|
185
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
186
|
+
name: [getQueryHookOptions(operation)],
|
|
187
|
+
root: file.path,
|
|
188
|
+
path: getHookFile(operation).path
|
|
189
|
+
});
|
|
190
|
+
};
|
|
191
|
+
const getMutationHookOptions = (operation) => {
|
|
192
|
+
return getName(operation, {
|
|
193
|
+
type: "function",
|
|
194
|
+
suffix: "MutationOptions"
|
|
195
|
+
});
|
|
196
|
+
};
|
|
197
|
+
const getMutationHookOptionsImport = (operation) => {
|
|
198
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
199
|
+
name: [getMutationHookOptions(operation)],
|
|
200
|
+
root: file.path,
|
|
201
|
+
path: getHookFile(operation).path
|
|
202
|
+
});
|
|
203
|
+
};
|
|
204
|
+
const getSuspenseHookName = (operation) => {
|
|
205
|
+
return getName(operation, {
|
|
206
|
+
type: "function",
|
|
207
|
+
prefix: "use",
|
|
208
|
+
suffix: "suspense"
|
|
209
|
+
});
|
|
210
|
+
};
|
|
211
|
+
const getSuspenseHookFile = (operation) => {
|
|
212
|
+
return getFile(operation, {
|
|
213
|
+
prefix: "use",
|
|
214
|
+
suffix: "suspense"
|
|
215
|
+
});
|
|
216
|
+
};
|
|
217
|
+
const getSuspenseHookOptions = (operation) => {
|
|
218
|
+
return getName(operation, {
|
|
219
|
+
type: "function",
|
|
220
|
+
suffix: "SuspenseQueryOptions"
|
|
221
|
+
});
|
|
222
|
+
};
|
|
223
|
+
const getSuspenseHookOptionsImport = (operation) => {
|
|
224
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
225
|
+
name: [getSuspenseHookOptions(operation)],
|
|
226
|
+
root: file.path,
|
|
227
|
+
path: getSuspenseHookFile(operation).path
|
|
228
|
+
});
|
|
229
|
+
};
|
|
230
|
+
const getInfiniteHookName = (operation) => {
|
|
231
|
+
return getName(operation, {
|
|
232
|
+
type: "function",
|
|
233
|
+
prefix: "use",
|
|
234
|
+
suffix: "infinite"
|
|
235
|
+
});
|
|
236
|
+
};
|
|
237
|
+
const getInfiniteHookFile = (operation) => {
|
|
238
|
+
return getFile(operation, {
|
|
239
|
+
prefix: "use",
|
|
240
|
+
suffix: "infinite"
|
|
241
|
+
});
|
|
242
|
+
};
|
|
243
|
+
const getInfiniteHookOptions = (operation) => {
|
|
244
|
+
return getName(operation, {
|
|
245
|
+
type: "function",
|
|
246
|
+
suffix: "InfiniteQueryOptions"
|
|
247
|
+
});
|
|
248
|
+
};
|
|
249
|
+
const getInfiniteHookOptionsImport = (operation) => {
|
|
250
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
251
|
+
name: [getInfiniteHookOptions(operation)],
|
|
252
|
+
root: file.path,
|
|
253
|
+
path: getInfiniteHookFile(operation).path
|
|
254
|
+
});
|
|
255
|
+
};
|
|
256
|
+
const getSuspenseInfiniteHookName = (operation) => {
|
|
257
|
+
return getName(operation, {
|
|
258
|
+
type: "function",
|
|
259
|
+
prefix: "use",
|
|
260
|
+
suffix: "suspenseInfinite"
|
|
261
|
+
});
|
|
262
|
+
};
|
|
263
|
+
const getSuspenseInfiniteHookFile = (operation) => {
|
|
264
|
+
return getFile(operation, {
|
|
265
|
+
prefix: "use",
|
|
266
|
+
suffix: "suspenseInfinite"
|
|
267
|
+
});
|
|
268
|
+
};
|
|
269
|
+
const getSuspenseInfiniteHookOptions = (operation) => {
|
|
270
|
+
return getName(operation, {
|
|
271
|
+
type: "function",
|
|
272
|
+
suffix: "SuspenseInfiniteQueryOptions"
|
|
273
|
+
});
|
|
274
|
+
};
|
|
275
|
+
const getSuspenseInfiniteHookOptionsImport = (operation) => {
|
|
276
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
277
|
+
name: [getSuspenseInfiniteHookOptions(operation)],
|
|
278
|
+
root: file.path,
|
|
279
|
+
path: getSuspenseInfiniteHookFile(operation).path
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
const imports = operations.flatMap((operation) => {
|
|
283
|
+
if (isQuery(operation)) return [
|
|
284
|
+
getQueryHookOptionsImport(operation),
|
|
285
|
+
isSuspense(operation) ? getSuspenseHookOptionsImport(operation) : void 0,
|
|
286
|
+
isInfinite(operation) ? getInfiniteHookOptionsImport(operation) : void 0,
|
|
287
|
+
isSuspense(operation) && isInfinite(operation) ? getSuspenseInfiniteHookOptionsImport(operation) : void 0
|
|
288
|
+
].filter(Boolean);
|
|
289
|
+
if (isMutation(operation)) return [getMutationHookOptionsImport(operation)];
|
|
290
|
+
return [];
|
|
291
|
+
}).filter(Boolean);
|
|
292
|
+
const hookOptions = operations.reduce((acc, operation) => {
|
|
293
|
+
if (isQuery(operation)) {
|
|
294
|
+
acc[getHookName(operation)] = `Partial<ReturnType<typeof ${getQueryHookOptions(operation)}>>`;
|
|
295
|
+
if (isSuspense(operation)) acc[getSuspenseHookName(operation)] = `Partial<ReturnType<typeof ${getSuspenseHookOptions(operation)}>>`;
|
|
296
|
+
if (isInfinite(operation)) acc[getInfiniteHookName(operation)] = `Partial<ReturnType<typeof ${getInfiniteHookOptions(operation)}>>`;
|
|
297
|
+
if (isSuspense(operation) && isInfinite(operation)) acc[getSuspenseInfiniteHookName(operation)] = `Partial<ReturnType<typeof ${getSuspenseInfiniteHookOptions(operation)}>>`;
|
|
298
|
+
}
|
|
299
|
+
if (isMutation(operation)) acc[getHookName(operation)] = `Partial<ReturnType<typeof ${getMutationHookOptions(operation)}>>`;
|
|
300
|
+
return acc;
|
|
301
|
+
}, {});
|
|
302
|
+
return /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric.File, {
|
|
303
|
+
baseName: file.baseName,
|
|
304
|
+
path: file.path,
|
|
305
|
+
meta: file.meta,
|
|
306
|
+
banner: (0, _kubb_plugin_oas_utils.getBanner)({
|
|
307
|
+
oas,
|
|
308
|
+
output,
|
|
309
|
+
config: pluginManager.config
|
|
310
|
+
}),
|
|
311
|
+
footer: (0, _kubb_plugin_oas_utils.getFooter)({
|
|
312
|
+
oas,
|
|
313
|
+
output
|
|
314
|
+
}),
|
|
315
|
+
children: [imports, /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Source, {
|
|
316
|
+
name,
|
|
317
|
+
isExportable: true,
|
|
318
|
+
isIndexable: true,
|
|
319
|
+
isTypeOnly: true,
|
|
320
|
+
children: /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.Type, {
|
|
321
|
+
export: true,
|
|
322
|
+
name,
|
|
323
|
+
children: `{ ${Object.keys(hookOptions).map((key) => `${JSON.stringify(key)}: ${hookOptions[key]}`)} }`
|
|
324
|
+
})
|
|
325
|
+
})]
|
|
326
|
+
});
|
|
327
|
+
}
|
|
328
|
+
});
|
|
329
|
+
|
|
330
|
+
//#endregion
|
|
43
331
|
//#region src/generators/infiniteQueryGenerator.tsx
|
|
44
332
|
const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
45
333
|
name: "react-infinite-query",
|
|
@@ -209,6 +497,10 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
209
497
|
pathParamsType: options.pathParamsType,
|
|
210
498
|
parser: options.parser
|
|
211
499
|
}),
|
|
500
|
+
options.customOptions && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
501
|
+
name: [options.customOptions.name],
|
|
502
|
+
path: options.customOptions.importPath
|
|
503
|
+
}),
|
|
212
504
|
infiniteOptions && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsxs)(_kubb_react_fabric_jsx_runtime.Fragment, { children: [
|
|
213
505
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
214
506
|
name: ["InfiniteData"],
|
|
@@ -262,7 +554,8 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
262
554
|
queryKeyName: queryKey.name,
|
|
263
555
|
queryKeyTypeName: queryKey.typeName,
|
|
264
556
|
initialPageParam: infiniteOptions.initialPageParam,
|
|
265
|
-
queryParam: infiniteOptions.queryParam
|
|
557
|
+
queryParam: infiniteOptions.queryParam,
|
|
558
|
+
customOptions: options.customOptions
|
|
266
559
|
})
|
|
267
560
|
] })
|
|
268
561
|
]
|
|
@@ -390,6 +683,10 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
390
683
|
root: mutation.file.path,
|
|
391
684
|
path: node_path.default.resolve(config.root, config.output.path, ".kubb/config.ts")
|
|
392
685
|
}),
|
|
686
|
+
options.customOptions && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
687
|
+
name: [options.customOptions.name],
|
|
688
|
+
path: options.customOptions.importPath
|
|
689
|
+
}),
|
|
393
690
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
394
691
|
name: [
|
|
395
692
|
type.schemas.request?.name,
|
|
@@ -461,7 +758,8 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
461
758
|
dataReturnType: options.client.dataReturnType || "data",
|
|
462
759
|
paramsCasing: options.paramsCasing,
|
|
463
760
|
pathParamsType: options.pathParamsType,
|
|
464
|
-
mutationKeyName: mutationKey.name
|
|
761
|
+
mutationKeyName: mutationKey.name,
|
|
762
|
+
customOptions: options.customOptions
|
|
465
763
|
})
|
|
466
764
|
] })
|
|
467
765
|
]
|
|
@@ -589,6 +887,10 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
589
887
|
root: query.file.path,
|
|
590
888
|
path: node_path.default.resolve(config.root, config.output.path, ".kubb/config.ts")
|
|
591
889
|
}),
|
|
890
|
+
options.customOptions && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
891
|
+
name: [options.customOptions.name],
|
|
892
|
+
path: options.customOptions.importPath
|
|
893
|
+
}),
|
|
592
894
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
593
895
|
name: [
|
|
594
896
|
type.schemas.request?.name,
|
|
@@ -663,7 +965,8 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
663
965
|
operation,
|
|
664
966
|
dataReturnType: options.client.dataReturnType || "data",
|
|
665
967
|
queryKeyName: queryKey.name,
|
|
666
|
-
queryKeyTypeName: queryKey.typeName
|
|
968
|
+
queryKeyTypeName: queryKey.typeName,
|
|
969
|
+
customOptions: options.customOptions
|
|
667
970
|
})
|
|
668
971
|
] })
|
|
669
972
|
]
|
|
@@ -800,6 +1103,10 @@ const suspenseInfiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createRea
|
|
|
800
1103
|
root: query.file.path,
|
|
801
1104
|
path: node_path.default.resolve(config.root, config.output.path, ".kubb/config.ts")
|
|
802
1105
|
}),
|
|
1106
|
+
options.customOptions && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
1107
|
+
name: [options.customOptions.name],
|
|
1108
|
+
path: options.customOptions.importPath
|
|
1109
|
+
}),
|
|
803
1110
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
804
1111
|
name: [
|
|
805
1112
|
type.schemas.request?.name,
|
|
@@ -886,6 +1193,7 @@ const suspenseInfiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createRea
|
|
|
886
1193
|
dataReturnType: options.client.dataReturnType || "data",
|
|
887
1194
|
queryKeyName: queryKey.name,
|
|
888
1195
|
queryKeyTypeName: queryKey.typeName,
|
|
1196
|
+
customOptions: options.customOptions,
|
|
889
1197
|
initialPageParam: infiniteOptions.initialPageParam,
|
|
890
1198
|
queryParam: infiniteOptions.queryParam
|
|
891
1199
|
})
|
|
@@ -1023,6 +1331,10 @@ const suspenseQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
1023
1331
|
root: query.file.path,
|
|
1024
1332
|
path: node_path.default.resolve(config.root, config.output.path, ".kubb/config.ts")
|
|
1025
1333
|
}),
|
|
1334
|
+
options.customOptions && /* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
1335
|
+
name: [options.customOptions.name],
|
|
1336
|
+
path: options.customOptions.importPath
|
|
1337
|
+
}),
|
|
1026
1338
|
/* @__PURE__ */ (0, _kubb_react_fabric_jsx_runtime.jsx)(_kubb_react_fabric.File.Import, {
|
|
1027
1339
|
name: [
|
|
1028
1340
|
type.schemas.request?.name,
|
|
@@ -1096,7 +1408,8 @@ const suspenseQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
1096
1408
|
operation,
|
|
1097
1409
|
dataReturnType: options.client.dataReturnType || "data",
|
|
1098
1410
|
queryKeyName: queryKey.name,
|
|
1099
|
-
queryKeyTypeName: queryKey.typeName
|
|
1411
|
+
queryKeyTypeName: queryKey.typeName,
|
|
1412
|
+
customOptions: options.customOptions
|
|
1100
1413
|
})
|
|
1101
1414
|
] })
|
|
1102
1415
|
]
|
|
@@ -1111,6 +1424,18 @@ Object.defineProperty(exports, '__toESM', {
|
|
|
1111
1424
|
return __toESM;
|
|
1112
1425
|
}
|
|
1113
1426
|
});
|
|
1427
|
+
Object.defineProperty(exports, 'customHookOptionsFileGenerator', {
|
|
1428
|
+
enumerable: true,
|
|
1429
|
+
get: function () {
|
|
1430
|
+
return customHookOptionsFileGenerator;
|
|
1431
|
+
}
|
|
1432
|
+
});
|
|
1433
|
+
Object.defineProperty(exports, 'hookOptionsGenerator', {
|
|
1434
|
+
enumerable: true,
|
|
1435
|
+
get: function () {
|
|
1436
|
+
return hookOptionsGenerator;
|
|
1437
|
+
}
|
|
1438
|
+
});
|
|
1114
1439
|
Object.defineProperty(exports, 'infiniteQueryGenerator', {
|
|
1115
1440
|
enumerable: true,
|
|
1116
1441
|
get: function () {
|
|
@@ -1141,4 +1466,4 @@ Object.defineProperty(exports, 'suspenseQueryGenerator', {
|
|
|
1141
1466
|
return suspenseQueryGenerator;
|
|
1142
1467
|
}
|
|
1143
1468
|
});
|
|
1144
|
-
//# sourceMappingURL=generators-
|
|
1469
|
+
//# sourceMappingURL=generators-CYoqgYAV.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators-CYoqgYAV.cjs","names":["path","operations","fs","File","Function","File","Type","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","InfiniteQueryOptions","InfiniteQuery","pluginTsName","pluginZodName","pluginClientName","File","path","MutationKey","Client","MutationOptions","Mutation","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","QueryOptions","Query","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","SuspenseInfiniteQueryOptions","SuspenseInfiniteQuery","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","QueryOptions","SuspenseQuery"],"sources":["../src/generators/customHookOptionsFileGenerator.tsx","../src/generators/hookOptionsGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx","../src/generators/suspenseInfiniteQueryGenerator.tsx","../src/generators/suspenseQueryGenerator.tsx"],"sourcesContent":["import fs from 'node:fs'\nimport path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport type { Operation } from '@kubb/oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { File, Function } from '@kubb/react-fabric'\nimport type { PluginReactQuery } from '../types'\n\nexport const customHookOptionsFileGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query-custom-hook-options-file',\n Operations({ operations, generator, plugin, config }) {\n const {\n options,\n options: { output },\n key: pluginKey,\n } = plugin\n const pluginManager = usePluginManager()\n\n const { getFile } = useOperationManager(generator)\n\n if (!options.customOptions) {\n return null\n }\n\n const override = output.override ?? config.output.override ?? false\n const { importPath, name } = options.customOptions\n\n const root = path.resolve(config.root, config.output.path)\n\n const reactQueryImportPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const getHookFilePath = (operations: Operation[]) => {\n const firstOperation = operations[0]\n if (firstOperation != null) {\n // Get the file of the first generated hook\n return getFile(firstOperation, { prefix: 'use' }).path\n }\n // Get the index file of the hooks directory\n return pluginManager.getFile({ name: 'index', extname: '.ts', pluginKey }).path\n }\n\n const ensureExtension = (filePath: string, extname: string) => {\n if (path.extname(filePath) === '') {\n return filePath + extname\n }\n return filePath\n }\n\n const getExternalFile = (filePath: string, rootPath: string) => {\n const actualFilePath = ensureExtension(filePath, '.ts')\n return {\n baseName: path.basename(actualFilePath) as `${string}.${string}`,\n name: path.basename(actualFilePath, path.extname(actualFilePath)),\n path: path.resolve(rootPath, actualFilePath),\n }\n }\n\n const basePath = path.dirname(getHookFilePath(operations))\n const file = getExternalFile(importPath, basePath)\n\n if (fs.existsSync(file.path) && !override) {\n return null\n }\n\n return (\n <File baseName={file.baseName} path={file.path}>\n <File.Import name={['QueryClient']} path={reactQueryImportPath} isTypeOnly />\n <File.Import name={['useQueryClient']} path={reactQueryImportPath} />\n <File.Import name={['HookOptions']} root={file.path} path={path.resolve(root, './index.ts')} />\n <File.Source name={file.name} isExportable isIndexable>\n <Function name=\"getCustomHookOptions\" params=\"{ queryClient }: { queryClient: QueryClient }\" returnType=\"Partial<HookOptions>\">\n {`return {\n // TODO: Define custom hook options here\n // Example:\n // useUpdatePetHook: {\n // onSuccess: () => {\n // void queryClient.invalidateQueries({ queryKey: ['pet'] })\n // }\n // }\n }`}\n </Function>\n <Function\n name={name}\n generics=\"T extends keyof HookOptions\"\n params=\"{ hookName, operationId }: { hookName: T, operationId: string }\"\n returnType=\"HookOptions[T]\"\n export\n >\n {`const queryClient = useQueryClient()\n const customOptions = getCustomHookOptions({ queryClient })\n return customOptions[hookName] ?? {}`}\n </Function>\n </File.Source>\n </File>\n )\n },\n})\n","import { usePluginManager } from '@kubb/core/hooks'\nimport type { Operation } from '@kubb/oas'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { File, Type } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport type { PluginReactQuery } from '../types'\n\nexport const hookOptionsGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query-hook-options',\n Operations({ operations, plugin, generator }) {\n const {\n options,\n options: { output },\n key: pluginKey,\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getName, getFile } = useOperationManager(generator)\n\n if (!options.customOptions) {\n return null\n }\n\n const name = 'HookOptions'\n const file = pluginManager.getFile({ name, extname: '.ts', pluginKey })\n\n const getOperationOptions = (operation: Operation) => {\n const operationOptions = generator.getOptions(operation, operation.method)\n return { ...options, ...operationOptions }\n }\n\n const isQuery = (operation: Operation) => {\n const operationOptions = getOperationOptions(operation)\n return typeof operationOptions.query === 'boolean' ? true : operationOptions.query?.methods.some((method) => operation.method === method)\n }\n\n const isMutation = (operation: Operation) => {\n const operationOptions = getOperationOptions(operation)\n return (\n operationOptions.mutation !== false &&\n !isQuery(operation) &&\n difference(operationOptions.mutation ? operationOptions.mutation.methods : [], operationOptions.query ? operationOptions.query.methods : []).some(\n (method) => operation.method === method,\n )\n )\n }\n\n const isSuspense = (operation: Operation) => {\n const operationOptions = getOperationOptions(operation)\n return !!operationOptions.suspense\n }\n\n const isInfinite = (operation: Operation) => {\n const operationOptions = getOperationOptions(operation)\n const infiniteOptions = operationOptions.infinite && typeof operationOptions.infinite === 'object' ? operationOptions.infinite : undefined\n return !!infiniteOptions\n }\n\n // Query/mutation hooks\n const getHookName = (operation: Operation) => {\n return getName(operation, { type: 'function', prefix: 'use' })\n }\n\n const getHookFile = (operation: Operation) => {\n return getFile(operation, { prefix: 'use' })\n }\n\n // Query hooks\n const getQueryHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'QueryOptions' })\n }\n\n const getQueryHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getQueryHookOptions(operation)]} root={file.path} path={getHookFile(operation).path} />\n }\n\n // Mutation hooks\n const getMutationHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'MutationOptions' })\n }\n\n const getMutationHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getMutationHookOptions(operation)]} root={file.path} path={getHookFile(operation).path} />\n }\n\n // Suspense hooks\n const getSuspenseHookName = (operation: Operation) => {\n return getName(operation, { type: 'function', prefix: 'use', suffix: 'suspense' })\n }\n\n const getSuspenseHookFile = (operation: Operation) => {\n return getFile(operation, { prefix: 'use', suffix: 'suspense' })\n }\n\n const getSuspenseHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'SuspenseQueryOptions' })\n }\n\n const getSuspenseHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getSuspenseHookOptions(operation)]} root={file.path} path={getSuspenseHookFile(operation).path} />\n }\n\n // Infinite hooks\n const getInfiniteHookName = (operation: Operation) => {\n return getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' })\n }\n\n const getInfiniteHookFile = (operation: Operation) => {\n return getFile(operation, { prefix: 'use', suffix: 'infinite' })\n }\n\n const getInfiniteHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'InfiniteQueryOptions' })\n }\n\n const getInfiniteHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getInfiniteHookOptions(operation)]} root={file.path} path={getInfiniteHookFile(operation).path} />\n }\n\n // Suspense infinite hooks\n const getSuspenseInfiniteHookName = (operation: Operation) => {\n return getName(operation, { type: 'function', prefix: 'use', suffix: 'suspenseInfinite' })\n }\n\n const getSuspenseInfiniteHookFile = (operation: Operation) => {\n return getFile(operation, { prefix: 'use', suffix: 'suspenseInfinite' })\n }\n\n const getSuspenseInfiniteHookOptions = (operation: Operation) => {\n return getName(operation, { type: 'function', suffix: 'SuspenseInfiniteQueryOptions' })\n }\n\n const getSuspenseInfiniteHookOptionsImport = (operation: Operation) => {\n return <File.Import name={[getSuspenseInfiniteHookOptions(operation)]} root={file.path} path={getSuspenseInfiniteHookFile(operation).path} />\n }\n\n const imports = operations\n .flatMap((operation) => {\n if (isQuery(operation)) {\n return [\n getQueryHookOptionsImport(operation),\n isSuspense(operation) ? getSuspenseHookOptionsImport(operation) : undefined,\n isInfinite(operation) ? getInfiniteHookOptionsImport(operation) : undefined,\n isSuspense(operation) && isInfinite(operation) ? getSuspenseInfiniteHookOptionsImport(operation) : undefined,\n ].filter(Boolean)\n }\n if (isMutation(operation)) {\n return [getMutationHookOptionsImport(operation)]\n }\n return []\n })\n .filter(Boolean)\n\n const hookOptions = operations.reduce(\n (acc, operation) => {\n if (isQuery(operation)) {\n acc[getHookName(operation)] = `Partial<ReturnType<typeof ${getQueryHookOptions(operation)}>>`\n if (isSuspense(operation)) {\n acc[getSuspenseHookName(operation)] = `Partial<ReturnType<typeof ${getSuspenseHookOptions(operation)}>>`\n }\n if (isInfinite(operation)) {\n acc[getInfiniteHookName(operation)] = `Partial<ReturnType<typeof ${getInfiniteHookOptions(operation)}>>`\n }\n if (isSuspense(operation) && isInfinite(operation)) {\n acc[getSuspenseInfiniteHookName(operation)] = `Partial<ReturnType<typeof ${getSuspenseInfiniteHookOptions(operation)}>>`\n }\n }\n if (isMutation(operation)) {\n acc[getHookName(operation)] = `Partial<ReturnType<typeof ${getMutationHookOptions(operation)}>>`\n }\n return acc\n },\n {} as Record<string, string>,\n )\n\n return (\n <File\n baseName={file.baseName}\n path={file.path}\n meta={file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {imports}\n <File.Source name={name} isExportable isIndexable isTypeOnly>\n <Type export name={name}>\n {`{ ${Object.keys(hookOptions).map((key) => `${JSON.stringify(key)}: ${hookOptions[key]}`)} }`}\n </Type>\n </File.Source>\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-infinite-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const infiniteOptions = options.infinite && typeof options.infinite === 'object' ? options.infinite : undefined\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n suffix: 'infinite',\n }),\n file: getFile(operation, { 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 || isMutation || !infiniteOptions) {\n return null\n }\n\n const normalizeKey = (key?: string | null) => (key ?? '').replace(/\\?$/, '')\n const queryParam = infiniteOptions.queryParam\n const cursorParam = infiniteOptions.cursorParam\n const queryParamKeys = type.schemas.queryParams?.keys ?? []\n const responseKeys = [...(type.schemas.responses?.flatMap((item) => item.keys ?? []) ?? []), ...(type.schemas.response?.keys ?? [])]\n\n const hasQueryParam = queryParam ? queryParamKeys.some((key) => normalizeKey(key) === queryParam) : false\n const hasCursorParam = cursorParam ? responseKeys.some((key) => normalizeKey(key) === cursorParam) : true\n\n if (!hasQueryParam || !hasCursorParam) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\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 </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n {infiniteOptions && (\n <>\n <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n cursorParam={infiniteOptions.cursorParam}\n nextParam={infiniteOptions.nextParam}\n previousParam={infiniteOptions.previousParam}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryResult']} path={importPath} isTypeOnly />\n <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n customOptions={options.customOptions}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport { MutationOptions } from '../components/MutationOptions.tsx'\nimport type { PluginReactQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ config, plugin, operation, generator }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n options.mutation !== false &&\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/react-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const type = {\n file: getFile(operation, { 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 // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const mutationOptions = {\n name: getName(operation, { type: 'function', suffix: 'MutationOptions' }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation) {\n return null\n }\n\n return (\n <File\n baseName={mutation.file.baseName}\n path={mutation.file.path}\n meta={mutation.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={mutation.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\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 </>\n ) : (\n <>\n <File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import\n name={['ResponseConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.mutationKey}\n />\n\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['mutationOptions']} path={importPath} />\n\n <MutationOptions\n name={mutationOptions.name}\n clientName={client.name}\n mutationKeyName={mutationKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n />\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['UseMutationOptions', 'UseMutationResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n mutationOptionsName={mutationOptions.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n customOptions={options.customOptions}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ config, plugin, operation, generator }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n 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, {\n pluginKey: [pluginTsName],\n type: 'type',\n }),\n }\n\n const zod = {\n // grouping is coming from react-query instead of zod option, we need to pass the options of zod instead\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, {\n pluginKey: [pluginZodName],\n type: 'function',\n }),\n }\n\n if (!isQuery || isMutation) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\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 </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.queryKey}\n />\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'QueryObserverOptions', 'UseQueryResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n customOptions={options.customOptions}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { QueryKey, SuspenseInfiniteQuery, SuspenseInfiniteQueryOptions } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const suspenseInfiniteQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-suspense-infinite-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const isSuspense = !!options.suspense\n const infiniteOptions = options.infinite && typeof options.infinite === 'object' ? options.infinite : undefined\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'suspenseInfinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'suspenseInfinite' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n suffix: 'suspenseInfinite',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'SuspenseInfiniteQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'SuspenseInfiniteQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'SuspenseInfiniteQueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { 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 || !isSuspense || !infiniteOptions) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\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 </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n <SuspenseInfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n cursorParam={infiniteOptions.cursorParam}\n nextParam={infiniteOptions.nextParam}\n previousParam={infiniteOptions.previousParam}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['useSuspenseInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseSuspenseInfiniteQueryOptions', 'UseSuspenseInfiniteQueryResult']} path={importPath} isTypeOnly />\n <SuspenseInfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n customOptions={options.customOptions}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { QueryKey, QueryOptions, SuspenseQuery } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const suspenseQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-suspense-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const isSuspense = !!options.suspense\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, {\n type: 'function',\n prefix: 'use',\n suffix: 'suspense',\n }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'suspense' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n suffix: 'suspense',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, {\n type: 'function',\n suffix: 'SuspenseQueryOptions',\n }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'SuspenseQueryKey' }),\n typeName: getName(operation, {\n type: 'type',\n suffix: 'SuspenseQueryKey',\n }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, {\n pluginKey: [pluginTsName],\n type: 'type',\n }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, {\n pluginKey: [pluginZodName],\n type: 'function',\n }),\n }\n\n if (!isQuery || isMutation || !isSuspense) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\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 </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\n {options.customOptions && <File.Import name={[options.customOptions.name]} path={options.customOptions.importPath} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n\n {!shouldUseClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.suspense && (\n <>\n <File.Import name={['useSuspenseQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseSuspenseQueryOptions', 'UseSuspenseQueryResult']} path={importPath} isTypeOnly />\n\n <SuspenseQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n customOptions={options.customOptions}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,MAAa,uFAAwE;CACnF,MAAM;CACN,WAAW,EAAE,YAAY,WAAW,QAAQ,UAAU;EACpD,MAAM,EACJ,SACA,SAAS,EAAE,UACX,KAAK,cACH;EACJ,MAAM,wDAAkC;EAExC,MAAM,EAAE,4DAAgC,UAAU;AAElD,MAAI,CAAC,QAAQ,cACX,QAAO;EAGT,MAAM,WAAW,OAAO,YAAY,OAAO,OAAO,YAAY;EAC9D,MAAM,EAAE,YAAY,SAAS,QAAQ;EAErC,MAAM,OAAOA,kBAAK,QAAQ,OAAO,MAAM,OAAO,OAAO,KAAK;EAE1D,MAAM,uBAAuB,QAAQ,QAAQ,QAAQ,MAAM,aAAa;EAExE,MAAM,mBAAmB,iBAA4B;GACnD,MAAM,iBAAiBC,aAAW;AAClC,OAAI,kBAAkB,KAEpB,QAAO,QAAQ,gBAAgB,EAAE,QAAQ,OAAO,CAAC,CAAC;AAGpD,UAAO,cAAc,QAAQ;IAAE,MAAM;IAAS,SAAS;IAAO;IAAW,CAAC,CAAC;;EAG7E,MAAM,mBAAmB,UAAkB,YAAoB;AAC7D,OAAID,kBAAK,QAAQ,SAAS,KAAK,GAC7B,QAAO,WAAW;AAEpB,UAAO;;EAGT,MAAM,mBAAmB,UAAkB,aAAqB;GAC9D,MAAM,iBAAiB,gBAAgB,UAAU,MAAM;AACvD,UAAO;IACL,UAAUA,kBAAK,SAAS,e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