@kubb/plugin-react-query 4.1.3 → 4.2.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.
- package/README.md +18 -16
- package/dist/components-DUCi70hD.cjs.map +1 -1
- package/dist/{components-D5kvem3f.js → components-Dc5XkKq5.js} +2 -2
- package/dist/components-Dc5XkKq5.js.map +1 -0
- package/dist/components.d.cts +19 -60
- package/dist/components.d.ts +19 -60
- package/dist/components.js +1 -1
- package/dist/{generators-Dnz9_qxT.js → generators-CqUlfy01.js} +13 -8
- package/dist/generators-CqUlfy01.js.map +1 -0
- package/dist/{generators-BeNg1AXS.cjs → generators-DaV-5jJ5.cjs} +11 -5
- package/dist/generators-DaV-5jJ5.cjs.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2 -2
- package/dist/{types-CEV0s7L4.d.cts → types-B8Fg-t4Z.d.ts} +69 -69
- package/dist/{types-CaU9WTtM.d.ts → types-DgkJznTO.d.cts} +69 -69
- package/package.json +9 -11
- package/src/components/InfiniteQuery.tsx +1 -2
- package/src/components/InfiniteQueryOptions.tsx +1 -2
- package/src/components/Mutation.tsx +1 -11
- package/src/components/MutationKey.tsx +1 -2
- package/src/components/Query.tsx +1 -2
- package/src/components/QueryKey.tsx +3 -5
- package/src/components/SuspenseQuery.tsx +1 -2
- package/src/generators/infiniteQueryGenerator.tsx +6 -6
- package/src/generators/mutationGenerator.tsx +6 -6
- package/src/generators/queryGenerator.tsx +6 -6
- package/src/generators/suspenseQueryGenerator.tsx +6 -6
- package/dist/components-D5kvem3f.js.map +0 -1
- package/dist/generators-BeNg1AXS.cjs.map +0 -1
- package/dist/generators-Dnz9_qxT.js.map +0 -1
package/dist/components.d.cts
CHANGED
|
@@ -1,49 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginReactQuery, t as Infinite } from "./types-DgkJznTO.cjs";
|
|
3
2
|
|
|
4
|
-
//#region
|
|
5
|
-
|
|
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
|
-
}
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
|
|
5
|
+
import * as import___kubb_react_fabric from "@kubb/react-fabric";
|
|
47
6
|
//#endregion
|
|
48
7
|
//#region src/components/InfiniteQuery.d.ts
|
|
49
8
|
type Props$8 = {
|
|
@@ -83,7 +42,7 @@ declare function InfiniteQuery({
|
|
|
83
42
|
operation,
|
|
84
43
|
initialPageParam,
|
|
85
44
|
queryParam
|
|
86
|
-
}: Props$8):
|
|
45
|
+
}: Props$8): any;
|
|
87
46
|
declare namespace InfiniteQuery {
|
|
88
47
|
var getParams: ({
|
|
89
48
|
paramsType,
|
|
@@ -91,7 +50,7 @@ declare namespace InfiniteQuery {
|
|
|
91
50
|
pathParamsType,
|
|
92
51
|
typeSchemas,
|
|
93
52
|
pageParamGeneric
|
|
94
|
-
}: GetParamsProps$7) => FunctionParams;
|
|
53
|
+
}: GetParamsProps$7) => index_d_exports.FunctionParams;
|
|
95
54
|
}
|
|
96
55
|
//#endregion
|
|
97
56
|
//#region src/components/InfiniteQueryOptions.d.ts
|
|
@@ -126,14 +85,14 @@ declare function InfiniteQueryOptions({
|
|
|
126
85
|
pathParamsType,
|
|
127
86
|
queryParam,
|
|
128
87
|
queryKeyName
|
|
129
|
-
}: Props$7):
|
|
88
|
+
}: Props$7): any;
|
|
130
89
|
declare namespace InfiniteQueryOptions {
|
|
131
90
|
var getParams: ({
|
|
132
91
|
paramsType,
|
|
133
92
|
paramsCasing,
|
|
134
93
|
pathParamsType,
|
|
135
94
|
typeSchemas
|
|
136
|
-
}: GetParamsProps$6) => FunctionParams;
|
|
95
|
+
}: GetParamsProps$6) => index_d_exports.FunctionParams;
|
|
137
96
|
}
|
|
138
97
|
//#endregion
|
|
139
98
|
//#region src/components/Mutation.d.ts
|
|
@@ -160,7 +119,7 @@ declare function Mutation({
|
|
|
160
119
|
typeSchemas,
|
|
161
120
|
operation,
|
|
162
121
|
mutationKeyName
|
|
163
|
-
}: Props$6):
|
|
122
|
+
}: Props$6): any;
|
|
164
123
|
//#endregion
|
|
165
124
|
//#region src/components/MutationKey.d.ts
|
|
166
125
|
type Props$5 = {
|
|
@@ -184,9 +143,9 @@ declare function MutationKey({
|
|
|
184
143
|
operation,
|
|
185
144
|
typeName,
|
|
186
145
|
transformer
|
|
187
|
-
}: Props$5):
|
|
146
|
+
}: Props$5): any;
|
|
188
147
|
declare namespace MutationKey {
|
|
189
|
-
var getParams: ({}: GetParamsProps$5) => FunctionParams;
|
|
148
|
+
var getParams: ({}: GetParamsProps$5) => index_d_exports.FunctionParams;
|
|
190
149
|
var getTransformer: Transformer;
|
|
191
150
|
}
|
|
192
151
|
//#endregion
|
|
@@ -217,7 +176,7 @@ declare function MutationOptions({
|
|
|
217
176
|
declare namespace MutationOptions {
|
|
218
177
|
var getParams: ({
|
|
219
178
|
typeSchemas
|
|
220
|
-
}: GetParamsProps$4) => FunctionParams;
|
|
179
|
+
}: GetParamsProps$4) => index_d_exports.FunctionParams;
|
|
221
180
|
}
|
|
222
181
|
//#endregion
|
|
223
182
|
//#region src/components/Query.d.ts
|
|
@@ -254,7 +213,7 @@ declare function Query({
|
|
|
254
213
|
dataReturnType,
|
|
255
214
|
typeSchemas,
|
|
256
215
|
operation
|
|
257
|
-
}: Props$3):
|
|
216
|
+
}: Props$3): any;
|
|
258
217
|
declare namespace Query {
|
|
259
218
|
var getParams: ({
|
|
260
219
|
paramsType,
|
|
@@ -262,7 +221,7 @@ declare namespace Query {
|
|
|
262
221
|
pathParamsType,
|
|
263
222
|
dataReturnType,
|
|
264
223
|
typeSchemas
|
|
265
|
-
}: GetParamsProps$3) => FunctionParams;
|
|
224
|
+
}: GetParamsProps$3) => index_d_exports.FunctionParams;
|
|
266
225
|
}
|
|
267
226
|
//#endregion
|
|
268
227
|
//#region src/components/QueryKey.d.ts
|
|
@@ -288,13 +247,13 @@ declare function QueryKey({
|
|
|
288
247
|
operation,
|
|
289
248
|
typeName,
|
|
290
249
|
transformer
|
|
291
|
-
}: Props$2):
|
|
250
|
+
}: Props$2): any;
|
|
292
251
|
declare namespace QueryKey {
|
|
293
252
|
var getParams: ({
|
|
294
253
|
pathParamsType,
|
|
295
254
|
paramsCasing,
|
|
296
255
|
typeSchemas
|
|
297
|
-
}: GetParamsProps$2) => FunctionParams;
|
|
256
|
+
}: GetParamsProps$2) => index_d_exports.FunctionParams;
|
|
298
257
|
var getTransformer: Transformer;
|
|
299
258
|
}
|
|
300
259
|
//#endregion
|
|
@@ -331,7 +290,7 @@ declare namespace QueryOptions {
|
|
|
331
290
|
paramsCasing,
|
|
332
291
|
pathParamsType,
|
|
333
292
|
typeSchemas
|
|
334
|
-
}: GetParamsProps$1) => FunctionParams;
|
|
293
|
+
}: GetParamsProps$1) => index_d_exports.FunctionParams;
|
|
335
294
|
}
|
|
336
295
|
//#endregion
|
|
337
296
|
//#region src/components/SuspenseQuery.d.ts
|
|
@@ -375,7 +334,7 @@ declare function SuspenseQuery({
|
|
|
375
334
|
dataReturnType,
|
|
376
335
|
typeSchemas,
|
|
377
336
|
operation
|
|
378
|
-
}: Props):
|
|
337
|
+
}: Props): any;
|
|
379
338
|
declare namespace SuspenseQuery {
|
|
380
339
|
var getParams: ({
|
|
381
340
|
paramsType,
|
|
@@ -383,7 +342,7 @@ declare namespace SuspenseQuery {
|
|
|
383
342
|
pathParamsType,
|
|
384
343
|
dataReturnType,
|
|
385
344
|
typeSchemas
|
|
386
|
-
}: GetParamsProps) => FunctionParams;
|
|
345
|
+
}: GetParamsProps) => index_d_exports.FunctionParams;
|
|
387
346
|
}
|
|
388
347
|
//#endregion
|
|
389
348
|
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, MutationOptions, Query, QueryKey, QueryOptions, SuspenseQuery };
|
package/dist/components.d.ts
CHANGED
|
@@ -1,49 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ReactNode } from "react";
|
|
1
|
+
import { c as Operation, i as Transformer, o as OperationSchemas, r as PluginReactQuery, t as Infinite } from "./types-B8Fg-t4Z.js";
|
|
3
2
|
|
|
4
|
-
//#region
|
|
5
|
-
|
|
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
|
-
}
|
|
3
|
+
//#region rolldown:runtime
|
|
4
|
+
|
|
5
|
+
import * as import___kubb_react_fabric from "@kubb/react-fabric";
|
|
47
6
|
//#endregion
|
|
48
7
|
//#region src/components/InfiniteQuery.d.ts
|
|
49
8
|
type Props$8 = {
|
|
@@ -83,7 +42,7 @@ declare function InfiniteQuery({
|
|
|
83
42
|
operation,
|
|
84
43
|
initialPageParam,
|
|
85
44
|
queryParam
|
|
86
|
-
}: Props$8):
|
|
45
|
+
}: Props$8): any;
|
|
87
46
|
declare namespace InfiniteQuery {
|
|
88
47
|
var getParams: ({
|
|
89
48
|
paramsType,
|
|
@@ -91,7 +50,7 @@ declare namespace InfiniteQuery {
|
|
|
91
50
|
pathParamsType,
|
|
92
51
|
typeSchemas,
|
|
93
52
|
pageParamGeneric
|
|
94
|
-
}: GetParamsProps$7) => FunctionParams;
|
|
53
|
+
}: GetParamsProps$7) => index_d_exports.FunctionParams;
|
|
95
54
|
}
|
|
96
55
|
//#endregion
|
|
97
56
|
//#region src/components/InfiniteQueryOptions.d.ts
|
|
@@ -126,14 +85,14 @@ declare function InfiniteQueryOptions({
|
|
|
126
85
|
pathParamsType,
|
|
127
86
|
queryParam,
|
|
128
87
|
queryKeyName
|
|
129
|
-
}: Props$7):
|
|
88
|
+
}: Props$7): any;
|
|
130
89
|
declare namespace InfiniteQueryOptions {
|
|
131
90
|
var getParams: ({
|
|
132
91
|
paramsType,
|
|
133
92
|
paramsCasing,
|
|
134
93
|
pathParamsType,
|
|
135
94
|
typeSchemas
|
|
136
|
-
}: GetParamsProps$6) => FunctionParams;
|
|
95
|
+
}: GetParamsProps$6) => index_d_exports.FunctionParams;
|
|
137
96
|
}
|
|
138
97
|
//#endregion
|
|
139
98
|
//#region src/components/Mutation.d.ts
|
|
@@ -160,7 +119,7 @@ declare function Mutation({
|
|
|
160
119
|
typeSchemas,
|
|
161
120
|
operation,
|
|
162
121
|
mutationKeyName
|
|
163
|
-
}: Props$6):
|
|
122
|
+
}: Props$6): any;
|
|
164
123
|
//#endregion
|
|
165
124
|
//#region src/components/MutationKey.d.ts
|
|
166
125
|
type Props$5 = {
|
|
@@ -184,9 +143,9 @@ declare function MutationKey({
|
|
|
184
143
|
operation,
|
|
185
144
|
typeName,
|
|
186
145
|
transformer
|
|
187
|
-
}: Props$5):
|
|
146
|
+
}: Props$5): any;
|
|
188
147
|
declare namespace MutationKey {
|
|
189
|
-
var getParams: ({}: GetParamsProps$5) => FunctionParams;
|
|
148
|
+
var getParams: ({}: GetParamsProps$5) => index_d_exports.FunctionParams;
|
|
190
149
|
var getTransformer: Transformer;
|
|
191
150
|
}
|
|
192
151
|
//#endregion
|
|
@@ -217,7 +176,7 @@ declare function MutationOptions({
|
|
|
217
176
|
declare namespace MutationOptions {
|
|
218
177
|
var getParams: ({
|
|
219
178
|
typeSchemas
|
|
220
|
-
}: GetParamsProps$4) => FunctionParams;
|
|
179
|
+
}: GetParamsProps$4) => index_d_exports.FunctionParams;
|
|
221
180
|
}
|
|
222
181
|
//#endregion
|
|
223
182
|
//#region src/components/Query.d.ts
|
|
@@ -254,7 +213,7 @@ declare function Query({
|
|
|
254
213
|
dataReturnType,
|
|
255
214
|
typeSchemas,
|
|
256
215
|
operation
|
|
257
|
-
}: Props$3):
|
|
216
|
+
}: Props$3): any;
|
|
258
217
|
declare namespace Query {
|
|
259
218
|
var getParams: ({
|
|
260
219
|
paramsType,
|
|
@@ -262,7 +221,7 @@ declare namespace Query {
|
|
|
262
221
|
pathParamsType,
|
|
263
222
|
dataReturnType,
|
|
264
223
|
typeSchemas
|
|
265
|
-
}: GetParamsProps$3) => FunctionParams;
|
|
224
|
+
}: GetParamsProps$3) => index_d_exports.FunctionParams;
|
|
266
225
|
}
|
|
267
226
|
//#endregion
|
|
268
227
|
//#region src/components/QueryKey.d.ts
|
|
@@ -288,13 +247,13 @@ declare function QueryKey({
|
|
|
288
247
|
operation,
|
|
289
248
|
typeName,
|
|
290
249
|
transformer
|
|
291
|
-
}: Props$2):
|
|
250
|
+
}: Props$2): any;
|
|
292
251
|
declare namespace QueryKey {
|
|
293
252
|
var getParams: ({
|
|
294
253
|
pathParamsType,
|
|
295
254
|
paramsCasing,
|
|
296
255
|
typeSchemas
|
|
297
|
-
}: GetParamsProps$2) => FunctionParams;
|
|
256
|
+
}: GetParamsProps$2) => index_d_exports.FunctionParams;
|
|
298
257
|
var getTransformer: Transformer;
|
|
299
258
|
}
|
|
300
259
|
//#endregion
|
|
@@ -331,7 +290,7 @@ declare namespace QueryOptions {
|
|
|
331
290
|
paramsCasing,
|
|
332
291
|
pathParamsType,
|
|
333
292
|
typeSchemas
|
|
334
|
-
}: GetParamsProps$1) => FunctionParams;
|
|
293
|
+
}: GetParamsProps$1) => index_d_exports.FunctionParams;
|
|
335
294
|
}
|
|
336
295
|
//#endregion
|
|
337
296
|
//#region src/components/SuspenseQuery.d.ts
|
|
@@ -375,7 +334,7 @@ declare function SuspenseQuery({
|
|
|
375
334
|
dataReturnType,
|
|
376
335
|
typeSchemas,
|
|
377
336
|
operation
|
|
378
|
-
}: Props):
|
|
337
|
+
}: Props): any;
|
|
379
338
|
declare namespace SuspenseQuery {
|
|
380
339
|
var getParams: ({
|
|
381
340
|
paramsType,
|
|
@@ -383,7 +342,7 @@ declare namespace SuspenseQuery {
|
|
|
383
342
|
pathParamsType,
|
|
384
343
|
dataReturnType,
|
|
385
344
|
typeSchemas
|
|
386
|
-
}: GetParamsProps) => FunctionParams;
|
|
345
|
+
}: GetParamsProps) => index_d_exports.FunctionParams;
|
|
387
346
|
}
|
|
388
347
|
//#endregion
|
|
389
348
|
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, MutationOptions, Query, QueryKey, QueryOptions, SuspenseQuery };
|
package/dist/components.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as MutationKey, c as QueryOptions, i as MutationOptions, l as QueryKey, n as Query, o as InfiniteQueryOptions, r as Mutation, s as InfiniteQuery, t as SuspenseQuery } from "./components-Dc5XkKq5.js";
|
|
2
2
|
|
|
3
3
|
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, MutationOptions, Query, QueryKey, QueryOptions, SuspenseQuery };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as MutationKey, c as QueryOptions, i as MutationOptions, l as QueryKey, n as Query, o as InfiniteQueryOptions, r as Mutation, s as InfiniteQuery, t as SuspenseQuery } from "./components-Dc5XkKq5.js";
|
|
2
2
|
import { createReactGenerator } from "@kubb/plugin-oas";
|
|
3
3
|
import { pluginTsName } from "@kubb/plugin-ts";
|
|
4
4
|
import { pluginZodName } from "@kubb/plugin-zod";
|
|
5
5
|
import { getBanner, getFooter } from "@kubb/plugin-oas/utils";
|
|
6
|
-
import { File
|
|
6
|
+
import { File } from "@kubb/react";
|
|
7
7
|
import { Fragment, jsx, jsxs } from "@kubb/react/jsx-runtime";
|
|
8
8
|
import { Client } from "@kubb/plugin-client/components";
|
|
9
|
+
import { usePlugin, usePluginManager } from "@kubb/core/hooks";
|
|
9
10
|
import { pluginClientName } from "@kubb/plugin-client";
|
|
10
11
|
import { useOas, useOperationManager } from "@kubb/plugin-oas/hooks";
|
|
11
12
|
import { difference } from "remeda";
|
|
@@ -14,7 +15,8 @@ import { difference } from "remeda";
|
|
|
14
15
|
const queryGenerator = createReactGenerator({
|
|
15
16
|
name: "react-query",
|
|
16
17
|
Operation({ options, operation }) {
|
|
17
|
-
const {
|
|
18
|
+
const { options: { output } } = usePlugin();
|
|
19
|
+
const pluginManager = usePluginManager();
|
|
18
20
|
const oas = useOas();
|
|
19
21
|
const { getSchemas, getName, getFile } = useOperationManager();
|
|
20
22
|
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
@@ -190,7 +192,8 @@ const queryGenerator = createReactGenerator({
|
|
|
190
192
|
const mutationGenerator = createReactGenerator({
|
|
191
193
|
name: "react-query",
|
|
192
194
|
Operation({ options, operation }) {
|
|
193
|
-
const {
|
|
195
|
+
const { options: { output } } = usePlugin();
|
|
196
|
+
const pluginManager = usePluginManager();
|
|
194
197
|
const oas = useOas();
|
|
195
198
|
const { getSchemas, getName, getFile } = useOperationManager();
|
|
196
199
|
const isMutation = !(!!options.query && options.query?.methods.some((method) => operation.method === method)) && difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method);
|
|
@@ -361,7 +364,8 @@ const mutationGenerator = createReactGenerator({
|
|
|
361
364
|
const infiniteQueryGenerator = createReactGenerator({
|
|
362
365
|
name: "react-infinite-query",
|
|
363
366
|
Operation({ options, operation }) {
|
|
364
|
-
const {
|
|
367
|
+
const { options: { output } } = usePlugin();
|
|
368
|
+
const pluginManager = usePluginManager();
|
|
365
369
|
const oas = useOas();
|
|
366
370
|
const { getSchemas, getName, getFile } = useOperationManager();
|
|
367
371
|
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
@@ -564,7 +568,8 @@ const infiniteQueryGenerator = createReactGenerator({
|
|
|
564
568
|
const suspenseQueryGenerator = createReactGenerator({
|
|
565
569
|
name: "react-suspense-query",
|
|
566
570
|
Operation({ options, operation }) {
|
|
567
|
-
const {
|
|
571
|
+
const { options: { output } } = usePlugin();
|
|
572
|
+
const pluginManager = usePluginManager();
|
|
568
573
|
const oas = useOas();
|
|
569
574
|
const { getSchemas, getName, getFile } = useOperationManager();
|
|
570
575
|
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
@@ -748,5 +753,5 @@ const suspenseQueryGenerator = createReactGenerator({
|
|
|
748
753
|
});
|
|
749
754
|
|
|
750
755
|
//#endregion
|
|
751
|
-
export { infiniteQueryGenerator, mutationGenerator
|
|
752
|
-
//# sourceMappingURL=generators-
|
|
756
|
+
export { queryGenerator as i, infiniteQueryGenerator as n, mutationGenerator as r, suspenseQueryGenerator as t };
|
|
757
|
+
//# sourceMappingURL=generators-CqUlfy01.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generators-CqUlfy01.js","names":[],"sources":["../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx","../src/generators/suspenseQueryGenerator.tsx"],"sourcesContent":["import { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ options, operation }) {\n const {\n options: { output },\n } = usePlugin<PluginReactQuery>()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\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 // grouping is coming from react-query instead of zod option, we need to pass the options of zod instead\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n if (!isQuery || isMutation) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n <File.Import name={'fetch'} path={options.client.importPath} />\n {hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.queryKey}\n />\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'QueryObserverOptions', 'UseQueryResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport { MutationOptions } from '../components/MutationOptions.tsx'\nimport type { PluginReactQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-query',\n Operation({ options, operation }) {\n const {\n options: { output },\n } = usePlugin<PluginReactQuery>()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/react-query'\n\n const mutation = {\n name: getName(operation, { type: 'function', prefix: 'use' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use' }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, { pluginKey: [pluginTsName], type: 'type' }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, { pluginKey: [pluginZodName], type: 'function' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n const client = {\n name: hasClientPlugin\n ? getName(operation, {\n type: 'function',\n pluginKey: [pluginClientName],\n })\n : getName(operation, {\n type: 'function',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const mutationOptions = {\n name: getName(operation, { type: 'function', suffix: 'MutationOptions' }),\n }\n\n const mutationKey = {\n name: getName(operation, { type: 'const', suffix: 'MutationKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'MutationKey' }),\n }\n\n if (!isMutation) {\n return null\n }\n\n return (\n <File\n baseName={mutation.file.baseName}\n path={mutation.file.path}\n meta={mutation.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={mutation.file.path} path={zod.file.path} />\n )}\n <File.Import name={'fetch'} path={options.client.importPath} />\n {!!hasClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n transformer={options.mutationKey}\n />\n\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['mutationOptions']} path={importPath} />\n\n <MutationOptions\n name={mutationOptions.name}\n clientName={client.name}\n mutationKeyName={mutationKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['UseMutationOptions', 'UseMutationResult', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n mutationOptionsName={mutationOptions.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-infinite-query',\n Operation({ options, operation }) {\n const {\n options: { output },\n } = usePlugin<PluginReactQuery>()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const infiniteOptions = options.infinite && typeof options.infinite === 'object' ? options.infinite : undefined\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'infinite' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\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 suffix: 'infinite',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'InfiniteQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'InfiniteQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'InfiniteQueryKey' }),\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 || !infiniteOptions) {\n return null\n }\n\n const normalizeKey = (key?: string | null) => (key ?? '').replace(/\\?$/, '')\n const queryParam = infiniteOptions.queryParam\n const cursorParam = infiniteOptions.cursorParam\n const queryParamKeys = type.schemas.queryParams?.keys ?? []\n const responseKeys = [...(type.schemas.responses?.flatMap((item) => item.keys ?? []) ?? []), ...(type.schemas.response?.keys ?? [])]\n\n const hasQueryParam = queryParam ? queryParamKeys.some((key) => normalizeKey(key) === queryParam) : false\n const hasCursorParam = cursorParam ? responseKeys.some((key) => normalizeKey(key) === cursorParam) : true\n\n if (!hasQueryParam || !hasCursorParam) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n {<File.Import name={'fetch'} path={options.client.importPath} />}\n {hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['InfiniteData']} isTypeOnly path={importPath} />\n <File.Import name={['infiniteQueryOptions']} path={importPath} />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n cursorParam={infiniteOptions.cursorParam}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n {infiniteOptions && (\n <>\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryResult']} path={importPath} isTypeOnly />\n <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n initialPageParam={infiniteOptions.initialPageParam}\n queryParam={infiniteOptions.queryParam}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { usePlugin, usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOas, useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { getBanner, getFooter } from '@kubb/plugin-oas/utils'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File } from '@kubb/react'\nimport { difference } from 'remeda'\nimport { QueryKey, QueryOptions, SuspenseQuery } from '../components'\nimport type { PluginReactQuery } from '../types'\n\nexport const suspenseQueryGenerator = createReactGenerator<PluginReactQuery>({\n name: 'react-suspense-query',\n Operation({ options, operation }) {\n const {\n options: { output },\n } = usePlugin<PluginReactQuery>()\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n\n const isSuspense = !!options.suspense\n\n const importPath = options.query ? options.query.importPath : '@tanstack/react-query'\n\n const query = {\n name: getName(operation, { type: 'function', prefix: 'use', suffix: 'suspense' }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'suspense' }),\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 suffix: 'suspense',\n }),\n file: getFile(operation, { pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: getName(operation, { type: 'function', suffix: 'SuspenseQueryOptions' }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'SuspenseQueryKey' }),\n typeName: getName(operation, { type: 'type', suffix: 'SuspenseQueryKey' }),\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 || !isSuspense) {\n return null\n }\n\n return (\n <File\n baseName={query.file.baseName}\n path={query.file.path}\n meta={query.file.meta}\n banner={getBanner({ oas, output, config: pluginManager.config })}\n footer={getFooter({ oas, output })}\n >\n {options.parser === 'zod' && (\n <File.Import name={[zod.schemas.response.name, zod.schemas.request?.name].filter(Boolean)} root={query.file.path} path={zod.file.path} />\n )}\n <File.Import name={'fetch'} path={options.client.importPath} />\n {hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n <File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={query.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n transformer={options.queryKey}\n />\n\n {!hasClientPlugin && (\n <Client\n name={client.name}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n <File.Import name={['queryOptions']} path={importPath} />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType}\n />\n {options.suspense && (\n <>\n <File.Import name={['useSuspenseQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseSuspenseQueryOptions', 'UseSuspenseQueryResult']} path={importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n\n <SuspenseQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;AAaA,MAAa,iBAAiB,qBAAuC;CACnE,MAAM;CACN,UAAU,EAAE,SAAS,aAAa;EAChC,MAAM,EACJ,SAAS,EAAE,aACT,WAA6B;EACjC,MAAM,gBAAgB,kBAAkB;EAExC,MAAM,MAAM,QAAQ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BAAgB,QAAQ,OAAO;MAC/B;IACD,QAAQ,YACP;KACE,oBAAC,KAAK;MAAO,MAAM,CAAC,mBAAmB;MAAE,MAAM;OAAc;KAC7D,oBAAC,KAAK;MAAO,MAAM;OAAC;OAAY;OAAe;OAA2B;OAAyB;MAAE,MAAM;MAAY;OAAa;KACnI,QAAQ,OAAO,mBAAmB,UAAU,oBAAC,KAAK;MAAO,MAAM,CAAC,iBAAiB;MAAE,MAAM,QAAQ,OAAO;MAAY;OAAa;KAElI,oBAAC;MACC,MAAM,MAAM;MACZ,kBAAkB,aAAa;MAC/B,aAAa,KAAK;MAClB,YAAY,QAAQ;MACpB,cAAc,QAAQ;MACtB,gBAAgB,QAAQ;MACb;MACX,gBAAgB,QAAQ,OAAO;MAC/B,cAAc,SAAS;MACvB,kBAAkB,SAAS;OAC3B;QACD;;IAEA;;CAGZ,CAAC"}
|
|
@@ -13,6 +13,8 @@ let __kubb_react_jsx_runtime = require("@kubb/react/jsx-runtime");
|
|
|
13
13
|
__kubb_react_jsx_runtime = require_components.__toESM(__kubb_react_jsx_runtime);
|
|
14
14
|
let __kubb_plugin_client_components = require("@kubb/plugin-client/components");
|
|
15
15
|
__kubb_plugin_client_components = require_components.__toESM(__kubb_plugin_client_components);
|
|
16
|
+
let __kubb_core_hooks = require("@kubb/core/hooks");
|
|
17
|
+
__kubb_core_hooks = require_components.__toESM(__kubb_core_hooks);
|
|
16
18
|
let __kubb_plugin_client = require("@kubb/plugin-client");
|
|
17
19
|
__kubb_plugin_client = require_components.__toESM(__kubb_plugin_client);
|
|
18
20
|
let __kubb_plugin_oas_hooks = require("@kubb/plugin-oas/hooks");
|
|
@@ -24,7 +26,8 @@ remeda = require_components.__toESM(remeda);
|
|
|
24
26
|
const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
25
27
|
name: "react-query",
|
|
26
28
|
Operation({ options, operation }) {
|
|
27
|
-
const {
|
|
29
|
+
const { options: { output } } = (0, __kubb_core_hooks.usePlugin)();
|
|
30
|
+
const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
|
|
28
31
|
const oas = (0, __kubb_plugin_oas_hooks.useOas)();
|
|
29
32
|
const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
|
|
30
33
|
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
@@ -200,7 +203,8 @@ const queryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
|
200
203
|
const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
201
204
|
name: "react-query",
|
|
202
205
|
Operation({ options, operation }) {
|
|
203
|
-
const {
|
|
206
|
+
const { options: { output } } = (0, __kubb_core_hooks.usePlugin)();
|
|
207
|
+
const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
|
|
204
208
|
const oas = (0, __kubb_plugin_oas_hooks.useOas)();
|
|
205
209
|
const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
|
|
206
210
|
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);
|
|
@@ -371,7 +375,8 @@ const mutationGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
|
371
375
|
const infiniteQueryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
372
376
|
name: "react-infinite-query",
|
|
373
377
|
Operation({ options, operation }) {
|
|
374
|
-
const {
|
|
378
|
+
const { options: { output } } = (0, __kubb_core_hooks.usePlugin)();
|
|
379
|
+
const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
|
|
375
380
|
const oas = (0, __kubb_plugin_oas_hooks.useOas)();
|
|
376
381
|
const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
|
|
377
382
|
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
@@ -574,7 +579,8 @@ const infiniteQueryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
|
574
579
|
const suspenseQueryGenerator = (0, __kubb_plugin_oas.createReactGenerator)({
|
|
575
580
|
name: "react-suspense-query",
|
|
576
581
|
Operation({ options, operation }) {
|
|
577
|
-
const {
|
|
582
|
+
const { options: { output } } = (0, __kubb_core_hooks.usePlugin)();
|
|
583
|
+
const pluginManager = (0, __kubb_core_hooks.usePluginManager)();
|
|
578
584
|
const oas = (0, __kubb_plugin_oas_hooks.useOas)();
|
|
579
585
|
const { getSchemas, getName, getFile } = (0, __kubb_plugin_oas_hooks.useOperationManager)();
|
|
580
586
|
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
@@ -782,4 +788,4 @@ Object.defineProperty(exports, 'suspenseQueryGenerator', {
|
|
|
782
788
|
return suspenseQueryGenerator;
|
|
783
789
|
}
|
|
784
790
|
});
|
|
785
|
-
//# sourceMappingURL=generators-
|
|
791
|
+
//# sourceMappingURL=generators-DaV-5jJ5.cjs.map
|