@kubb/plugin-svelte-query 4.4.0 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/dist/{components-Dj8ralvN.cjs → components-CSifi2yW.cjs} +3 -3
  2. package/dist/{components-Dj8ralvN.cjs.map → components-CSifi2yW.cjs.map} +1 -1
  3. package/dist/{components-iwhc-RTI.js → components-D9W_4P34.js} +2 -2
  4. package/dist/{components-iwhc-RTI.js.map → components-D9W_4P34.js.map} +1 -1
  5. package/dist/components.cjs +1 -1
  6. package/dist/components.d.cts +37 -37
  7. package/dist/components.d.ts +37 -37
  8. package/dist/components.js +1 -1
  9. package/dist/{generators-D6whEaa8.js → generators-DX6qs2Fo.js} +195 -153
  10. package/dist/generators-DX6qs2Fo.js.map +1 -0
  11. package/dist/{generators-B0OWxMd3.cjs → generators-Dk290xby.cjs} +196 -153
  12. package/dist/generators-Dk290xby.cjs.map +1 -0
  13. package/dist/generators.cjs +2 -2
  14. package/dist/generators.d.cts +4 -4
  15. package/dist/generators.d.ts +4 -4
  16. package/dist/generators.js +2 -2
  17. package/dist/index.cjs +17 -3
  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 +15 -3
  22. package/dist/index.js.map +1 -1
  23. package/dist/{types-CbvRYZeT.d.cts → types-Clf8TkM_.d.ts} +189 -311
  24. package/dist/{types-CSzdgTx_.d.ts → types-m6PMgR_-.d.cts} +189 -311
  25. package/package.json +18 -14
  26. package/src/components/QueryKey.tsx +1 -1
  27. package/src/components/index.ts +1 -1
  28. package/src/generators/index.ts +1 -1
  29. package/src/generators/mutationGenerator.tsx +34 -9
  30. package/src/generators/queryGenerator.tsx +35 -11
  31. package/src/plugin.ts +22 -1
  32. package/src/types.ts +4 -3
  33. package/dist/generators-B0OWxMd3.cjs.map +0 -1
  34. package/dist/generators-D6whEaa8.js.map +0 -1
@@ -1,6 +1,8 @@
1
- const require_components = require('./components-Dj8ralvN.cjs');
2
- let __kubb_plugin_oas = require("@kubb/plugin-oas");
3
- __kubb_plugin_oas = require_components.__toESM(__kubb_plugin_oas);
1
+ const require_components = require('./components-CSifi2yW.cjs');
2
+ let node_path = require("node:path");
3
+ node_path = require_components.__toESM(node_path);
4
+ let __kubb_plugin_client = require("@kubb/plugin-client");
5
+ __kubb_plugin_client = require_components.__toESM(__kubb_plugin_client);
4
6
  let __kubb_plugin_ts = require("@kubb/plugin-ts");
5
7
  __kubb_plugin_ts = require_components.__toESM(__kubb_plugin_ts);
6
8
  let __kubb_plugin_zod = require("@kubb/plugin-zod");
@@ -15,25 +17,24 @@ let __kubb_react_fabric_jsx_runtime = require("@kubb/react-fabric/jsx-runtime");
15
17
  __kubb_react_fabric_jsx_runtime = require_components.__toESM(__kubb_react_fabric_jsx_runtime);
16
18
  let __kubb_core_hooks = require("@kubb/core/hooks");
17
19
  __kubb_core_hooks = require_components.__toESM(__kubb_core_hooks);
18
- let __kubb_plugin_client = require("@kubb/plugin-client");
19
- __kubb_plugin_client = require_components.__toESM(__kubb_plugin_client);
20
+ let __kubb_plugin_oas_generators = require("@kubb/plugin-oas/generators");
21
+ __kubb_plugin_oas_generators = require_components.__toESM(__kubb_plugin_oas_generators);
20
22
  let __kubb_plugin_oas_hooks = require("@kubb/plugin-oas/hooks");
21
23
  __kubb_plugin_oas_hooks = require_components.__toESM(__kubb_plugin_oas_hooks);
22
24
  let remeda = require("remeda");
23
25
  remeda = require_components.__toESM(remeda);
24
26
 
25
- //#region src/generators/queryGenerator.tsx
26
- const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
27
+ //#region src/generators/mutationGenerator.tsx
28
+ const mutationGenerator = (0, __kubb_plugin_oas_generators.createReactGenerator)({
27
29
  name: "svelte-query",
28
- Operation({ options, operation }) {
29
- const { options: { output } } = (0, __kubb_core_hooks.usePlugin)();
30
+ Operation({ config, operation, generator, plugin }) {
31
+ const { options, options: { output } } = plugin;
30
32
  const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
31
33
  const oas = (0, __kubb_plugin_oas_hooks.useOas)();
32
- const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
33
- const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
34
- const isMutation = (0, remeda.difference)(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method);
35
- const importPath = options.query ? options.query.importPath : "@tanstack/svelte-query";
36
- const query = {
34
+ const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)(generator);
35
+ 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);
36
+ const importPath = options.mutation ? options.mutation.importPath : "@tanstack/svelte-query";
37
+ const mutation = {
37
38
  name: getName(operation, {
38
39
  type: "function",
39
40
  prefix: "create"
@@ -41,6 +42,20 @@ const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
41
42
  typeName: getName(operation, { type: "type" }),
42
43
  file: getFile(operation, { prefix: "create" })
43
44
  };
45
+ const type = {
46
+ file: getFile(operation, { pluginKey: [__kubb_plugin_ts.pluginTsName] }),
47
+ schemas: getSchemas(operation, {
48
+ pluginKey: [__kubb_plugin_ts.pluginTsName],
49
+ type: "type"
50
+ })
51
+ };
52
+ const zod = {
53
+ file: getFile(operation, { pluginKey: [__kubb_plugin_zod.pluginZodName] }),
54
+ schemas: getSchemas(operation, {
55
+ pluginKey: [__kubb_plugin_zod.pluginZodName],
56
+ type: "function"
57
+ })
58
+ };
44
59
  const hasClientPlugin = !!pluginManager.getPluginByKey([__kubb_plugin_client.pluginClientName]);
45
60
  const client = {
46
61
  name: hasClientPlugin ? getName(operation, {
@@ -49,39 +64,21 @@ const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
49
64
  }) : getName(operation, { type: "function" }),
50
65
  file: getFile(operation, { pluginKey: [__kubb_plugin_client.pluginClientName] })
51
66
  };
52
- const queryOptions = { name: getName(operation, {
53
- type: "function",
54
- suffix: "QueryOptions"
55
- }) };
56
- const queryKey = {
67
+ const mutationKey = {
57
68
  name: getName(operation, {
58
69
  type: "const",
59
- suffix: "QueryKey"
70
+ suffix: "MutationKey"
60
71
  }),
61
72
  typeName: getName(operation, {
62
73
  type: "type",
63
- suffix: "QueryKey"
64
- })
65
- };
66
- const type = {
67
- file: getFile(operation, { pluginKey: [__kubb_plugin_ts.pluginTsName] }),
68
- schemas: getSchemas(operation, {
69
- pluginKey: [__kubb_plugin_ts.pluginTsName],
70
- type: "type"
71
- })
72
- };
73
- const zod = {
74
- file: getFile(operation, { pluginKey: [__kubb_plugin_zod.pluginZodName] }),
75
- schemas: getSchemas(operation, {
76
- pluginKey: [__kubb_plugin_zod.pluginZodName],
77
- type: "function"
74
+ suffix: "MutationKey"
78
75
  })
79
76
  };
80
- if (!isQuery || isMutation) return null;
77
+ if (!isMutation) return null;
81
78
  return /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric.File, {
82
- baseName: query.file.baseName,
83
- path: query.file.path,
84
- meta: query.file.meta,
79
+ baseName: mutation.file.baseName,
80
+ path: mutation.file.path,
81
+ meta: mutation.file.meta,
85
82
  banner: (0, __kubb_plugin_oas_utils.getBanner)({
86
83
  oas,
87
84
  output,
@@ -94,28 +91,48 @@ const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
94
91
  children: [
95
92
  options.parser === "zod" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
96
93
  name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean),
97
- root: query.file.path,
94
+ root: mutation.file.path,
98
95
  path: zod.file.path
99
96
  }),
100
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
101
- name: "fetch",
102
- path: options.client.importPath
103
- }),
97
+ options.client.importPath ? /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
98
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
99
+ name: "fetch",
100
+ path: options.client.importPath
101
+ }),
102
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
103
+ name: ["RequestConfig", "ResponseErrorConfig"],
104
+ path: options.client.importPath,
105
+ isTypeOnly: true
106
+ }),
107
+ options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
108
+ name: ["ResponseConfig"],
109
+ path: options.client.importPath,
110
+ isTypeOnly: true
111
+ })
112
+ ] }) : /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
113
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
114
+ name: "fetch",
115
+ root: mutation.file.path,
116
+ path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetcher.ts")
117
+ }),
118
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
119
+ name: ["RequestConfig", "ResponseErrorConfig"],
120
+ root: mutation.file.path,
121
+ path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetcher.ts"),
122
+ isTypeOnly: true
123
+ }),
124
+ options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
125
+ name: ["ResponseConfig"],
126
+ root: mutation.file.path,
127
+ path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetcher.ts"),
128
+ isTypeOnly: true
129
+ })
130
+ ] }),
104
131
  !!hasClientPlugin && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
105
132
  name: [client.name],
106
- root: query.file.path,
133
+ root: mutation.file.path,
107
134
  path: client.file.path
108
135
  }),
109
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
110
- name: ["RequestConfig", "ResponseErrorConfig"],
111
- path: options.client.importPath,
112
- isTypeOnly: true
113
- }),
114
- options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
115
- name: ["ResponseConfig"],
116
- path: options.client.importPath,
117
- isTypeOnly: true
118
- }),
119
136
  /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
120
137
  name: [
121
138
  type.schemas.request?.name,
@@ -125,18 +142,18 @@ const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
125
142
  type.schemas.headerParams?.name,
126
143
  ...type.schemas.statusCodes?.map((item) => item.name) || []
127
144
  ].filter(Boolean),
128
- root: query.file.path,
145
+ root: mutation.file.path,
129
146
  path: type.file.path,
130
147
  isTypeOnly: true
131
148
  }),
132
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.QueryKey, {
133
- name: queryKey.name,
134
- typeName: queryKey.typeName,
149
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.MutationKey, {
150
+ name: mutationKey.name,
151
+ typeName: mutationKey.typeName,
135
152
  operation,
153
+ paramsCasing: options.paramsCasing,
136
154
  pathParamsType: options.pathParamsType,
137
155
  typeSchemas: type.schemas,
138
- paramsCasing: options.paramsCasing,
139
- transformer: options.queryKey
156
+ transformer: options.mutationKey
140
157
  }),
141
158
  !hasClientPlugin && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_plugin_client_components.Client, {
142
159
  name: client.name,
@@ -144,52 +161,37 @@ const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
144
161
  operation,
145
162
  typeSchemas: type.schemas,
146
163
  zodSchemas: zod.schemas,
147
- dataReturnType: options.client.dataReturnType,
164
+ dataReturnType: options.client.dataReturnType || "data",
148
165
  paramsCasing: options.paramsCasing,
149
166
  paramsType: options.paramsType,
150
167
  pathParamsType: options.pathParamsType,
151
168
  parser: options.parser
152
169
  }),
153
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
154
- name: ["queryOptions"],
155
- path: importPath
156
- }),
157
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.QueryOptions, {
158
- name: queryOptions.name,
159
- clientName: client.name,
160
- queryKeyName: queryKey.name,
161
- typeSchemas: type.schemas,
162
- paramsCasing: options.paramsCasing,
163
- paramsType: options.paramsType,
164
- pathParamsType: options.pathParamsType,
165
- dataReturnType: options.client.dataReturnType
166
- }),
167
- options.query && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
170
+ options.mutation && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
168
171
  /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
169
- name: ["createQuery"],
172
+ name: ["createMutation"],
170
173
  path: importPath
171
174
  }),
172
175
  /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
173
176
  name: [
174
- "QueryKey",
175
- "QueryClient",
176
- "CreateBaseQueryOptions",
177
- "CreateQueryResult"
177
+ "CreateMutationOptions",
178
+ "CreateMutationResult",
179
+ "QueryClient"
178
180
  ],
179
181
  path: importPath,
180
182
  isTypeOnly: true
181
183
  }),
182
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.Query, {
183
- name: query.name,
184
- queryOptionsName: queryOptions.name,
184
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.Mutation, {
185
+ name: mutation.name,
186
+ clientName: client.name,
187
+ typeName: mutation.typeName,
185
188
  typeSchemas: type.schemas,
186
- pathParamsType: options.pathParamsType,
187
189
  operation,
188
190
  paramsCasing: options.paramsCasing,
191
+ dataReturnType: options.client.dataReturnType || "data",
189
192
  paramsType: options.paramsType,
190
- dataReturnType: options.client.dataReturnType,
191
- queryKeyName: queryKey.name,
192
- queryKeyTypeName: queryKey.typeName
193
+ pathParamsType: options.pathParamsType,
194
+ mutationKeyName: mutationKey.name
193
195
  })
194
196
  ] })
195
197
  ]
@@ -198,17 +200,18 @@ const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
198
200
  });
199
201
 
200
202
  //#endregion
201
- //#region src/generators/mutationGenerator.tsx
202
- const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
203
+ //#region src/generators/queryGenerator.tsx
204
+ const queryGenerator = (0, __kubb_plugin_oas_generators.createReactGenerator)({
203
205
  name: "svelte-query",
204
- Operation({ options, operation }) {
205
- const { options: { output } } = (0, __kubb_core_hooks.usePlugin)();
206
+ Operation({ config, operation, generator, plugin }) {
207
+ const { options, options: { output } } = plugin;
206
208
  const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
207
209
  const oas = (0, __kubb_plugin_oas_hooks.useOas)();
208
- const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
209
- 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);
210
- const importPath = options.mutation ? options.mutation.importPath : "@tanstack/svelte-query";
211
- const mutation = {
210
+ const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)(generator);
211
+ const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
212
+ const isMutation = (0, remeda.difference)(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method);
213
+ const importPath = options.query ? options.query.importPath : "@tanstack/svelte-query";
214
+ const query = {
212
215
  name: getName(operation, {
213
216
  type: "function",
214
217
  prefix: "create"
@@ -216,20 +219,6 @@ const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
216
219
  typeName: getName(operation, { type: "type" }),
217
220
  file: getFile(operation, { prefix: "create" })
218
221
  };
219
- const type = {
220
- file: getFile(operation, { pluginKey: [__kubb_plugin_ts.pluginTsName] }),
221
- schemas: getSchemas(operation, {
222
- pluginKey: [__kubb_plugin_ts.pluginTsName],
223
- type: "type"
224
- })
225
- };
226
- const zod = {
227
- file: getFile(operation, { pluginKey: [__kubb_plugin_zod.pluginZodName] }),
228
- schemas: getSchemas(operation, {
229
- pluginKey: [__kubb_plugin_zod.pluginZodName],
230
- type: "function"
231
- })
232
- };
233
222
  const hasClientPlugin = !!pluginManager.getPluginByKey([__kubb_plugin_client.pluginClientName]);
234
223
  const client = {
235
224
  name: hasClientPlugin ? getName(operation, {
@@ -238,21 +227,39 @@ const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
238
227
  }) : getName(operation, { type: "function" }),
239
228
  file: getFile(operation, { pluginKey: [__kubb_plugin_client.pluginClientName] })
240
229
  };
241
- const mutationKey = {
230
+ const queryOptions = { name: getName(operation, {
231
+ type: "function",
232
+ suffix: "QueryOptions"
233
+ }) };
234
+ const queryKey = {
242
235
  name: getName(operation, {
243
236
  type: "const",
244
- suffix: "MutationKey"
237
+ suffix: "QueryKey"
245
238
  }),
246
239
  typeName: getName(operation, {
247
240
  type: "type",
248
- suffix: "MutationKey"
241
+ suffix: "QueryKey"
249
242
  })
250
243
  };
251
- if (!isMutation) return null;
244
+ const type = {
245
+ file: getFile(operation, { pluginKey: [__kubb_plugin_ts.pluginTsName] }),
246
+ schemas: getSchemas(operation, {
247
+ pluginKey: [__kubb_plugin_ts.pluginTsName],
248
+ type: "type"
249
+ })
250
+ };
251
+ const zod = {
252
+ file: getFile(operation, { pluginKey: [__kubb_plugin_zod.pluginZodName] }),
253
+ schemas: getSchemas(operation, {
254
+ pluginKey: [__kubb_plugin_zod.pluginZodName],
255
+ type: "function"
256
+ })
257
+ };
258
+ if (!isQuery || isMutation) return null;
252
259
  return /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric.File, {
253
- baseName: mutation.file.baseName,
254
- path: mutation.file.path,
255
- meta: mutation.file.meta,
260
+ baseName: query.file.baseName,
261
+ path: query.file.path,
262
+ meta: query.file.meta,
256
263
  banner: (0, __kubb_plugin_oas_utils.getBanner)({
257
264
  oas,
258
265
  output,
@@ -265,27 +272,48 @@ const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
265
272
  children: [
266
273
  options.parser === "zod" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
267
274
  name: [zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean),
268
- root: mutation.file.path,
275
+ root: query.file.path,
269
276
  path: zod.file.path
270
277
  }),
271
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
272
- name: "fetch",
273
- path: options.client.importPath
274
- }),
278
+ options.client.importPath ? /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
279
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
280
+ name: "fetch",
281
+ path: options.client.importPath
282
+ }),
283
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
284
+ name: ["RequestConfig", "ResponseErrorConfig"],
285
+ path: options.client.importPath,
286
+ isTypeOnly: true
287
+ }),
288
+ options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
289
+ name: ["ResponseConfig"],
290
+ path: options.client.importPath,
291
+ isTypeOnly: true
292
+ })
293
+ ] }) : /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
294
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
295
+ name: "fetch",
296
+ root: query.file.path,
297
+ path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetcher.ts")
298
+ }),
299
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
300
+ name: ["RequestConfig", "ResponseErrorConfig"],
301
+ root: query.file.path,
302
+ path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetcher.ts"),
303
+ isTypeOnly: true
304
+ }),
305
+ options.client.dataReturnType === "full" && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
306
+ name: ["ResponseConfig"],
307
+ root: query.file.path,
308
+ path: node_path.default.resolve(config.root, config.output.path, ".kubb/fetcher.ts"),
309
+ isTypeOnly: true
310
+ })
311
+ ] }),
275
312
  !!hasClientPlugin && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
276
313
  name: [client.name],
277
- root: mutation.file.path,
314
+ root: query.file.path,
278
315
  path: client.file.path
279
316
  }),
280
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
281
- name: [
282
- "RequestConfig",
283
- "ResponseConfig",
284
- "ResponseErrorConfig"
285
- ],
286
- path: options.client.importPath,
287
- isTypeOnly: true
288
- }),
289
317
  /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
290
318
  name: [
291
319
  type.schemas.request?.name,
@@ -295,18 +323,18 @@ const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
295
323
  type.schemas.headerParams?.name,
296
324
  ...type.schemas.statusCodes?.map((item) => item.name) || []
297
325
  ].filter(Boolean),
298
- root: mutation.file.path,
326
+ root: query.file.path,
299
327
  path: type.file.path,
300
328
  isTypeOnly: true
301
329
  }),
302
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.MutationKey, {
303
- name: mutationKey.name,
304
- typeName: mutationKey.typeName,
330
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.QueryKey, {
331
+ name: queryKey.name,
332
+ typeName: queryKey.typeName,
305
333
  operation,
306
- paramsCasing: options.paramsCasing,
307
334
  pathParamsType: options.pathParamsType,
308
335
  typeSchemas: type.schemas,
309
- transformer: options.mutationKey
336
+ paramsCasing: options.paramsCasing,
337
+ transformer: options.queryKey
310
338
  }),
311
339
  !hasClientPlugin && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_plugin_client_components.Client, {
312
340
  name: client.name,
@@ -314,37 +342,52 @@ const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
314
342
  operation,
315
343
  typeSchemas: type.schemas,
316
344
  zodSchemas: zod.schemas,
317
- dataReturnType: options.client.dataReturnType,
345
+ dataReturnType: options.client.dataReturnType || "data",
318
346
  paramsCasing: options.paramsCasing,
319
347
  paramsType: options.paramsType,
320
348
  pathParamsType: options.pathParamsType,
321
349
  parser: options.parser
322
350
  }),
323
- options.mutation && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
351
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
352
+ name: ["queryOptions"],
353
+ path: importPath
354
+ }),
355
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.QueryOptions, {
356
+ name: queryOptions.name,
357
+ clientName: client.name,
358
+ queryKeyName: queryKey.name,
359
+ typeSchemas: type.schemas,
360
+ paramsCasing: options.paramsCasing,
361
+ paramsType: options.paramsType,
362
+ pathParamsType: options.pathParamsType,
363
+ dataReturnType: options.client.dataReturnType || "data"
364
+ }),
365
+ options.query && /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsxs)(__kubb_react_fabric_jsx_runtime.Fragment, { children: [
324
366
  /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
325
- name: ["createMutation"],
367
+ name: ["createQuery"],
326
368
  path: importPath
327
369
  }),
328
370
  /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(__kubb_react_fabric.File.Import, {
329
371
  name: [
330
- "CreateMutationOptions",
331
- "CreateMutationResult",
332
- "QueryClient"
372
+ "QueryKey",
373
+ "QueryClient",
374
+ "CreateBaseQueryOptions",
375
+ "CreateQueryResult"
333
376
  ],
334
377
  path: importPath,
335
378
  isTypeOnly: true
336
379
  }),
337
- /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.Mutation, {
338
- name: mutation.name,
339
- clientName: client.name,
340
- typeName: mutation.typeName,
380
+ /* @__PURE__ */ (0, __kubb_react_fabric_jsx_runtime.jsx)(require_components.Query, {
381
+ name: query.name,
382
+ queryOptionsName: queryOptions.name,
341
383
  typeSchemas: type.schemas,
384
+ pathParamsType: options.pathParamsType,
342
385
  operation,
343
386
  paramsCasing: options.paramsCasing,
344
- dataReturnType: options.client.dataReturnType,
345
387
  paramsType: options.paramsType,
346
- pathParamsType: options.pathParamsType,
347
- mutationKeyName: mutationKey.name
388
+ dataReturnType: options.client.dataReturnType || "data",
389
+ queryKeyName: queryKey.name,
390
+ queryKeyTypeName: queryKey.typeName
348
391
  })
349
392
  ] })
350
393
  ]
@@ -365,4 +408,4 @@ Object.defineProperty(exports, 'queryGenerator', {
365
408
  return queryGenerator;
366
409
  }
367
410
  });
368
- //# sourceMappingURL=generators-B0OWxMd3.cjs.map
411
+ //# sourceMappingURL=generators-Dk290xby.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generators-Dk290xby.cjs","names":["pluginTsName","pluginZodName","pluginClientName","File","path","MutationKey","Client","Mutation","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","QueryOptions","Query"],"sources":["../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx"],"sourcesContent":["import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginSvelteQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginSvelteQuery>({\n name: 'svelte-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/svelte-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation) {\n return null\n }\n\n return (\n <File\n baseName={mutation.file.baseName}\n path={mutation.file.path}\n meta={mutation.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={mutation.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n <File.Import name={'fetch'} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import\n name={['ResponseConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n {!!hasClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.mutationKey}\n />\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.mutation && (\n <>\n <File.Import name={['createMutation']} path={importPath} />\n <File.Import name={['CreateMutationOptions', 'CreateMutationResult', '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 || 'data'}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react-fabric'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginSvelteQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginSvelteQuery>({\n name: 'svelte-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const importPath = options.query ? options.query.importPath : '@tanstack/svelte-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'create' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'create' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'QueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'QueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'QueryKey' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || isMutation) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n </>\n ) : (\n <>\n <File.Import name={'fetch'} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import\n name={['ResponseConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n {!!hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.queryKey}\n />\n\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n />\n {options.query && (\n <>\n <File.Import name={['createQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'CreateBaseQueryOptions', 'CreateQueryResult']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAcA,MAAa,2EAA4D;CACvE,MAAM;CACN,UAAU,EAAE,QAAQ,WAAW,WAAW,UAAU;EAClD,MAAM,EACJ,SACA,SAAS,EAAE,aACT;EACJ,MAAM,yDAAkC;EAExC,MAAM,2CAAc;EACpB,MAAM,EAAE,YAAY,SAAS,6DAAgC,UAAU;EAGvE,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,UAAU,WAAW,OAAO;EAExJ,MAAM,aAAa,QAAQ,WAAW,QAAQ,SAAS,aAAa;EAEpE,MAAM,WAAW;GACf,MAAM,QAAQ,WAAW;IAAE,MAAM;IAAY,QAAQ;IAAU,CAAC;GAChE,UAAU,QAAQ,WAAW,EAAE,MAAM,QAAQ,CAAC;GAC9C,MAAM,QAAQ,WAAW,EAAE,QAAQ,UAAU,CAAC;GAC/C;EAED,MAAM,OAAO;GACX,MAAM,QAAQ,WAAW,EAAE,WAAW,CAACA,8BAAa,EAAE,CAAC;GAEvD,SAAS,WAAW,WAAW;IAAE,WAAW,CAACA,8BAAa;IAAE,MAAM;IAAQ,CAAC;GAC5E;EAED,MAAM,MAAM;GACV,MAAM,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,aAAa,KAAK;KAClB,cAAc,QAAQ;KACtB,aAAa,QAAQ;MACrB;IAED,CAAC,mBACA,yDAACC;KACC,MAAM,OAAO;KACb,SAAS,QAAQ,OAAO;KACb;KACX,aAAa,KAAK;KAClB,YAAY,IAAI;KAChB,gBAAgB,QAAQ,OAAO,kBAAkB;KACjD,cAAc,QAAQ;KACtB,YAAY,QAAQ;KACpB,gBAAgB,QAAQ;KACxB,QAAQ,QAAQ;MAChB;IAEJ,yDAACH,yBAAK;KAAO,MAAM,CAAC,eAAe;KAAE,MAAM;MAAc;IACzD,yDAACI;KACC,MAAM,aAAa;KACnB,YAAY,OAAO;KACnB,cAAc,SAAS;KACvB,aAAa,KAAK;KAClB,cAAc,QAAQ;KACtB,YAAY,QAAQ;KACpB,gBAAgB,QAAQ;KACxB,gBAAgB,QAAQ,OAAO,kBAAkB;MACjD;IACD,QAAQ,SACP;KACE,yDAACJ,yBAAK;MAAO,MAAM,CAAC,cAAc;MAAE,MAAM;OAAc;KACxD,yDAACA,yBAAK;MAAO,MAAM;OAAC;OAAY;OAAe;OAA0B;OAAoB;MAAE,MAAM;MAAY;OAAa;KAC9H,yDAACK;MACC,MAAM,MAAM;MACZ,kBAAkB,aAAa;MAC/B,aAAa,KAAK;MAClB,gBAAgB,QAAQ;MACb;MACX,cAAc,QAAQ;MACtB,YAAY,QAAQ;MACpB,gBAAgB,QAAQ,OAAO,kBAAkB;MACjD,cAAc,SAAS;MACvB,kBAAkB,SAAS;OAC3B;QACD;;IAEA;;CAGZ,CAAC"}
@@ -1,5 +1,5 @@
1
- require('./components-Dj8ralvN.cjs');
2
- const require_generators = require('./generators-B0OWxMd3.cjs');
1
+ require('./components-CSifi2yW.cjs');
2
+ const require_generators = require('./generators-Dk290xby.cjs');
3
3
 
4
4
  exports.mutationGenerator = require_generators.mutationGenerator;
5
5
  exports.queryGenerator = require_generators.queryGenerator;
@@ -1,10 +1,10 @@
1
- import { a as ReactGenerator, n as PluginSvelteQuery } from "./types-CbvRYZeT.cjs";
1
+ import { i as ReactGenerator, n as PluginSvelteQuery } from "./types-m6PMgR_-.cjs";
2
2
 
3
- //#region src/generators/queryGenerator.d.ts
4
- declare const queryGenerator: ReactGenerator<PluginSvelteQuery>;
5
- //#endregion
6
3
  //#region src/generators/mutationGenerator.d.ts
7
4
  declare const mutationGenerator: ReactGenerator<PluginSvelteQuery>;
8
5
  //#endregion
6
+ //#region src/generators/queryGenerator.d.ts
7
+ declare const queryGenerator: ReactGenerator<PluginSvelteQuery>;
8
+ //#endregion
9
9
  export { mutationGenerator, queryGenerator };
10
10
  //# sourceMappingURL=generators.d.cts.map
@@ -1,10 +1,10 @@
1
- import { a as ReactGenerator, n as PluginSvelteQuery } from "./types-CSzdgTx_.js";
1
+ import { i as ReactGenerator, n as PluginSvelteQuery } from "./types-Clf8TkM_.js";
2
2
 
3
- //#region src/generators/queryGenerator.d.ts
4
- declare const queryGenerator: ReactGenerator<PluginSvelteQuery>;
5
- //#endregion
6
3
  //#region src/generators/mutationGenerator.d.ts
7
4
  declare const mutationGenerator: ReactGenerator<PluginSvelteQuery>;
8
5
  //#endregion
6
+ //#region src/generators/queryGenerator.d.ts
7
+ declare const queryGenerator: ReactGenerator<PluginSvelteQuery>;
8
+ //#endregion
9
9
  export { mutationGenerator, queryGenerator };
10
10
  //# sourceMappingURL=generators.d.ts.map
@@ -1,4 +1,4 @@
1
- import "./components-iwhc-RTI.js";
2
- import { n as queryGenerator, t as mutationGenerator } from "./generators-D6whEaa8.js";
1
+ import "./components-D9W_4P34.js";
2
+ import { n as mutationGenerator, t as queryGenerator } from "./generators-DX6qs2Fo.js";
3
3
 
4
4
  export { mutationGenerator, queryGenerator };