@kubb/plugin-vue-query 4.21.1 → 4.22.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/dist/components.d.cts +3 -1
- package/dist/components.d.ts +3 -1
- package/dist/{generators-DuwiAmFf.cjs → generators-Bv1nkAc7.cjs} +31 -7
- package/dist/generators-Bv1nkAc7.cjs.map +1 -0
- package/dist/{generators-CZAVnDfq.js → generators-DmiFBtTX.js} +31 -7
- package/dist/generators-DmiFBtTX.js.map +1 -0
- package/dist/generators.cjs +1 -1
- package/dist/generators.d.cts +457 -1
- package/dist/generators.d.ts +457 -1
- package/dist/generators.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/types-CCBVSWEl.d.cts +178 -0
- package/dist/types-CH_xZCvL.d.ts +177 -0
- package/package.json +8 -8
- package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +2 -2
- package/src/generators/__snapshots__/clientGetImportPath.ts +2 -2
- package/src/generators/__snapshots__/clientPostImportPath.ts +2 -2
- package/src/generators/__snapshots__/findByTags.ts +2 -2
- package/src/generators/__snapshots__/findByTagsObject.ts +2 -2
- package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +2 -2
- package/src/generators/__snapshots__/findByTagsTemplateString.ts +2 -2
- package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +2 -2
- package/src/generators/__snapshots__/findByTagsWithZod.ts +2 -2
- package/src/generators/__snapshots__/findInfiniteByTags.ts +2 -2
- package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +2 -2
- package/src/generators/__snapshots__/postAsQuery.ts +2 -2
- package/src/generators/__snapshots__/updatePetById.ts +2 -2
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +2 -2
- package/src/generators/infiniteQueryGenerator.tsx +2 -2
- package/src/generators/mutationGenerator.tsx +2 -2
- package/src/generators/queryGenerator.tsx +2 -2
- package/dist/generators-CZAVnDfq.js.map +0 -1
- package/dist/generators-DuwiAmFf.cjs.map +0 -1
- package/dist/types-CmEFNy2D.d.cts +0 -852
- package/dist/types-D9QEyz6N.d.ts +0 -851
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import { t as __name } from "./chunk-eQyhnF5A.js";
|
|
2
|
+
import { Group, Output, PluginFactoryOptions, ResolveNameParams } from "@kubb/core";
|
|
3
|
+
import { PluginClient } from "@kubb/plugin-client";
|
|
4
|
+
import { Exclude, Include, OperationSchemas, Override, ResolvePathOptions } from "@kubb/plugin-oas";
|
|
5
|
+
import { HttpMethod, Oas, Operation, contentType } from "@kubb/oas";
|
|
6
|
+
import { Generator } from "@kubb/plugin-oas/generators";
|
|
7
|
+
|
|
8
|
+
//#region src/types.d.ts
|
|
9
|
+
type TransformerProps = {
|
|
10
|
+
operation: Operation;
|
|
11
|
+
schemas: OperationSchemas;
|
|
12
|
+
casing: 'camelcase' | undefined;
|
|
13
|
+
};
|
|
14
|
+
type Transformer = (props: TransformerProps) => unknown[];
|
|
15
|
+
/**
|
|
16
|
+
* Customize the queryKey
|
|
17
|
+
*/
|
|
18
|
+
type QueryKey = Transformer;
|
|
19
|
+
/**
|
|
20
|
+
* Customize the mutationKey
|
|
21
|
+
*/
|
|
22
|
+
type MutationKey = Transformer;
|
|
23
|
+
type Query = {
|
|
24
|
+
/**
|
|
25
|
+
* Define which HttpMethods can be used for queries
|
|
26
|
+
* @default ['get']
|
|
27
|
+
*/
|
|
28
|
+
methods: Array<HttpMethod>;
|
|
29
|
+
/**
|
|
30
|
+
* Path to the useQuery hook for useQuery functionality.
|
|
31
|
+
* Used as `import { useQuery } from '${importPath}'`.
|
|
32
|
+
* Accepts relative and absolute paths.
|
|
33
|
+
* Path is used as-is; relative paths are based on the generated file location.
|
|
34
|
+
* @default '@tanstack/react-query'
|
|
35
|
+
*/
|
|
36
|
+
importPath?: string;
|
|
37
|
+
};
|
|
38
|
+
type Mutation = {
|
|
39
|
+
/**
|
|
40
|
+
* Define which HttpMethods can be used for mutations
|
|
41
|
+
* @default ['post', 'put', 'delete']
|
|
42
|
+
*/
|
|
43
|
+
methods: Array<HttpMethod>;
|
|
44
|
+
/**
|
|
45
|
+
* Path to the useQuery hook for useQuery functionality.
|
|
46
|
+
* Used as `import { useQuery } from '${importPath}'`.
|
|
47
|
+
* Accepts relative and absolute paths.
|
|
48
|
+
* Path is used as-is; relative paths are based on the generated file location.
|
|
49
|
+
* @default '@tanstack/react-query'
|
|
50
|
+
*/
|
|
51
|
+
importPath?: string;
|
|
52
|
+
};
|
|
53
|
+
type Infinite = {
|
|
54
|
+
/**
|
|
55
|
+
* Specify the params key used for `pageParam`.
|
|
56
|
+
* @default `'id'`
|
|
57
|
+
*/
|
|
58
|
+
queryParam: string;
|
|
59
|
+
/**
|
|
60
|
+
* Which field of the data is used, set it to undefined when no cursor is known.
|
|
61
|
+
* @deprecated Use `nextParam` and `previousParam` instead for more flexible pagination handling.
|
|
62
|
+
*/
|
|
63
|
+
cursorParam?: string | undefined;
|
|
64
|
+
/**
|
|
65
|
+
* Which field of the data is used to get the cursor for the next page.
|
|
66
|
+
* Supports dot notation (e.g. 'pagination.next.id') or array path (e.g. ['pagination', 'next', 'id']) to access nested fields.
|
|
67
|
+
*/
|
|
68
|
+
nextParam?: string | string[] | undefined;
|
|
69
|
+
/**
|
|
70
|
+
* Which field of the data is used to get the cursor for the previous page.
|
|
71
|
+
* Supports dot notation (e.g. 'pagination.prev.id') or array path (e.g. ['pagination', 'prev', 'id']) to access nested fields.
|
|
72
|
+
*/
|
|
73
|
+
previousParam?: string | string[] | undefined;
|
|
74
|
+
/**
|
|
75
|
+
* The initial value, the value of the first page.
|
|
76
|
+
* @default `0`
|
|
77
|
+
*/
|
|
78
|
+
initialPageParam: unknown;
|
|
79
|
+
};
|
|
80
|
+
type Options = {
|
|
81
|
+
/**
|
|
82
|
+
* Specify the export location for the files and define the behavior of the output
|
|
83
|
+
* @default { path: 'hooks', barrelType: 'named' }
|
|
84
|
+
*/
|
|
85
|
+
output?: Output<Oas>;
|
|
86
|
+
/**
|
|
87
|
+
* Define which contentType should be used.
|
|
88
|
+
* By default, the first JSON valid mediaType is used
|
|
89
|
+
*/
|
|
90
|
+
contentType?: contentType;
|
|
91
|
+
/**
|
|
92
|
+
* Group the @tanstack/query hooks based on the provided name.
|
|
93
|
+
*/
|
|
94
|
+
group?: Group;
|
|
95
|
+
client?: Pick<PluginClient['options'], 'client' | 'clientType' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle' | 'paramsCasing'>;
|
|
96
|
+
/**
|
|
97
|
+
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
98
|
+
*/
|
|
99
|
+
exclude?: Array<Exclude>;
|
|
100
|
+
/**
|
|
101
|
+
* Array containing include parameters to include tags/operations/methods/paths.
|
|
102
|
+
*/
|
|
103
|
+
include?: Array<Include>;
|
|
104
|
+
/**
|
|
105
|
+
* Array containing override parameters to override `options` based on tags/operations/methods/paths.
|
|
106
|
+
*/
|
|
107
|
+
override?: Array<Override<ResolvedOptions>>;
|
|
108
|
+
/**
|
|
109
|
+
* How to style your params, by default no casing is applied
|
|
110
|
+
* - 'camelcase' uses camelcase for the params names
|
|
111
|
+
*/
|
|
112
|
+
paramsCasing?: 'camelcase';
|
|
113
|
+
/**
|
|
114
|
+
* How to pass your params
|
|
115
|
+
* - 'object' returns the params and pathParams as an object.
|
|
116
|
+
* - 'inline' returns the params as comma separated params.
|
|
117
|
+
* @default 'inline'
|
|
118
|
+
*/
|
|
119
|
+
paramsType?: 'object' | 'inline';
|
|
120
|
+
/**
|
|
121
|
+
* How to pass your pathParams.
|
|
122
|
+
* - 'object' returns the pathParams as an object.
|
|
123
|
+
* - 'inline': returns the pathParams as comma separated params.
|
|
124
|
+
* @default 'inline'
|
|
125
|
+
*/
|
|
126
|
+
pathParamsType?: PluginClient['options']['pathParamsType'];
|
|
127
|
+
/**
|
|
128
|
+
* When set, an infiniteQuery hooks is added.
|
|
129
|
+
*/
|
|
130
|
+
infinite?: Partial<Infinite> | false;
|
|
131
|
+
queryKey?: QueryKey;
|
|
132
|
+
/**
|
|
133
|
+
* Override some useQuery behaviors.
|
|
134
|
+
*/
|
|
135
|
+
query?: Partial<Query> | false;
|
|
136
|
+
mutationKey?: MutationKey;
|
|
137
|
+
/**
|
|
138
|
+
* Override some useMutation behaviors.
|
|
139
|
+
*/
|
|
140
|
+
mutation?: Partial<Mutation> | false;
|
|
141
|
+
/**
|
|
142
|
+
* Which parser should be used before returning the data to `@tanstack/query`.
|
|
143
|
+
* `'zod'` uses `@kubb/plugin-zod` to parse the data.
|
|
144
|
+
*/
|
|
145
|
+
parser?: PluginClient['options']['parser'];
|
|
146
|
+
transformers?: {
|
|
147
|
+
/**
|
|
148
|
+
* Customize the names based on the type that is provided by the plugin.
|
|
149
|
+
*/
|
|
150
|
+
name?: (name: ResolveNameParams['name'], type?: ResolveNameParams['type']) => string;
|
|
151
|
+
};
|
|
152
|
+
/**
|
|
153
|
+
* Define some generators next to the vue-query generators
|
|
154
|
+
*/
|
|
155
|
+
generators?: Array<Generator<PluginVueQuery>>;
|
|
156
|
+
};
|
|
157
|
+
type ResolvedOptions = {
|
|
158
|
+
output: Output<Oas>;
|
|
159
|
+
group: Options['group'];
|
|
160
|
+
client: NonNullable<PluginVueQuery['options']['client']>;
|
|
161
|
+
parser: Required<NonNullable<Options['parser']>>;
|
|
162
|
+
paramsCasing: Options['paramsCasing'];
|
|
163
|
+
paramsType: NonNullable<Options['paramsType']>;
|
|
164
|
+
pathParamsType: NonNullable<Options['pathParamsType']>;
|
|
165
|
+
/**
|
|
166
|
+
* Only used of infinite
|
|
167
|
+
*/
|
|
168
|
+
infinite: NonNullable<Infinite> | false;
|
|
169
|
+
queryKey: QueryKey | undefined;
|
|
170
|
+
query: NonNullable<Required<Query>> | false;
|
|
171
|
+
mutationKey: MutationKey | undefined;
|
|
172
|
+
mutation: NonNullable<Required<Mutation>> | false;
|
|
173
|
+
};
|
|
174
|
+
type PluginVueQuery = PluginFactoryOptions<'plugin-vue-query', Options, ResolvedOptions, never, ResolvePathOptions>;
|
|
175
|
+
//#endregion
|
|
176
|
+
export { Transformer as i, Options as n, PluginVueQuery as r, Infinite as t };
|
|
177
|
+
//# sourceMappingURL=types-CH_xZCvL.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-vue-query",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.22.0",
|
|
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",
|
|
@@ -75,13 +75,13 @@
|
|
|
75
75
|
],
|
|
76
76
|
"dependencies": {
|
|
77
77
|
"@kubb/react-fabric": "0.12.11",
|
|
78
|
-
"remeda": "^2.33.
|
|
79
|
-
"@kubb/core": "4.
|
|
80
|
-
"@kubb/oas": "4.
|
|
81
|
-
"@kubb/plugin-client": "4.
|
|
82
|
-
"@kubb/plugin-oas": "4.
|
|
83
|
-
"@kubb/plugin-ts": "4.
|
|
84
|
-
"@kubb/plugin-zod": "4.
|
|
78
|
+
"remeda": "^2.33.6",
|
|
79
|
+
"@kubb/core": "4.22.0",
|
|
80
|
+
"@kubb/oas": "4.22.0",
|
|
81
|
+
"@kubb/plugin-client": "4.22.0",
|
|
82
|
+
"@kubb/plugin-oas": "4.22.0",
|
|
83
|
+
"@kubb/plugin-ts": "4.22.0",
|
|
84
|
+
"@kubb/plugin-zod": "4.22.0"
|
|
85
85
|
},
|
|
86
86
|
"peerDependencies": {
|
|
87
87
|
"@kubb/react-fabric": "0.12.11"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig, ResponseConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig, ResponseConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import fetch from 'axios'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
|
-
import type { RequestConfig, ResponseErrorConfig } from 'axios'
|
|
7
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from 'axios'
|
|
8
8
|
import type { MaybeRefOrGetter } from 'vue'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import fetch from 'axios'
|
|
6
6
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
7
|
-
import type { RequestConfig, ResponseErrorConfig } from 'axios'
|
|
7
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from 'axios'
|
|
8
8
|
import type { MaybeRefOrGetter } from 'vue'
|
|
9
9
|
import { useMutation } from '@tanstack/vue-query'
|
|
10
10
|
|
|
@@ -20,7 +20,7 @@ export async function updatePetWithForm(
|
|
|
20
20
|
petId: UpdatePetWithFormPathParams['petId'],
|
|
21
21
|
data?: UpdatePetWithFormMutationRequest,
|
|
22
22
|
params?: UpdatePetWithFormQueryParams,
|
|
23
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?:
|
|
23
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: Client } = {},
|
|
24
24
|
) {
|
|
25
25
|
const { client: request = fetch, ...requestConfig } = config
|
|
26
26
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -21,7 +21,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
21
21
|
*/
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
{ headers, params }: { headers: FindPetsByTagsHeaderParams; params?: FindPetsByTagsQueryParams },
|
|
24
|
-
config: Partial<RequestConfig> & { client?:
|
|
24
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
25
25
|
) {
|
|
26
26
|
const { client: request = fetch, ...requestConfig } = config
|
|
27
27
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsQueryKey = ReturnType<typeof findPetsByTagsQueryKey>
|
|
|
22
22
|
export async function findPetsByTags(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { InfiniteData, QueryKey, QueryClient, UseInfiniteQueryOptions, UseInfiniteQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInf
|
|
|
22
22
|
export async function findPetsByTagsInfinite(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { InfiniteData, QueryKey, QueryClient, UseInfiniteQueryOptions, UseInfiniteQueryReturnType } from '@tanstack/react-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -22,7 +22,7 @@ export type FindPetsByTagsInfiniteQueryKey = ReturnType<typeof findPetsByTagsInf
|
|
|
22
22
|
export async function findPetsByTagsInfinite(
|
|
23
23
|
headers: FindPetsByTagsHeaderParams,
|
|
24
24
|
params?: FindPetsByTagsQueryParams,
|
|
25
|
-
config: Partial<RequestConfig> & { client?:
|
|
25
|
+
config: Partial<RequestConfig> & { client?: Client } = {},
|
|
26
26
|
) {
|
|
27
27
|
const { client: request = fetch, ...requestConfig } = config
|
|
28
28
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { QueryKey, QueryClient, UseQueryOptions, UseQueryReturnType } from 'custom-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -25,7 +25,7 @@ export async function updatePetWithForm(
|
|
|
25
25
|
petId: UpdatePetWithFormPathParams['petId'],
|
|
26
26
|
data?: UpdatePetWithFormMutationRequest,
|
|
27
27
|
params?: UpdatePetWithFormQueryParams,
|
|
28
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?:
|
|
28
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: Client } = {},
|
|
29
29
|
) {
|
|
30
30
|
const { client: request = fetch, ...requestConfig } = config
|
|
31
31
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -20,7 +20,7 @@ export async function updatePetWithForm(
|
|
|
20
20
|
petId: UpdatePetWithFormPathParams['petId'],
|
|
21
21
|
data?: UpdatePetWithFormMutationRequest,
|
|
22
22
|
params?: UpdatePetWithFormQueryParams,
|
|
23
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?:
|
|
23
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: Client } = {},
|
|
24
24
|
) {
|
|
25
25
|
const { client: request = fetch, ...requestConfig } = config
|
|
26
26
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
5
|
+
import type { Client, RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
6
6
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
7
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
8
|
import { fetch } from './test/.kubb/fetch'
|
|
@@ -20,7 +20,7 @@ export async function updatePetWithForm(
|
|
|
20
20
|
{ petId }: { petId: UpdatePetWithFormPathParams['petId'] },
|
|
21
21
|
data?: UpdatePetWithFormMutationRequest,
|
|
22
22
|
params?: UpdatePetWithFormQueryParams,
|
|
23
|
-
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?:
|
|
23
|
+
config: Partial<RequestConfig<UpdatePetWithFormMutationRequest>> & { client?: Client } = {},
|
|
24
24
|
) {
|
|
25
25
|
const { client: request = fetch, ...requestConfig } = config
|
|
26
26
|
|
|
@@ -107,14 +107,14 @@ export const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
107
107
|
{options.client.importPath ? (
|
|
108
108
|
<>
|
|
109
109
|
<File.Import name={'fetch'} path={options.client.importPath} />
|
|
110
|
-
<File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
110
|
+
<File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
111
111
|
{options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}
|
|
112
112
|
</>
|
|
113
113
|
) : (
|
|
114
114
|
<>
|
|
115
115
|
<File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />
|
|
116
116
|
<File.Import
|
|
117
|
-
name={['RequestConfig', 'ResponseErrorConfig']}
|
|
117
|
+
name={['Client', 'RequestConfig', 'ResponseErrorConfig']}
|
|
118
118
|
root={query.file.path}
|
|
119
119
|
path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
|
|
120
120
|
isTypeOnly
|
|
@@ -87,14 +87,14 @@ export const mutationGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
87
87
|
{options.client.importPath ? (
|
|
88
88
|
<>
|
|
89
89
|
<File.Import name={'fetch'} path={options.client.importPath} />
|
|
90
|
-
<File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
90
|
+
<File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
91
91
|
{options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}
|
|
92
92
|
</>
|
|
93
93
|
) : (
|
|
94
94
|
<>
|
|
95
95
|
<File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />
|
|
96
96
|
<File.Import
|
|
97
|
-
name={['RequestConfig', 'ResponseErrorConfig']}
|
|
97
|
+
name={['Client', 'RequestConfig', 'ResponseErrorConfig']}
|
|
98
98
|
root={mutation.file.path}
|
|
99
99
|
path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
|
|
100
100
|
isTypeOnly
|
|
@@ -95,14 +95,14 @@ export const queryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
95
95
|
{options.client.importPath ? (
|
|
96
96
|
<>
|
|
97
97
|
<File.Import name={'fetch'} path={options.client.importPath} />
|
|
98
|
-
<File.Import name={['RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
98
|
+
<File.Import name={['Client', 'RequestConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />
|
|
99
99
|
{options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}
|
|
100
100
|
</>
|
|
101
101
|
) : (
|
|
102
102
|
<>
|
|
103
103
|
<File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />
|
|
104
104
|
<File.Import
|
|
105
|
-
name={['RequestConfig', 'ResponseErrorConfig']}
|
|
105
|
+
name={['Client', 'RequestConfig', 'ResponseErrorConfig']}
|
|
106
106
|
root={query.file.path}
|
|
107
107
|
path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
|
|
108
108
|
isTypeOnly
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generators-CZAVnDfq.js","names":[],"sources":["../src/generators/infiniteQueryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/queryGenerator.tsx"],"sourcesContent":["import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\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-fabric'\nimport { difference } from 'remeda'\nimport { InfiniteQuery, InfiniteQueryOptions, QueryKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-infinite-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\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 isInfinite = isQuery && !!options.infinite\n const importPath = options.query ? options.query.importPath : '@tanstack/vue-query'\n\n const query = {\n name: getName(operation, {\n type: 'function',\n prefix: 'use',\n suffix: 'infinite',\n }),\n typeName: getName(operation, { type: 'type' }),\n file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),\n }\n\n const hasClientPlugin = !!pluginManager.getPluginByKey([pluginClientName])\n // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\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, {\n type: 'function',\n suffix: 'InfiniteQueryOptions',\n }),\n }\n\n const queryKey = {\n name: getName(operation, { type: 'const', suffix: 'InfiniteQueryKey' }),\n typeName: getName(operation, {\n type: 'type',\n suffix: 'InfiniteQueryKey',\n }),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\n //todo remove type?\n schemas: getSchemas(operation, {\n pluginKey: [pluginTsName],\n type: 'type',\n }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, {\n pluginKey: [pluginZodName],\n type: 'function',\n }),\n }\n\n if (!isQuery || isMutation || !isInfinite) {\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 {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\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 </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n <File.Import name={['toValue']} path=\"vue\" />\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\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 {!shouldUseClientPlugin && (\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 || 'data'}\n paramsCasing={options.client?.paramsCasing || options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.infinite && (\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 paramsType={options.paramsType}\n paramsCasing={options.paramsCasing}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n cursorParam={options.infinite.cursorParam}\n nextParam={options.infinite.nextParam}\n previousParam={options.infinite.previousParam}\n initialPageParam={options.infinite.initialPageParam}\n queryParam={options.infinite.queryParam}\n />\n </>\n )}\n {options.infinite && (\n <>\n <File.Import name={['useInfiniteQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseInfiniteQueryOptions', 'UseInfiniteQueryReturnType']} 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 || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\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-fabric'\nimport { difference } from 'remeda'\nimport { Mutation, MutationKey } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const mutationGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n options.mutation !== false &&\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/vue-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 // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\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 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 {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\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 </>\n ) : (\n <>\n <File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import\n name={['ResponseConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\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 <MutationKey\n name={mutationKey.name}\n typeName={mutationKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n paramsCasing={options.paramsCasing}\n typeSchemas={type.schemas}\n transformer={options.mutationKey}\n />\n {!shouldUseClientPlugin && (\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 || 'data'}\n paramsCasing={options.client?.paramsCasing || options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n )}\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['MutationObserverOptions', 'QueryClient']} path={importPath} isTypeOnly />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n paramsCasing={options.paramsCasing}\n dataReturnType={options.client.dataReturnType || 'data'}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import path from 'node:path'\nimport { usePluginManager } from '@kubb/core/hooks'\nimport { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas/generators'\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-fabric'\nimport { difference } from 'remeda'\nimport { Query, QueryKey, QueryOptions } from '../components'\nimport type { PluginVueQuery } from '../types'\n\nexport const queryGenerator = createReactGenerator<PluginVueQuery>({\n name: 'vue-query',\n Operation({ config, operation, generator, plugin }) {\n const {\n options,\n options: { output },\n } = plugin\n const pluginManager = usePluginManager()\n\n const oas = useOas()\n const { getSchemas, getName, getFile } = useOperationManager(generator)\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 importPath = options.query ? options.query.importPath : '@tanstack/vue-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 // Class-based clients are not compatible with query hooks, so we generate inline clients\n const shouldUseClientPlugin = hasClientPlugin && options.client.clientType !== 'class'\n const client = {\n name: shouldUseClientPlugin\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, {\n pluginKey: [pluginTsName],\n type: 'type',\n }),\n }\n\n const zod = {\n file: getFile(operation, { pluginKey: [pluginZodName] }),\n schemas: getSchemas(operation, {\n pluginKey: [pluginZodName],\n type: 'function',\n }),\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 {options.client.importPath ? (\n <>\n <File.Import name={'fetch'} path={options.client.importPath} />\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 </>\n ) : (\n <>\n <File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />\n )}\n </>\n )}\n <File.Import name={['toValue']} path=\"vue\" />\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {shouldUseClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\n {!shouldUseClientPlugin && (\n <File.Import name={['buildFormData']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/config.ts')} />\n )}\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 {!shouldUseClientPlugin && (\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 || 'data'}\n paramsCasing={options.client?.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 paramsCasing={options.paramsCasing}\n typeSchemas={type.schemas}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n dataReturnType={options.client.dataReturnType || 'data'}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', 'QueryClient', 'UseQueryOptions', 'UseQueryReturnType']} 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 || 'data'}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"],"mappings":";;;;;;;;;;;;;;;;AAcA,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