@kubb/plugin-react-query 5.0.0-alpha.8 → 5.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +17 -10
- package/README.md +1 -3
- package/dist/components-DTGLu4UV.js +1451 -0
- package/dist/components-DTGLu4UV.js.map +1 -0
- package/dist/components-dAKJEn9b.cjs +1571 -0
- package/dist/components-dAKJEn9b.cjs.map +1 -0
- package/dist/components.cjs +1 -1
- package/dist/components.d.ts +105 -161
- package/dist/components.js +1 -1
- package/dist/generators-CWEQsdO9.cjs +1502 -0
- package/dist/generators-CWEQsdO9.cjs.map +1 -0
- package/dist/generators-C_fbcjpG.js +1460 -0
- package/dist/generators-C_fbcjpG.js.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.ts +9 -476
- package/dist/generators.js +1 -1
- package/dist/index.cjs +114 -126
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.js +110 -126
- package/dist/index.js.map +1 -1
- package/dist/{types-D5S7Ny9r.d.ts → types-DfaFRSBf.d.ts} +100 -86
- package/package.json +59 -62
- package/src/components/InfiniteQuery.tsx +75 -139
- package/src/components/InfiniteQueryOptions.tsx +62 -164
- package/src/components/Mutation.tsx +58 -113
- package/src/components/MutationOptions.tsx +61 -80
- package/src/components/Query.tsx +67 -140
- package/src/components/QueryOptions.tsx +75 -135
- package/src/components/SuspenseInfiniteQuery.tsx +75 -139
- package/src/components/SuspenseInfiniteQueryOptions.tsx +62 -164
- package/src/components/SuspenseQuery.tsx +67 -150
- package/src/generators/customHookOptionsFileGenerator.tsx +33 -45
- package/src/generators/hookOptionsGenerator.tsx +115 -175
- package/src/generators/infiniteQueryGenerator.tsx +183 -176
- package/src/generators/mutationGenerator.tsx +127 -138
- package/src/generators/queryGenerator.tsx +141 -141
- package/src/generators/suspenseInfiniteQueryGenerator.tsx +175 -155
- package/src/generators/suspenseQueryGenerator.tsx +149 -148
- package/src/index.ts +1 -1
- package/src/plugin.ts +133 -183
- package/src/resolvers/resolverReactQuery.ts +22 -0
- package/src/types.ts +67 -45
- package/src/utils.ts +40 -0
- package/dist/components-BHQT9ZLc.cjs +0 -1634
- package/dist/components-BHQT9ZLc.cjs.map +0 -1
- package/dist/components-CpyHYGOw.js +0 -1520
- package/dist/components-CpyHYGOw.js.map +0 -1
- package/dist/generators-DP07m3rH.cjs +0 -1469
- package/dist/generators-DP07m3rH.cjs.map +0 -1
- package/dist/generators-DkQwKTc2.js +0 -1427
- package/dist/generators-DkQwKTc2.js.map +0 -1
package/dist/components.d.ts
CHANGED
|
@@ -1,21 +1,17 @@
|
|
|
1
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-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { FabricReactNode } from "@kubb/react-fabric/types";
|
|
2
|
+
import { a as MutationKey, i as QueryKey, r as PluginReactQuery, t as Infinite } from "./types-DfaFRSBf.js";
|
|
3
|
+
import { ast } from "@kubb/core";
|
|
4
|
+
import { ResolverTs } from "@kubb/plugin-ts";
|
|
5
|
+
import { KubbReactNode } from "@kubb/renderer-jsx/types";
|
|
7
6
|
|
|
8
7
|
//#region src/components/InfiniteQuery.d.ts
|
|
9
8
|
type Props$8 = {
|
|
10
|
-
/**
|
|
11
|
-
* Name of the function
|
|
12
|
-
*/
|
|
13
9
|
name: string;
|
|
14
10
|
queryOptionsName: string;
|
|
15
11
|
queryKeyName: string;
|
|
16
12
|
queryKeyTypeName: string;
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
node: ast.OperationNode;
|
|
14
|
+
tsResolver: ResolverTs;
|
|
19
15
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
20
16
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
21
17
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
@@ -24,13 +20,6 @@ type Props$8 = {
|
|
|
24
20
|
queryParam?: Infinite['queryParam'];
|
|
25
21
|
customOptions: PluginReactQuery['resolvedOptions']['customOptions'];
|
|
26
22
|
};
|
|
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
23
|
declare function InfiniteQuery({
|
|
35
24
|
name,
|
|
36
25
|
queryKeyTypeName,
|
|
@@ -40,20 +29,21 @@ declare function InfiniteQuery({
|
|
|
40
29
|
paramsCasing,
|
|
41
30
|
pathParamsType,
|
|
42
31
|
dataReturnType,
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
node,
|
|
33
|
+
tsResolver,
|
|
45
34
|
initialPageParam,
|
|
46
35
|
queryParam,
|
|
47
36
|
customOptions
|
|
48
|
-
}: Props$8):
|
|
37
|
+
}: Props$8): KubbReactNode;
|
|
49
38
|
declare namespace InfiniteQuery {
|
|
50
|
-
var getParams: ({
|
|
51
|
-
paramsType
|
|
52
|
-
paramsCasing
|
|
53
|
-
pathParamsType
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
39
|
+
var getParams: (node: ast.OperationNode, options: {
|
|
40
|
+
paramsType: PluginReactQuery["resolvedOptions"]["paramsType"];
|
|
41
|
+
paramsCasing: PluginReactQuery["resolvedOptions"]["paramsCasing"];
|
|
42
|
+
pathParamsType: PluginReactQuery["resolvedOptions"]["pathParamsType"];
|
|
43
|
+
dataReturnType: PluginReactQuery["resolvedOptions"]["client"]["dataReturnType"];
|
|
44
|
+
resolver: ResolverTs;
|
|
45
|
+
pageParamGeneric: string;
|
|
46
|
+
}) => ast.FunctionParametersNode;
|
|
57
47
|
}
|
|
58
48
|
//#endregion
|
|
59
49
|
//#region src/components/InfiniteQueryOptions.d.ts
|
|
@@ -61,7 +51,8 @@ type Props$7 = {
|
|
|
61
51
|
name: string;
|
|
62
52
|
clientName: string;
|
|
63
53
|
queryKeyName: string;
|
|
64
|
-
|
|
54
|
+
node: ast.OperationNode;
|
|
55
|
+
tsResolver: ResolverTs;
|
|
65
56
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
66
57
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
67
58
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
@@ -72,12 +63,6 @@ type Props$7 = {
|
|
|
72
63
|
previousParam: Infinite['previousParam'];
|
|
73
64
|
queryParam: Infinite['queryParam'];
|
|
74
65
|
};
|
|
75
|
-
type GetParamsProps$6 = {
|
|
76
|
-
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
77
|
-
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
78
|
-
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
79
|
-
typeSchemas: OperationSchemas;
|
|
80
|
-
};
|
|
81
66
|
declare function InfiniteQueryOptions({
|
|
82
67
|
name,
|
|
83
68
|
clientName,
|
|
@@ -85,34 +70,32 @@ declare function InfiniteQueryOptions({
|
|
|
85
70
|
cursorParam,
|
|
86
71
|
nextParam,
|
|
87
72
|
previousParam,
|
|
88
|
-
|
|
73
|
+
node,
|
|
74
|
+
tsResolver,
|
|
89
75
|
paramsCasing,
|
|
90
76
|
paramsType,
|
|
91
77
|
dataReturnType,
|
|
92
78
|
pathParamsType,
|
|
93
79
|
queryParam,
|
|
94
80
|
queryKeyName
|
|
95
|
-
}: Props$7):
|
|
81
|
+
}: Props$7): KubbReactNode;
|
|
96
82
|
declare namespace InfiniteQueryOptions {
|
|
97
|
-
var getParams: ({
|
|
98
|
-
paramsType
|
|
99
|
-
paramsCasing
|
|
100
|
-
pathParamsType
|
|
101
|
-
|
|
102
|
-
}
|
|
83
|
+
var getParams: (node: ast.OperationNode, options: {
|
|
84
|
+
paramsType: PluginReactQuery["resolvedOptions"]["paramsType"];
|
|
85
|
+
paramsCasing: PluginReactQuery["resolvedOptions"]["paramsCasing"];
|
|
86
|
+
pathParamsType: PluginReactQuery["resolvedOptions"]["pathParamsType"];
|
|
87
|
+
resolver: ResolverTs;
|
|
88
|
+
}) => ast.FunctionParametersNode;
|
|
103
89
|
}
|
|
104
90
|
//#endregion
|
|
105
91
|
//#region src/components/Mutation.d.ts
|
|
106
92
|
type Props$6 = {
|
|
107
|
-
/**
|
|
108
|
-
* Name of the function
|
|
109
|
-
*/
|
|
110
93
|
name: string;
|
|
111
94
|
typeName: string;
|
|
112
95
|
mutationOptionsName: string;
|
|
113
96
|
mutationKeyName: string;
|
|
114
|
-
|
|
115
|
-
|
|
97
|
+
node: ast.OperationNode;
|
|
98
|
+
tsResolver: ResolverTs;
|
|
116
99
|
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
117
100
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
118
101
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
@@ -122,68 +105,62 @@ declare function Mutation({
|
|
|
122
105
|
name,
|
|
123
106
|
mutationOptionsName,
|
|
124
107
|
paramsCasing,
|
|
125
|
-
pathParamsType,
|
|
126
108
|
dataReturnType,
|
|
127
|
-
|
|
128
|
-
|
|
109
|
+
node,
|
|
110
|
+
tsResolver,
|
|
129
111
|
mutationKeyName,
|
|
130
112
|
customOptions
|
|
131
|
-
}: Props$6):
|
|
113
|
+
}: Props$6): KubbReactNode;
|
|
114
|
+
declare namespace Mutation {
|
|
115
|
+
var getParams: (node: ast.OperationNode, options: {
|
|
116
|
+
paramsCasing: PluginReactQuery["resolvedOptions"]["paramsCasing"];
|
|
117
|
+
dataReturnType: PluginReactQuery["resolvedOptions"]["client"]["dataReturnType"];
|
|
118
|
+
resolver: ResolverTs;
|
|
119
|
+
}) => ast.FunctionParametersNode;
|
|
120
|
+
}
|
|
132
121
|
//#endregion
|
|
133
122
|
//#region src/components/MutationOptions.d.ts
|
|
134
123
|
type Props$5 = {
|
|
135
124
|
name: string;
|
|
136
125
|
clientName: string;
|
|
137
126
|
mutationKeyName: string;
|
|
138
|
-
|
|
127
|
+
node: ast.OperationNode;
|
|
128
|
+
tsResolver: ResolverTs;
|
|
139
129
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
140
130
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
141
131
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
142
132
|
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
143
133
|
};
|
|
144
|
-
|
|
145
|
-
typeSchemas: OperationSchemas;
|
|
146
|
-
};
|
|
134
|
+
declare function getConfigParam(node: ast.OperationNode, resolver: ResolverTs): ast.FunctionParametersNode;
|
|
147
135
|
declare function MutationOptions({
|
|
148
136
|
name,
|
|
149
137
|
clientName,
|
|
150
138
|
dataReturnType,
|
|
151
|
-
|
|
139
|
+
node,
|
|
140
|
+
tsResolver,
|
|
152
141
|
paramsCasing,
|
|
153
142
|
paramsType,
|
|
154
143
|
pathParamsType,
|
|
155
144
|
mutationKeyName
|
|
156
|
-
}: Props$5):
|
|
145
|
+
}: Props$5): KubbReactNode;
|
|
157
146
|
declare namespace MutationOptions {
|
|
158
|
-
var getParams:
|
|
159
|
-
typeSchemas
|
|
160
|
-
}: GetParamsProps$5) => FunctionParams;
|
|
147
|
+
var getParams: typeof getConfigParam;
|
|
161
148
|
}
|
|
162
149
|
//#endregion
|
|
163
150
|
//#region src/components/Query.d.ts
|
|
164
151
|
type Props$4 = {
|
|
165
|
-
/**
|
|
166
|
-
* Name of the function
|
|
167
|
-
*/
|
|
168
152
|
name: string;
|
|
169
153
|
queryOptionsName: string;
|
|
170
154
|
queryKeyName: string;
|
|
171
155
|
queryKeyTypeName: string;
|
|
172
|
-
|
|
173
|
-
|
|
156
|
+
node: ast.OperationNode;
|
|
157
|
+
tsResolver: ResolverTs;
|
|
174
158
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
175
159
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
176
160
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
177
161
|
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
178
162
|
customOptions: PluginReactQuery['resolvedOptions']['customOptions'];
|
|
179
163
|
};
|
|
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
164
|
declare function Query({
|
|
188
165
|
name,
|
|
189
166
|
queryKeyTypeName,
|
|
@@ -193,18 +170,18 @@ declare function Query({
|
|
|
193
170
|
paramsCasing,
|
|
194
171
|
pathParamsType,
|
|
195
172
|
dataReturnType,
|
|
196
|
-
|
|
197
|
-
|
|
173
|
+
node,
|
|
174
|
+
tsResolver,
|
|
198
175
|
customOptions
|
|
199
|
-
}: Props$4):
|
|
176
|
+
}: Props$4): KubbReactNode;
|
|
200
177
|
declare namespace Query {
|
|
201
|
-
var getParams: ({
|
|
202
|
-
paramsType
|
|
203
|
-
paramsCasing
|
|
204
|
-
pathParamsType
|
|
205
|
-
dataReturnType
|
|
206
|
-
|
|
207
|
-
}
|
|
178
|
+
var getParams: (node: ast.OperationNode, options: {
|
|
179
|
+
paramsType: PluginReactQuery["resolvedOptions"]["paramsType"];
|
|
180
|
+
paramsCasing: PluginReactQuery["resolvedOptions"]["paramsCasing"];
|
|
181
|
+
pathParamsType: PluginReactQuery["resolvedOptions"]["pathParamsType"];
|
|
182
|
+
dataReturnType: PluginReactQuery["resolvedOptions"]["client"]["dataReturnType"];
|
|
183
|
+
resolver: ResolverTs;
|
|
184
|
+
}) => ast.FunctionParametersNode;
|
|
208
185
|
}
|
|
209
186
|
//#endregion
|
|
210
187
|
//#region src/components/QueryOptions.d.ts
|
|
@@ -212,48 +189,42 @@ type Props$3 = {
|
|
|
212
189
|
name: string;
|
|
213
190
|
clientName: string;
|
|
214
191
|
queryKeyName: string;
|
|
215
|
-
|
|
192
|
+
node: ast.OperationNode;
|
|
193
|
+
tsResolver: ResolverTs;
|
|
216
194
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
217
195
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
218
196
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
219
197
|
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
220
198
|
};
|
|
221
|
-
|
|
222
|
-
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
199
|
+
declare function getQueryOptionsParams(node: ast.OperationNode, options: {
|
|
223
200
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
201
|
+
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
224
202
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
225
|
-
|
|
226
|
-
};
|
|
203
|
+
resolver: ResolverTs;
|
|
204
|
+
}): ast.FunctionParametersNode;
|
|
227
205
|
declare function QueryOptions({
|
|
228
206
|
name,
|
|
229
207
|
clientName,
|
|
230
208
|
dataReturnType,
|
|
231
|
-
|
|
209
|
+
node,
|
|
210
|
+
tsResolver,
|
|
232
211
|
paramsCasing,
|
|
233
212
|
paramsType,
|
|
234
213
|
pathParamsType,
|
|
235
214
|
queryKeyName
|
|
236
|
-
}: Props$3):
|
|
215
|
+
}: Props$3): KubbReactNode;
|
|
237
216
|
declare namespace QueryOptions {
|
|
238
|
-
var getParams:
|
|
239
|
-
paramsType,
|
|
240
|
-
paramsCasing,
|
|
241
|
-
pathParamsType,
|
|
242
|
-
typeSchemas
|
|
243
|
-
}: GetParamsProps$3) => FunctionParams;
|
|
217
|
+
var getParams: typeof getQueryOptionsParams;
|
|
244
218
|
}
|
|
245
219
|
//#endregion
|
|
246
220
|
//#region src/components/SuspenseInfiniteQuery.d.ts
|
|
247
221
|
type Props$2 = {
|
|
248
|
-
/**
|
|
249
|
-
* Name of the function
|
|
250
|
-
*/
|
|
251
222
|
name: string;
|
|
252
223
|
queryOptionsName: string;
|
|
253
224
|
queryKeyName: string;
|
|
254
225
|
queryKeyTypeName: string;
|
|
255
|
-
|
|
256
|
-
|
|
226
|
+
node: ast.OperationNode;
|
|
227
|
+
tsResolver: ResolverTs;
|
|
257
228
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
258
229
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
259
230
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
@@ -262,13 +233,6 @@ type Props$2 = {
|
|
|
262
233
|
initialPageParam: Infinite['initialPageParam'];
|
|
263
234
|
queryParam?: Infinite['queryParam'];
|
|
264
235
|
};
|
|
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
236
|
declare function SuspenseInfiniteQuery({
|
|
273
237
|
name,
|
|
274
238
|
queryKeyTypeName,
|
|
@@ -278,20 +242,21 @@ declare function SuspenseInfiniteQuery({
|
|
|
278
242
|
paramsCasing,
|
|
279
243
|
pathParamsType,
|
|
280
244
|
dataReturnType,
|
|
281
|
-
|
|
282
|
-
|
|
245
|
+
node,
|
|
246
|
+
tsResolver,
|
|
283
247
|
customOptions,
|
|
284
248
|
initialPageParam,
|
|
285
249
|
queryParam
|
|
286
|
-
}: Props$2):
|
|
250
|
+
}: Props$2): KubbReactNode;
|
|
287
251
|
declare namespace SuspenseInfiniteQuery {
|
|
288
|
-
var getParams: ({
|
|
289
|
-
paramsType
|
|
290
|
-
paramsCasing
|
|
291
|
-
pathParamsType
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
252
|
+
var getParams: (node: ast.OperationNode, options: {
|
|
253
|
+
paramsType: PluginReactQuery["resolvedOptions"]["paramsType"];
|
|
254
|
+
paramsCasing: PluginReactQuery["resolvedOptions"]["paramsCasing"];
|
|
255
|
+
pathParamsType: PluginReactQuery["resolvedOptions"]["pathParamsType"];
|
|
256
|
+
dataReturnType: PluginReactQuery["resolvedOptions"]["client"]["dataReturnType"];
|
|
257
|
+
resolver: ResolverTs;
|
|
258
|
+
pageParamGeneric: string;
|
|
259
|
+
}) => ast.FunctionParametersNode;
|
|
295
260
|
}
|
|
296
261
|
//#endregion
|
|
297
262
|
//#region src/components/SuspenseInfiniteQueryOptions.d.ts
|
|
@@ -299,7 +264,8 @@ type Props$1 = {
|
|
|
299
264
|
name: string;
|
|
300
265
|
clientName: string;
|
|
301
266
|
queryKeyName: string;
|
|
302
|
-
|
|
267
|
+
node: ast.OperationNode;
|
|
268
|
+
tsResolver: ResolverTs;
|
|
303
269
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
304
270
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
305
271
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
@@ -310,12 +276,6 @@ type Props$1 = {
|
|
|
310
276
|
previousParam: Infinite['previousParam'];
|
|
311
277
|
queryParam: Infinite['queryParam'];
|
|
312
278
|
};
|
|
313
|
-
type GetParamsProps$1 = {
|
|
314
|
-
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
315
|
-
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
316
|
-
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
317
|
-
typeSchemas: OperationSchemas;
|
|
318
|
-
};
|
|
319
279
|
declare function SuspenseInfiniteQueryOptions({
|
|
320
280
|
name,
|
|
321
281
|
clientName,
|
|
@@ -323,54 +283,38 @@ declare function SuspenseInfiniteQueryOptions({
|
|
|
323
283
|
cursorParam,
|
|
324
284
|
nextParam,
|
|
325
285
|
previousParam,
|
|
326
|
-
|
|
286
|
+
node,
|
|
287
|
+
tsResolver,
|
|
327
288
|
paramsCasing,
|
|
328
289
|
paramsType,
|
|
329
290
|
dataReturnType,
|
|
330
291
|
pathParamsType,
|
|
331
292
|
queryParam,
|
|
332
293
|
queryKeyName
|
|
333
|
-
}: Props$1):
|
|
294
|
+
}: Props$1): KubbReactNode;
|
|
334
295
|
declare namespace SuspenseInfiniteQueryOptions {
|
|
335
|
-
var getParams: ({
|
|
336
|
-
paramsType
|
|
337
|
-
paramsCasing
|
|
338
|
-
pathParamsType
|
|
339
|
-
|
|
340
|
-
}
|
|
296
|
+
var getParams: (node: ast.OperationNode, options: {
|
|
297
|
+
paramsType: PluginReactQuery["resolvedOptions"]["paramsType"];
|
|
298
|
+
paramsCasing: PluginReactQuery["resolvedOptions"]["paramsCasing"];
|
|
299
|
+
pathParamsType: PluginReactQuery["resolvedOptions"]["pathParamsType"];
|
|
300
|
+
resolver: ResolverTs;
|
|
301
|
+
}) => ast.FunctionParametersNode;
|
|
341
302
|
}
|
|
342
303
|
//#endregion
|
|
343
304
|
//#region src/components/SuspenseQuery.d.ts
|
|
344
305
|
type Props = {
|
|
345
|
-
/**
|
|
346
|
-
* Name of the function
|
|
347
|
-
*/
|
|
348
306
|
name: string;
|
|
349
307
|
queryOptionsName: string;
|
|
350
308
|
queryKeyName: string;
|
|
351
309
|
queryKeyTypeName: string;
|
|
352
|
-
|
|
353
|
-
|
|
310
|
+
node: ast.OperationNode;
|
|
311
|
+
tsResolver: ResolverTs;
|
|
354
312
|
paramsCasing: PluginReactQuery['resolvedOptions']['paramsCasing'];
|
|
355
313
|
paramsType: PluginReactQuery['resolvedOptions']['paramsType'];
|
|
356
314
|
pathParamsType: PluginReactQuery['resolvedOptions']['pathParamsType'];
|
|
357
315
|
dataReturnType: PluginReactQuery['resolvedOptions']['client']['dataReturnType'];
|
|
358
316
|
customOptions: PluginReactQuery['resolvedOptions']['customOptions'];
|
|
359
317
|
};
|
|
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
318
|
declare function SuspenseQuery({
|
|
375
319
|
name,
|
|
376
320
|
queryKeyTypeName,
|
|
@@ -380,18 +324,18 @@ declare function SuspenseQuery({
|
|
|
380
324
|
paramsCasing,
|
|
381
325
|
pathParamsType,
|
|
382
326
|
dataReturnType,
|
|
383
|
-
|
|
384
|
-
|
|
327
|
+
node,
|
|
328
|
+
tsResolver,
|
|
385
329
|
customOptions
|
|
386
|
-
}: Props):
|
|
330
|
+
}: Props): KubbReactNode;
|
|
387
331
|
declare namespace SuspenseQuery {
|
|
388
|
-
var getParams: ({
|
|
389
|
-
paramsType
|
|
390
|
-
paramsCasing
|
|
391
|
-
pathParamsType
|
|
392
|
-
dataReturnType
|
|
393
|
-
|
|
394
|
-
}
|
|
332
|
+
var getParams: (node: ast.OperationNode, options: {
|
|
333
|
+
paramsType: PluginReactQuery["resolvedOptions"]["paramsType"];
|
|
334
|
+
paramsCasing: PluginReactQuery["resolvedOptions"]["paramsCasing"];
|
|
335
|
+
pathParamsType: PluginReactQuery["resolvedOptions"]["pathParamsType"];
|
|
336
|
+
dataReturnType: PluginReactQuery["resolvedOptions"]["client"]["dataReturnType"];
|
|
337
|
+
resolver: ResolverTs;
|
|
338
|
+
}) => ast.FunctionParametersNode;
|
|
395
339
|
}
|
|
396
340
|
//#endregion
|
|
397
341
|
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, MutationOptions, Query, QueryKey, QueryOptions, SuspenseInfiniteQuery, SuspenseInfiniteQueryOptions, SuspenseQuery };
|
package/dist/components.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as Mutation, c as InfiniteQuery,
|
|
1
|
+
import { a as Mutation, c as InfiniteQuery, f as QueryKey, i as Query, l as QueryOptions, n as SuspenseInfiniteQueryOptions, o as MutationOptions, p as MutationKey, r as SuspenseInfiniteQuery, s as InfiniteQueryOptions, t as SuspenseQuery } from "./components-DTGLu4UV.js";
|
|
2
2
|
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, MutationOptions, Query, QueryKey, QueryOptions, SuspenseInfiniteQuery, SuspenseInfiniteQueryOptions, SuspenseQuery };
|