@kubb/plugin-vue-query 3.16.2 → 3.16.4
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-ClNrCCre.cjs +873 -0
- package/dist/components-ClNrCCre.cjs.map +1 -0
- package/dist/components-D8lYnxao.js +803 -0
- package/dist/components-D8lYnxao.js.map +1 -0
- package/dist/components.cjs +9 -36
- package/dist/components.d.cts +266 -124
- package/dist/components.d.ts +266 -124
- package/dist/components.js +3 -3
- package/dist/generators-DIB6YtRr.js +556 -0
- package/dist/generators-DIB6YtRr.js.map +1 -0
- package/dist/generators-DIZQUvkg.cjs +573 -0
- package/dist/generators-DIZQUvkg.cjs.map +1 -0
- package/dist/generators.cjs +5 -20
- package/dist/generators.d.cts +12 -12
- package/dist/generators.d.ts +12 -12
- package/dist/generators.js +4 -4
- package/dist/index.cjs +118 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -8
- package/dist/index.d.ts +6 -8
- package/dist/index.js +118 -137
- package/dist/index.js.map +1 -1
- package/dist/types-DPDni0p-.d.ts +1385 -0
- package/dist/types-UcJcIqHK.d.cts +1385 -0
- package/package.json +23 -28
- package/dist/chunk-5RO5VZAJ.js +0 -444
- package/dist/chunk-5RO5VZAJ.js.map +0 -1
- package/dist/chunk-BBSHBY5N.cjs +0 -448
- package/dist/chunk-BBSHBY5N.cjs.map +0 -1
- package/dist/chunk-KHEXOVSW.js +0 -726
- package/dist/chunk-KHEXOVSW.js.map +0 -1
- package/dist/chunk-ZR7DRLPY.cjs +0 -734
- package/dist/chunk-ZR7DRLPY.cjs.map +0 -1
- package/dist/components.cjs.map +0 -1
- package/dist/components.js.map +0 -1
- package/dist/generators.cjs.map +0 -1
- package/dist/generators.js.map +0 -1
- package/dist/types-CDzVWC17.d.cts +0 -164
- package/dist/types-CDzVWC17.d.ts +0 -164
package/dist/chunk-BBSHBY5N.cjs
DELETED
|
@@ -1,448 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkZR7DRLPY_cjs = require('./chunk-ZR7DRLPY.cjs');
|
|
4
|
-
var pluginClient = require('@kubb/plugin-client');
|
|
5
|
-
var components = require('@kubb/plugin-client/components');
|
|
6
|
-
var pluginOas = require('@kubb/plugin-oas');
|
|
7
|
-
var hooks = require('@kubb/plugin-oas/hooks');
|
|
8
|
-
var utils = require('@kubb/plugin-oas/utils');
|
|
9
|
-
var pluginTs = require('@kubb/plugin-ts');
|
|
10
|
-
var pluginZod = require('@kubb/plugin-zod');
|
|
11
|
-
var react = require('@kubb/react');
|
|
12
|
-
var remeda = require('remeda');
|
|
13
|
-
var jsxRuntime = require('@kubb/react/jsx-runtime');
|
|
14
|
-
|
|
15
|
-
var queryGenerator = pluginOas.createReactGenerator({
|
|
16
|
-
name: "vue-query",
|
|
17
|
-
Operation({ options, operation }) {
|
|
18
|
-
const {
|
|
19
|
-
plugin: {
|
|
20
|
-
options: { output }
|
|
21
|
-
},
|
|
22
|
-
pluginManager
|
|
23
|
-
} = react.useApp();
|
|
24
|
-
const oas = hooks.useOas();
|
|
25
|
-
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
26
|
-
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
27
|
-
const isMutation = remeda.difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(
|
|
28
|
-
(method) => operation.method === method
|
|
29
|
-
);
|
|
30
|
-
const importPath = options.query ? options.query.importPath : "@tanstack/vue-query";
|
|
31
|
-
const query = {
|
|
32
|
-
name: getName(operation, { type: "function", prefix: "use" }),
|
|
33
|
-
typeName: getName(operation, { type: "type" }),
|
|
34
|
-
file: getFile(operation, { prefix: "use" })
|
|
35
|
-
};
|
|
36
|
-
const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClient.pluginClientName]);
|
|
37
|
-
const client = {
|
|
38
|
-
name: hasClientPlugin ? getName(operation, {
|
|
39
|
-
type: "function",
|
|
40
|
-
pluginKey: [pluginClient.pluginClientName]
|
|
41
|
-
}) : getName(operation, {
|
|
42
|
-
type: "function"
|
|
43
|
-
}),
|
|
44
|
-
file: getFile(operation, { pluginKey: [pluginClient.pluginClientName] })
|
|
45
|
-
};
|
|
46
|
-
const queryOptions = {
|
|
47
|
-
name: getName(operation, { type: "function", suffix: "QueryOptions" })
|
|
48
|
-
};
|
|
49
|
-
const queryKey = {
|
|
50
|
-
name: getName(operation, { type: "const", suffix: "QueryKey" }),
|
|
51
|
-
typeName: getName(operation, { type: "type", suffix: "QueryKey" })
|
|
52
|
-
};
|
|
53
|
-
const type = {
|
|
54
|
-
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
55
|
-
//todo remove type?
|
|
56
|
-
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
57
|
-
};
|
|
58
|
-
const zod = {
|
|
59
|
-
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
60
|
-
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
61
|
-
};
|
|
62
|
-
if (!isQuery || isMutation) {
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
66
|
-
react.File,
|
|
67
|
-
{
|
|
68
|
-
baseName: query.file.baseName,
|
|
69
|
-
path: query.file.path,
|
|
70
|
-
meta: query.file.meta,
|
|
71
|
-
banner: utils.getBanner({ oas, output, config: pluginManager.config }),
|
|
72
|
-
footer: utils.getFooter({ oas, output }),
|
|
73
|
-
children: [
|
|
74
|
-
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean), root: query.file.path, path: zod.file.path }),
|
|
75
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["toValue"], path: "vue" }),
|
|
76
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRefOrGetter"], path: "vue", isTypeOnly: true }),
|
|
77
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "fetch", path: options.client.importPath }),
|
|
78
|
-
!!hasClientPlugin && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [client.name], root: query.file.path, path: client.file.path }),
|
|
79
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
80
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
81
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
82
|
-
react.File.Import,
|
|
83
|
-
{
|
|
84
|
-
name: [
|
|
85
|
-
type.schemas.request?.name,
|
|
86
|
-
type.schemas.response.name,
|
|
87
|
-
type.schemas.pathParams?.name,
|
|
88
|
-
type.schemas.queryParams?.name,
|
|
89
|
-
type.schemas.headerParams?.name,
|
|
90
|
-
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
91
|
-
].filter(Boolean),
|
|
92
|
-
root: query.file.path,
|
|
93
|
-
path: type.file.path,
|
|
94
|
-
isTypeOnly: true
|
|
95
|
-
}
|
|
96
|
-
),
|
|
97
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
98
|
-
chunkZR7DRLPY_cjs.QueryKey,
|
|
99
|
-
{
|
|
100
|
-
name: queryKey.name,
|
|
101
|
-
typeName: queryKey.typeName,
|
|
102
|
-
operation,
|
|
103
|
-
paramsCasing: options.paramsCasing,
|
|
104
|
-
pathParamsType: options.pathParamsType,
|
|
105
|
-
typeSchemas: type.schemas,
|
|
106
|
-
transformer: options.queryKey
|
|
107
|
-
}
|
|
108
|
-
),
|
|
109
|
-
!hasClientPlugin && /* @__PURE__ */ jsxRuntime.jsx(
|
|
110
|
-
components.Client,
|
|
111
|
-
{
|
|
112
|
-
name: client.name,
|
|
113
|
-
baseURL: options.client.baseURL,
|
|
114
|
-
operation,
|
|
115
|
-
typeSchemas: type.schemas,
|
|
116
|
-
zodSchemas: zod.schemas,
|
|
117
|
-
dataReturnType: options.client.dataReturnType,
|
|
118
|
-
paramsCasing: options.paramsCasing,
|
|
119
|
-
paramsType: options.paramsType,
|
|
120
|
-
pathParamsType: options.pathParamsType,
|
|
121
|
-
parser: options.parser
|
|
122
|
-
}
|
|
123
|
-
),
|
|
124
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["queryOptions"], path: importPath }),
|
|
125
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
126
|
-
chunkZR7DRLPY_cjs.QueryOptions,
|
|
127
|
-
{
|
|
128
|
-
name: queryOptions.name,
|
|
129
|
-
clientName: client.name,
|
|
130
|
-
queryKeyName: queryKey.name,
|
|
131
|
-
paramsCasing: options.paramsCasing,
|
|
132
|
-
typeSchemas: type.schemas,
|
|
133
|
-
paramsType: options.paramsType,
|
|
134
|
-
pathParamsType: options.pathParamsType,
|
|
135
|
-
dataReturnType: options.client.dataReturnType
|
|
136
|
-
}
|
|
137
|
-
),
|
|
138
|
-
options.query && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
139
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useQuery"], path: importPath }),
|
|
140
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "QueryClient", "QueryObserverOptions", "UseQueryReturnType"], path: importPath, isTypeOnly: true }),
|
|
141
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
142
|
-
chunkZR7DRLPY_cjs.Query,
|
|
143
|
-
{
|
|
144
|
-
name: query.name,
|
|
145
|
-
queryOptionsName: queryOptions.name,
|
|
146
|
-
typeSchemas: type.schemas,
|
|
147
|
-
paramsCasing: options.paramsCasing,
|
|
148
|
-
paramsType: options.paramsType,
|
|
149
|
-
pathParamsType: options.pathParamsType,
|
|
150
|
-
operation,
|
|
151
|
-
dataReturnType: options.client.dataReturnType,
|
|
152
|
-
queryKeyName: queryKey.name,
|
|
153
|
-
queryKeyTypeName: queryKey.typeName
|
|
154
|
-
}
|
|
155
|
-
)
|
|
156
|
-
] })
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
});
|
|
162
|
-
var mutationGenerator = pluginOas.createReactGenerator({
|
|
163
|
-
name: "vue-query",
|
|
164
|
-
Operation({ options, operation }) {
|
|
165
|
-
const {
|
|
166
|
-
plugin: {
|
|
167
|
-
options: { output }
|
|
168
|
-
},
|
|
169
|
-
pluginManager
|
|
170
|
-
} = react.useApp();
|
|
171
|
-
const oas = hooks.useOas();
|
|
172
|
-
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
173
|
-
const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method);
|
|
174
|
-
const isMutation = !isQuery && remeda.difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method);
|
|
175
|
-
const importPath = options.mutation ? options.mutation.importPath : "@tanstack/vue-query";
|
|
176
|
-
const mutation = {
|
|
177
|
-
name: getName(operation, { type: "function", prefix: "use" }),
|
|
178
|
-
typeName: getName(operation, { type: "type" }),
|
|
179
|
-
file: getFile(operation, { prefix: "use" })
|
|
180
|
-
};
|
|
181
|
-
const type = {
|
|
182
|
-
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
183
|
-
//todo remove type?
|
|
184
|
-
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
185
|
-
};
|
|
186
|
-
const zod = {
|
|
187
|
-
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
188
|
-
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
189
|
-
};
|
|
190
|
-
const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClient.pluginClientName]);
|
|
191
|
-
const client = {
|
|
192
|
-
name: hasClientPlugin ? getName(operation, {
|
|
193
|
-
type: "function",
|
|
194
|
-
pluginKey: [pluginClient.pluginClientName]
|
|
195
|
-
}) : getName(operation, {
|
|
196
|
-
type: "function"
|
|
197
|
-
}),
|
|
198
|
-
file: getFile(operation, { pluginKey: [pluginClient.pluginClientName] })
|
|
199
|
-
};
|
|
200
|
-
const mutationKey = {
|
|
201
|
-
name: getName(operation, { type: "const", suffix: "MutationKey" }),
|
|
202
|
-
typeName: getName(operation, { type: "type", suffix: "MutationKey" })
|
|
203
|
-
};
|
|
204
|
-
if (!isMutation) {
|
|
205
|
-
return null;
|
|
206
|
-
}
|
|
207
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
208
|
-
react.File,
|
|
209
|
-
{
|
|
210
|
-
baseName: mutation.file.baseName,
|
|
211
|
-
path: mutation.file.path,
|
|
212
|
-
meta: mutation.file.meta,
|
|
213
|
-
banner: utils.getBanner({ oas, output, config: pluginManager.config }),
|
|
214
|
-
footer: utils.getFooter({ oas, output }),
|
|
215
|
-
children: [
|
|
216
|
-
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean), root: mutation.file.path, path: zod.file.path }),
|
|
217
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRefOrGetter"], path: "vue", isTypeOnly: true }),
|
|
218
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "fetch", path: options.client.importPath }),
|
|
219
|
-
!!hasClientPlugin && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [client.name], root: mutation.file.path, path: client.file.path }),
|
|
220
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
221
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
222
|
-
react.File.Import,
|
|
223
|
-
{
|
|
224
|
-
name: [
|
|
225
|
-
type.schemas.request?.name,
|
|
226
|
-
type.schemas.response.name,
|
|
227
|
-
type.schemas.pathParams?.name,
|
|
228
|
-
type.schemas.queryParams?.name,
|
|
229
|
-
type.schemas.headerParams?.name,
|
|
230
|
-
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
231
|
-
].filter(Boolean),
|
|
232
|
-
root: mutation.file.path,
|
|
233
|
-
path: type.file.path,
|
|
234
|
-
isTypeOnly: true
|
|
235
|
-
}
|
|
236
|
-
),
|
|
237
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
238
|
-
chunkZR7DRLPY_cjs.MutationKey,
|
|
239
|
-
{
|
|
240
|
-
name: mutationKey.name,
|
|
241
|
-
typeName: mutationKey.typeName,
|
|
242
|
-
operation,
|
|
243
|
-
pathParamsType: options.pathParamsType,
|
|
244
|
-
paramsCasing: options.paramsCasing,
|
|
245
|
-
typeSchemas: type.schemas,
|
|
246
|
-
transformer: options.mutationKey
|
|
247
|
-
}
|
|
248
|
-
),
|
|
249
|
-
!hasClientPlugin && /* @__PURE__ */ jsxRuntime.jsx(
|
|
250
|
-
components.Client,
|
|
251
|
-
{
|
|
252
|
-
name: client.name,
|
|
253
|
-
baseURL: options.client.baseURL,
|
|
254
|
-
operation,
|
|
255
|
-
typeSchemas: type.schemas,
|
|
256
|
-
zodSchemas: zod.schemas,
|
|
257
|
-
dataReturnType: options.client.dataReturnType,
|
|
258
|
-
paramsCasing: options.paramsCasing,
|
|
259
|
-
paramsType: options.paramsType,
|
|
260
|
-
pathParamsType: options.pathParamsType,
|
|
261
|
-
parser: options.parser
|
|
262
|
-
}
|
|
263
|
-
),
|
|
264
|
-
options.mutation && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
265
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useMutation"], path: importPath }),
|
|
266
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MutationObserverOptions", "QueryClient"], path: importPath, isTypeOnly: true }),
|
|
267
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
268
|
-
chunkZR7DRLPY_cjs.Mutation,
|
|
269
|
-
{
|
|
270
|
-
name: mutation.name,
|
|
271
|
-
clientName: client.name,
|
|
272
|
-
typeName: mutation.typeName,
|
|
273
|
-
typeSchemas: type.schemas,
|
|
274
|
-
operation,
|
|
275
|
-
paramsCasing: options.paramsCasing,
|
|
276
|
-
dataReturnType: options.client.dataReturnType,
|
|
277
|
-
paramsType: options.paramsType,
|
|
278
|
-
pathParamsType: options.pathParamsType,
|
|
279
|
-
mutationKeyName: mutationKey.name
|
|
280
|
-
}
|
|
281
|
-
)
|
|
282
|
-
] })
|
|
283
|
-
]
|
|
284
|
-
}
|
|
285
|
-
);
|
|
286
|
-
}
|
|
287
|
-
});
|
|
288
|
-
var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
289
|
-
name: "vue-infinite-query",
|
|
290
|
-
Operation({ options, operation }) {
|
|
291
|
-
const {
|
|
292
|
-
plugin: {
|
|
293
|
-
options: { output }
|
|
294
|
-
},
|
|
295
|
-
pluginManager
|
|
296
|
-
} = react.useApp();
|
|
297
|
-
const oas = hooks.useOas();
|
|
298
|
-
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
299
|
-
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
300
|
-
const isMutation = remeda.difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(
|
|
301
|
-
(method) => operation.method === method
|
|
302
|
-
);
|
|
303
|
-
const isInfinite = isQuery && !!options.infinite;
|
|
304
|
-
const importPath = options.query ? options.query.importPath : "@tanstack/vue-query";
|
|
305
|
-
const query = {
|
|
306
|
-
name: getName(operation, { type: "function", prefix: "use", suffix: "infinite" }),
|
|
307
|
-
typeName: getName(operation, { type: "type" }),
|
|
308
|
-
file: getFile(operation, { prefix: "use", suffix: "infinite" })
|
|
309
|
-
};
|
|
310
|
-
const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClient.pluginClientName]);
|
|
311
|
-
const client = {
|
|
312
|
-
name: hasClientPlugin ? getName(operation, {
|
|
313
|
-
type: "function",
|
|
314
|
-
pluginKey: [pluginClient.pluginClientName]
|
|
315
|
-
}) : getName(operation, {
|
|
316
|
-
type: "function",
|
|
317
|
-
suffix: "infinite"
|
|
318
|
-
}),
|
|
319
|
-
file: getFile(operation, { pluginKey: [pluginClient.pluginClientName] })
|
|
320
|
-
};
|
|
321
|
-
const queryOptions = {
|
|
322
|
-
name: getName(operation, { type: "function", suffix: "InfiniteQueryOptions" })
|
|
323
|
-
};
|
|
324
|
-
const queryKey = {
|
|
325
|
-
name: getName(operation, { type: "const", suffix: "InfiniteQueryKey" }),
|
|
326
|
-
typeName: getName(operation, { type: "type", suffix: "InfiniteQueryKey" })
|
|
327
|
-
};
|
|
328
|
-
const type = {
|
|
329
|
-
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
330
|
-
//todo remove type?
|
|
331
|
-
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
332
|
-
};
|
|
333
|
-
const zod = {
|
|
334
|
-
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
335
|
-
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
336
|
-
};
|
|
337
|
-
if (!isQuery || isMutation || !isInfinite) {
|
|
338
|
-
return null;
|
|
339
|
-
}
|
|
340
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
341
|
-
react.File,
|
|
342
|
-
{
|
|
343
|
-
baseName: query.file.baseName,
|
|
344
|
-
path: query.file.path,
|
|
345
|
-
meta: query.file.meta,
|
|
346
|
-
banner: utils.getBanner({ oas, output, config: pluginManager.config }),
|
|
347
|
-
footer: utils.getFooter({ oas, output }),
|
|
348
|
-
children: [
|
|
349
|
-
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean), root: query.file.path, path: zod.file.path }),
|
|
350
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["toValue"], path: "vue" }),
|
|
351
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRefOrGetter"], path: "vue", isTypeOnly: true }),
|
|
352
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "fetch", path: options.client.importPath }),
|
|
353
|
-
hasClientPlugin && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [client.name], root: query.file.path, path: client.file.path }),
|
|
354
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
355
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
356
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
357
|
-
react.File.Import,
|
|
358
|
-
{
|
|
359
|
-
name: [
|
|
360
|
-
type.schemas.request?.name,
|
|
361
|
-
type.schemas.response.name,
|
|
362
|
-
type.schemas.pathParams?.name,
|
|
363
|
-
type.schemas.queryParams?.name,
|
|
364
|
-
type.schemas.headerParams?.name,
|
|
365
|
-
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
366
|
-
].filter(Boolean),
|
|
367
|
-
root: query.file.path,
|
|
368
|
-
path: type.file.path,
|
|
369
|
-
isTypeOnly: true
|
|
370
|
-
}
|
|
371
|
-
),
|
|
372
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
373
|
-
chunkZR7DRLPY_cjs.QueryKey,
|
|
374
|
-
{
|
|
375
|
-
name: queryKey.name,
|
|
376
|
-
typeName: queryKey.typeName,
|
|
377
|
-
operation,
|
|
378
|
-
paramsCasing: options.paramsCasing,
|
|
379
|
-
pathParamsType: options.pathParamsType,
|
|
380
|
-
typeSchemas: type.schemas,
|
|
381
|
-
transformer: options.queryKey
|
|
382
|
-
}
|
|
383
|
-
),
|
|
384
|
-
!hasClientPlugin && /* @__PURE__ */ jsxRuntime.jsx(
|
|
385
|
-
components.Client,
|
|
386
|
-
{
|
|
387
|
-
name: client.name,
|
|
388
|
-
baseURL: options.client.baseURL,
|
|
389
|
-
operation,
|
|
390
|
-
typeSchemas: type.schemas,
|
|
391
|
-
zodSchemas: zod.schemas,
|
|
392
|
-
dataReturnType: options.client.dataReturnType,
|
|
393
|
-
paramsCasing: options.paramsCasing,
|
|
394
|
-
paramsType: options.paramsType,
|
|
395
|
-
pathParamsType: options.pathParamsType,
|
|
396
|
-
parser: options.parser
|
|
397
|
-
}
|
|
398
|
-
),
|
|
399
|
-
options.infinite && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
400
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["InfiniteData"], isTypeOnly: true, path: importPath }),
|
|
401
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["infiniteQueryOptions"], path: importPath }),
|
|
402
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
403
|
-
chunkZR7DRLPY_cjs.InfiniteQueryOptions,
|
|
404
|
-
{
|
|
405
|
-
name: queryOptions.name,
|
|
406
|
-
clientName: client.name,
|
|
407
|
-
queryKeyName: queryKey.name,
|
|
408
|
-
typeSchemas: type.schemas,
|
|
409
|
-
paramsType: options.paramsType,
|
|
410
|
-
paramsCasing: options.paramsCasing,
|
|
411
|
-
pathParamsType: options.pathParamsType,
|
|
412
|
-
dataReturnType: options.client.dataReturnType,
|
|
413
|
-
cursorParam: options.infinite.cursorParam,
|
|
414
|
-
initialPageParam: options.infinite.initialPageParam,
|
|
415
|
-
queryParam: options.infinite.queryParam
|
|
416
|
-
}
|
|
417
|
-
)
|
|
418
|
-
] }),
|
|
419
|
-
options.infinite && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
420
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useInfiniteQuery"], path: importPath }),
|
|
421
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "QueryClient", "InfiniteQueryObserverOptions", "UseInfiniteQueryReturnType"], path: importPath, isTypeOnly: true }),
|
|
422
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
423
|
-
chunkZR7DRLPY_cjs.InfiniteQuery,
|
|
424
|
-
{
|
|
425
|
-
name: query.name,
|
|
426
|
-
queryOptionsName: queryOptions.name,
|
|
427
|
-
typeSchemas: type.schemas,
|
|
428
|
-
paramsCasing: options.paramsCasing,
|
|
429
|
-
paramsType: options.paramsType,
|
|
430
|
-
pathParamsType: options.pathParamsType,
|
|
431
|
-
operation,
|
|
432
|
-
dataReturnType: options.client.dataReturnType,
|
|
433
|
-
queryKeyName: queryKey.name,
|
|
434
|
-
queryKeyTypeName: queryKey.typeName
|
|
435
|
-
}
|
|
436
|
-
)
|
|
437
|
-
] })
|
|
438
|
-
]
|
|
439
|
-
}
|
|
440
|
-
);
|
|
441
|
-
}
|
|
442
|
-
});
|
|
443
|
-
|
|
444
|
-
exports.infiniteQueryGenerator = infiniteQueryGenerator;
|
|
445
|
-
exports.mutationGenerator = mutationGenerator;
|
|
446
|
-
exports.queryGenerator = queryGenerator;
|
|
447
|
-
//# sourceMappingURL=chunk-BBSHBY5N.cjs.map
|
|
448
|
-
//# sourceMappingURL=chunk-BBSHBY5N.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx"],"names":["createReactGenerator","useApp","useOas","useOperationManager","difference","pluginClientName","pluginTsName","pluginZodName","jsxs","File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,UAAA,EAAY,QAAQ,QAAS,CAAA;AAAA;AAAA;AAC/B,WACF,EAAA,CAAA;AAAA,UAED,OAAQ,CAAA,QAAA,oBACPZ,eAAAA,CAAAQ,qBAAA,EACE,QAAA,EAAA;AAAA,4BAAAJ,cAAAA,CAACH,WAAK,MAAL,EAAA,EAAY,MAAM,CAAC,kBAAkB,CAAG,EAAA,IAAA,EAAM,UAAY,EAAA,CAAA;AAAA,4BAC3DG,cAAAA,CAACH,UAAK,CAAA,MAAA,EAAL,EAAY,IAAM,EAAA,CAAC,UAAY,EAAA,aAAA,EAAe,gCAAgC,4BAA4B,CAAA,EAAG,IAAM,EAAA,UAAA,EAAY,YAAU,IAAC,EAAA,CAAA;AAAA,4BAC3IG,cAAAA;AAAA,cAACS,+BAAA;AAAA,cAAA;AAAA,gBACC,MAAM,KAAM,CAAA,IAAA;AAAA,gBACZ,kBAAkB,YAAa,CAAA,IAAA;AAAA,gBAC/B,aAAa,IAAK,CAAA,OAAA;AAAA,gBAClB,cAAc,OAAQ,CAAA,YAAA;AAAA,gBACtB,YAAY,OAAQ,CAAA,UAAA;AAAA,gBACpB,gBAAgB,OAAQ,CAAA,cAAA;AAAA,gBACxB,SAAA;AAAA,gBACA,cAAA,EAAgB,QAAQ,MAAO,CAAA,cAAA;AAAA,gBAC/B,cAAc,QAAS,CAAA,IAAA;AAAA,gBACvB,kBAAkB,QAAS,CAAA;AAAA;AAAA;AAC7B,WACF,EAAA;AAAA;AAAA;AAAA,KAEJ;AAAA;AAGN,CAAC","file":"chunk-BBSHBY5N.cjs","sourcesContent":["import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n pluginManager,\n } = useApp<PluginVueQuery>()\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const importPath = options.query ? options.query.importPath : '@tanstack/vue-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 const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'QueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'QueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'QueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || isMutation) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, 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 <File.Import name={['toValue']} path=\"vue\" />\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n <File.Import name={'fetch'} path={options.client.importPath} />\n {!!hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <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 {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n paramsCasing={options.paramsCasing}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'QueryObserverOptions', 'UseQueryReturnType']} 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}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n pluginManager,\n } = useApp<PluginVueQuery>()\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/vue-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 const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation) {\n return null\n }\n\n return (\n <File\n baseName={mutation.file.baseName}\n path={mutation.file.path}\n meta={mutation.file.meta}\n banner={getBanner({ oas, output, 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 <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n <File.Import name={'fetch'} path={options.client.importPath} />\n {!!hasClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n typeSchemas={type.schemas}\n transformer={options.mutationKey}\n />\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['MutationObserverOptions', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n paramsCasing={options.paramsCasing}\n dataReturnType={options.client.dataReturnType}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-infinite-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n pluginManager,\n } = useApp<PluginVueQuery>()\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const isInfinite = isQuery && !!options.infinite\n const importPath = options.query ? options.query.importPath : '@tanstack/vue-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 const client = {\n name: hasClientPlugin\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 || !isInfinite) {\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 <File.Import name={['toValue']} path=\"vue\" />\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n <File.Import name={'fetch'} path={options.client.importPath} />\n {hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <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 {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.infinite && (\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 paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n cursorParam={options.infinite.cursorParam}\n initialPageParam={options.infinite.initialPageParam}\n queryParam={options.infinite.queryParam}\n />\n </>\n )}\n {options.infinite && (\n <>\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryReturnType']} 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}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"]}
|