@kubb/plugin-vue-query 4.5.7 → 4.5.9
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-kADKAHgd.js → components-CvWdx6lq.js} +1 -1
- package/dist/{components-kADKAHgd.js.map → components-CvWdx6lq.js.map} +1 -1
- package/dist/{components-CloQzY2S.cjs → components-fEdRyxiW.cjs} +2 -2
- package/dist/{components-CloQzY2S.cjs.map → components-fEdRyxiW.cjs.map} +1 -1
- package/dist/components.cjs +1 -1
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +1 -1
- package/dist/{generators-CIsfvh9C.cjs → generators-B8sZ3OeN.cjs} +14 -14
- package/dist/generators-B8sZ3OeN.cjs.map +1 -0
- package/dist/{generators-DHkXUh19.js → generators-kmb86DA3.js} +14 -14
- package/dist/generators-kmb86DA3.js.map +1 -0
- package/dist/generators.cjs +2 -2
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +2 -2
- package/dist/index.cjs +17 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +17 -13
- package/dist/index.js.map +1 -1
- package/dist/{types-DLapUyxZ.d.ts → types-COROLdSu.d.cts} +10 -3
- package/dist/{types-ChWhf2ft.d.cts → types-DC5yKSuG.d.ts} +10 -3
- package/package.json +9 -9
- package/src/generators/__snapshots__/clientDataReturnTypeFull.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__/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 +24 -13
- package/src/generators/mutationGenerator.tsx +3 -3
- package/src/generators/queryGenerator.tsx +11 -10
- package/src/plugin.ts +16 -10
- package/src/types.ts +1 -2
- package/dist/generators-CIsfvh9C.cjs.map +0 -1
- package/dist/generators-DHkXUh19.js.map +0 -1
- /package/dist/{chunk-DMmIE7y6.js → chunk-HKYW5u2u.js} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
2
1
|
import * as OasTypes from "oas/types";
|
|
3
2
|
import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
|
|
4
3
|
import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
@@ -6,6 +5,7 @@ import { OpenAPIV3 } from "openapi-types";
|
|
|
6
5
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
7
6
|
import BaseOas from "oas";
|
|
8
7
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
8
|
+
import { Fabric } from "@kubb/react-fabric";
|
|
9
9
|
import { ConsolaInstance, LogLevel } from "consola";
|
|
10
10
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
11
11
|
|
|
@@ -1087,6 +1087,12 @@ type Options$2 = {
|
|
|
1087
1087
|
* @default 'axios'
|
|
1088
1088
|
*/
|
|
1089
1089
|
client?: 'axios' | 'fetch';
|
|
1090
|
+
/**
|
|
1091
|
+
* Bundle the selected client into the generated `.kubb` directory.
|
|
1092
|
+
* When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
|
|
1093
|
+
* @default false
|
|
1094
|
+
*/
|
|
1095
|
+
bundle?: boolean;
|
|
1090
1096
|
transformers?: {
|
|
1091
1097
|
/**
|
|
1092
1098
|
* Customize the names based on the type that is provided by the plugin.
|
|
@@ -1103,6 +1109,7 @@ type ResolvedOptions$1 = {
|
|
|
1103
1109
|
group?: Options$2['group'];
|
|
1104
1110
|
baseURL: string | undefined;
|
|
1105
1111
|
client: Options$2['client'];
|
|
1112
|
+
bundle: NonNullable<Options$2['bundle']>;
|
|
1106
1113
|
parser: NonNullable<Options$2['parser']>;
|
|
1107
1114
|
urlType: NonNullable<Options$2['urlType']>;
|
|
1108
1115
|
importPath: Options$2['importPath'];
|
|
@@ -1189,7 +1196,7 @@ type Options$1 = {
|
|
|
1189
1196
|
* Group the @tanstack/query hooks based on the provided name.
|
|
1190
1197
|
*/
|
|
1191
1198
|
group?: Group;
|
|
1192
|
-
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL'>;
|
|
1199
|
+
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle'>;
|
|
1193
1200
|
/**
|
|
1194
1201
|
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
1195
1202
|
*/
|
|
@@ -1271,4 +1278,4 @@ type ResolvedOptions = {
|
|
|
1271
1278
|
type PluginVueQuery = PluginFactoryOptions<'plugin-vue-query', Options$1, ResolvedOptions, never, ResolvePathOptions>;
|
|
1272
1279
|
//#endregion
|
|
1273
1280
|
export { ReactGenerator as a, Operation$1 as c, Transformer as i, Options$1 as n, OperationSchemas as o, PluginVueQuery as r, UserPluginWithLifeCycle as s, Infinite as t };
|
|
1274
|
-
//# sourceMappingURL=types-
|
|
1281
|
+
//# sourceMappingURL=types-COROLdSu.d.cts.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { Fabric } from "@kubb/react-fabric";
|
|
1
2
|
import * as OasTypes from "oas/types";
|
|
2
3
|
import { HttpMethods as HttpMethod, OASDocument, SchemaObject, User } from "oas/types";
|
|
3
4
|
import { Operation, Operation as Operation$1 } from "oas/operation";
|
|
@@ -5,7 +6,6 @@ import { OpenAPIV3 } from "openapi-types";
|
|
|
5
6
|
import * as oas_normalize_lib_types0 from "oas-normalize/lib/types";
|
|
6
7
|
import BaseOas from "oas";
|
|
7
8
|
import { KubbFile } from "@kubb/fabric-core/types";
|
|
8
|
-
import { Fabric } from "@kubb/react-fabric";
|
|
9
9
|
import { ConsolaInstance, LogLevel } from "consola";
|
|
10
10
|
import { KubbNode } from "@kubb/react-fabric/types";
|
|
11
11
|
|
|
@@ -1087,6 +1087,12 @@ type Options$2 = {
|
|
|
1087
1087
|
* @default 'axios'
|
|
1088
1088
|
*/
|
|
1089
1089
|
client?: 'axios' | 'fetch';
|
|
1090
|
+
/**
|
|
1091
|
+
* Bundle the selected client into the generated `.kubb` directory.
|
|
1092
|
+
* When disabled the generated clients will import the shared runtime from `@kubb/plugin-client/clients/*`.
|
|
1093
|
+
* @default false
|
|
1094
|
+
*/
|
|
1095
|
+
bundle?: boolean;
|
|
1090
1096
|
transformers?: {
|
|
1091
1097
|
/**
|
|
1092
1098
|
* Customize the names based on the type that is provided by the plugin.
|
|
@@ -1103,6 +1109,7 @@ type ResolvedOptions$1 = {
|
|
|
1103
1109
|
group?: Options$2['group'];
|
|
1104
1110
|
baseURL: string | undefined;
|
|
1105
1111
|
client: Options$2['client'];
|
|
1112
|
+
bundle: NonNullable<Options$2['bundle']>;
|
|
1106
1113
|
parser: NonNullable<Options$2['parser']>;
|
|
1107
1114
|
urlType: NonNullable<Options$2['urlType']>;
|
|
1108
1115
|
importPath: Options$2['importPath'];
|
|
@@ -1189,7 +1196,7 @@ type Options$1 = {
|
|
|
1189
1196
|
* Group the @tanstack/query hooks based on the provided name.
|
|
1190
1197
|
*/
|
|
1191
1198
|
group?: Group;
|
|
1192
|
-
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL'>;
|
|
1199
|
+
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle'>;
|
|
1193
1200
|
/**
|
|
1194
1201
|
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
1195
1202
|
*/
|
|
@@ -1271,4 +1278,4 @@ type ResolvedOptions = {
|
|
|
1271
1278
|
type PluginVueQuery = PluginFactoryOptions<'plugin-vue-query', Options$1, ResolvedOptions, never, ResolvePathOptions>;
|
|
1272
1279
|
//#endregion
|
|
1273
1280
|
export { ReactGenerator as a, Operation$1 as c, Transformer as i, Options$1 as n, OperationSchemas as o, PluginVueQuery as r, UserPluginWithLifeCycle as s, Infinite as t };
|
|
1274
|
-
//# sourceMappingURL=types-
|
|
1281
|
+
//# sourceMappingURL=types-DC5yKSuG.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kubb/plugin-vue-query",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.9",
|
|
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",
|
|
@@ -68,17 +68,17 @@
|
|
|
68
68
|
}
|
|
69
69
|
],
|
|
70
70
|
"dependencies": {
|
|
71
|
-
"@kubb/react-fabric": "0.
|
|
71
|
+
"@kubb/react-fabric": "0.3.1",
|
|
72
72
|
"remeda": "^2.32.0",
|
|
73
|
-
"@kubb/core": "4.5.
|
|
74
|
-
"@kubb/oas": "4.5.
|
|
75
|
-
"@kubb/plugin-client": "4.5.
|
|
76
|
-
"@kubb/plugin-oas": "4.5.
|
|
77
|
-
"@kubb/plugin-ts": "4.5.
|
|
78
|
-
"@kubb/plugin-zod": "4.5.
|
|
73
|
+
"@kubb/core": "4.5.9",
|
|
74
|
+
"@kubb/oas": "4.5.9",
|
|
75
|
+
"@kubb/plugin-client": "4.5.9",
|
|
76
|
+
"@kubb/plugin-oas": "4.5.9",
|
|
77
|
+
"@kubb/plugin-ts": "4.5.9",
|
|
78
|
+
"@kubb/plugin-zod": "4.5.9"
|
|
79
79
|
},
|
|
80
80
|
"peerDependencies": {
|
|
81
|
-
"@kubb/react-fabric": "0.
|
|
81
|
+
"@kubb/react-fabric": "0.3.1"
|
|
82
82
|
},
|
|
83
83
|
"engines": {
|
|
84
84
|
"node": ">=20"
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig, ResponseConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig, ResponseConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from '@tanstack/react-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { queryOptions, useQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryReturnType } from '@tanstack/react-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { InfiniteData, QueryKey, QueryClient, InfiniteQueryObserverOptions, UseInfiniteQueryReturnType } from '@tanstack/react-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { infiniteQueryOptions, useInfiniteQuery } from '@tanstack/react-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { QueryKey, QueryClient, QueryObserverOptions, UseQueryReturnType } from 'custom-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { queryOptions, useQuery } from 'custom-query'
|
|
10
10
|
import { toValue } from 'vue'
|
|
11
11
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { useMutation } from '@tanstack/vue-query'
|
|
10
10
|
|
|
11
11
|
export const updatePetWithFormMutationKey = () => [{ url: '/pet/:petId' }] as const
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Generated by Kubb (https://kubb.dev/).
|
|
3
3
|
* Do not edit manually.
|
|
4
4
|
*/
|
|
5
|
-
import
|
|
6
|
-
import type { RequestConfig, ResponseErrorConfig } from '@kubb/plugin-client/clients/axios'
|
|
5
|
+
import type { RequestConfig, ResponseErrorConfig } from './test/.kubb/fetch'
|
|
7
6
|
import type { MutationObserverOptions, QueryClient } from '@tanstack/vue-query'
|
|
8
7
|
import type { MaybeRefOrGetter } from 'vue'
|
|
8
|
+
import { fetch } from './test/.kubb/fetch'
|
|
9
9
|
import { useMutation } from '@tanstack/vue-query'
|
|
10
10
|
|
|
11
11
|
export const updatePetWithFormMutationKey = () => [{ url: '/pet/:petId' }] as const
|
|
@@ -32,7 +32,11 @@ export const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
32
32
|
const importPath = options.query ? options.query.importPath : '@tanstack/vue-query'
|
|
33
33
|
|
|
34
34
|
const query = {
|
|
35
|
-
name: getName(operation, {
|
|
35
|
+
name: getName(operation, {
|
|
36
|
+
type: 'function',
|
|
37
|
+
prefix: 'use',
|
|
38
|
+
suffix: 'infinite',
|
|
39
|
+
}),
|
|
36
40
|
typeName: getName(operation, { type: 'type' }),
|
|
37
41
|
file: getFile(operation, { prefix: 'use', suffix: 'infinite' }),
|
|
38
42
|
}
|
|
@@ -52,23 +56,35 @@ export const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
52
56
|
}
|
|
53
57
|
|
|
54
58
|
const queryOptions = {
|
|
55
|
-
name: getName(operation, {
|
|
59
|
+
name: getName(operation, {
|
|
60
|
+
type: 'function',
|
|
61
|
+
suffix: 'InfiniteQueryOptions',
|
|
62
|
+
}),
|
|
56
63
|
}
|
|
57
64
|
|
|
58
65
|
const queryKey = {
|
|
59
66
|
name: getName(operation, { type: 'const', suffix: 'InfiniteQueryKey' }),
|
|
60
|
-
typeName: getName(operation, {
|
|
67
|
+
typeName: getName(operation, {
|
|
68
|
+
type: 'type',
|
|
69
|
+
suffix: 'InfiniteQueryKey',
|
|
70
|
+
}),
|
|
61
71
|
}
|
|
62
72
|
|
|
63
73
|
const type = {
|
|
64
74
|
file: getFile(operation, { pluginKey: [pluginTsName] }),
|
|
65
75
|
//todo remove type?
|
|
66
|
-
schemas: getSchemas(operation, {
|
|
76
|
+
schemas: getSchemas(operation, {
|
|
77
|
+
pluginKey: [pluginTsName],
|
|
78
|
+
type: 'type',
|
|
79
|
+
}),
|
|
67
80
|
}
|
|
68
81
|
|
|
69
82
|
const zod = {
|
|
70
83
|
file: getFile(operation, { pluginKey: [pluginZodName] }),
|
|
71
|
-
schemas: getSchemas(operation, {
|
|
84
|
+
schemas: getSchemas(operation, {
|
|
85
|
+
pluginKey: [pluginZodName],
|
|
86
|
+
type: 'function',
|
|
87
|
+
}),
|
|
72
88
|
}
|
|
73
89
|
|
|
74
90
|
if (!isQuery || isMutation || !isInfinite) {
|
|
@@ -94,20 +110,15 @@ export const infiniteQueryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
94
110
|
</>
|
|
95
111
|
) : (
|
|
96
112
|
<>
|
|
97
|
-
<File.Import name={'fetch'} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/
|
|
113
|
+
<File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />
|
|
98
114
|
<File.Import
|
|
99
115
|
name={['RequestConfig', 'ResponseErrorConfig']}
|
|
100
116
|
root={query.file.path}
|
|
101
|
-
path={path.resolve(config.root, config.output.path, '.kubb/
|
|
117
|
+
path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
|
|
102
118
|
isTypeOnly
|
|
103
119
|
/>
|
|
104
120
|
{options.client.dataReturnType === 'full' && (
|
|
105
|
-
<File.Import
|
|
106
|
-
name={['ResponseConfig']}
|
|
107
|
-
root={query.file.path}
|
|
108
|
-
path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}
|
|
109
|
-
isTypeOnly
|
|
110
|
-
/>
|
|
121
|
+
<File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />
|
|
111
122
|
)}
|
|
112
123
|
</>
|
|
113
124
|
)}
|
|
@@ -89,18 +89,18 @@ export const mutationGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
89
89
|
</>
|
|
90
90
|
) : (
|
|
91
91
|
<>
|
|
92
|
-
<File.Import name={'fetch'} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/
|
|
92
|
+
<File.Import name={['fetch']} root={mutation.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />
|
|
93
93
|
<File.Import
|
|
94
94
|
name={['RequestConfig', 'ResponseErrorConfig']}
|
|
95
95
|
root={mutation.file.path}
|
|
96
|
-
path={path.resolve(config.root, config.output.path, '.kubb/
|
|
96
|
+
path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
|
|
97
97
|
isTypeOnly
|
|
98
98
|
/>
|
|
99
99
|
{options.client.dataReturnType === 'full' && (
|
|
100
100
|
<File.Import
|
|
101
101
|
name={['ResponseConfig']}
|
|
102
102
|
root={mutation.file.path}
|
|
103
|
-
path={path.resolve(config.root, config.output.path, '.kubb/
|
|
103
|
+
path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
|
|
104
104
|
isTypeOnly
|
|
105
105
|
/>
|
|
106
106
|
)}
|
|
@@ -61,12 +61,18 @@ export const queryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
61
61
|
const type = {
|
|
62
62
|
file: getFile(operation, { pluginKey: [pluginTsName] }),
|
|
63
63
|
//todo remove type?
|
|
64
|
-
schemas: getSchemas(operation, {
|
|
64
|
+
schemas: getSchemas(operation, {
|
|
65
|
+
pluginKey: [pluginTsName],
|
|
66
|
+
type: 'type',
|
|
67
|
+
}),
|
|
65
68
|
}
|
|
66
69
|
|
|
67
70
|
const zod = {
|
|
68
71
|
file: getFile(operation, { pluginKey: [pluginZodName] }),
|
|
69
|
-
schemas: getSchemas(operation, {
|
|
72
|
+
schemas: getSchemas(operation, {
|
|
73
|
+
pluginKey: [pluginZodName],
|
|
74
|
+
type: 'function',
|
|
75
|
+
}),
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
if (!isQuery || isMutation) {
|
|
@@ -92,20 +98,15 @@ export const queryGenerator = createReactGenerator<PluginVueQuery>({
|
|
|
92
98
|
</>
|
|
93
99
|
) : (
|
|
94
100
|
<>
|
|
95
|
-
<File.Import name={'fetch'} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/
|
|
101
|
+
<File.Import name={['fetch']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} />
|
|
96
102
|
<File.Import
|
|
97
103
|
name={['RequestConfig', 'ResponseErrorConfig']}
|
|
98
104
|
root={query.file.path}
|
|
99
|
-
path={path.resolve(config.root, config.output.path, '.kubb/
|
|
105
|
+
path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')}
|
|
100
106
|
isTypeOnly
|
|
101
107
|
/>
|
|
102
108
|
{options.client.dataReturnType === 'full' && (
|
|
103
|
-
<File.Import
|
|
104
|
-
name={['ResponseConfig']}
|
|
105
|
-
root={query.file.path}
|
|
106
|
-
path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}
|
|
107
|
-
isTypeOnly
|
|
108
|
-
/>
|
|
109
|
+
<File.Import name={['ResponseConfig']} root={query.file.path} path={path.resolve(config.root, config.output.path, '.kubb/fetch.ts')} isTypeOnly />
|
|
109
110
|
)}
|
|
110
111
|
</>
|
|
111
112
|
)}
|
package/src/plugin.ts
CHANGED
|
@@ -31,18 +31,22 @@ export const pluginVueQuery = definePlugin<PluginVueQuery>((options) => {
|
|
|
31
31
|
queryKey = QueryKey.getTransformer,
|
|
32
32
|
generators = [queryGenerator, infiniteQueryGenerator, mutationGenerator].filter(Boolean),
|
|
33
33
|
contentType,
|
|
34
|
+
client,
|
|
34
35
|
} = options
|
|
35
36
|
|
|
37
|
+
const clientType = client?.client ?? 'axios'
|
|
38
|
+
const clientImportPath = client?.importPath ?? (!client?.bundle ? `@kubb/plugin-client/clients/${clientType}` : undefined)
|
|
39
|
+
|
|
36
40
|
return {
|
|
37
41
|
name: pluginVueQueryName,
|
|
38
42
|
options: {
|
|
39
43
|
output,
|
|
40
44
|
client: {
|
|
41
|
-
client: 'axios',
|
|
42
|
-
importPath: undefined,
|
|
43
|
-
dataReturnType: 'data',
|
|
44
|
-
pathParamsType,
|
|
45
45
|
...options.client,
|
|
46
|
+
client: clientType,
|
|
47
|
+
dataReturnType: client?.dataReturnType ?? 'data',
|
|
48
|
+
pathParamsType,
|
|
49
|
+
importPath: clientImportPath,
|
|
46
50
|
},
|
|
47
51
|
infinite: infinite
|
|
48
52
|
? {
|
|
@@ -137,19 +141,21 @@ export const pluginVueQuery = definePlugin<PluginVueQuery>((options) => {
|
|
|
137
141
|
}
|
|
138
142
|
|
|
139
143
|
const hasClientPlugin = !!this.pluginManager.getPluginByKey([pluginClientName])
|
|
140
|
-
const
|
|
144
|
+
const containsFetch = this.fabric.files.some((file) => file.baseName === 'fetch.ts')
|
|
141
145
|
|
|
142
|
-
if (!hasClientPlugin && !this.plugin.options.client.importPath && !
|
|
143
|
-
// pre add bundled
|
|
146
|
+
if (this.plugin.options.client.bundle && !hasClientPlugin && !this.plugin.options.client.importPath && !containsFetch) {
|
|
147
|
+
// pre add bundled
|
|
144
148
|
await this.addFile({
|
|
145
|
-
baseName: '
|
|
146
|
-
path: path.resolve(root, '.kubb/
|
|
149
|
+
baseName: 'fetch.ts',
|
|
150
|
+
path: path.resolve(root, '.kubb/fetch.ts'),
|
|
147
151
|
sources: [
|
|
148
152
|
{
|
|
149
|
-
name: '
|
|
153
|
+
name: 'fetch',
|
|
150
154
|
value: resolveModuleSource(
|
|
151
155
|
this.plugin.options.client.client === 'fetch' ? '@kubb/plugin-client/templates/clients/fetch' : '@kubb/plugin-client/templates/clients/axios',
|
|
152
156
|
).source,
|
|
157
|
+
isExportable: true,
|
|
158
|
+
isIndexable: true,
|
|
153
159
|
},
|
|
154
160
|
],
|
|
155
161
|
})
|
package/src/types.ts
CHANGED
|
@@ -87,8 +87,7 @@ export type Options = {
|
|
|
87
87
|
* Group the @tanstack/query hooks based on the provided name.
|
|
88
88
|
*/
|
|
89
89
|
group?: Group
|
|
90
|
-
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL'>
|
|
91
|
-
|
|
90
|
+
client?: Pick<PluginClient['options'], 'client' | 'dataReturnType' | 'importPath' | 'baseURL' | 'bundle'>
|
|
92
91
|
/**
|
|
93
92
|
* Array containing exclude parameters to exclude/skip tags/operations/methods/paths.
|
|
94
93
|
*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"generators-CIsfvh9C.cjs","names":["pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","InfiniteQueryOptions","InfiniteQuery","pluginTsName","pluginZodName","pluginClientName","File","path","MutationKey","Client","Mutation","pluginClientName","pluginTsName","pluginZodName","File","path","QueryKey","Client","QueryOptions","Query"],"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, { 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 || !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/fetcher.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import\n name={['ResponseConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n <File.Import name={['toValue']} path=\"vue\" />\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\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 || 'data'}\n 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 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', 'InfiniteQueryObserverOptions', '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 !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 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 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/fetcher.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={mutation.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.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/fetcher.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {!!hasClientPlugin && <File.Import name={[client.name]} root={mutation.file.path} path={client.file.path} />}\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 {!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 || 'data'}\n 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 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 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 {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/fetcher.ts')} />\n <File.Import\n name={['RequestConfig', 'ResponseErrorConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}\n isTypeOnly\n />\n {options.client.dataReturnType === 'full' && (\n <File.Import\n name={['ResponseConfig']}\n root={query.file.path}\n path={path.resolve(config.root, config.output.path, '.kubb/fetcher.ts')}\n isTypeOnly\n />\n )}\n </>\n )}\n <File.Import name={['toValue']} path=\"vue\" />\n <File.Import name={['MaybeRefOrGetter']} path=\"vue\" isTypeOnly />\n {!!hasClientPlugin && <File.Import name={[client.name]} root={query.file.path} path={client.file.path} />}\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 || 'data'}\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 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', 'QueryObserverOptions', '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,MAAa,gFAA8D;CACzE,MAAM;CACN,UAAU,EAAE,QAAQ,WAAW,WAAW,UAAU;EAClD,MAAM,EACJ,SACA,SAAS,EAAE,aACT;EACJ,MAAM,yDAAkC;EAExC,MAAM,2CAAc;EACpB,MAAM,EAAE,YAAY,SAAS,6DAAgC,UAAU;EAEvE,MAAM,UAAU,OAAO,QAAQ,UAAU,YAAY,OAAO,QAAQ,OAAO,QAAQ,MAAM,WAAW,UAAU,WAAW,OAAO;EAChI,MAAM,oCAAwB,QAAQ,WAAW,QAAQ,SAAS,UAAU,EAAE,EAAE,QAAQ,QAAQ,QAAQ,MAAM,UAAU,EAAE,CAAC,CAAC,MACzH,WAAW,UAAU,WAAW,OAClC;EACD,MAAM,aAAa,WAAW,CAAC,CAAC,Q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