@kubb/plugin-vue-query 3.15.0 → 3.15.1
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/{chunk-HMPC446F.js → chunk-5RO5VZAJ.js} +8 -8
- package/dist/chunk-5RO5VZAJ.js.map +1 -0
- package/dist/{chunk-QRXBIFH6.cjs → chunk-BBSHBY5N.cjs} +16 -16
- package/dist/chunk-BBSHBY5N.cjs.map +1 -0
- package/dist/{chunk-QKMSX5DE.js → chunk-KHEXOVSW.js} +42 -42
- package/dist/chunk-KHEXOVSW.js.map +1 -0
- package/dist/{chunk-GK7FG2U6.cjs → chunk-ZR7DRLPY.cjs} +42 -42
- package/dist/chunk-ZR7DRLPY.cjs.map +1 -0
- package/dist/components.cjs +8 -8
- package/dist/components.js +1 -1
- package/dist/generators.cjs +5 -5
- package/dist/generators.js +2 -2
- package/dist/index.cjs +5 -5
- package/dist/index.js +2 -2
- package/package.json +10 -10
- package/src/components/InfiniteQuery.tsx +8 -8
- package/src/components/InfiniteQueryOptions.tsx +8 -8
- package/src/components/Mutation.tsx +4 -4
- package/src/components/Query.tsx +8 -8
- package/src/components/QueryKey.tsx +3 -3
- package/src/components/QueryOptions.tsx +9 -9
- package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +9 -8
- package/src/generators/__snapshots__/clientGetImportPath.ts +9 -8
- package/src/generators/__snapshots__/clientPostImportPath.ts +4 -4
- package/src/generators/__snapshots__/findByTags.ts +9 -8
- package/src/generators/__snapshots__/findByTagsObject.ts +7 -6
- package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +9 -8
- package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +8 -8
- package/src/generators/__snapshots__/findByTagsWithZod.ts +9 -8
- package/src/generators/__snapshots__/findInfiniteByTags.ts +6 -6
- package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +6 -6
- package/src/generators/__snapshots__/postAsQuery.ts +12 -12
- package/src/generators/__snapshots__/updatePetById.ts +4 -4
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +4 -4
- package/src/generators/infiniteQueryGenerator.tsx +2 -2
- package/src/generators/mutationGenerator.tsx +1 -1
- package/src/generators/queryGenerator.tsx +2 -2
- package/dist/chunk-GK7FG2U6.cjs.map +0 -1
- package/dist/chunk-HMPC446F.js.map +0 -1
- package/dist/chunk-QKMSX5DE.js.map +0 -1
- package/dist/chunk-QRXBIFH6.cjs.map +0 -1
package/dist/components.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions } from './chunk-
|
|
1
|
+
export { InfiniteQuery, InfiniteQueryOptions, Mutation, MutationKey, Query, QueryKey, QueryOptions } from './chunk-KHEXOVSW.js';
|
|
2
2
|
//# sourceMappingURL=components.js.map
|
|
3
3
|
//# sourceMappingURL=components.js.map
|
package/dist/generators.cjs
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkBBSHBY5N_cjs = require('./chunk-BBSHBY5N.cjs');
|
|
4
|
+
require('./chunk-ZR7DRLPY.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
Object.defineProperty(exports, "infiniteQueryGenerator", {
|
|
9
9
|
enumerable: true,
|
|
10
|
-
get: function () { return
|
|
10
|
+
get: function () { return chunkBBSHBY5N_cjs.infiniteQueryGenerator; }
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "mutationGenerator", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function () { return
|
|
14
|
+
get: function () { return chunkBBSHBY5N_cjs.mutationGenerator; }
|
|
15
15
|
});
|
|
16
16
|
Object.defineProperty(exports, "queryGenerator", {
|
|
17
17
|
enumerable: true,
|
|
18
|
-
get: function () { return
|
|
18
|
+
get: function () { return chunkBBSHBY5N_cjs.queryGenerator; }
|
|
19
19
|
});
|
|
20
20
|
//# sourceMappingURL=generators.cjs.map
|
|
21
21
|
//# sourceMappingURL=generators.cjs.map
|
package/dist/generators.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { infiniteQueryGenerator, mutationGenerator, queryGenerator } from './chunk-5RO5VZAJ.js';
|
|
2
|
+
import './chunk-KHEXOVSW.js';
|
|
3
3
|
//# sourceMappingURL=generators.js.map
|
|
4
4
|
//# sourceMappingURL=generators.js.map
|
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var chunkBBSHBY5N_cjs = require('./chunk-BBSHBY5N.cjs');
|
|
4
|
+
var chunkZR7DRLPY_cjs = require('./chunk-ZR7DRLPY.cjs');
|
|
5
5
|
var path = require('path');
|
|
6
6
|
var core = require('@kubb/core');
|
|
7
7
|
var transformers = require('@kubb/core/transformers');
|
|
@@ -29,9 +29,9 @@ var pluginVueQuery = core.createPlugin((options) => {
|
|
|
29
29
|
mutation = {},
|
|
30
30
|
query = {},
|
|
31
31
|
paramsCasing,
|
|
32
|
-
mutationKey =
|
|
33
|
-
queryKey =
|
|
34
|
-
generators = [
|
|
32
|
+
mutationKey = chunkZR7DRLPY_cjs.MutationKey.getTransformer,
|
|
33
|
+
queryKey = chunkZR7DRLPY_cjs.QueryKey.getTransformer,
|
|
34
|
+
generators = [chunkBBSHBY5N_cjs.queryGenerator, chunkBBSHBY5N_cjs.infiniteQueryGenerator, chunkBBSHBY5N_cjs.mutationGenerator].filter(Boolean),
|
|
35
35
|
contentType
|
|
36
36
|
} = options;
|
|
37
37
|
return {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { queryGenerator, infiniteQueryGenerator, mutationGenerator } from './chunk-
|
|
2
|
-
import { MutationKey, QueryKey } from './chunk-
|
|
1
|
+
import { queryGenerator, infiniteQueryGenerator, mutationGenerator } from './chunk-5RO5VZAJ.js';
|
|
2
|
+
import { MutationKey, QueryKey } from './chunk-KHEXOVSW.js';
|
|
3
3
|
import path from 'path';
|
|
4
4
|
import { createPlugin, PluginManager, FileManager } from '@kubb/core';
|
|
5
5
|
import { camelCase, pascalCase } from '@kubb/core/transformers';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-vue-query",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.1",
|
|
4
4
|
"description": "Vue Query hooks generator plugin for Kubb, creating type-safe API client hooks from OpenAPI specifications for Vue.js applications.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vue-query",
|
|
@@ -66,21 +66,21 @@
|
|
|
66
66
|
],
|
|
67
67
|
"dependencies": {
|
|
68
68
|
"remeda": "^2.25.0",
|
|
69
|
-
"@kubb/
|
|
70
|
-
"@kubb/
|
|
71
|
-
"@kubb/plugin-client": "3.15.
|
|
72
|
-
"@kubb/plugin-oas": "3.15.
|
|
73
|
-
"@kubb/plugin-ts": "3.15.
|
|
74
|
-
"@kubb/plugin-zod": "3.15.
|
|
75
|
-
"@kubb/react": "3.15.
|
|
69
|
+
"@kubb/oas": "3.15.1",
|
|
70
|
+
"@kubb/core": "3.15.1",
|
|
71
|
+
"@kubb/plugin-client": "3.15.1",
|
|
72
|
+
"@kubb/plugin-oas": "3.15.1",
|
|
73
|
+
"@kubb/plugin-ts": "3.15.1",
|
|
74
|
+
"@kubb/plugin-zod": "3.15.1",
|
|
75
|
+
"@kubb/react": "3.15.1"
|
|
76
76
|
},
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@types/react": "^18.3.23",
|
|
79
79
|
"react": "^18.3.1",
|
|
80
80
|
"tsup": "^8.5.0",
|
|
81
81
|
"typescript": "^5.8.3",
|
|
82
|
-
"@kubb/config-ts": "3.15.
|
|
83
|
-
"@kubb/config-tsup": "3.15.
|
|
82
|
+
"@kubb/config-ts": "3.15.1",
|
|
83
|
+
"@kubb/config-tsup": "3.15.1"
|
|
84
84
|
},
|
|
85
85
|
"peerDependencies": {
|
|
86
86
|
"@kubb/react": "^3.0.0"
|
|
@@ -46,25 +46,25 @@ function getParams({ paramsType, paramsCasing, pathParamsType, dataReturnType, t
|
|
|
46
46
|
override(item) {
|
|
47
47
|
return {
|
|
48
48
|
...item,
|
|
49
|
-
type: `
|
|
49
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
}),
|
|
53
53
|
data: typeSchemas.request?.name
|
|
54
54
|
? {
|
|
55
|
-
type: `
|
|
55
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
56
56
|
optional: isOptional(typeSchemas.request?.schema),
|
|
57
57
|
}
|
|
58
58
|
: undefined,
|
|
59
59
|
params: typeSchemas.queryParams?.name
|
|
60
60
|
? {
|
|
61
|
-
type: `
|
|
61
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
62
62
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
63
63
|
}
|
|
64
64
|
: undefined,
|
|
65
65
|
headers: typeSchemas.headerParams?.name
|
|
66
66
|
? {
|
|
67
|
-
type: `
|
|
67
|
+
type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
|
|
68
68
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
69
69
|
}
|
|
70
70
|
: undefined,
|
|
@@ -92,26 +92,26 @@ function getParams({ paramsType, paramsCasing, pathParamsType, dataReturnType, t
|
|
|
92
92
|
override(item) {
|
|
93
93
|
return {
|
|
94
94
|
...item,
|
|
95
|
-
type: `
|
|
95
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
}),
|
|
99
99
|
},
|
|
100
100
|
data: typeSchemas.request?.name
|
|
101
101
|
? {
|
|
102
|
-
type: `
|
|
102
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
103
103
|
optional: isOptional(typeSchemas.request?.schema),
|
|
104
104
|
}
|
|
105
105
|
: undefined,
|
|
106
106
|
params: typeSchemas.queryParams?.name
|
|
107
107
|
? {
|
|
108
|
-
type: `
|
|
108
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
109
109
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
110
110
|
}
|
|
111
111
|
: undefined,
|
|
112
112
|
headers: typeSchemas.headerParams?.name
|
|
113
113
|
? {
|
|
114
|
-
type: `
|
|
114
|
+
type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
|
|
115
115
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
116
116
|
}
|
|
117
117
|
: undefined,
|
|
@@ -42,25 +42,25 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
|
|
|
42
42
|
override(item) {
|
|
43
43
|
return {
|
|
44
44
|
...item,
|
|
45
|
-
type: `
|
|
45
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
}),
|
|
49
49
|
data: typeSchemas.request?.name
|
|
50
50
|
? {
|
|
51
|
-
type: `
|
|
51
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
52
52
|
optional: isOptional(typeSchemas.request?.schema),
|
|
53
53
|
}
|
|
54
54
|
: undefined,
|
|
55
55
|
params: typeSchemas.queryParams?.name
|
|
56
56
|
? {
|
|
57
|
-
type: `
|
|
57
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
58
58
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
59
59
|
}
|
|
60
60
|
: undefined,
|
|
61
61
|
headers: typeSchemas.headerParams?.name
|
|
62
62
|
? {
|
|
63
|
-
type: `
|
|
63
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
64
64
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
65
65
|
}
|
|
66
66
|
: undefined,
|
|
@@ -85,26 +85,26 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
|
|
|
85
85
|
override(item) {
|
|
86
86
|
return {
|
|
87
87
|
...item,
|
|
88
|
-
type: `
|
|
88
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
91
|
}),
|
|
92
92
|
},
|
|
93
93
|
data: typeSchemas.request?.name
|
|
94
94
|
? {
|
|
95
|
-
type: `
|
|
95
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
96
96
|
optional: isOptional(typeSchemas.request?.schema),
|
|
97
97
|
}
|
|
98
98
|
: undefined,
|
|
99
99
|
params: typeSchemas.queryParams?.name
|
|
100
100
|
? {
|
|
101
|
-
type: `
|
|
101
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
102
102
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
103
103
|
}
|
|
104
104
|
: undefined,
|
|
105
105
|
headers: typeSchemas.headerParams?.name
|
|
106
106
|
? {
|
|
107
|
-
type: `
|
|
107
|
+
type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
|
|
108
108
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
109
109
|
}
|
|
110
110
|
: undefined,
|
|
@@ -43,25 +43,25 @@ function getParams({ paramsCasing, dataReturnType, typeSchemas }: GetParamsProps
|
|
|
43
43
|
override(item) {
|
|
44
44
|
return {
|
|
45
45
|
...item,
|
|
46
|
-
type: `
|
|
46
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
49
|
}),
|
|
50
50
|
data: typeSchemas.request?.name
|
|
51
51
|
? {
|
|
52
|
-
type: `
|
|
52
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
53
53
|
optional: isOptional(typeSchemas.request?.schema),
|
|
54
54
|
}
|
|
55
55
|
: undefined,
|
|
56
56
|
params: typeSchemas.queryParams?.name
|
|
57
57
|
? {
|
|
58
|
-
type: `
|
|
58
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
59
59
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
60
60
|
}
|
|
61
61
|
: undefined,
|
|
62
62
|
headers: typeSchemas.headerParams?.name
|
|
63
63
|
? {
|
|
64
|
-
type: `
|
|
64
|
+
type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
|
|
65
65
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
66
66
|
}
|
|
67
67
|
: undefined,
|
package/src/components/Query.tsx
CHANGED
|
@@ -46,25 +46,25 @@ function getParams({ paramsCasing, paramsType, pathParamsType, dataReturnType, t
|
|
|
46
46
|
override(item) {
|
|
47
47
|
return {
|
|
48
48
|
...item,
|
|
49
|
-
type: `
|
|
49
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
50
50
|
}
|
|
51
51
|
},
|
|
52
52
|
}),
|
|
53
53
|
data: typeSchemas.request?.name
|
|
54
54
|
? {
|
|
55
|
-
type: `
|
|
55
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
56
56
|
optional: isOptional(typeSchemas.request?.schema),
|
|
57
57
|
}
|
|
58
58
|
: undefined,
|
|
59
59
|
params: typeSchemas.queryParams?.name
|
|
60
60
|
? {
|
|
61
|
-
type: `
|
|
61
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
62
62
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
63
63
|
}
|
|
64
64
|
: undefined,
|
|
65
65
|
headers: typeSchemas.headerParams?.name
|
|
66
66
|
? {
|
|
67
|
-
type: `
|
|
67
|
+
type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
|
|
68
68
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
69
69
|
}
|
|
70
70
|
: undefined,
|
|
@@ -92,26 +92,26 @@ function getParams({ paramsCasing, paramsType, pathParamsType, dataReturnType, t
|
|
|
92
92
|
override(item) {
|
|
93
93
|
return {
|
|
94
94
|
...item,
|
|
95
|
-
type: `
|
|
95
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
96
96
|
}
|
|
97
97
|
},
|
|
98
98
|
}),
|
|
99
99
|
},
|
|
100
100
|
data: typeSchemas.request?.name
|
|
101
101
|
? {
|
|
102
|
-
type: `
|
|
102
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
103
103
|
optional: isOptional(typeSchemas.request?.schema),
|
|
104
104
|
}
|
|
105
105
|
: undefined,
|
|
106
106
|
params: typeSchemas.queryParams?.name
|
|
107
107
|
? {
|
|
108
|
-
type: `
|
|
108
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
109
109
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
110
110
|
}
|
|
111
111
|
: undefined,
|
|
112
112
|
headers: typeSchemas.headerParams?.name
|
|
113
113
|
? {
|
|
114
|
-
type: `
|
|
114
|
+
type: `MaybeRefOrGetter<${typeSchemas.headerParams?.name}>`,
|
|
115
115
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
116
116
|
}
|
|
117
117
|
: undefined,
|
|
@@ -33,20 +33,20 @@ function getParams({ pathParamsType, paramsCasing, typeSchemas }: GetParamsProps
|
|
|
33
33
|
override(item) {
|
|
34
34
|
return {
|
|
35
35
|
...item,
|
|
36
|
-
type: `
|
|
36
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
37
37
|
}
|
|
38
38
|
},
|
|
39
39
|
}),
|
|
40
40
|
},
|
|
41
41
|
data: typeSchemas.request?.name
|
|
42
42
|
? {
|
|
43
|
-
type: `
|
|
43
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
44
44
|
optional: isOptional(typeSchemas.request?.schema),
|
|
45
45
|
}
|
|
46
46
|
: undefined,
|
|
47
47
|
params: typeSchemas.queryParams?.name
|
|
48
48
|
? {
|
|
49
|
-
type: `
|
|
49
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
50
50
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
51
51
|
}
|
|
52
52
|
: undefined,
|
|
@@ -39,25 +39,25 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
|
|
|
39
39
|
override(item) {
|
|
40
40
|
return {
|
|
41
41
|
...item,
|
|
42
|
-
type: `
|
|
42
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
}),
|
|
46
46
|
data: typeSchemas.request?.name
|
|
47
47
|
? {
|
|
48
|
-
type: `
|
|
48
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
49
49
|
optional: isOptional(typeSchemas.request?.schema),
|
|
50
50
|
}
|
|
51
51
|
: undefined,
|
|
52
52
|
params: typeSchemas.queryParams?.name
|
|
53
53
|
? {
|
|
54
|
-
type: `
|
|
54
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
55
55
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
56
56
|
}
|
|
57
57
|
: undefined,
|
|
58
58
|
headers: typeSchemas.headerParams?.name
|
|
59
59
|
? {
|
|
60
|
-
type: `
|
|
60
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
61
61
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
62
62
|
}
|
|
63
63
|
: undefined,
|
|
@@ -82,26 +82,26 @@ function getParams({ paramsType, paramsCasing, pathParamsType, typeSchemas }: Ge
|
|
|
82
82
|
override(item) {
|
|
83
83
|
return {
|
|
84
84
|
...item,
|
|
85
|
-
type: `
|
|
85
|
+
type: `MaybeRefOrGetter<${item.type}>`,
|
|
86
86
|
}
|
|
87
87
|
},
|
|
88
88
|
}),
|
|
89
89
|
},
|
|
90
90
|
data: typeSchemas.request?.name
|
|
91
91
|
? {
|
|
92
|
-
type: `
|
|
92
|
+
type: `MaybeRefOrGetter<${typeSchemas.request?.name}>`,
|
|
93
93
|
optional: isOptional(typeSchemas.request?.schema),
|
|
94
94
|
}
|
|
95
95
|
: undefined,
|
|
96
96
|
params: typeSchemas.queryParams?.name
|
|
97
97
|
? {
|
|
98
|
-
type: `
|
|
98
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
99
99
|
optional: isOptional(typeSchemas.queryParams?.schema),
|
|
100
100
|
}
|
|
101
101
|
: undefined,
|
|
102
102
|
headers: typeSchemas.headerParams?.name
|
|
103
103
|
? {
|
|
104
|
-
type: `
|
|
104
|
+
type: `MaybeRefOrGetter<${typeSchemas.queryParams?.name}>`,
|
|
105
105
|
optional: isOptional(typeSchemas.headerParams?.schema),
|
|
106
106
|
}
|
|
107
107
|
: undefined,
|
|
@@ -151,7 +151,7 @@ export function QueryOptions({ name, clientName, dataReturnType, typeSchemas, pa
|
|
|
151
151
|
config.signal = signal
|
|
152
152
|
return ${clientName}(${clientParams.toCall({
|
|
153
153
|
transformName(name) {
|
|
154
|
-
return `
|
|
154
|
+
return `toValue(${name})`
|
|
155
155
|
},
|
|
156
156
|
})})
|
|
157
157
|
},
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig, ResponseConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
|
-
import type {
|
|
8
|
+
import type { MaybeRefOrGetter } from 'vue'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
|
-
import {
|
|
10
|
+
import { toValue } from 'vue'
|
|
11
11
|
|
|
12
|
-
export const findPetsByTagsQueryKey = (params?:
|
|
12
|
+
export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
|
|
13
|
+
[{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
|
|
13
14
|
|
|
14
15
|
export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
15
16
|
|
|
@@ -36,8 +37,8 @@ export async function findPetsByTags(
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export function findPetsByTagsQueryOptions(
|
|
39
|
-
headers:
|
|
40
|
-
params?:
|
|
40
|
+
headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
41
|
+
params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
41
42
|
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
43
|
) {
|
|
43
44
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
@@ -50,7 +51,7 @@ export function findPetsByTagsQueryOptions(
|
|
|
50
51
|
queryKey,
|
|
51
52
|
queryFn: async ({ signal }) => {
|
|
52
53
|
config.signal = signal
|
|
53
|
-
return findPetsByTags(
|
|
54
|
+
return findPetsByTags(toValue(headers), toValue(params), toValue(config))
|
|
54
55
|
},
|
|
55
56
|
})
|
|
56
57
|
}
|
|
@@ -65,8 +66,8 @@ export function useFindPetsByTags<
|
|
|
65
66
|
TQueryData = ResponseConfig<FindPetsByTagsQueryResponse>,
|
|
66
67
|
TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
|
|
67
68
|
>(
|
|
68
|
-
headers:
|
|
69
|
-
params?:
|
|
69
|
+
headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
|
|
70
|
+
params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
70
71
|
options: {
|
|
71
72
|
query?: Partial<QueryObserverOptions<ResponseConfig<FindPetsByTagsQueryResponse>, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
72
73
|
client?: QueryClient
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
import fetch from 'axios'
|
|
6
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { RequestConfig, ResponseErrorConfig } from 'axios'
|
|
8
|
-
import type {
|
|
8
|
+
import type { MaybeRefOrGetter } from 'vue'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
|
-
import {
|
|
10
|
+
import { toValue } from 'vue'
|
|
11
11
|
|
|
12
|
-
export const findPetsByTagsQueryKey = (params?:
|
|
12
|
+
export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
|
|
13
|
+
[{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
|
|
13
14
|
|
|
14
15
|
export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
15
16
|
|
|
@@ -36,8 +37,8 @@ export async function findPetsByTags(
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export function findPetsByTagsQueryOptions(
|
|
39
|
-
headers:
|
|
40
|
-
params?:
|
|
40
|
+
headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
41
|
+
params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
41
42
|
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
43
|
) {
|
|
43
44
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
@@ -45,7 +46,7 @@ export function findPetsByTagsQueryOptions(
|
|
|
45
46
|
queryKey,
|
|
46
47
|
queryFn: async ({ signal }) => {
|
|
47
48
|
config.signal = signal
|
|
48
|
-
return findPetsByTags(
|
|
49
|
+
return findPetsByTags(toValue(headers), toValue(params), toValue(config))
|
|
49
50
|
},
|
|
50
51
|
})
|
|
51
52
|
}
|
|
@@ -60,8 +61,8 @@ export function useFindPetsByTags<
|
|
|
60
61
|
TQueryData = FindPetsByTagsQueryResponse,
|
|
61
62
|
TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
|
|
62
63
|
>(
|
|
63
|
-
headers:
|
|
64
|
-
params?:
|
|
64
|
+
headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
|
|
65
|
+
params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
65
66
|
options: {
|
|
66
67
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
67
68
|
client?: QueryClient
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import fetch from 'axios'
|
|
6
6
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
7
7
|
import type { RequestConfig, ResponseErrorConfig } from 'axios'
|
|
8
|
-
import type {
|
|
8
|
+
import type { MaybeRefOrGetter } from 'vue'
|
|
9
9
|
import { useMutation } from '@tanstack/vue-query'
|
|
10
10
|
|
|
11
11
|
export const updatePetWithFormMutationKey = () => [{ url: '/pet/{petId}' }] as const
|
|
@@ -45,9 +45,9 @@ export function useUpdatePetWithForm<TContext>(
|
|
|
45
45
|
UpdatePetWithFormMutationResponse,
|
|
46
46
|
ResponseErrorConfig<UpdatePetWithForm405>,
|
|
47
47
|
{
|
|
48
|
-
petId:
|
|
49
|
-
data?:
|
|
50
|
-
params?:
|
|
48
|
+
petId: MaybeRefOrGetter<UpdatePetWithFormPathParams['petId']>
|
|
49
|
+
data?: MaybeRefOrGetter<UpdatePetWithFormMutationRequest>
|
|
50
|
+
params?: MaybeRefOrGetter<UpdatePetWithFormQueryParams>
|
|
51
51
|
},
|
|
52
52
|
TContext
|
|
53
53
|
> & { client?: QueryClient }
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
|
-
import type {
|
|
8
|
+
import type { MaybeRefOrGetter } from 'vue'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
|
-
import {
|
|
10
|
+
import { toValue } from 'vue'
|
|
11
11
|
|
|
12
|
-
export const findPetsByTagsQueryKey = (params?:
|
|
12
|
+
export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
|
|
13
|
+
[{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
|
|
13
14
|
|
|
14
15
|
export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
15
16
|
|
|
@@ -36,8 +37,8 @@ export async function findPetsByTags(
|
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
export function findPetsByTagsQueryOptions(
|
|
39
|
-
headers:
|
|
40
|
-
params?:
|
|
40
|
+
headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
41
|
+
params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
41
42
|
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
42
43
|
) {
|
|
43
44
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
@@ -45,7 +46,7 @@ export function findPetsByTagsQueryOptions(
|
|
|
45
46
|
queryKey,
|
|
46
47
|
queryFn: async ({ signal }) => {
|
|
47
48
|
config.signal = signal
|
|
48
|
-
return findPetsByTags(
|
|
49
|
+
return findPetsByTags(toValue(headers), toValue(params), toValue(config))
|
|
49
50
|
},
|
|
50
51
|
})
|
|
51
52
|
}
|
|
@@ -60,8 +61,8 @@ export function useFindPetsByTags<
|
|
|
60
61
|
TQueryData = FindPetsByTagsQueryResponse,
|
|
61
62
|
TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
|
|
62
63
|
>(
|
|
63
|
-
headers:
|
|
64
|
-
params?:
|
|
64
|
+
headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>,
|
|
65
|
+
params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>,
|
|
65
66
|
options: {
|
|
66
67
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
67
68
|
client?: QueryClient
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
import fetch from '@kubb/plugin-client/clients/axios'
|
|
6
6
|
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
7
7
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
|
-
import type {
|
|
8
|
+
import type { MaybeRefOrGetter } from 'vue'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
|
-
import {
|
|
10
|
+
import { toValue } from 'vue'
|
|
11
11
|
|
|
12
|
-
export const findPetsByTagsQueryKey = (params?:
|
|
12
|
+
export const findPetsByTagsQueryKey = (params?: MaybeRefOrGetter<FindPetsByTagsQueryParams>) =>
|
|
13
|
+
[{ url: '/pet/findByTags' }, ...(params ? [params] : [])] as const
|
|
13
14
|
|
|
14
15
|
export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
15
16
|
|
|
@@ -35,7 +36,7 @@ export async function findPetsByTags(
|
|
|
35
36
|
}
|
|
36
37
|
|
|
37
38
|
export function findPetsByTagsQueryOptions(
|
|
38
|
-
{ headers, params }: { headers:
|
|
39
|
+
{ headers, params }: { headers: MaybeRefOrGetter<FindPetsByTagsQueryParams>; params?: MaybeRefOrGetter<FindPetsByTagsQueryParams> },
|
|
39
40
|
config: Partial<RequestConfig> & { client?: typeof fetch } = {},
|
|
40
41
|
) {
|
|
41
42
|
const queryKey = findPetsByTagsQueryKey(params)
|
|
@@ -43,7 +44,7 @@ export function findPetsByTagsQueryOptions(
|
|
|
43
44
|
queryKey,
|
|
44
45
|
queryFn: async ({ signal }) => {
|
|
45
46
|
config.signal = signal
|
|
46
|
-
return findPetsByTags(
|
|
47
|
+
return findPetsByTags(toValue({ headers: toValue(headers), params: toValue(params) }), toValue(config))
|
|
47
48
|
},
|
|
48
49
|
})
|
|
49
50
|
}
|
|
@@ -58,7 +59,7 @@ export function useFindPetsByTags<
|
|
|
58
59
|
TQueryData = FindPetsByTagsQueryResponse,
|
|
59
60
|
TQueryKey extends QueryKey = FindPetsByTagsQueryKey,
|
|
60
61
|
>(
|
|
61
|
-
{ headers, params }: { headers:
|
|
62
|
+
{ headers, params }: { headers: MaybeRefOrGetter<FindPetsByTagsHeaderParams>; params?: MaybeRefOrGetter<FindPetsByTagsQueryParams> },
|
|
62
63
|
options: {
|
|
63
64
|
query?: Partial<QueryObserverOptions<FindPetsByTagsQueryResponse, ResponseErrorConfig<FindPetsByTags400>, TData, TQueryData, TQueryKey>> & {
|
|
64
65
|
client?: QueryClient
|