@kubb/plugin-react-query 3.0.0-beta.3 → 3.0.0-beta.5
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.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{types-5pnOmDmM.d.cts → types-LhwfnVo7.d.cts} +15 -32
- package/dist/{types-5pnOmDmM.d.ts → types-LhwfnVo7.d.ts} +15 -32
- package/package.json +11 -11
- package/src/types.ts +7 -19
package/dist/components.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Operation } from '@kubb/oas';
|
|
2
2
|
import { OperationSchemas } from '@kubb/plugin-oas';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { P as PluginReactQuery, I as Infinite } from './types-
|
|
4
|
+
import { P as PluginReactQuery, I as Infinite } from './types-LhwfnVo7.cjs';
|
|
5
5
|
import { FunctionParams } from '@kubb/react';
|
|
6
6
|
import '@kubb/core';
|
|
7
7
|
|
package/dist/components.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Operation } from '@kubb/oas';
|
|
2
2
|
import { OperationSchemas } from '@kubb/plugin-oas';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
|
-
import { P as PluginReactQuery, I as Infinite } from './types-
|
|
4
|
+
import { P as PluginReactQuery, I as Infinite } from './types-LhwfnVo7.js';
|
|
5
5
|
import { FunctionParams } from '@kubb/react';
|
|
6
6
|
import '@kubb/core';
|
|
7
7
|
|
package/dist/generators.d.cts
CHANGED
package/dist/generators.d.ts
CHANGED
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -26,7 +26,7 @@ type Options$1 = {
|
|
|
26
26
|
override?: Array<Override<ResolvedOptions$1>>;
|
|
27
27
|
/**
|
|
28
28
|
* Create `operations.ts` file with all operations grouped by methods.
|
|
29
|
-
* @default
|
|
29
|
+
* @default false
|
|
30
30
|
*/
|
|
31
31
|
operations?: boolean;
|
|
32
32
|
/**
|
|
@@ -38,27 +38,21 @@ type Options$1 = {
|
|
|
38
38
|
importPath?: string;
|
|
39
39
|
/**
|
|
40
40
|
* ReturnType that will be used when calling the client.
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* `Full` will return ResponseConfig.
|
|
45
|
-
* @default `'data'`
|
|
46
|
-
* @private
|
|
41
|
+
* - 'data' will return ResponseConfig[data].
|
|
42
|
+
* - 'full' will return ResponseConfig.
|
|
43
|
+
* @default 'data'
|
|
47
44
|
*/
|
|
48
45
|
dataReturnType?: 'data' | 'full';
|
|
49
46
|
/**
|
|
50
47
|
* How to pass your pathParams.
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* `inline` will return the pathParams as comma separated params.
|
|
55
|
-
* @default `'inline'`
|
|
56
|
-
* @private
|
|
48
|
+
* - 'object' will return the pathParams as an object.
|
|
49
|
+
* - 'inline' will return the pathParams as comma separated params.
|
|
50
|
+
* @default 'inline'
|
|
57
51
|
*/
|
|
58
52
|
pathParamsType?: 'object' | 'inline';
|
|
59
53
|
/**
|
|
60
54
|
* Which parser can be used before returning the data
|
|
61
|
-
*
|
|
55
|
+
* - 'zod' will use `@kubb/plugin-zod` to parse the data.
|
|
62
56
|
* @default 'client'
|
|
63
57
|
*/
|
|
64
58
|
parser?: 'client' | 'zod';
|
|
@@ -126,7 +120,7 @@ type Mutation = {
|
|
|
126
120
|
type Infinite = {
|
|
127
121
|
/**
|
|
128
122
|
* Specify the params key used for `pageParam`.
|
|
129
|
-
* @default
|
|
123
|
+
* @default 'id'
|
|
130
124
|
*/
|
|
131
125
|
queryParam: string;
|
|
132
126
|
/**
|
|
@@ -135,13 +129,14 @@ type Infinite = {
|
|
|
135
129
|
cursorParam?: string | undefined;
|
|
136
130
|
/**
|
|
137
131
|
* The initial value, the value of the first page.
|
|
138
|
-
* @default
|
|
132
|
+
* @default 0
|
|
139
133
|
*/
|
|
140
134
|
initialPageParam: unknown;
|
|
141
135
|
};
|
|
142
136
|
type Options = {
|
|
143
137
|
/**
|
|
144
|
-
*
|
|
138
|
+
* Specify the export location for the files and define the behavior of the output
|
|
139
|
+
* @default { path: 'hooks', barrelType: 'named' }
|
|
145
140
|
*/
|
|
146
141
|
output?: Output;
|
|
147
142
|
/**
|
|
@@ -149,15 +144,6 @@ type Options = {
|
|
|
149
144
|
*/
|
|
150
145
|
group?: Group;
|
|
151
146
|
client?: Pick<PluginClient['options'], 'dataReturnType' | 'importPath'>;
|
|
152
|
-
/**
|
|
153
|
-
* ReturnType that needs to be used when calling client().
|
|
154
|
-
*
|
|
155
|
-
* `Data` will return ResponseConfig[data].
|
|
156
|
-
*
|
|
157
|
-
* `Full` will return ResponseConfig.
|
|
158
|
-
* @default `'data'`
|
|
159
|
-
* @private
|
|
160
|
-
*/
|
|
161
147
|
/**
|
|
162
148
|
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
163
149
|
*/
|
|
@@ -172,12 +158,9 @@ type Options = {
|
|
|
172
158
|
override?: Array<Override<ResolvedOptions>>;
|
|
173
159
|
/**
|
|
174
160
|
* How to pass your pathParams.
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* `inline` will return the pathParams as comma separated params.
|
|
179
|
-
* @default `'inline'`
|
|
180
|
-
* @private
|
|
161
|
+
* - 'object' will return the pathParams as an object.
|
|
162
|
+
* - 'inline' will return the pathParams as comma separated params.
|
|
163
|
+
* @default 'inline'
|
|
181
164
|
*/
|
|
182
165
|
pathParamsType?: PluginClient['options']['pathParamsType'];
|
|
183
166
|
/**
|
|
@@ -26,7 +26,7 @@ type Options$1 = {
|
|
|
26
26
|
override?: Array<Override<ResolvedOptions$1>>;
|
|
27
27
|
/**
|
|
28
28
|
* Create `operations.ts` file with all operations grouped by methods.
|
|
29
|
-
* @default
|
|
29
|
+
* @default false
|
|
30
30
|
*/
|
|
31
31
|
operations?: boolean;
|
|
32
32
|
/**
|
|
@@ -38,27 +38,21 @@ type Options$1 = {
|
|
|
38
38
|
importPath?: string;
|
|
39
39
|
/**
|
|
40
40
|
* ReturnType that will be used when calling the client.
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
* `Full` will return ResponseConfig.
|
|
45
|
-
* @default `'data'`
|
|
46
|
-
* @private
|
|
41
|
+
* - 'data' will return ResponseConfig[data].
|
|
42
|
+
* - 'full' will return ResponseConfig.
|
|
43
|
+
* @default 'data'
|
|
47
44
|
*/
|
|
48
45
|
dataReturnType?: 'data' | 'full';
|
|
49
46
|
/**
|
|
50
47
|
* How to pass your pathParams.
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* `inline` will return the pathParams as comma separated params.
|
|
55
|
-
* @default `'inline'`
|
|
56
|
-
* @private
|
|
48
|
+
* - 'object' will return the pathParams as an object.
|
|
49
|
+
* - 'inline' will return the pathParams as comma separated params.
|
|
50
|
+
* @default 'inline'
|
|
57
51
|
*/
|
|
58
52
|
pathParamsType?: 'object' | 'inline';
|
|
59
53
|
/**
|
|
60
54
|
* Which parser can be used before returning the data
|
|
61
|
-
*
|
|
55
|
+
* - 'zod' will use `@kubb/plugin-zod` to parse the data.
|
|
62
56
|
* @default 'client'
|
|
63
57
|
*/
|
|
64
58
|
parser?: 'client' | 'zod';
|
|
@@ -126,7 +120,7 @@ type Mutation = {
|
|
|
126
120
|
type Infinite = {
|
|
127
121
|
/**
|
|
128
122
|
* Specify the params key used for `pageParam`.
|
|
129
|
-
* @default
|
|
123
|
+
* @default 'id'
|
|
130
124
|
*/
|
|
131
125
|
queryParam: string;
|
|
132
126
|
/**
|
|
@@ -135,13 +129,14 @@ type Infinite = {
|
|
|
135
129
|
cursorParam?: string | undefined;
|
|
136
130
|
/**
|
|
137
131
|
* The initial value, the value of the first page.
|
|
138
|
-
* @default
|
|
132
|
+
* @default 0
|
|
139
133
|
*/
|
|
140
134
|
initialPageParam: unknown;
|
|
141
135
|
};
|
|
142
136
|
type Options = {
|
|
143
137
|
/**
|
|
144
|
-
*
|
|
138
|
+
* Specify the export location for the files and define the behavior of the output
|
|
139
|
+
* @default { path: 'hooks', barrelType: 'named' }
|
|
145
140
|
*/
|
|
146
141
|
output?: Output;
|
|
147
142
|
/**
|
|
@@ -149,15 +144,6 @@ type Options = {
|
|
|
149
144
|
*/
|
|
150
145
|
group?: Group;
|
|
151
146
|
client?: Pick<PluginClient['options'], 'dataReturnType' | 'importPath'>;
|
|
152
|
-
/**
|
|
153
|
-
* ReturnType that needs to be used when calling client().
|
|
154
|
-
*
|
|
155
|
-
* `Data` will return ResponseConfig[data].
|
|
156
|
-
*
|
|
157
|
-
* `Full` will return ResponseConfig.
|
|
158
|
-
* @default `'data'`
|
|
159
|
-
* @private
|
|
160
|
-
*/
|
|
161
147
|
/**
|
|
162
148
|
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
163
149
|
*/
|
|
@@ -172,12 +158,9 @@ type Options = {
|
|
|
172
158
|
override?: Array<Override<ResolvedOptions>>;
|
|
173
159
|
/**
|
|
174
160
|
* How to pass your pathParams.
|
|
175
|
-
*
|
|
176
|
-
*
|
|
177
|
-
*
|
|
178
|
-
* `inline` will return the pathParams as comma separated params.
|
|
179
|
-
* @default `'inline'`
|
|
180
|
-
* @private
|
|
161
|
+
* - 'object' will return the pathParams as an object.
|
|
162
|
+
* - 'inline' will return the pathParams as comma separated params.
|
|
163
|
+
* @default 'inline'
|
|
181
164
|
*/
|
|
182
165
|
pathParamsType?: PluginClient['options']['pathParamsType'];
|
|
183
166
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-react-query",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.5",
|
|
4
4
|
"description": "Generator react-query hooks",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"faker",
|
|
@@ -62,24 +62,24 @@
|
|
|
62
62
|
"!/**/__tests__/**"
|
|
63
63
|
],
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@kubb/core": "3.0.0-beta.
|
|
66
|
-
"@kubb/fs": "3.0.0-beta.
|
|
67
|
-
"@kubb/oas": "3.0.0-beta.
|
|
68
|
-
"@kubb/plugin-
|
|
69
|
-
"@kubb/plugin-
|
|
70
|
-
"@kubb/plugin-
|
|
71
|
-
"@kubb/react": "3.0.0-beta.
|
|
65
|
+
"@kubb/core": "3.0.0-beta.5",
|
|
66
|
+
"@kubb/fs": "3.0.0-beta.5",
|
|
67
|
+
"@kubb/oas": "3.0.0-beta.5",
|
|
68
|
+
"@kubb/plugin-oas": "3.0.0-beta.5",
|
|
69
|
+
"@kubb/plugin-ts": "3.0.0-beta.5",
|
|
70
|
+
"@kubb/plugin-zod": "3.0.0-beta.5",
|
|
71
|
+
"@kubb/react": "3.0.0-beta.5"
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@types/react": "^18.3.11",
|
|
75
75
|
"react": "^18.3.1",
|
|
76
76
|
"tsup": "^8.3.0",
|
|
77
77
|
"typescript": "^5.6.2",
|
|
78
|
-
"@kubb/config-ts": "3.0.0-beta.
|
|
79
|
-
"@kubb/config-tsup": "3.0.0-beta.
|
|
78
|
+
"@kubb/config-ts": "3.0.0-beta.5",
|
|
79
|
+
"@kubb/config-tsup": "3.0.0-beta.5"
|
|
80
80
|
},
|
|
81
81
|
"peerDependencies": {
|
|
82
|
-
"@kubb/react": "3.0.0-beta.
|
|
82
|
+
"@kubb/react": "3.0.0-beta.5"
|
|
83
83
|
},
|
|
84
84
|
"engines": {
|
|
85
85
|
"node": ">=20"
|
package/src/types.ts
CHANGED
|
@@ -49,7 +49,7 @@ type Mutation = {
|
|
|
49
49
|
export type Infinite = {
|
|
50
50
|
/**
|
|
51
51
|
* Specify the params key used for `pageParam`.
|
|
52
|
-
* @default
|
|
52
|
+
* @default 'id'
|
|
53
53
|
*/
|
|
54
54
|
queryParam: string
|
|
55
55
|
/**
|
|
@@ -58,14 +58,15 @@ export type Infinite = {
|
|
|
58
58
|
cursorParam?: string | undefined
|
|
59
59
|
/**
|
|
60
60
|
* The initial value, the value of the first page.
|
|
61
|
-
* @default
|
|
61
|
+
* @default 0
|
|
62
62
|
*/
|
|
63
63
|
initialPageParam: unknown
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
export type Options = {
|
|
67
67
|
/**
|
|
68
|
-
*
|
|
68
|
+
* Specify the export location for the files and define the behavior of the output
|
|
69
|
+
* @default { path: 'hooks', barrelType: 'named' }
|
|
69
70
|
*/
|
|
70
71
|
output?: Output
|
|
71
72
|
/**
|
|
@@ -74,16 +75,6 @@ export type Options = {
|
|
|
74
75
|
group?: Group
|
|
75
76
|
|
|
76
77
|
client?: Pick<PluginClient['options'], 'dataReturnType' | 'importPath'>
|
|
77
|
-
/**
|
|
78
|
-
* ReturnType that needs to be used when calling client().
|
|
79
|
-
*
|
|
80
|
-
* `Data` will return ResponseConfig[data].
|
|
81
|
-
*
|
|
82
|
-
* `Full` will return ResponseConfig.
|
|
83
|
-
* @default `'data'`
|
|
84
|
-
* @private
|
|
85
|
-
*/
|
|
86
|
-
|
|
87
78
|
/**
|
|
88
79
|
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
89
80
|
*/
|
|
@@ -98,12 +89,9 @@ export type Options = {
|
|
|
98
89
|
override?: Array<Override<ResolvedOptions>>
|
|
99
90
|
/**
|
|
100
91
|
* How to pass your pathParams.
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
* `inline` will return the pathParams as comma separated params.
|
|
105
|
-
* @default `'inline'`
|
|
106
|
-
* @private
|
|
92
|
+
* - 'object' will return the pathParams as an object.
|
|
93
|
+
* - 'inline' will return the pathParams as comma separated params.
|
|
94
|
+
* @default 'inline'
|
|
107
95
|
*/
|
|
108
96
|
pathParamsType?: PluginClient['options']['pathParamsType']
|
|
109
97
|
|