@kubb/plugin-solid-query 3.18.3 → 4.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/{components-CCkbce4B.cjs → components-CrpQqUQQ.cjs} +194 -14
  2. package/dist/components-CrpQqUQQ.cjs.map +1 -0
  3. package/dist/{components-DteoGXDw.js → components-JN6XAKh3.js} +172 -10
  4. package/dist/components-JN6XAKh3.js.map +1 -0
  5. package/dist/components.cjs +3 -1
  6. package/dist/components.d.cts +58 -2
  7. package/dist/components.d.ts +58 -2
  8. package/dist/components.js +2 -2
  9. package/dist/generators-CUcA3_rk.cjs +365 -0
  10. package/dist/generators-CUcA3_rk.cjs.map +1 -0
  11. package/dist/{generators-D4zsCZ8Y.js → generators-DRX-ix2A.js} +155 -5
  12. package/dist/generators-DRX-ix2A.js.map +1 -0
  13. package/dist/generators.cjs +3 -2
  14. package/dist/generators.d.cts +5 -2
  15. package/dist/generators.d.ts +5 -2
  16. package/dist/generators.js +3 -3
  17. package/dist/index.cjs +29 -14
  18. package/dist/index.cjs.map +1 -1
  19. package/dist/index.d.cts +1 -1
  20. package/dist/index.d.ts +1 -1
  21. package/dist/index.js +17 -8
  22. package/dist/index.js.map +1 -1
  23. package/dist/{types-BcAT9UxT.d.cts → types-BI1GJc6y.d.cts} +27 -1
  24. package/dist/{types-B5mFPIGb.d.ts → types-fv5KLGsJ.d.ts} +27 -1
  25. package/package.json +11 -12
  26. package/src/components/Mutation.tsx +177 -0
  27. package/src/components/MutationKey.tsx +54 -0
  28. package/src/components/Query.tsx +1 -1
  29. package/src/components/index.ts +2 -0
  30. package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +2 -2
  31. package/src/generators/__snapshots__/clientGetImportPath.ts +2 -2
  32. package/src/generators/__snapshots__/findByTags.ts +2 -2
  33. package/src/generators/__snapshots__/findByTagsObject.ts +2 -2
  34. package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +2 -2
  35. package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +2 -2
  36. package/src/generators/__snapshots__/findByTagsWithZod.ts +2 -2
  37. package/src/generators/__snapshots__/postAsQuery.ts +2 -2
  38. package/src/generators/index.ts +1 -0
  39. package/src/generators/mutationGenerator.tsx +144 -0
  40. package/src/generators/queryGenerator.tsx +1 -1
  41. package/src/plugin.ts +14 -9
  42. package/src/types.ts +28 -0
  43. package/dist/components-CCkbce4B.cjs.map +0 -1
  44. package/dist/components-DteoGXDw.js.map +0 -1
  45. package/dist/generators-D4zsCZ8Y.js.map +0 -1
  46. package/dist/generators-yp4-76zC.cjs +0 -199
  47. package/dist/generators-yp4-76zC.cjs.map +0 -1
@@ -1,4 +1,4 @@
1
- import { Operation, OperationSchemas, PluginSolidQuery, Transformer } from "./types-BcAT9UxT.cjs";
1
+ import { Operation, OperationSchemas, PluginSolidQuery, Transformer } from "./types-BI1GJc6y.cjs";
2
2
  import { ReactNode } from "react";
3
3
 
4
4
  //#region ../react/src/utils/getFunctionParams.d.ts
@@ -45,6 +45,62 @@ declare class FunctionParams {
45
45
  toConstructor(): string;
46
46
  }
47
47
  //#endregion
48
+ //#region src/components/Mutation.d.ts
49
+ type Props$4 = {
50
+ /**
51
+ * Name of the function
52
+ */
53
+ name: string;
54
+ typeName: string;
55
+ clientName: string;
56
+ mutationKeyName: string;
57
+ typeSchemas: OperationSchemas;
58
+ operation: Operation;
59
+ dataReturnType: PluginSolidQuery['resolvedOptions']['client']['dataReturnType'];
60
+ paramsCasing: PluginSolidQuery['resolvedOptions']['paramsCasing'];
61
+ paramsType: PluginSolidQuery['resolvedOptions']['paramsType'];
62
+ pathParamsType: PluginSolidQuery['resolvedOptions']['pathParamsType'];
63
+ };
64
+ declare function Mutation({
65
+ name,
66
+ clientName,
67
+ paramsCasing,
68
+ paramsType,
69
+ pathParamsType,
70
+ dataReturnType,
71
+ typeSchemas,
72
+ operation,
73
+ mutationKeyName
74
+ }: Props$4): ReactNode;
75
+ //#endregion
76
+ //#region src/components/MutationKey.d.ts
77
+ type Props$3 = {
78
+ name: string;
79
+ typeName: string;
80
+ typeSchemas: OperationSchemas;
81
+ operation: Operation;
82
+ paramsCasing: PluginSolidQuery['resolvedOptions']['paramsCasing'];
83
+ pathParamsType: PluginSolidQuery['resolvedOptions']['pathParamsType'];
84
+ transformer: Transformer | undefined;
85
+ };
86
+ type GetParamsProps$3 = {
87
+ pathParamsType: PluginSolidQuery['resolvedOptions']['pathParamsType'];
88
+ typeSchemas: OperationSchemas;
89
+ };
90
+ declare function MutationKey({
91
+ name,
92
+ typeSchemas,
93
+ pathParamsType,
94
+ paramsCasing,
95
+ operation,
96
+ typeName,
97
+ transformer
98
+ }: Props$3): ReactNode;
99
+ declare namespace MutationKey {
100
+ var getParams: ({}: GetParamsProps$3) => FunctionParams;
101
+ var getTransformer: Transformer;
102
+ }
103
+ //#endregion
48
104
  //#region src/components/Query.d.ts
49
105
  type Props$2 = {
50
106
  /**
@@ -159,5 +215,5 @@ declare namespace QueryOptions {
159
215
  }: GetParamsProps) => FunctionParams;
160
216
  }
161
217
  //#endregion
162
- export { Query, QueryKey, QueryOptions };
218
+ export { Mutation, MutationKey, Query, QueryKey, QueryOptions };
163
219
  //# sourceMappingURL=components.d.cts.map
@@ -1,4 +1,4 @@
1
- import { Operation, OperationSchemas, PluginSolidQuery, Transformer } from "./types-B5mFPIGb.js";
1
+ import { Operation, OperationSchemas, PluginSolidQuery, Transformer } from "./types-fv5KLGsJ.js";
2
2
  import { ReactNode } from "react";
3
3
 
4
4
  //#region ../react/src/utils/getFunctionParams.d.ts
@@ -45,6 +45,62 @@ declare class FunctionParams {
45
45
  toConstructor(): string;
46
46
  }
47
47
  //#endregion
48
+ //#region src/components/Mutation.d.ts
49
+ type Props$4 = {
50
+ /**
51
+ * Name of the function
52
+ */
53
+ name: string;
54
+ typeName: string;
55
+ clientName: string;
56
+ mutationKeyName: string;
57
+ typeSchemas: OperationSchemas;
58
+ operation: Operation;
59
+ dataReturnType: PluginSolidQuery['resolvedOptions']['client']['dataReturnType'];
60
+ paramsCasing: PluginSolidQuery['resolvedOptions']['paramsCasing'];
61
+ paramsType: PluginSolidQuery['resolvedOptions']['paramsType'];
62
+ pathParamsType: PluginSolidQuery['resolvedOptions']['pathParamsType'];
63
+ };
64
+ declare function Mutation({
65
+ name,
66
+ clientName,
67
+ paramsCasing,
68
+ paramsType,
69
+ pathParamsType,
70
+ dataReturnType,
71
+ typeSchemas,
72
+ operation,
73
+ mutationKeyName
74
+ }: Props$4): ReactNode;
75
+ //#endregion
76
+ //#region src/components/MutationKey.d.ts
77
+ type Props$3 = {
78
+ name: string;
79
+ typeName: string;
80
+ typeSchemas: OperationSchemas;
81
+ operation: Operation;
82
+ paramsCasing: PluginSolidQuery['resolvedOptions']['paramsCasing'];
83
+ pathParamsType: PluginSolidQuery['resolvedOptions']['pathParamsType'];
84
+ transformer: Transformer | undefined;
85
+ };
86
+ type GetParamsProps$3 = {
87
+ pathParamsType: PluginSolidQuery['resolvedOptions']['pathParamsType'];
88
+ typeSchemas: OperationSchemas;
89
+ };
90
+ declare function MutationKey({
91
+ name,
92
+ typeSchemas,
93
+ pathParamsType,
94
+ paramsCasing,
95
+ operation,
96
+ typeName,
97
+ transformer
98
+ }: Props$3): ReactNode;
99
+ declare namespace MutationKey {
100
+ var getParams: ({}: GetParamsProps$3) => FunctionParams;
101
+ var getTransformer: Transformer;
102
+ }
103
+ //#endregion
48
104
  //#region src/components/Query.d.ts
49
105
  type Props$2 = {
50
106
  /**
@@ -159,5 +215,5 @@ declare namespace QueryOptions {
159
215
  }: GetParamsProps) => FunctionParams;
160
216
  }
161
217
  //#endregion
162
- export { Query, QueryKey, QueryOptions };
218
+ export { Mutation, MutationKey, Query, QueryKey, QueryOptions };
163
219
  //# sourceMappingURL=components.d.ts.map
@@ -1,3 +1,3 @@
1
- import { Query, QueryKey, QueryOptions } from "./components-DteoGXDw.js";
1
+ import { Mutation, MutationKey, Query, QueryKey, QueryOptions } from "./components-JN6XAKh3.js";
2
2
 
3
- export { Query, QueryKey, QueryOptions };
3
+ export { Mutation, MutationKey, Query, QueryKey, QueryOptions };
@@ -0,0 +1,365 @@
1
+ const require_components = require('./components-CrpQqUQQ.cjs');
2
+ let __kubb_plugin_oas = require("@kubb/plugin-oas");
3
+ __kubb_plugin_oas = require_components.__toESM(__kubb_plugin_oas);
4
+ let __kubb_plugin_ts = require("@kubb/plugin-ts");
5
+ __kubb_plugin_ts = require_components.__toESM(__kubb_plugin_ts);
6
+ let __kubb_plugin_zod = require("@kubb/plugin-zod");
7
+ __kubb_plugin_zod = require_components.__toESM(__kubb_plugin_zod);
8
+ let __kubb_plugin_client_components = require("@kubb/plugin-client/components");
9
+ __kubb_plugin_client_components = require_components.__toESM(__kubb_plugin_client_components);
10
+ let __kubb_plugin_oas_utils = require("@kubb/plugin-oas/utils");
11
+ __kubb_plugin_oas_utils = require_components.__toESM(__kubb_plugin_oas_utils);
12
+ let __kubb_react = require("@kubb/react");
13
+ __kubb_react = require_components.__toESM(__kubb_react);
14
+ let __kubb_react_jsx_runtime = require("@kubb/react/jsx-runtime");
15
+ __kubb_react_jsx_runtime = require_components.__toESM(__kubb_react_jsx_runtime);
16
+ let __kubb_plugin_client = require("@kubb/plugin-client");
17
+ __kubb_plugin_client = require_components.__toESM(__kubb_plugin_client);
18
+ let __kubb_plugin_oas_hooks = require("@kubb/plugin-oas/hooks");
19
+ __kubb_plugin_oas_hooks = require_components.__toESM(__kubb_plugin_oas_hooks);
20
+ let remeda = require("remeda");
21
+ remeda = require_components.__toESM(remeda);
22
+
23
+ //#region src/generators/mutationGenerator.tsx
24
+ const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
25
+ name: "solid-query",
26
+ Operation({ options, operation }) {
27
+ const { plugin: { options: { output } }, pluginManager } = (0, __kubb_react.useApp)();
28
+ const oas = (0, __kubb_plugin_oas_hooks.useOas)();
29
+ const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
30
+ const isMutation = !(!!options.query && options.query?.methods.some((method) => operation.method === method)) && (0, remeda.difference)(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method);
31
+ const importPath = options.mutation ? options.mutation.importPath : "@tanstack/solid-query";
32
+ const mutation = {
33
+ name: getName(operation, {
34
+ type: "function",
35
+ prefix: "use"
36
+ }),
37
+ typeName: getName(operation, { type: "type" }),
38
+ file: getFile(operation, { prefix: "use" })
39
+ };
40
+ const type = {
41
+ file: getFile(operation, { pluginKey: [__kubb_plugin_ts.pluginTsName] }),
42
+ schemas: getSchemas(operation, {
43
+ pluginKey: [__kubb_plugin_ts.pluginTsName],
44
+ type: "type"
45
+ })
46
+ };
47
+ const zod = {
48
+ file: getFile(operation, { pluginKey: [__kubb_plugin_zod.pluginZodName] }),
49
+ schemas: getSchemas(operation, {
50
+ pluginKey: [__kubb_plugin_zod.pluginZodName],
51
+ type: "function"
52
+ })
53
+ };
54
+ const hasClientPlugin = !!pluginManager.getPluginByKey([__kubb_plugin_client.pluginClientName]);
55
+ const client = {
56
+ name: hasClientPlugin ? getName(operation, {
57
+ type: "function",
58
+ pluginKey: [__kubb_plugin_client.pluginClientName]
59
+ }) : getName(operation, { type: "function" }),
60
+ file: getFile(operation, { pluginKey: [__kubb_plugin_client.pluginClientName] })
61
+ };
62
+ const mutationKey = {
63
+ name: getName(operation, {
64
+ type: "const",
65
+ suffix: "MutationKey"
66
+ }),
67
+ typeName: getName(operation, {
68
+ type: "type",
69
+ suffix: "MutationKey"
70
+ })
71
+ };
72
+ if (!isMutation) return null;
73
+ return /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsxs)(__kubb_react.File, {
74
+ baseName: mutation.file.baseName,
75
+ path: mutation.file.path,
76
+ meta: mutation.file.meta,
77
+ banner: (0, __kubb_plugin_oas_utils.getBanner)({
78
+ oas,
79
+ output,
80
+ config: pluginManager.config
81
+ }),
82
+ footer: (0, __kubb_plugin_oas_utils.getFooter)({
83
+ oas,
84
+ output
85
+ }),
86
+ children: [
87
+ options.parser === "zod" && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
88
+ name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean),
89
+ root: mutation.file.path,
90
+ path: zod.file.path
91
+ }),
92
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
93
+ name: "fetch",
94
+ path: options.client.importPath
95
+ }),
96
+ !!hasClientPlugin && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
97
+ name: [client.name],
98
+ root: mutation.file.path,
99
+ path: client.file.path
100
+ }),
101
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
102
+ name: [
103
+ "RequestConfig",
104
+ "ResponseConfig",
105
+ "ResponseErrorConfig"
106
+ ],
107
+ path: options.client.importPath,
108
+ isTypeOnly: true
109
+ }),
110
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
111
+ name: [
112
+ type.schemas.request?.name,
113
+ type.schemas.response.name,
114
+ type.schemas.pathParams?.name,
115
+ type.schemas.queryParams?.name,
116
+ type.schemas.headerParams?.name,
117
+ ...type.schemas.statusCodes?.map((item) => item.name) || []
118
+ ].filter(Boolean),
119
+ root: mutation.file.path,
120
+ path: type.file.path,
121
+ isTypeOnly: true
122
+ }),
123
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(require_components.MutationKey, {
124
+ name: mutationKey.name,
125
+ typeName: mutationKey.typeName,
126
+ operation,
127
+ pathParamsType: options.pathParamsType,
128
+ typeSchemas: type.schemas,
129
+ paramsCasing: options.paramsCasing,
130
+ transformer: options.mutationKey
131
+ }),
132
+ !hasClientPlugin && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_plugin_client_components.Client, {
133
+ name: client.name,
134
+ baseURL: options.client.baseURL,
135
+ operation,
136
+ typeSchemas: type.schemas,
137
+ zodSchemas: zod.schemas,
138
+ dataReturnType: options.client.dataReturnType,
139
+ paramsCasing: options.paramsCasing,
140
+ paramsType: options.paramsType,
141
+ pathParamsType: options.pathParamsType,
142
+ parser: options.parser
143
+ }),
144
+ options.mutation && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsxs)(__kubb_react_jsx_runtime.Fragment, { children: [
145
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
146
+ name: ["useMutation"],
147
+ path: importPath
148
+ }),
149
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
150
+ name: ["UseMutationOptions", "QueryClient"],
151
+ path: importPath,
152
+ isTypeOnly: true
153
+ }),
154
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(require_components.Mutation, {
155
+ name: mutation.name,
156
+ clientName: client.name,
157
+ typeName: mutation.typeName,
158
+ typeSchemas: type.schemas,
159
+ operation,
160
+ dataReturnType: options.client.dataReturnType,
161
+ paramsCasing: options.paramsCasing,
162
+ paramsType: options.paramsType,
163
+ pathParamsType: options.pathParamsType,
164
+ mutationKeyName: mutationKey.name
165
+ })
166
+ ] })
167
+ ]
168
+ });
169
+ }
170
+ });
171
+
172
+ //#endregion
173
+ //#region src/generators/queryGenerator.tsx
174
+ const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
175
+ name: "svelte-query",
176
+ Operation({ options, operation }) {
177
+ const { plugin: { options: { output } }, pluginManager } = (0, __kubb_react.useApp)();
178
+ const oas = (0, __kubb_plugin_oas_hooks.useOas)();
179
+ const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
180
+ const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
181
+ const isMutation = (0, remeda.difference)([
182
+ "post",
183
+ "put",
184
+ "delete",
185
+ "patch"
186
+ ], options.query ? options.query.methods : []).some((method) => operation.method === method);
187
+ const importPath = options.query ? options.query.importPath : "@tanstack/solid-query";
188
+ const query = {
189
+ name: getName(operation, {
190
+ type: "function",
191
+ prefix: "create"
192
+ }),
193
+ typeName: getName(operation, { type: "type" }),
194
+ file: getFile(operation, { prefix: "create" })
195
+ };
196
+ const hasClientPlugin = !!pluginManager.getPluginByKey([__kubb_plugin_client.pluginClientName]);
197
+ const client = {
198
+ name: hasClientPlugin ? getName(operation, {
199
+ type: "function",
200
+ pluginKey: [__kubb_plugin_client.pluginClientName]
201
+ }) : getName(operation, { type: "function" }),
202
+ file: getFile(operation, { pluginKey: [__kubb_plugin_client.pluginClientName] })
203
+ };
204
+ const queryOptions = { name: getName(operation, {
205
+ type: "function",
206
+ suffix: "QueryOptions"
207
+ }) };
208
+ const queryKey = {
209
+ name: getName(operation, {
210
+ type: "const",
211
+ suffix: "QueryKey"
212
+ }),
213
+ typeName: getName(operation, {
214
+ type: "type",
215
+ suffix: "QueryKey"
216
+ })
217
+ };
218
+ const type = {
219
+ file: getFile(operation, { pluginKey: [__kubb_plugin_ts.pluginTsName] }),
220
+ schemas: getSchemas(operation, {
221
+ pluginKey: [__kubb_plugin_ts.pluginTsName],
222
+ type: "type"
223
+ })
224
+ };
225
+ const zod = {
226
+ file: getFile(operation, { pluginKey: [__kubb_plugin_zod.pluginZodName] }),
227
+ schemas: getSchemas(operation, {
228
+ pluginKey: [__kubb_plugin_zod.pluginZodName],
229
+ type: "function"
230
+ })
231
+ };
232
+ if (!isQuery || isMutation) return null;
233
+ return /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsxs)(__kubb_react.File, {
234
+ baseName: query.file.baseName,
235
+ path: query.file.path,
236
+ meta: query.file.meta,
237
+ banner: (0, __kubb_plugin_oas_utils.getBanner)({
238
+ oas,
239
+ output,
240
+ config: pluginManager.config
241
+ }),
242
+ footer: (0, __kubb_plugin_oas_utils.getFooter)({
243
+ oas,
244
+ output
245
+ }),
246
+ children: [
247
+ options.parser === "zod" && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
248
+ name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean),
249
+ root: query.file.path,
250
+ path: zod.file.path
251
+ }),
252
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
253
+ name: "fetch",
254
+ path: options.client.importPath
255
+ }),
256
+ !!hasClientPlugin && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
257
+ name: [client.name],
258
+ root: query.file.path,
259
+ path: client.file.path
260
+ }),
261
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
262
+ name: ["RequestConfig", "ResponseErrorConfig"],
263
+ path: options.client.importPath,
264
+ isTypeOnly: true
265
+ }),
266
+ options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
267
+ name: ["ResponseConfig"],
268
+ path: options.client.importPath,
269
+ isTypeOnly: true
270
+ }),
271
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
272
+ name: [
273
+ type.schemas.request?.name,
274
+ type.schemas.response.name,
275
+ type.schemas.pathParams?.name,
276
+ type.schemas.queryParams?.name,
277
+ type.schemas.headerParams?.name,
278
+ ...type.schemas.statusCodes?.map((item) => item.name) || []
279
+ ].filter(Boolean),
280
+ root: query.file.path,
281
+ path: type.file.path,
282
+ isTypeOnly: true
283
+ }),
284
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(require_components.QueryKey, {
285
+ name: queryKey.name,
286
+ typeName: queryKey.typeName,
287
+ operation,
288
+ paramsCasing: options.paramsCasing,
289
+ pathParamsType: options.pathParamsType,
290
+ typeSchemas: type.schemas,
291
+ transformer: options.queryKey
292
+ }),
293
+ !hasClientPlugin && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_plugin_client_components.Client, {
294
+ name: client.name,
295
+ baseURL: options.client.baseURL,
296
+ operation,
297
+ typeSchemas: type.schemas,
298
+ zodSchemas: zod.schemas,
299
+ dataReturnType: options.client.dataReturnType,
300
+ paramsCasing: options.paramsCasing,
301
+ paramsType: options.paramsType,
302
+ pathParamsType: options.pathParamsType,
303
+ parser: options.parser
304
+ }),
305
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
306
+ name: ["queryOptions"],
307
+ path: importPath
308
+ }),
309
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(require_components.QueryOptions, {
310
+ name: queryOptions.name,
311
+ clientName: client.name,
312
+ queryKeyName: queryKey.name,
313
+ typeSchemas: type.schemas,
314
+ paramsCasing: options.paramsCasing,
315
+ paramsType: options.paramsType,
316
+ pathParamsType: options.pathParamsType,
317
+ dataReturnType: options.client.dataReturnType
318
+ }),
319
+ options.query && /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsxs)(__kubb_react_jsx_runtime.Fragment, { children: [
320
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
321
+ name: ["useQuery"],
322
+ path: importPath
323
+ }),
324
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(__kubb_react.File.Import, {
325
+ name: [
326
+ "QueryKey",
327
+ "QueryClient",
328
+ "UseBaseQueryOptions",
329
+ "UseQueryResult"
330
+ ],
331
+ path: importPath,
332
+ isTypeOnly: true
333
+ }),
334
+ /* @__PURE__ */ (0, __kubb_react_jsx_runtime.jsx)(require_components.Query, {
335
+ name: query.name,
336
+ queryOptionsName: queryOptions.name,
337
+ typeSchemas: type.schemas,
338
+ paramsType: options.paramsType,
339
+ pathParamsType: options.pathParamsType,
340
+ operation,
341
+ paramsCasing: options.paramsCasing,
342
+ dataReturnType: options.client.dataReturnType,
343
+ queryKeyName: queryKey.name,
344
+ queryKeyTypeName: queryKey.typeName
345
+ })
346
+ ] })
347
+ ]
348
+ });
349
+ }
350
+ });
351
+
352
+ //#endregion
353
+ Object.defineProperty(exports, 'mutationGenerator', {
354
+ enumerable: true,
355
+ get: function () {
356
+ return mutationGenerator;
357
+ }
358
+ });
359
+ Object.defineProperty(exports, 'queryGenerator', {
360
+ enumerable: true,
361
+ get: function () {
362
+ return queryGenerator;
363
+ }
364
+ });
365
+ //# sourceMappingURL=generators-CUcA3_rk.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators-CUcA3_rk.cjs","names":["pluginTsName","pluginZodName","pluginClientName","File","MutationKey","Client","Mutation","pluginClientName","pluginTsName","pluginZodName","File","QueryKey","Client","QueryOptions","Query"],"sources":["../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx"],"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 { Mutation, MutationKey } from '../components'\nimport type { PluginSolidQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginSolidQuery>({\n name: 'solid-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n pluginManager,\n } = useApp<PluginSolidQuery>()\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/solid-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={'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\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 {!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={['UseMutationOptions', '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 dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\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 { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginSolidQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginSolidQuery>({\n name: 'svelte-query',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n pluginManager,\n } = useApp<PluginSolidQuery>()\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(['post', 'put', 'delete', 'patch'], options.query ? options.query.methods : []).some((method) => operation.method === method)\n const importPath = options.query ? options.query.importPath : '@tanstack/solid-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'QueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'QueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'QueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || isMutation) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, 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={'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 typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseBaseQueryOptions', 'UseQueryResult']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n paramsCasing={options.paramsCasing}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAYA,MAAa,gEAA2D;CACtE,MAAM;CACN,UAAU,EAAE,SAAS,aAAa;EAChC,MAAM,EACJ,QAAQ,EACN,SAAS,EAAE,YAEb,4CAC4B;EAC9B,MAAM,2CAAc;EACpB,MAAM,EAAE,YAAY,SAAS,8DAAiC;EAG9D,MAAM,aACJ,EAFc,CAAC,CAAC,QAAQ,SAAS,QAAQ,OAAO,QAAQ,MAAM,WAAW,UAAU,WAAW,OAAO,4BAG1F,QAAQ,WAAW,QAAQ,SAAS,UAAU,EAAE,EAAE,QAAQ,QAAQ,QAAQ,MAAM,UAAU,EAAE,CAAC,CAAC,MAAM,WAAW,UAA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