@kubb/plugin-react-query 5.0.0-alpha.9 → 5.0.0-beta.100

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/LICENSE +17 -10
  2. package/README.md +38 -93
  3. package/dist/index.cjs +2317 -149
  4. package/dist/index.cjs.map +1 -1
  5. package/dist/index.d.ts +494 -6
  6. package/dist/index.js +2283 -143
  7. package/dist/index.js.map +1 -1
  8. package/package.json +47 -75
  9. package/dist/components-BHQT9ZLc.cjs +0 -1634
  10. package/dist/components-BHQT9ZLc.cjs.map +0 -1
  11. package/dist/components-CpyHYGOw.js +0 -1520
  12. package/dist/components-CpyHYGOw.js.map +0 -1
  13. package/dist/components.cjs +0 -13
  14. package/dist/components.d.ts +0 -398
  15. package/dist/components.js +0 -2
  16. package/dist/generators-DP07m3rH.cjs +0 -1469
  17. package/dist/generators-DP07m3rH.cjs.map +0 -1
  18. package/dist/generators-DkQwKTc2.js +0 -1427
  19. package/dist/generators-DkQwKTc2.js.map +0 -1
  20. package/dist/generators.cjs +0 -9
  21. package/dist/generators.d.ts +0 -523
  22. package/dist/generators.js +0 -2
  23. package/dist/types-D5S7Ny9r.d.ts +0 -270
  24. package/src/components/InfiniteQuery.tsx +0 -220
  25. package/src/components/InfiniteQueryOptions.tsx +0 -289
  26. package/src/components/Mutation.tsx +0 -158
  27. package/src/components/MutationKey.tsx +0 -1
  28. package/src/components/MutationOptions.tsx +0 -122
  29. package/src/components/Query.tsx +0 -194
  30. package/src/components/QueryKey.tsx +0 -1
  31. package/src/components/QueryOptions.tsx +0 -181
  32. package/src/components/SuspenseInfiniteQuery.tsx +0 -220
  33. package/src/components/SuspenseInfiniteQueryOptions.tsx +0 -289
  34. package/src/components/SuspenseQuery.tsx +0 -204
  35. package/src/components/index.ts +0 -11
  36. package/src/generators/customHookOptionsFileGenerator.tsx +0 -98
  37. package/src/generators/hookOptionsGenerator.tsx +0 -196
  38. package/src/generators/index.ts +0 -7
  39. package/src/generators/infiniteQueryGenerator.tsx +0 -214
  40. package/src/generators/mutationGenerator.tsx +0 -195
  41. package/src/generators/queryGenerator.tsx +0 -194
  42. package/src/generators/suspenseInfiniteQueryGenerator.tsx +0 -202
  43. package/src/generators/suspenseQueryGenerator.tsx +0 -207
  44. package/src/index.ts +0 -2
  45. package/src/plugin.ts +0 -239
  46. package/src/types.ts +0 -205
  47. /package/dist/{chunk--u3MIqq1.js → rolldown-runtime-C0LytTxp.js} +0 -0
@@ -1,398 +0,0 @@
1
- import { t as __name } from "./chunk--u3MIqq1.js";
2
- import { a as MutationKey, i as QueryKey, r as PluginReactQuery, t as Infinite } from "./types-D5S7Ny9r.js";
3
- import { OperationSchemas } from "@kubb/plugin-oas";
4
- import { Operation } from "@kubb/oas";
5
- import { FunctionParams } from "@kubb/react-fabric";
6
- import { FabricReactNode } from "@kubb/react-fabric/types";
7
-
8
- //#region src/components/InfiniteQuery.d.ts
9
- type Props$8 = {
10
- /**
11
- * Name of the function
12
- */
13
- name: string;
14
- queryOptionsName: string;
15
- queryKeyName: string;
16
- queryKeyTypeName: string;
17
- typeSchemas: OperationSchemas;
18
- operation: Operation;
19
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
20
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
21
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
22
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
23
- initialPageParam: Infinite['initialPageParam'];
24
- queryParam?: Infinite['queryParam'];
25
- customOptions: PluginReactQuery['resolvedOptions']['customOptions'];
26
- };
27
- type GetParamsProps$7 = {
28
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
29
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
30
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
31
- typeSchemas: OperationSchemas;
32
- pageParamGeneric: string;
33
- };
34
- declare function InfiniteQuery({
35
- name,
36
- queryKeyTypeName,
37
- queryOptionsName,
38
- queryKeyName,
39
- paramsType,
40
- paramsCasing,
41
- pathParamsType,
42
- dataReturnType,
43
- typeSchemas,
44
- operation,
45
- initialPageParam,
46
- queryParam,
47
- customOptions
48
- }: Props$8): FabricReactNode;
49
- declare namespace InfiniteQuery {
50
- var getParams: ({
51
- paramsType,
52
- paramsCasing,
53
- pathParamsType,
54
- typeSchemas,
55
- pageParamGeneric
56
- }: GetParamsProps$7) => FunctionParams;
57
- }
58
- //#endregion
59
- //#region src/components/InfiniteQueryOptions.d.ts
60
- type Props$7 = {
61
- name: string;
62
- clientName: string;
63
- queryKeyName: string;
64
- typeSchemas: OperationSchemas;
65
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
66
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
67
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
68
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
69
- initialPageParam: Infinite['initialPageParam'];
70
- cursorParam: Infinite['cursorParam'];
71
- nextParam: Infinite['nextParam'];
72
- previousParam: Infinite['previousParam'];
73
- queryParam: Infinite['queryParam'];
74
- };
75
- type GetParamsProps$6 = {
76
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
77
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
78
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
79
- typeSchemas: OperationSchemas;
80
- };
81
- declare function InfiniteQueryOptions({
82
- name,
83
- clientName,
84
- initialPageParam,
85
- cursorParam,
86
- nextParam,
87
- previousParam,
88
- typeSchemas,
89
- paramsCasing,
90
- paramsType,
91
- dataReturnType,
92
- pathParamsType,
93
- queryParam,
94
- queryKeyName
95
- }: Props$7): FabricReactNode;
96
- declare namespace InfiniteQueryOptions {
97
- var getParams: ({
98
- paramsType,
99
- paramsCasing,
100
- pathParamsType,
101
- typeSchemas
102
- }: GetParamsProps$6) => FunctionParams;
103
- }
104
- //#endregion
105
- //#region src/components/Mutation.d.ts
106
- type Props$6 = {
107
- /**
108
- * Name of the function
109
- */
110
- name: string;
111
- typeName: string;
112
- mutationOptionsName: string;
113
- mutationKeyName: string;
114
- typeSchemas: OperationSchemas;
115
- operation: Operation;
116
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
117
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
118
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
119
- customOptions: PluginReactQuery['resolvedOptions']['customOptions'];
120
- };
121
- declare function Mutation({
122
- name,
123
- mutationOptionsName,
124
- paramsCasing,
125
- pathParamsType,
126
- dataReturnType,
127
- typeSchemas,
128
- operation,
129
- mutationKeyName,
130
- customOptions
131
- }: Props$6): FabricReactNode;
132
- //#endregion
133
- //#region src/components/MutationOptions.d.ts
134
- type Props$5 = {
135
- name: string;
136
- clientName: string;
137
- mutationKeyName: string;
138
- typeSchemas: OperationSchemas;
139
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
140
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
141
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
142
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
143
- };
144
- type GetParamsProps$5 = {
145
- typeSchemas: OperationSchemas;
146
- };
147
- declare function MutationOptions({
148
- name,
149
- clientName,
150
- dataReturnType,
151
- typeSchemas,
152
- paramsCasing,
153
- paramsType,
154
- pathParamsType,
155
- mutationKeyName
156
- }: Props$5): FabricReactNode;
157
- declare namespace MutationOptions {
158
- var getParams: ({
159
- typeSchemas
160
- }: GetParamsProps$5) => FunctionParams;
161
- }
162
- //#endregion
163
- //#region src/components/Query.d.ts
164
- type Props$4 = {
165
- /**
166
- * Name of the function
167
- */
168
- name: string;
169
- queryOptionsName: string;
170
- queryKeyName: string;
171
- queryKeyTypeName: string;
172
- typeSchemas: OperationSchemas;
173
- operation: Operation;
174
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
175
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
176
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
177
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
178
- customOptions: PluginReactQuery['resolvedOptions']['customOptions'];
179
- };
180
- type GetParamsProps$4 = {
181
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
182
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
183
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
184
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
185
- typeSchemas: OperationSchemas;
186
- };
187
- declare function Query({
188
- name,
189
- queryKeyTypeName,
190
- queryOptionsName,
191
- queryKeyName,
192
- paramsType,
193
- paramsCasing,
194
- pathParamsType,
195
- dataReturnType,
196
- typeSchemas,
197
- operation,
198
- customOptions
199
- }: Props$4): FabricReactNode;
200
- declare namespace Query {
201
- var getParams: ({
202
- paramsType,
203
- paramsCasing,
204
- pathParamsType,
205
- dataReturnType,
206
- typeSchemas
207
- }: GetParamsProps$4) => FunctionParams;
208
- }
209
- //#endregion
210
- //#region src/components/QueryOptions.d.ts
211
- type Props$3 = {
212
- name: string;
213
- clientName: string;
214
- queryKeyName: string;
215
- typeSchemas: OperationSchemas;
216
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
217
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
218
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
219
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
220
- };
221
- type GetParamsProps$3 = {
222
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
223
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
224
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
225
- typeSchemas: OperationSchemas;
226
- };
227
- declare function QueryOptions({
228
- name,
229
- clientName,
230
- dataReturnType,
231
- typeSchemas,
232
- paramsCasing,
233
- paramsType,
234
- pathParamsType,
235
- queryKeyName
236
- }: Props$3): FabricReactNode;
237
- declare namespace QueryOptions {
238
- var getParams: ({
239
- paramsType,
240
- paramsCasing,
241
- pathParamsType,
242
- typeSchemas
243
- }: GetParamsProps$3) => FunctionParams;
244
- }
245
- //#endregion
246
- //#region src/components/SuspenseInfiniteQuery.d.ts
247
- type Props$2 = {
248
- /**
249
- * Name of the function
250
- */
251
- name: string;
252
- queryOptionsName: string;
253
- queryKeyName: string;
254
- queryKeyTypeName: string;
255
- typeSchemas: OperationSchemas;
256
- operation: Operation;
257
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
258
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
259
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
260
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
261
- customOptions: PluginReactQuery['resolvedOptions']['customOptions'];
262
- initialPageParam: Infinite['initialPageParam'];
263
- queryParam?: Infinite['queryParam'];
264
- };
265
- type GetParamsProps$2 = {
266
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
267
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
268
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
269
- typeSchemas: OperationSchemas;
270
- pageParamGeneric: string;
271
- };
272
- declare function SuspenseInfiniteQuery({
273
- name,
274
- queryKeyTypeName,
275
- queryOptionsName,
276
- queryKeyName,
277
- paramsType,
278
- paramsCasing,
279
- pathParamsType,
280
- dataReturnType,
281
- typeSchemas,
282
- operation,
283
- customOptions,
284
- initialPageParam,
285
- queryParam
286
- }: Props$2): FabricReactNode;
287
- declare namespace SuspenseInfiniteQuery {
288
- var getParams: ({
289
- paramsType,
290
- paramsCasing,
291
- pathParamsType,
292
- typeSchemas,
293
- pageParamGeneric
294
- }: GetParamsProps$2) => FunctionParams;
295
- }
296
- //#endregion
297
- //#region src/components/SuspenseInfiniteQueryOptions.d.ts
298
- type Props$1 = {
299
- name: string;
300
- clientName: string;
301
- queryKeyName: string;
302
- typeSchemas: OperationSchemas;
303
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
304
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
305
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
306
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
307
- initialPageParam: Infinite['initialPageParam'];
308
- cursorParam: Infinite['cursorParam'];
309
- nextParam: Infinite['nextParam'];
310
- previousParam: Infinite['previousParam'];
311
- queryParam: Infinite['queryParam'];
312
- };
313
- type GetParamsProps$1 = {
314
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
315
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
316
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
317
- typeSchemas: OperationSchemas;
318
- };
319
- declare function SuspenseInfiniteQueryOptions({
320
- name,
321
- clientName,
322
- initialPageParam,
323
- cursorParam,
324
- nextParam,
325
- previousParam,
326
- typeSchemas,
327
- paramsCasing,
328
- paramsType,
329
- dataReturnType,
330
- pathParamsType,
331
- queryParam,
332
- queryKeyName
333
- }: Props$1): FabricReactNode;
334
- declare namespace SuspenseInfiniteQueryOptions {
335
- var getParams: ({
336
- paramsType,
337
- paramsCasing,
338
- pathParamsType,
339
- typeSchemas
340
- }: GetParamsProps$1) => FunctionParams;
341
- }
342
- //#endregion
343
- //#region src/components/SuspenseQuery.d.ts
344
- type Props = {
345
- /**
346
- * Name of the function
347
- */
348
- name: string;
349
- queryOptionsName: string;
350
- queryKeyName: string;
351
- queryKeyTypeName: string;
352
- typeSchemas: OperationSchemas;
353
- operation: Operation;
354
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
355
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
356
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
357
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
358
- customOptions: PluginReactQuery['resolvedOptions']['customOptions'];
359
- };
360
- type GetParamsProps = {
361
- paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
362
- paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
363
- pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
364
- dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
365
- typeSchemas: OperationSchemas;
366
- };
367
- /**
368
- * Generates a strongly-typed React Query Suspense hook function for an OpenAPI operation.
369
- *
370
- * The generated function wraps `useSuspenseQuery`, providing type-safe parameters and return types based on the supplied OpenAPI schemas and configuration.
371
- *
372
- * @returns A React component source node containing the generated query function.
373
- */
374
- declare function SuspenseQuery({
375
- name,
376
- queryKeyTypeName,
377
- queryOptionsName,
378
- queryKeyName,
379
- paramsType,
380
- paramsCasing,
381
- pathParamsType,
382
- dataReturnType,
383
- typeSchemas,
384
- operation,
385
- customOptions
386
- }: Props): FabricReactNode;
387
- declare namespace SuspenseQuery {
388
- var getParams: ({
389
- paramsType,
390
- paramsCasing,
391
- pathParamsType,
392
- dataReturnType,
393
- typeSchemas
394
- }: GetParamsProps) => FunctionParams;
395
- }
396
- //#endregion
397
- export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, MutationOptions, Query, QueryKey, QueryOptions, SuspenseInfiniteQuery, SuspenseInfiniteQueryOptions, SuspenseQuery };
398
- //# sourceMappingURL=components.d.ts.map
@@ -1,2 +0,0 @@
1
- import { a as Mutation, c as InfiniteQuery, d as MutationKey, i as Query, l as QueryOptions, n as SuspenseInfiniteQueryOptions, o as MutationOptions, r as SuspenseInfiniteQuery, s as InfiniteQueryOptions, t as SuspenseQuery, u as QueryKey } from "./components-CpyHYGOw.js";
2
- export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, MutationOptions, Query, QueryKey, QueryOptions, SuspenseInfiniteQuery, SuspenseInfiniteQueryOptions, SuspenseQuery };