@kubb/plugin-vue-query 3.16.2 → 3.16.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components-ClNrCCre.cjs +873 -0
- package/dist/components-ClNrCCre.cjs.map +1 -0
- package/dist/components-D8lYnxao.js +803 -0
- package/dist/components-D8lYnxao.js.map +1 -0
- package/dist/components.cjs +9 -36
- package/dist/components.d.cts +266 -124
- package/dist/components.d.ts +266 -124
- package/dist/components.js +3 -3
- package/dist/generators-DIB6YtRr.js +556 -0
- package/dist/generators-DIB6YtRr.js.map +1 -0
- package/dist/generators-DIZQUvkg.cjs +573 -0
- package/dist/generators-DIZQUvkg.cjs.map +1 -0
- package/dist/generators.cjs +5 -20
- package/dist/generators.d.cts +12 -12
- package/dist/generators.d.ts +12 -12
- package/dist/generators.js +4 -4
- package/dist/index.cjs +118 -143
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +6 -8
- package/dist/index.d.ts +6 -8
- package/dist/index.js +118 -137
- package/dist/index.js.map +1 -1
- package/dist/types-DPDni0p-.d.ts +1385 -0
- package/dist/types-UcJcIqHK.d.cts +1385 -0
- package/package.json +23 -28
- package/dist/chunk-5RO5VZAJ.js +0 -444
- package/dist/chunk-5RO5VZAJ.js.map +0 -1
- package/dist/chunk-BBSHBY5N.cjs +0 -448
- package/dist/chunk-BBSHBY5N.cjs.map +0 -1
- package/dist/chunk-KHEXOVSW.js +0 -726
- package/dist/chunk-KHEXOVSW.js.map +0 -1
- package/dist/chunk-ZR7DRLPY.cjs +0 -734
- package/dist/chunk-ZR7DRLPY.cjs.map +0 -1
- package/dist/components.cjs.map +0 -1
- package/dist/components.js.map +0 -1
- package/dist/generators.cjs.map +0 -1
- package/dist/generators.js.map +0 -1
- package/dist/types-CDzVWC17.d.cts +0 -164
- package/dist/types-CDzVWC17.d.ts +0 -164
package/dist/components.d.ts
CHANGED
|
@@ -1,164 +1,306 @@
|
|
|
1
|
-
import { Operation } from
|
|
2
|
-
import {
|
|
3
|
-
import { ReactNode } from 'react';
|
|
4
|
-
import { P as PluginVueQuery, T as Transformer, I as Infinite } from './types-CDzVWC17.js';
|
|
5
|
-
import { FunctionParams } from '@kubb/react';
|
|
6
|
-
import '@kubb/core';
|
|
7
|
-
import '@kubb/plugin-client';
|
|
1
|
+
import { Infinite, Operation, OperationSchemas, PluginVueQuery, Transformer } from "./types-DPDni0p-.js";
|
|
2
|
+
import { ReactNode } from "react";
|
|
8
3
|
|
|
4
|
+
//#region ../react/src/utils/getFunctionParams.d.ts
|
|
5
|
+
type Param = {
|
|
6
|
+
/**
|
|
7
|
+
* `object` will return the pathParams as an object.
|
|
8
|
+
*
|
|
9
|
+
* `inline` will return the pathParams as comma separated params.
|
|
10
|
+
* @default `'inline'`
|
|
11
|
+
* @private
|
|
12
|
+
*/
|
|
13
|
+
mode?: 'object' | 'inline' | 'inlineSpread';
|
|
14
|
+
type?: 'string' | 'number' | (string & {});
|
|
15
|
+
optional?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @example test = "default"
|
|
18
|
+
*/
|
|
19
|
+
default?: string;
|
|
20
|
+
/**
|
|
21
|
+
* Used for no TypeScript(with mode object)
|
|
22
|
+
* @example test: "default"
|
|
23
|
+
*/
|
|
24
|
+
value?: string;
|
|
25
|
+
children?: Params;
|
|
26
|
+
};
|
|
27
|
+
type Params = Record<string, Param | undefined>;
|
|
28
|
+
type Options = {
|
|
29
|
+
type: 'constructor' | 'call' | 'object' | 'objectValue';
|
|
30
|
+
transformName?: (name: string) => string;
|
|
31
|
+
transformType?: (type: string) => string;
|
|
32
|
+
};
|
|
33
|
+
declare class FunctionParams {
|
|
34
|
+
#private;
|
|
35
|
+
static factory(params: Params): FunctionParams;
|
|
36
|
+
constructor(params: Params);
|
|
37
|
+
get params(): Params;
|
|
38
|
+
get flatParams(): Params;
|
|
39
|
+
toCall({
|
|
40
|
+
transformName,
|
|
41
|
+
transformType
|
|
42
|
+
}?: Pick<Options, 'transformName' | 'transformType'>): string;
|
|
43
|
+
toObject(): string;
|
|
44
|
+
toObjectValue(): string;
|
|
45
|
+
toConstructor(): string;
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/components/Mutation.d.ts
|
|
9
49
|
type Props$6 = {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
60
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
61
|
+
dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType'];
|
|
62
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
23
63
|
};
|
|
24
|
-
declare function Mutation({
|
|
25
|
-
|
|
64
|
+
declare function Mutation({
|
|
65
|
+
name,
|
|
66
|
+
clientName,
|
|
67
|
+
paramsCasing,
|
|
68
|
+
paramsType,
|
|
69
|
+
pathParamsType,
|
|
70
|
+
dataReturnType,
|
|
71
|
+
typeSchemas,
|
|
72
|
+
operation,
|
|
73
|
+
mutationKeyName
|
|
74
|
+
}: Props$6): ReactNode;
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/Query.d.ts
|
|
26
77
|
type Props$5 = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
78
|
+
/**
|
|
79
|
+
* Name of the function
|
|
80
|
+
*/
|
|
81
|
+
name: string;
|
|
82
|
+
queryOptionsName: string;
|
|
83
|
+
queryKeyName: string;
|
|
84
|
+
queryKeyTypeName: string;
|
|
85
|
+
typeSchemas: OperationSchemas;
|
|
86
|
+
operation: Operation;
|
|
87
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
88
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
89
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
90
|
+
dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType'];
|
|
40
91
|
};
|
|
41
92
|
type GetParamsProps$5 = {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
93
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
94
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
95
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
96
|
+
dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType'];
|
|
97
|
+
typeSchemas: OperationSchemas;
|
|
47
98
|
};
|
|
48
|
-
declare function Query({
|
|
99
|
+
declare function Query({
|
|
100
|
+
name,
|
|
101
|
+
queryKeyTypeName,
|
|
102
|
+
queryOptionsName,
|
|
103
|
+
queryKeyName,
|
|
104
|
+
paramsType,
|
|
105
|
+
paramsCasing,
|
|
106
|
+
pathParamsType,
|
|
107
|
+
dataReturnType,
|
|
108
|
+
typeSchemas,
|
|
109
|
+
operation
|
|
110
|
+
}: Props$5): ReactNode;
|
|
49
111
|
declare namespace Query {
|
|
50
|
-
|
|
112
|
+
var getParams: ({
|
|
113
|
+
paramsCasing,
|
|
114
|
+
paramsType,
|
|
115
|
+
pathParamsType,
|
|
116
|
+
dataReturnType,
|
|
117
|
+
typeSchemas
|
|
118
|
+
}: GetParamsProps$5) => FunctionParams;
|
|
51
119
|
}
|
|
52
|
-
|
|
120
|
+
//#endregion
|
|
121
|
+
//#region src/components/QueryKey.d.ts
|
|
53
122
|
type Props$4 = {
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
123
|
+
name: string;
|
|
124
|
+
typeName: string;
|
|
125
|
+
typeSchemas: OperationSchemas;
|
|
126
|
+
operation: Operation;
|
|
127
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
128
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
129
|
+
transformer: Transformer | undefined;
|
|
61
130
|
};
|
|
62
131
|
type GetParamsProps$4 = {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
132
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
133
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
134
|
+
typeSchemas: OperationSchemas;
|
|
66
135
|
};
|
|
67
|
-
declare function QueryKey({
|
|
136
|
+
declare function QueryKey({
|
|
137
|
+
name,
|
|
138
|
+
typeSchemas,
|
|
139
|
+
paramsCasing,
|
|
140
|
+
pathParamsType,
|
|
141
|
+
operation,
|
|
142
|
+
typeName,
|
|
143
|
+
transformer
|
|
144
|
+
}: Props$4): ReactNode;
|
|
68
145
|
declare namespace QueryKey {
|
|
69
|
-
|
|
70
|
-
|
|
146
|
+
var getParams: ({
|
|
147
|
+
pathParamsType,
|
|
148
|
+
paramsCasing,
|
|
149
|
+
typeSchemas
|
|
150
|
+
}: GetParamsProps$4) => FunctionParams;
|
|
151
|
+
var getTransformer: Transformer;
|
|
71
152
|
}
|
|
72
|
-
|
|
153
|
+
//#endregion
|
|
154
|
+
//#region src/components/QueryOptions.d.ts
|
|
73
155
|
type Props$3 = {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
156
|
+
name: string;
|
|
157
|
+
clientName: string;
|
|
158
|
+
queryKeyName: string;
|
|
159
|
+
typeSchemas: OperationSchemas;
|
|
160
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
161
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
162
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
163
|
+
dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType'];
|
|
82
164
|
};
|
|
83
165
|
type GetParamsProps$3 = {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
166
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
167
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
168
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
169
|
+
typeSchemas: OperationSchemas;
|
|
88
170
|
};
|
|
89
|
-
declare function QueryOptions({
|
|
171
|
+
declare function QueryOptions({
|
|
172
|
+
name,
|
|
173
|
+
clientName,
|
|
174
|
+
dataReturnType,
|
|
175
|
+
typeSchemas,
|
|
176
|
+
paramsCasing,
|
|
177
|
+
paramsType,
|
|
178
|
+
pathParamsType,
|
|
179
|
+
queryKeyName
|
|
180
|
+
}: Props$3): ReactNode;
|
|
90
181
|
declare namespace QueryOptions {
|
|
91
|
-
|
|
182
|
+
var getParams: ({
|
|
183
|
+
paramsType,
|
|
184
|
+
paramsCasing,
|
|
185
|
+
pathParamsType,
|
|
186
|
+
typeSchemas
|
|
187
|
+
}: GetParamsProps$3) => FunctionParams;
|
|
92
188
|
}
|
|
93
|
-
|
|
189
|
+
//#endregion
|
|
190
|
+
//#region src/components/InfiniteQueryOptions.d.ts
|
|
94
191
|
type Props$2 = {
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
192
|
+
name: string;
|
|
193
|
+
clientName: string;
|
|
194
|
+
queryKeyName: string;
|
|
195
|
+
typeSchemas: OperationSchemas;
|
|
196
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
197
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
198
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
199
|
+
dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType'];
|
|
200
|
+
initialPageParam: Infinite['initialPageParam'];
|
|
201
|
+
cursorParam: Infinite['cursorParam'];
|
|
202
|
+
queryParam: Infinite['queryParam'];
|
|
106
203
|
};
|
|
107
204
|
type GetParamsProps$2 = {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
205
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
206
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
207
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
208
|
+
typeSchemas: OperationSchemas;
|
|
112
209
|
};
|
|
113
|
-
declare function InfiniteQueryOptions({
|
|
210
|
+
declare function InfiniteQueryOptions({
|
|
211
|
+
name,
|
|
212
|
+
clientName,
|
|
213
|
+
initialPageParam,
|
|
214
|
+
cursorParam,
|
|
215
|
+
typeSchemas,
|
|
216
|
+
paramsType,
|
|
217
|
+
paramsCasing,
|
|
218
|
+
dataReturnType,
|
|
219
|
+
pathParamsType,
|
|
220
|
+
queryParam,
|
|
221
|
+
queryKeyName
|
|
222
|
+
}: Props$2): ReactNode;
|
|
114
223
|
declare namespace InfiniteQueryOptions {
|
|
115
|
-
|
|
224
|
+
var getParams: ({
|
|
225
|
+
paramsType,
|
|
226
|
+
paramsCasing,
|
|
227
|
+
pathParamsType,
|
|
228
|
+
typeSchemas
|
|
229
|
+
}: GetParamsProps$2) => FunctionParams;
|
|
116
230
|
}
|
|
117
|
-
|
|
231
|
+
//#endregion
|
|
232
|
+
//#region src/components/InfiniteQuery.d.ts
|
|
118
233
|
type Props$1 = {
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
234
|
+
/**
|
|
235
|
+
* Name of the function
|
|
236
|
+
*/
|
|
237
|
+
name: string;
|
|
238
|
+
queryOptionsName: string;
|
|
239
|
+
queryKeyName: string;
|
|
240
|
+
queryKeyTypeName: string;
|
|
241
|
+
typeSchemas: OperationSchemas;
|
|
242
|
+
operation: Operation;
|
|
243
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
244
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
245
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
246
|
+
dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType'];
|
|
132
247
|
};
|
|
133
248
|
type GetParamsProps$1 = {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
249
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
250
|
+
paramsType: PluginVueQuery['resolvedOptions']['paramsType'];
|
|
251
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
252
|
+
dataReturnType: PluginVueQuery['resolvedOptions']['client']['dataReturnType'];
|
|
253
|
+
typeSchemas: OperationSchemas;
|
|
139
254
|
};
|
|
140
|
-
declare function InfiniteQuery({
|
|
255
|
+
declare function InfiniteQuery({
|
|
256
|
+
name,
|
|
257
|
+
queryKeyTypeName,
|
|
258
|
+
queryOptionsName,
|
|
259
|
+
queryKeyName,
|
|
260
|
+
paramsType,
|
|
261
|
+
pathParamsType,
|
|
262
|
+
paramsCasing,
|
|
263
|
+
dataReturnType,
|
|
264
|
+
typeSchemas,
|
|
265
|
+
operation
|
|
266
|
+
}: Props$1): ReactNode;
|
|
141
267
|
declare namespace InfiniteQuery {
|
|
142
|
-
|
|
268
|
+
var getParams: ({
|
|
269
|
+
paramsType,
|
|
270
|
+
paramsCasing,
|
|
271
|
+
pathParamsType,
|
|
272
|
+
dataReturnType,
|
|
273
|
+
typeSchemas
|
|
274
|
+
}: GetParamsProps$1) => FunctionParams;
|
|
143
275
|
}
|
|
144
|
-
|
|
276
|
+
//#endregion
|
|
277
|
+
//#region src/components/MutationKey.d.ts
|
|
145
278
|
type Props = {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
279
|
+
name: string;
|
|
280
|
+
typeName: string;
|
|
281
|
+
typeSchemas: OperationSchemas;
|
|
282
|
+
operation: Operation;
|
|
283
|
+
paramsCasing: PluginVueQuery['resolvedOptions']['paramsCasing'];
|
|
284
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
285
|
+
transformer: Transformer | undefined;
|
|
153
286
|
};
|
|
154
287
|
type GetParamsProps = {
|
|
155
|
-
|
|
156
|
-
|
|
288
|
+
pathParamsType: PluginVueQuery['resolvedOptions']['pathParamsType'];
|
|
289
|
+
typeSchemas: OperationSchemas;
|
|
157
290
|
};
|
|
158
|
-
declare function MutationKey({
|
|
291
|
+
declare function MutationKey({
|
|
292
|
+
name,
|
|
293
|
+
typeSchemas,
|
|
294
|
+
paramsCasing,
|
|
295
|
+
pathParamsType,
|
|
296
|
+
operation,
|
|
297
|
+
typeName,
|
|
298
|
+
transformer
|
|
299
|
+
}: Props): ReactNode;
|
|
159
300
|
declare namespace MutationKey {
|
|
160
|
-
|
|
161
|
-
|
|
301
|
+
var getParams: ({}: GetParamsProps) => FunctionParams;
|
|
302
|
+
var getTransformer: Transformer;
|
|
162
303
|
}
|
|
163
|
-
|
|
304
|
+
//#endregion
|
|
164
305
|
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions };
|
|
306
|
+
//# sourceMappingURL=components.d.ts.map
|
package/dist/components.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions } from "./components-D8lYnxao.js";
|
|
2
|
+
|
|
3
|
+
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions };
|