@kubb/plugin-vue-query 3.4.4 → 3.5.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/chunk-HUKJLE4A.cjs +424 -0
- package/dist/chunk-HUKJLE4A.cjs.map +1 -0
- package/dist/chunk-VTRFZL5E.js +420 -0
- package/dist/chunk-VTRFZL5E.js.map +1 -0
- package/dist/components.d.cts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/generators.cjs +4 -4
- package/dist/generators.d.cts +1 -1
- package/dist/generators.d.ts +1 -1
- package/dist/generators.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{types-B6HlLDzG.d.cts → types-DKq2nW8w.d.cts} +7 -7
- package/dist/{types-B6HlLDzG.d.ts → types-DKq2nW8w.d.ts} +7 -7
- package/package.json +11 -11
- package/src/generators/infiniteQueryGenerator.tsx +10 -3
- package/src/generators/mutationGenerator.tsx +10 -2
- package/src/generators/queryGenerator.tsx +10 -2
- package/src/types.ts +3 -3
- package/dist/chunk-KQSFBSYB.js +0 -386
- package/dist/chunk-KQSFBSYB.js.map +0 -1
- package/dist/chunk-P5FF4CZ7.cjs +0 -390
- package/dist/chunk-P5FF4CZ7.cjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx"],"names":["createReactGenerator","useApp","useOperationManager","difference","pluginTsName","pluginZodName","jsxs","File","jsx","Fragment"],"mappings":";;;;;;;;;AAUO,IAAM,iBAAiB,oBAAqC,CAAA;AAAA,EACjE,IAAM,EAAA,WAAA;AAAA,EACN,SAAU,CAAA,EAAE,OAAS,EAAA,SAAA,EAAa,EAAA;AAChC,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,OAAA,EAAS,EAAE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BAA4B,CAAA,EAAG,IAAM,EAAA,UAAA,EAAY,YAAU,IAAC,EAAA,CAAA;AAAA,wBAC5HC,GAAAA;AAAA,UAAC,aAAA;AAAA,UAAA;AAAA,YACC,MAAM,KAAM,CAAA,IAAA;AAAA,YACZ,kBAAkB,YAAa,CAAA,IAAA;AAAA,YAC/B,aAAa,IAAK,CAAA,OAAA;AAAA,YAClB,cAAc,OAAQ,CAAA,YAAA;AAAA,YACtB,YAAY,OAAQ,CAAA,UAAA;AAAA,YACpB,gBAAgB,OAAQ,CAAA,cAAA;AAAA,YACxB,SAAA;AAAA,YACA,cAAA,EAAgB,QAAQ,MAAO,CAAA,cAAA;AAAA,YAC/B,cAAc,QAAS,CAAA,IAAA;AAAA,YACvB,kBAAkB,QAAS,CAAA;AAAA;AAAA;AAC7B,OACF,EAAA;AAAA,KAEJ,EAAA,CAAA;AAAA;AAGN,CAAC","file":"chunk-KQSFBSYB.js","sourcesContent":["import { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\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({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const 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 client = {\n name: getName(operation, { type: 'function' }),\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 baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['unref']} path=\"vue\" />\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} 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 <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 <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <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}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', '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}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\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({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/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 client = {\n name: getName(operation, { type: 'function' }),\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 baseName={mutation.file.baseName} path={mutation.file.path} meta={mutation.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={mutation.file.path} path={zod.file.path} />}\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <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 <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['MutationObserverOptions']} 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}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\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({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const 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 client = {\n name: getName(operation, { type: 'function' }),\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 baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['unref']} path=\"vue\" />\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} 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 <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 <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n {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}\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', '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}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"]}
|
package/dist/chunk-P5FF4CZ7.cjs
DELETED
|
@@ -1,390 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunkKGJSQLZT_cjs = require('./chunk-KGJSQLZT.cjs');
|
|
4
|
-
var pluginOas = require('@kubb/plugin-oas');
|
|
5
|
-
var hooks = require('@kubb/plugin-oas/hooks');
|
|
6
|
-
var pluginTs = require('@kubb/plugin-ts');
|
|
7
|
-
var pluginZod = require('@kubb/plugin-zod');
|
|
8
|
-
var react = require('@kubb/react');
|
|
9
|
-
var remeda = require('remeda');
|
|
10
|
-
var jsxRuntime = require('@kubb/react/jsx-runtime');
|
|
11
|
-
|
|
12
|
-
var queryGenerator = pluginOas.createReactGenerator({
|
|
13
|
-
name: "vue-query",
|
|
14
|
-
Operation({ options, operation }) {
|
|
15
|
-
const {
|
|
16
|
-
plugin: {
|
|
17
|
-
options: { output }
|
|
18
|
-
}
|
|
19
|
-
} = react.useApp();
|
|
20
|
-
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
21
|
-
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
22
|
-
const isMutation = remeda.difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(
|
|
23
|
-
(method) => operation.method === method
|
|
24
|
-
);
|
|
25
|
-
const importPath = options.query ? options.query.importPath : "@tanstack/vue-query";
|
|
26
|
-
const query = {
|
|
27
|
-
name: getName(operation, { type: "function", prefix: "use" }),
|
|
28
|
-
typeName: getName(operation, { type: "type" }),
|
|
29
|
-
file: getFile(operation, { prefix: "use" })
|
|
30
|
-
};
|
|
31
|
-
const client = {
|
|
32
|
-
name: getName(operation, { type: "function" })
|
|
33
|
-
};
|
|
34
|
-
const queryOptions = {
|
|
35
|
-
name: getName(operation, { type: "function", suffix: "QueryOptions" })
|
|
36
|
-
};
|
|
37
|
-
const queryKey = {
|
|
38
|
-
name: getName(operation, { type: "const", suffix: "QueryKey" }),
|
|
39
|
-
typeName: getName(operation, { type: "type", suffix: "QueryKey" })
|
|
40
|
-
};
|
|
41
|
-
const type = {
|
|
42
|
-
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
43
|
-
//todo remove type?
|
|
44
|
-
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
45
|
-
};
|
|
46
|
-
const zod = {
|
|
47
|
-
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
48
|
-
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
49
|
-
};
|
|
50
|
-
if (!isQuery || isMutation) {
|
|
51
|
-
return null;
|
|
52
|
-
}
|
|
53
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
|
|
54
|
-
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
|
|
55
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["unref"], path: "vue" }),
|
|
56
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
57
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
58
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
59
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
60
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
61
|
-
react.File.Import,
|
|
62
|
-
{
|
|
63
|
-
name: [
|
|
64
|
-
type.schemas.request?.name,
|
|
65
|
-
type.schemas.response.name,
|
|
66
|
-
type.schemas.pathParams?.name,
|
|
67
|
-
type.schemas.queryParams?.name,
|
|
68
|
-
type.schemas.headerParams?.name,
|
|
69
|
-
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
70
|
-
].filter(Boolean),
|
|
71
|
-
root: query.file.path,
|
|
72
|
-
path: type.file.path,
|
|
73
|
-
isTypeOnly: true
|
|
74
|
-
}
|
|
75
|
-
),
|
|
76
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
77
|
-
chunkKGJSQLZT_cjs.QueryKey,
|
|
78
|
-
{
|
|
79
|
-
name: queryKey.name,
|
|
80
|
-
typeName: queryKey.typeName,
|
|
81
|
-
operation,
|
|
82
|
-
paramsCasing: options.paramsCasing,
|
|
83
|
-
pathParamsType: options.pathParamsType,
|
|
84
|
-
typeSchemas: type.schemas,
|
|
85
|
-
transformer: options.queryKey
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
89
|
-
chunkKGJSQLZT_cjs.Client,
|
|
90
|
-
{
|
|
91
|
-
name: client.name,
|
|
92
|
-
isExportable: false,
|
|
93
|
-
isIndexable: false,
|
|
94
|
-
baseURL: options.client.baseURL,
|
|
95
|
-
operation,
|
|
96
|
-
typeSchemas: type.schemas,
|
|
97
|
-
zodSchemas: zod.schemas,
|
|
98
|
-
dataReturnType: options.client.dataReturnType,
|
|
99
|
-
paramsCasing: options.paramsCasing,
|
|
100
|
-
paramsType: options.paramsType,
|
|
101
|
-
pathParamsType: options.pathParamsType,
|
|
102
|
-
parser: options.parser
|
|
103
|
-
}
|
|
104
|
-
),
|
|
105
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["queryOptions"], path: importPath }),
|
|
106
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
107
|
-
chunkKGJSQLZT_cjs.QueryOptions,
|
|
108
|
-
{
|
|
109
|
-
name: queryOptions.name,
|
|
110
|
-
clientName: client.name,
|
|
111
|
-
queryKeyName: queryKey.name,
|
|
112
|
-
paramsCasing: options.paramsCasing,
|
|
113
|
-
typeSchemas: type.schemas,
|
|
114
|
-
paramsType: options.paramsType,
|
|
115
|
-
pathParamsType: options.pathParamsType,
|
|
116
|
-
dataReturnType: options.client.dataReturnType
|
|
117
|
-
}
|
|
118
|
-
),
|
|
119
|
-
options.query && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
120
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useQuery"], path: importPath }),
|
|
121
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "QueryObserverOptions", "UseQueryReturnType"], path: importPath, isTypeOnly: true }),
|
|
122
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
123
|
-
chunkKGJSQLZT_cjs.Query,
|
|
124
|
-
{
|
|
125
|
-
name: query.name,
|
|
126
|
-
queryOptionsName: queryOptions.name,
|
|
127
|
-
typeSchemas: type.schemas,
|
|
128
|
-
paramsCasing: options.paramsCasing,
|
|
129
|
-
paramsType: options.paramsType,
|
|
130
|
-
pathParamsType: options.pathParamsType,
|
|
131
|
-
operation,
|
|
132
|
-
dataReturnType: options.client.dataReturnType,
|
|
133
|
-
queryKeyName: queryKey.name,
|
|
134
|
-
queryKeyTypeName: queryKey.typeName
|
|
135
|
-
}
|
|
136
|
-
)
|
|
137
|
-
] })
|
|
138
|
-
] });
|
|
139
|
-
}
|
|
140
|
-
});
|
|
141
|
-
var mutationGenerator = pluginOas.createReactGenerator({
|
|
142
|
-
name: "vue-query",
|
|
143
|
-
Operation({ options, operation }) {
|
|
144
|
-
const {
|
|
145
|
-
plugin: {
|
|
146
|
-
options: { output }
|
|
147
|
-
}
|
|
148
|
-
} = react.useApp();
|
|
149
|
-
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
150
|
-
const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method);
|
|
151
|
-
const isMutation = !isQuery && remeda.difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method);
|
|
152
|
-
const importPath = options.mutation ? options.mutation.importPath : "@tanstack/vue-query";
|
|
153
|
-
const mutation = {
|
|
154
|
-
name: getName(operation, { type: "function", prefix: "use" }),
|
|
155
|
-
typeName: getName(operation, { type: "type" }),
|
|
156
|
-
file: getFile(operation, { prefix: "use" })
|
|
157
|
-
};
|
|
158
|
-
const type = {
|
|
159
|
-
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
160
|
-
//todo remove type?
|
|
161
|
-
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
162
|
-
};
|
|
163
|
-
const zod = {
|
|
164
|
-
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
165
|
-
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
166
|
-
};
|
|
167
|
-
const client = {
|
|
168
|
-
name: getName(operation, { type: "function" })
|
|
169
|
-
};
|
|
170
|
-
const mutationKey = {
|
|
171
|
-
name: getName(operation, { type: "const", suffix: "MutationKey" }),
|
|
172
|
-
typeName: getName(operation, { type: "type", suffix: "MutationKey" })
|
|
173
|
-
};
|
|
174
|
-
if (!isMutation) {
|
|
175
|
-
return null;
|
|
176
|
-
}
|
|
177
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: mutation.file.baseName, path: mutation.file.path, meta: mutation.file.meta, banner: output?.banner, footer: output?.footer, children: [
|
|
178
|
-
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
|
|
179
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
180
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
181
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
182
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
183
|
-
react.File.Import,
|
|
184
|
-
{
|
|
185
|
-
name: [
|
|
186
|
-
type.schemas.request?.name,
|
|
187
|
-
type.schemas.response.name,
|
|
188
|
-
type.schemas.pathParams?.name,
|
|
189
|
-
type.schemas.queryParams?.name,
|
|
190
|
-
type.schemas.headerParams?.name,
|
|
191
|
-
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
192
|
-
].filter(Boolean),
|
|
193
|
-
root: mutation.file.path,
|
|
194
|
-
path: type.file.path,
|
|
195
|
-
isTypeOnly: true
|
|
196
|
-
}
|
|
197
|
-
),
|
|
198
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
199
|
-
chunkKGJSQLZT_cjs.MutationKey,
|
|
200
|
-
{
|
|
201
|
-
name: mutationKey.name,
|
|
202
|
-
typeName: mutationKey.typeName,
|
|
203
|
-
operation,
|
|
204
|
-
pathParamsType: options.pathParamsType,
|
|
205
|
-
paramsCasing: options.paramsCasing,
|
|
206
|
-
typeSchemas: type.schemas,
|
|
207
|
-
transformer: options.mutationKey
|
|
208
|
-
}
|
|
209
|
-
),
|
|
210
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
211
|
-
chunkKGJSQLZT_cjs.Client,
|
|
212
|
-
{
|
|
213
|
-
name: client.name,
|
|
214
|
-
isExportable: false,
|
|
215
|
-
isIndexable: false,
|
|
216
|
-
baseURL: options.client.baseURL,
|
|
217
|
-
operation,
|
|
218
|
-
typeSchemas: type.schemas,
|
|
219
|
-
zodSchemas: zod.schemas,
|
|
220
|
-
dataReturnType: options.client.dataReturnType,
|
|
221
|
-
paramsCasing: options.paramsCasing,
|
|
222
|
-
paramsType: options.paramsType,
|
|
223
|
-
pathParamsType: options.pathParamsType,
|
|
224
|
-
parser: options.parser
|
|
225
|
-
}
|
|
226
|
-
),
|
|
227
|
-
options.mutation && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
228
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useMutation"], path: importPath }),
|
|
229
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MutationObserverOptions"], path: importPath, isTypeOnly: true }),
|
|
230
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
231
|
-
chunkKGJSQLZT_cjs.Mutation,
|
|
232
|
-
{
|
|
233
|
-
name: mutation.name,
|
|
234
|
-
clientName: client.name,
|
|
235
|
-
typeName: mutation.typeName,
|
|
236
|
-
typeSchemas: type.schemas,
|
|
237
|
-
operation,
|
|
238
|
-
paramsCasing: options.paramsCasing,
|
|
239
|
-
dataReturnType: options.client.dataReturnType,
|
|
240
|
-
paramsType: options.paramsType,
|
|
241
|
-
pathParamsType: options.pathParamsType,
|
|
242
|
-
mutationKeyName: mutationKey.name
|
|
243
|
-
}
|
|
244
|
-
)
|
|
245
|
-
] })
|
|
246
|
-
] });
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
250
|
-
name: "vue-infinite-query",
|
|
251
|
-
Operation({ options, operation }) {
|
|
252
|
-
const {
|
|
253
|
-
plugin: {
|
|
254
|
-
options: { output }
|
|
255
|
-
}
|
|
256
|
-
} = react.useApp();
|
|
257
|
-
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
258
|
-
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
259
|
-
const isMutation = remeda.difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(
|
|
260
|
-
(method) => operation.method === method
|
|
261
|
-
);
|
|
262
|
-
const isInfinite = isQuery && !!options.infinite;
|
|
263
|
-
const importPath = options.query ? options.query.importPath : "@tanstack/vue-query";
|
|
264
|
-
const query = {
|
|
265
|
-
name: getName(operation, { type: "function", prefix: "use", suffix: "infinite" }),
|
|
266
|
-
typeName: getName(operation, { type: "type" }),
|
|
267
|
-
file: getFile(operation, { prefix: "use", suffix: "infinite" })
|
|
268
|
-
};
|
|
269
|
-
const client = {
|
|
270
|
-
name: getName(operation, { type: "function" })
|
|
271
|
-
};
|
|
272
|
-
const queryOptions = {
|
|
273
|
-
name: getName(operation, { type: "function", suffix: "InfiniteQueryOptions" })
|
|
274
|
-
};
|
|
275
|
-
const queryKey = {
|
|
276
|
-
name: getName(operation, { type: "const", suffix: "InfiniteQueryKey" }),
|
|
277
|
-
typeName: getName(operation, { type: "type", suffix: "InfiniteQueryKey" })
|
|
278
|
-
};
|
|
279
|
-
const type = {
|
|
280
|
-
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
281
|
-
//todo remove type?
|
|
282
|
-
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
283
|
-
};
|
|
284
|
-
const zod = {
|
|
285
|
-
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
286
|
-
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
287
|
-
};
|
|
288
|
-
if (!isQuery || isMutation || !isInfinite) {
|
|
289
|
-
return null;
|
|
290
|
-
}
|
|
291
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: query.file.baseName, path: query.file.path, meta: query.file.meta, banner: output?.banner, footer: output?.footer, children: [
|
|
292
|
-
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
|
|
293
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["unref"], path: "vue" }),
|
|
294
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
295
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
296
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseErrorConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
297
|
-
options.client.dataReturnType === "full" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
298
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
299
|
-
react.File.Import,
|
|
300
|
-
{
|
|
301
|
-
name: [
|
|
302
|
-
type.schemas.request?.name,
|
|
303
|
-
type.schemas.response.name,
|
|
304
|
-
type.schemas.pathParams?.name,
|
|
305
|
-
type.schemas.queryParams?.name,
|
|
306
|
-
type.schemas.headerParams?.name,
|
|
307
|
-
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
308
|
-
].filter(Boolean),
|
|
309
|
-
root: query.file.path,
|
|
310
|
-
path: type.file.path,
|
|
311
|
-
isTypeOnly: true
|
|
312
|
-
}
|
|
313
|
-
),
|
|
314
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
315
|
-
chunkKGJSQLZT_cjs.QueryKey,
|
|
316
|
-
{
|
|
317
|
-
name: queryKey.name,
|
|
318
|
-
typeName: queryKey.typeName,
|
|
319
|
-
operation,
|
|
320
|
-
paramsCasing: options.paramsCasing,
|
|
321
|
-
pathParamsType: options.pathParamsType,
|
|
322
|
-
typeSchemas: type.schemas,
|
|
323
|
-
transformer: options.queryKey
|
|
324
|
-
}
|
|
325
|
-
),
|
|
326
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
327
|
-
chunkKGJSQLZT_cjs.Client,
|
|
328
|
-
{
|
|
329
|
-
name: client.name,
|
|
330
|
-
isExportable: false,
|
|
331
|
-
isIndexable: false,
|
|
332
|
-
baseURL: options.client.baseURL,
|
|
333
|
-
operation,
|
|
334
|
-
typeSchemas: type.schemas,
|
|
335
|
-
zodSchemas: zod.schemas,
|
|
336
|
-
dataReturnType: options.client.dataReturnType,
|
|
337
|
-
paramsCasing: options.paramsCasing,
|
|
338
|
-
paramsType: options.paramsType,
|
|
339
|
-
pathParamsType: options.pathParamsType,
|
|
340
|
-
parser: options.parser
|
|
341
|
-
}
|
|
342
|
-
),
|
|
343
|
-
options.infinite && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
344
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["InfiniteData"], isTypeOnly: true, path: importPath }),
|
|
345
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["infiniteQueryOptions"], path: importPath }),
|
|
346
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
347
|
-
chunkKGJSQLZT_cjs.InfiniteQueryOptions,
|
|
348
|
-
{
|
|
349
|
-
name: queryOptions.name,
|
|
350
|
-
clientName: client.name,
|
|
351
|
-
queryKeyName: queryKey.name,
|
|
352
|
-
typeSchemas: type.schemas,
|
|
353
|
-
paramsType: options.paramsType,
|
|
354
|
-
paramsCasing: options.paramsCasing,
|
|
355
|
-
pathParamsType: options.pathParamsType,
|
|
356
|
-
dataReturnType: options.client.dataReturnType,
|
|
357
|
-
cursorParam: options.infinite.cursorParam,
|
|
358
|
-
initialPageParam: options.infinite.initialPageParam,
|
|
359
|
-
queryParam: options.infinite.queryParam
|
|
360
|
-
}
|
|
361
|
-
)
|
|
362
|
-
] }),
|
|
363
|
-
options.infinite && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
364
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useInfiniteQuery"], path: importPath }),
|
|
365
|
-
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "InfiniteQueryObserverOptions", "UseInfiniteQueryReturnType"], path: importPath, isTypeOnly: true }),
|
|
366
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
367
|
-
chunkKGJSQLZT_cjs.InfiniteQuery,
|
|
368
|
-
{
|
|
369
|
-
name: query.name,
|
|
370
|
-
queryOptionsName: queryOptions.name,
|
|
371
|
-
typeSchemas: type.schemas,
|
|
372
|
-
paramsCasing: options.paramsCasing,
|
|
373
|
-
paramsType: options.paramsType,
|
|
374
|
-
pathParamsType: options.pathParamsType,
|
|
375
|
-
operation,
|
|
376
|
-
dataReturnType: options.client.dataReturnType,
|
|
377
|
-
queryKeyName: queryKey.name,
|
|
378
|
-
queryKeyTypeName: queryKey.typeName
|
|
379
|
-
}
|
|
380
|
-
)
|
|
381
|
-
] })
|
|
382
|
-
] });
|
|
383
|
-
}
|
|
384
|
-
});
|
|
385
|
-
|
|
386
|
-
exports.infiniteQueryGenerator = infiniteQueryGenerator;
|
|
387
|
-
exports.mutationGenerator = mutationGenerator;
|
|
388
|
-
exports.queryGenerator = queryGenerator;
|
|
389
|
-
//# sourceMappingURL=chunk-P5FF4CZ7.cjs.map
|
|
390
|
-
//# sourceMappingURL=chunk-P5FF4CZ7.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx"],"names":["createReactGenerator","useApp","useOperationManager","difference","pluginTsName","pluginZodName","File","jsx","QueryKey","Client","QueryOptions","jsxs","Fragment","Query","MutationKey","Mutation","InfiniteQueryOptions","InfiniteQuery"],"mappings":";;;;;;;;;;;AAUO,IAAM,iBAAiBA,8BAAqC,CAAA;AAAA,EACjE,IAAM,EAAA,WAAA;AAAA,EACN,SAAU,CAAA,EAAE,OAAS,EAAA,SAAA,EAAa,EAAA;AAChC,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,OAAA,EAAS,EAAE,MAAO;AAAA;AACpB,QACEC,YAAuB,EAAA;AAC3B,IAAA,MAAM,EAAE,UAAA,EAAY,OAAS,EAAA,OAAA,KAAYC,yBAAoB,EAAA;AAE7D,IAAA,MAAM,OAAU,GAAA,OAAO,OAAQ,CAAA,KAAA,KAAU,YAAY,IAAO,GAAA,OAAA,CAAQ,KAAO,EAAA,OAAA,CAAQ,IAAK,CAAA,CAAC,MAAW,KAAA,SAAA,CAAU,WAAW,MAAM,CAAA;AAC/H,IAAA,MAAM,aAAaC,iBAAW,CAAA,OAAA,CAAQ,QAAW,GAAA,OAAA,CAAQ,SAAS,OAAU,GAAA,EAAI,EAAA,OAAA,CAAQ,QAAQ,OAAQ,CAAA,KAAA,CAAM,OAAU,GAAA,EAAE,CAAE,CAAA,IAAA;AAAA,MAC1H,CAAC,MAAW,KAAA,SAAA,CAAU,MAAW,KAAA;AAAA,KACnC;AACA,IAAA,MAAM,UAAa,GAAA,OAAA,CAAQ,KAAQ,GAAA,OAAA,CAAQ,MAAM,UAAa,GAAA,qBAAA;AAE9D,IAAA,MAAM,KAAQ,GAAA;AAAA,MACZ,IAAA,EAAM,QAAQ,SAAW,EAAA,EAAE,MAAM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YACtB,gBAAgB,OAAQ,CAAA,cAAA;AAAA,YACxB,cAAA,EAAgB,QAAQ,MAAO,CAAA,cAAA;AAAA,YAC/B,WAAA,EAAa,QAAQ,QAAS,CAAA,WAAA;AAAA,YAC9B,gBAAA,EAAkB,QAAQ,QAAS,CAAA,gBAAA;AAAA,YACnC,UAAA,EAAY,QAAQ,QAAS,CAAA;AAAA;AAAA;AAC/B,OACF,EAAA,CAAA;AAAA,MAED,OAAQ,CAAA,QAAA,oBACPL,eAAAA,CAAAC,qBAAA,EACE,QAAA,EAAA;AAAA,wBAAAL,cAAAA,CAACD,WAAK,MAAL,EAAA,EAAY,MAAM,CAAC,kBAAkB,CAAG,EAAA,IAAA,EAAM,UAAY,EAAA,CAAA;AAAA,wBAC3DC,cAAAA,CAACD,UAAK,CAAA,MAAA,EAAL,EAAY,IAAM,EAAA,CAAC,UAAY,EAAA,8BAAA,EAAgC,4BAA4B,CAAA,EAAG,IAAM,EAAA,UAAA,EAAY,YAAU,IAAC,EAAA,CAAA;AAAA,wBAC5HC,cAAAA;AAAA,UAACU,+BAAA;AAAA,UAAA;AAAA,YACC,MAAM,KAAM,CAAA,IAAA;AAAA,YACZ,kBAAkB,YAAa,CAAA,IAAA;AAAA,YAC/B,aAAa,IAAK,CAAA,OAAA;AAAA,YAClB,cAAc,OAAQ,CAAA,YAAA;AAAA,YACtB,YAAY,OAAQ,CAAA,UAAA;AAAA,YACpB,gBAAgB,OAAQ,CAAA,cAAA;AAAA,YACxB,SAAA;AAAA,YACA,cAAA,EAAgB,QAAQ,MAAO,CAAA,cAAA;AAAA,YAC/B,cAAc,QAAS,CAAA,IAAA;AAAA,YACvB,kBAAkB,QAAS,CAAA;AAAA;AAAA;AAC7B,OACF,EAAA;AAAA,KAEJ,EAAA,CAAA;AAAA;AAGN,CAAC","file":"chunk-P5FF4CZ7.cjs","sourcesContent":["import { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\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({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const 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 client = {\n name: getName(operation, { type: 'function' }),\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 baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['unref']} path=\"vue\" />\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} 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 <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 <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <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}\n />\n {options.query && (\n <>\n <File.Import name={['useQuery']} path={importPath} />\n <File.Import name={['QueryKey', '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}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\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({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = !!options.query && options.query?.methods.some((method) => operation.method === method)\n const isMutation =\n !isQuery &&\n difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some((method) => operation.method === method)\n\n const importPath = options.mutation ? options.mutation.importPath : '@tanstack/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 client = {\n name: getName(operation, { type: 'function' }),\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 baseName={mutation.file.baseName} path={mutation.file.path} meta={mutation.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={mutation.file.path} path={zod.file.path} />}\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseConfig', 'ResponseErrorConfig']} path={options.client.importPath} isTypeOnly />\n <File.Import\n name={[\n type.schemas.request?.name,\n type.schemas.response.name,\n type.schemas.pathParams?.name,\n type.schemas.queryParams?.name,\n type.schemas.headerParams?.name,\n ...(type.schemas.statusCodes?.map((item) => item.name) || []),\n ].filter(Boolean)}\n root={mutation.file.path}\n path={type.file.path}\n isTypeOnly\n />\n <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 <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n {options.mutation && (\n <>\n <File.Import name={['useMutation']} path={importPath} />\n <File.Import name={['MutationObserverOptions']} 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}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n mutationKeyName={mutationKey.name}\n />\n </>\n )}\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { Client } from '@kubb/plugin-client/components'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { useOperationManager } from '@kubb/plugin-oas/hooks'\nimport { pluginTsName } from '@kubb/plugin-ts'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { File, useApp } from '@kubb/react'\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({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginVueQuery>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const isQuery = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = difference(options.mutation ? options.mutation.methods : [], options.query ? options.query.methods : []).some(\n (method) => operation.method === method,\n )\n const 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 client = {\n name: getName(operation, { type: 'function' }),\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 baseName={query.file.baseName} path={query.file.path} meta={query.file.meta} banner={output?.banner} footer={output?.footer}>\n {options.parser === 'zod' && <File.Import name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['unref']} path=\"vue\" />\n <File.Import name={['MaybeRef']} path=\"vue\" isTypeOnly />\n <File.Import name={'client'} 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 <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 <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.client.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n paramsCasing={options.paramsCasing}\n paramsType={options.paramsType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n {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}\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', '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}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </>\n )}\n </File>\n )\n },\n})\n"]}
|