@kubb/plugin-vue-query 5.0.0-alpha.32 → 5.0.0-alpha.33
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-Dh9ETgiK.cjs → components-DberPyb4.cjs} +36 -35
- package/dist/components-DberPyb4.cjs.map +1 -0
- package/dist/{components-BqilTESI.js → components-Dtcq349-.js} +4 -3
- package/dist/components-Dtcq349-.js.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.ts +9 -9
- package/dist/components.js +1 -1
- package/dist/{generators-TcueY7eX.cjs → generators-CAq2xhSX.cjs} +72 -72
- package/dist/{generators-TcueY7eX.cjs.map → generators-CAq2xhSX.cjs.map} +1 -1
- package/dist/{generators-C_oXqIAr.js → generators-X60LXmf_.js} +4 -4
- package/dist/{generators-C_oXqIAr.js.map → generators-X60LXmf_.js.map} +1 -1
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +1 -1
- package/dist/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -6
- package/dist/index.js.map +1 -1
- package/dist/{types-Cx-x7vSU.d.ts → types-Djdj3Js0.d.ts} +4 -5
- package/package.json +10 -10
- package/src/components/InfiniteQuery.tsx +4 -3
- package/src/components/InfiniteQueryOptions.tsx +4 -3
- package/src/components/Mutation.tsx +5 -3
- package/src/components/Query.tsx +4 -3
- package/src/components/QueryKey.tsx +4 -3
- package/src/components/QueryOptions.tsx +4 -12
- package/src/generators/infiniteQueryGenerator.tsx +1 -1
- package/src/generators/mutationGenerator.tsx +1 -1
- package/src/generators/queryGenerator.tsx +1 -1
- package/src/plugin.ts +3 -3
- package/dist/components-BqilTESI.js.map +0 -1
- package/dist/components-Dh9ETgiK.cjs.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
const require_components = require("./components-
|
|
1
|
+
const require_components = require("./components-DberPyb4.cjs");
|
|
2
2
|
let node_path = require("node:path");
|
|
3
3
|
node_path = require_components.__toESM(node_path);
|
|
4
4
|
let _kubb_plugin_client = require("@kubb/plugin-client");
|
|
5
5
|
let _kubb_plugin_ts = require("@kubb/plugin-ts");
|
|
6
6
|
let _kubb_plugin_zod = require("@kubb/plugin-zod");
|
|
7
7
|
let _kubb_plugin_oas_utils = require("@kubb/plugin-oas/utils");
|
|
8
|
-
let
|
|
9
|
-
let
|
|
8
|
+
let _kubb_renderer_jsx = require("@kubb/renderer-jsx");
|
|
9
|
+
let _kubb_renderer_jsx_jsx_runtime = require("@kubb/renderer-jsx/jsx-runtime");
|
|
10
10
|
let _kubb_core_hooks = require("@kubb/core/hooks");
|
|
11
11
|
let _kubb_plugin_oas_generators = require("@kubb/plugin-oas/generators");
|
|
12
12
|
let _kubb_plugin_oas_hooks = require("@kubb/plugin-oas/hooks");
|
|
@@ -76,7 +76,7 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
76
76
|
})
|
|
77
77
|
};
|
|
78
78
|
if (!isQuery || isMutation || !isInfinite) return null;
|
|
79
|
-
return /* @__PURE__ */ (0,
|
|
79
|
+
return /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx.File, {
|
|
80
80
|
baseName: query.file.baseName,
|
|
81
81
|
path: query.file.path,
|
|
82
82
|
meta: query.file.meta,
|
|
@@ -90,17 +90,17 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
90
90
|
output
|
|
91
91
|
}),
|
|
92
92
|
children: [
|
|
93
|
-
options.parser === "zod" && /* @__PURE__ */ (0,
|
|
93
|
+
options.parser === "zod" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
94
94
|
name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean),
|
|
95
95
|
root: query.file.path,
|
|
96
96
|
path: zod.file.path
|
|
97
97
|
}),
|
|
98
|
-
options.client.importPath ? /* @__PURE__ */ (0,
|
|
99
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
98
|
+
options.client.importPath ? /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
99
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
100
100
|
name: "fetch",
|
|
101
101
|
path: options.client.importPath
|
|
102
102
|
}),
|
|
103
|
-
/* @__PURE__ */ (0,
|
|
103
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
104
104
|
name: [
|
|
105
105
|
"Client",
|
|
106
106
|
"RequestConfig",
|
|
@@ -109,18 +109,18 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
109
109
|
path: options.client.importPath,
|
|
110
110
|
isTypeOnly: true
|
|
111
111
|
}),
|
|
112
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ (0,
|
|
112
|
+
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
113
113
|
name: ["ResponseConfig"],
|
|
114
114
|
path: options.client.importPath,
|
|
115
115
|
isTypeOnly: true
|
|
116
116
|
})
|
|
117
|
-
] }) : /* @__PURE__ */ (0,
|
|
118
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
117
|
+
] }) : /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
118
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
119
119
|
name: ["fetch"],
|
|
120
120
|
root: query.file.path,
|
|
121
121
|
path: node_path.default.resolve(root, ".kubb/fetch.ts")
|
|
122
122
|
}),
|
|
123
|
-
/* @__PURE__ */ (0,
|
|
123
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
124
124
|
name: [
|
|
125
125
|
"Client",
|
|
126
126
|
"RequestConfig",
|
|
@@ -130,33 +130,33 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
130
130
|
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
131
131
|
isTypeOnly: true
|
|
132
132
|
}),
|
|
133
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ (0,
|
|
133
|
+
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
134
134
|
name: ["ResponseConfig"],
|
|
135
135
|
root: query.file.path,
|
|
136
136
|
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
137
137
|
isTypeOnly: true
|
|
138
138
|
})
|
|
139
139
|
] }),
|
|
140
|
-
/* @__PURE__ */ (0,
|
|
140
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
141
141
|
name: ["toValue"],
|
|
142
142
|
path: "vue"
|
|
143
143
|
}),
|
|
144
|
-
/* @__PURE__ */ (0,
|
|
144
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
145
145
|
name: ["MaybeRefOrGetter"],
|
|
146
146
|
path: "vue",
|
|
147
147
|
isTypeOnly: true
|
|
148
148
|
}),
|
|
149
|
-
shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
149
|
+
shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
150
150
|
name: [client.name],
|
|
151
151
|
root: query.file.path,
|
|
152
152
|
path: client.file.path
|
|
153
153
|
}),
|
|
154
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
154
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
155
155
|
name: ["buildFormData"],
|
|
156
156
|
root: query.file.path,
|
|
157
157
|
path: node_path.default.resolve(root, ".kubb/config.ts")
|
|
158
158
|
}),
|
|
159
|
-
/* @__PURE__ */ (0,
|
|
159
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
160
160
|
name: [
|
|
161
161
|
type.schemas.request?.name,
|
|
162
162
|
type.schemas.response.name,
|
|
@@ -169,7 +169,7 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
169
169
|
path: type.file.path,
|
|
170
170
|
isTypeOnly: true
|
|
171
171
|
}),
|
|
172
|
-
/* @__PURE__ */ (0,
|
|
172
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.QueryKey, {
|
|
173
173
|
name: queryKey.name,
|
|
174
174
|
typeName: queryKey.typeName,
|
|
175
175
|
operation,
|
|
@@ -178,7 +178,7 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
178
178
|
typeSchemas: type.schemas,
|
|
179
179
|
transformer: options.queryKey
|
|
180
180
|
}),
|
|
181
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
181
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_plugin_client.ClientLegacy, {
|
|
182
182
|
name: client.name,
|
|
183
183
|
baseURL: options.client.baseURL,
|
|
184
184
|
operation,
|
|
@@ -190,17 +190,17 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
190
190
|
pathParamsType: options.pathParamsType,
|
|
191
191
|
parser: options.parser
|
|
192
192
|
}),
|
|
193
|
-
options.infinite && /* @__PURE__ */ (0,
|
|
194
|
-
/* @__PURE__ */ (0,
|
|
193
|
+
options.infinite && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
194
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
195
195
|
name: ["InfiniteData"],
|
|
196
196
|
isTypeOnly: true,
|
|
197
197
|
path: importPath
|
|
198
198
|
}),
|
|
199
|
-
/* @__PURE__ */ (0,
|
|
199
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
200
200
|
name: ["infiniteQueryOptions"],
|
|
201
201
|
path: importPath
|
|
202
202
|
}),
|
|
203
|
-
/* @__PURE__ */ (0,
|
|
203
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.InfiniteQueryOptions, {
|
|
204
204
|
name: queryOptions.name,
|
|
205
205
|
clientName: client.name,
|
|
206
206
|
queryKeyName: queryKey.name,
|
|
@@ -216,12 +216,12 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
216
216
|
queryParam: options.infinite.queryParam
|
|
217
217
|
})
|
|
218
218
|
] }),
|
|
219
|
-
options.infinite && /* @__PURE__ */ (0,
|
|
220
|
-
/* @__PURE__ */ (0,
|
|
219
|
+
options.infinite && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
220
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
221
221
|
name: ["useInfiniteQuery"],
|
|
222
222
|
path: importPath
|
|
223
223
|
}),
|
|
224
|
-
/* @__PURE__ */ (0,
|
|
224
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
225
225
|
name: [
|
|
226
226
|
"QueryKey",
|
|
227
227
|
"QueryClient",
|
|
@@ -231,7 +231,7 @@ const infiniteQueryGenerator = (0, _kubb_plugin_oas_generators.createReactGenera
|
|
|
231
231
|
path: importPath,
|
|
232
232
|
isTypeOnly: true
|
|
233
233
|
}),
|
|
234
|
-
/* @__PURE__ */ (0,
|
|
234
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.InfiniteQuery, {
|
|
235
235
|
name: query.name,
|
|
236
236
|
queryOptionsName: queryOptions.name,
|
|
237
237
|
typeSchemas: type.schemas,
|
|
@@ -302,7 +302,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
302
302
|
})
|
|
303
303
|
};
|
|
304
304
|
if (!isMutation) return null;
|
|
305
|
-
return /* @__PURE__ */ (0,
|
|
305
|
+
return /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx.File, {
|
|
306
306
|
baseName: mutation.file.baseName,
|
|
307
307
|
path: mutation.file.path,
|
|
308
308
|
meta: mutation.file.meta,
|
|
@@ -316,17 +316,17 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
316
316
|
output
|
|
317
317
|
}),
|
|
318
318
|
children: [
|
|
319
|
-
options.parser === "zod" && /* @__PURE__ */ (0,
|
|
319
|
+
options.parser === "zod" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
320
320
|
name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean),
|
|
321
321
|
root: mutation.file.path,
|
|
322
322
|
path: zod.file.path
|
|
323
323
|
}),
|
|
324
|
-
options.client.importPath ? /* @__PURE__ */ (0,
|
|
325
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
324
|
+
options.client.importPath ? /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
325
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
326
326
|
name: "fetch",
|
|
327
327
|
path: options.client.importPath
|
|
328
328
|
}),
|
|
329
|
-
/* @__PURE__ */ (0,
|
|
329
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
330
330
|
name: [
|
|
331
331
|
"Client",
|
|
332
332
|
"RequestConfig",
|
|
@@ -335,18 +335,18 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
335
335
|
path: options.client.importPath,
|
|
336
336
|
isTypeOnly: true
|
|
337
337
|
}),
|
|
338
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ (0,
|
|
338
|
+
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
339
339
|
name: ["ResponseConfig"],
|
|
340
340
|
path: options.client.importPath,
|
|
341
341
|
isTypeOnly: true
|
|
342
342
|
})
|
|
343
|
-
] }) : /* @__PURE__ */ (0,
|
|
344
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
343
|
+
] }) : /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
344
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
345
345
|
name: ["fetch"],
|
|
346
346
|
root: mutation.file.path,
|
|
347
347
|
path: node_path.default.resolve(root, ".kubb/fetch.ts")
|
|
348
348
|
}),
|
|
349
|
-
/* @__PURE__ */ (0,
|
|
349
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
350
350
|
name: [
|
|
351
351
|
"Client",
|
|
352
352
|
"RequestConfig",
|
|
@@ -356,29 +356,29 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
356
356
|
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
357
357
|
isTypeOnly: true
|
|
358
358
|
}),
|
|
359
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ (0,
|
|
359
|
+
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
360
360
|
name: ["ResponseConfig"],
|
|
361
361
|
root: mutation.file.path,
|
|
362
362
|
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
363
363
|
isTypeOnly: true
|
|
364
364
|
})
|
|
365
365
|
] }),
|
|
366
|
-
/* @__PURE__ */ (0,
|
|
366
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
367
367
|
name: ["MaybeRefOrGetter"],
|
|
368
368
|
path: "vue",
|
|
369
369
|
isTypeOnly: true
|
|
370
370
|
}),
|
|
371
|
-
shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
371
|
+
shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
372
372
|
name: [client.name],
|
|
373
373
|
root: mutation.file.path,
|
|
374
374
|
path: client.file.path
|
|
375
375
|
}),
|
|
376
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
376
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
377
377
|
name: ["buildFormData"],
|
|
378
378
|
root: mutation.file.path,
|
|
379
379
|
path: node_path.default.resolve(root, ".kubb/config.ts")
|
|
380
380
|
}),
|
|
381
|
-
/* @__PURE__ */ (0,
|
|
381
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
382
382
|
name: [
|
|
383
383
|
type.schemas.request?.name,
|
|
384
384
|
type.schemas.response.name,
|
|
@@ -391,7 +391,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
391
391
|
path: type.file.path,
|
|
392
392
|
isTypeOnly: true
|
|
393
393
|
}),
|
|
394
|
-
/* @__PURE__ */ (0,
|
|
394
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.MutationKey, {
|
|
395
395
|
name: mutationKey.name,
|
|
396
396
|
typeName: mutationKey.typeName,
|
|
397
397
|
operation,
|
|
@@ -400,7 +400,7 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
400
400
|
typeSchemas: type.schemas,
|
|
401
401
|
transformer: options.mutationKey
|
|
402
402
|
}),
|
|
403
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
403
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_plugin_client.ClientLegacy, {
|
|
404
404
|
name: client.name,
|
|
405
405
|
baseURL: options.client.baseURL,
|
|
406
406
|
operation,
|
|
@@ -412,17 +412,17 @@ const mutationGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)(
|
|
|
412
412
|
pathParamsType: options.pathParamsType,
|
|
413
413
|
parser: options.parser
|
|
414
414
|
}),
|
|
415
|
-
options.mutation && /* @__PURE__ */ (0,
|
|
416
|
-
/* @__PURE__ */ (0,
|
|
415
|
+
options.mutation && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
416
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
417
417
|
name: ["useMutation"],
|
|
418
418
|
path: importPath
|
|
419
419
|
}),
|
|
420
|
-
/* @__PURE__ */ (0,
|
|
420
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
421
421
|
name: ["MutationObserverOptions", "QueryClient"],
|
|
422
422
|
path: importPath,
|
|
423
423
|
isTypeOnly: true
|
|
424
424
|
}),
|
|
425
|
-
/* @__PURE__ */ (0,
|
|
425
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.Mutation, {
|
|
426
426
|
name: mutation.name,
|
|
427
427
|
clientName: client.name,
|
|
428
428
|
typeName: mutation.typeName,
|
|
@@ -497,7 +497,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
497
497
|
})
|
|
498
498
|
};
|
|
499
499
|
if (!isQuery || isMutation) return null;
|
|
500
|
-
return /* @__PURE__ */ (0,
|
|
500
|
+
return /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx.File, {
|
|
501
501
|
baseName: query.file.baseName,
|
|
502
502
|
path: query.file.path,
|
|
503
503
|
meta: query.file.meta,
|
|
@@ -511,17 +511,17 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
511
511
|
output
|
|
512
512
|
}),
|
|
513
513
|
children: [
|
|
514
|
-
options.parser === "zod" && /* @__PURE__ */ (0,
|
|
514
|
+
options.parser === "zod" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
515
515
|
name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean),
|
|
516
516
|
root: query.file.path,
|
|
517
517
|
path: zod.file.path
|
|
518
518
|
}),
|
|
519
|
-
options.client.importPath ? /* @__PURE__ */ (0,
|
|
520
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
519
|
+
options.client.importPath ? /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
520
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
521
521
|
name: "fetch",
|
|
522
522
|
path: options.client.importPath
|
|
523
523
|
}),
|
|
524
|
-
/* @__PURE__ */ (0,
|
|
524
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
525
525
|
name: [
|
|
526
526
|
"Client",
|
|
527
527
|
"RequestConfig",
|
|
@@ -530,18 +530,18 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
530
530
|
path: options.client.importPath,
|
|
531
531
|
isTypeOnly: true
|
|
532
532
|
}),
|
|
533
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ (0,
|
|
533
|
+
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
534
534
|
name: ["ResponseConfig"],
|
|
535
535
|
path: options.client.importPath,
|
|
536
536
|
isTypeOnly: true
|
|
537
537
|
})
|
|
538
|
-
] }) : /* @__PURE__ */ (0,
|
|
539
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
538
|
+
] }) : /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
539
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
540
540
|
name: ["fetch"],
|
|
541
541
|
root: query.file.path,
|
|
542
542
|
path: node_path.default.resolve(root, ".kubb/fetch.ts")
|
|
543
543
|
}),
|
|
544
|
-
/* @__PURE__ */ (0,
|
|
544
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
545
545
|
name: [
|
|
546
546
|
"Client",
|
|
547
547
|
"RequestConfig",
|
|
@@ -551,33 +551,33 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
551
551
|
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
552
552
|
isTypeOnly: true
|
|
553
553
|
}),
|
|
554
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ (0,
|
|
554
|
+
options.client.dataReturnType === "full" && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
555
555
|
name: ["ResponseConfig"],
|
|
556
556
|
root: query.file.path,
|
|
557
557
|
path: node_path.default.resolve(root, ".kubb/fetch.ts"),
|
|
558
558
|
isTypeOnly: true
|
|
559
559
|
})
|
|
560
560
|
] }),
|
|
561
|
-
/* @__PURE__ */ (0,
|
|
561
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
562
562
|
name: ["toValue"],
|
|
563
563
|
path: "vue"
|
|
564
564
|
}),
|
|
565
|
-
/* @__PURE__ */ (0,
|
|
565
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
566
566
|
name: ["MaybeRefOrGetter"],
|
|
567
567
|
path: "vue",
|
|
568
568
|
isTypeOnly: true
|
|
569
569
|
}),
|
|
570
|
-
shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
570
|
+
shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
571
571
|
name: [client.name],
|
|
572
572
|
root: query.file.path,
|
|
573
573
|
path: client.file.path
|
|
574
574
|
}),
|
|
575
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
575
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
576
576
|
name: ["buildFormData"],
|
|
577
577
|
root: query.file.path,
|
|
578
578
|
path: node_path.default.resolve(root, ".kubb/config.ts")
|
|
579
579
|
}),
|
|
580
|
-
/* @__PURE__ */ (0,
|
|
580
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
581
581
|
name: [
|
|
582
582
|
type.schemas.request?.name,
|
|
583
583
|
type.schemas.response.name,
|
|
@@ -590,7 +590,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
590
590
|
path: type.file.path,
|
|
591
591
|
isTypeOnly: true
|
|
592
592
|
}),
|
|
593
|
-
/* @__PURE__ */ (0,
|
|
593
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.QueryKey, {
|
|
594
594
|
name: queryKey.name,
|
|
595
595
|
typeName: queryKey.typeName,
|
|
596
596
|
operation,
|
|
@@ -599,7 +599,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
599
599
|
typeSchemas: type.schemas,
|
|
600
600
|
transformer: options.queryKey
|
|
601
601
|
}),
|
|
602
|
-
!shouldUseClientPlugin && /* @__PURE__ */ (0,
|
|
602
|
+
!shouldUseClientPlugin && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_plugin_client.ClientLegacy, {
|
|
603
603
|
name: client.name,
|
|
604
604
|
baseURL: options.client.baseURL,
|
|
605
605
|
operation,
|
|
@@ -611,11 +611,11 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
611
611
|
pathParamsType: options.pathParamsType,
|
|
612
612
|
parser: options.parser
|
|
613
613
|
}),
|
|
614
|
-
/* @__PURE__ */ (0,
|
|
614
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
615
615
|
name: ["queryOptions"],
|
|
616
616
|
path: importPath
|
|
617
617
|
}),
|
|
618
|
-
/* @__PURE__ */ (0,
|
|
618
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.QueryOptions, {
|
|
619
619
|
name: queryOptions.name,
|
|
620
620
|
clientName: client.name,
|
|
621
621
|
queryKeyName: queryKey.name,
|
|
@@ -625,12 +625,12 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
625
625
|
pathParamsType: options.pathParamsType,
|
|
626
626
|
dataReturnType: options.client.dataReturnType || "data"
|
|
627
627
|
}),
|
|
628
|
-
options.query && /* @__PURE__ */ (0,
|
|
629
|
-
/* @__PURE__ */ (0,
|
|
628
|
+
options.query && /* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsxs)(_kubb_renderer_jsx_jsx_runtime.Fragment, { children: [
|
|
629
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
630
630
|
name: ["useQuery"],
|
|
631
631
|
path: importPath
|
|
632
632
|
}),
|
|
633
|
-
/* @__PURE__ */ (0,
|
|
633
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(_kubb_renderer_jsx.File.Import, {
|
|
634
634
|
name: [
|
|
635
635
|
"QueryKey",
|
|
636
636
|
"QueryClient",
|
|
@@ -640,7 +640,7 @@ const queryGenerator = (0, _kubb_plugin_oas_generators.createReactGenerator)({
|
|
|
640
640
|
path: importPath,
|
|
641
641
|
isTypeOnly: true
|
|
642
642
|
}),
|
|
643
|
-
/* @__PURE__ */ (0,
|
|
643
|
+
/* @__PURE__ */ (0, _kubb_renderer_jsx_jsx_runtime.jsx)(require_components.Query, {
|
|
644
644
|
name: query.name,
|
|
645
645
|
queryOptionsName: queryOptions.name,
|
|
646
646
|
typeSchemas: type.schemas,
|
|
@@ -677,4 +677,4 @@ Object.defineProperty(exports, "queryGenerator", {
|
|
|
677
677
|
}
|
|
678
678
|
});
|
|
679
679
|
|
|
680
|
-
//# sourceMappingURL=generators-
|
|
680
|
+
//# sourceMappingURL=generators-CAq2xhSX.cjs.map
|