@kubb/plugin-vue-query 3.0.0-alpha.20
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/LICENSE +21 -0
- package/README.md +123 -0
- package/dist/chunk-3HD4DCDR.js +505 -0
- package/dist/chunk-3HD4DCDR.js.map +1 -0
- package/dist/chunk-4YY5DUPV.cjs +514 -0
- package/dist/chunk-4YY5DUPV.cjs.map +1 -0
- package/dist/chunk-BKYBSBUA.js +567 -0
- package/dist/chunk-BKYBSBUA.js.map +1 -0
- package/dist/chunk-FRKJLBA5.cjs +576 -0
- package/dist/chunk-FRKJLBA5.cjs.map +1 -0
- package/dist/components.cjs +32 -0
- package/dist/components.cjs.map +1 -0
- package/dist/components.d.cts +121 -0
- package/dist/components.d.ts +121 -0
- package/dist/components.js +3 -0
- package/dist/components.js.map +1 -0
- package/dist/generators.cjs +21 -0
- package/dist/generators.cjs.map +1 -0
- package/dist/generators.d.cts +12 -0
- package/dist/generators.d.ts +12 -0
- package/dist/generators.js +4 -0
- package/dist/generators.js.map +1 -0
- package/dist/index.cjs +138 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +131 -0
- package/dist/index.js.map +1 -0
- package/dist/types-CmetQDTc.d.cts +173 -0
- package/dist/types-CmetQDTc.d.ts +173 -0
- package/package.json +102 -0
- package/src/components/InfiniteQuery.tsx +137 -0
- package/src/components/InfiniteQueryOptions.tsx +129 -0
- package/src/components/Mutation.tsx +141 -0
- package/src/components/Query.tsx +128 -0
- package/src/components/QueryKey.tsx +81 -0
- package/src/components/QueryOptions.tsx +88 -0
- package/src/components/index.ts +6 -0
- package/src/generators/__snapshots__/clientDataReturnTypeFull.ts +52 -0
- package/src/generators/__snapshots__/clientGetImportPath.ts +52 -0
- package/src/generators/__snapshots__/clientPostImportPath.ts +38 -0
- package/src/generators/__snapshots__/findByTags.ts +52 -0
- package/src/generators/__snapshots__/findByTagsPathParamsObject.ts +52 -0
- package/src/generators/__snapshots__/findByTagsWithCustomQueryKey.ts +52 -0
- package/src/generators/__snapshots__/findByTagsWithZod.ts +52 -0
- package/src/generators/__snapshots__/findInfiniteByTags.ts +57 -0
- package/src/generators/__snapshots__/findInfiniteByTagsCursor.ts +57 -0
- package/src/generators/__snapshots__/postAsQuery.ts +50 -0
- package/src/generators/__snapshots__/updatePetById.ts +38 -0
- package/src/generators/__snapshots__/updatePetByIdPathParamsObject.ts +40 -0
- package/src/generators/index.ts +3 -0
- package/src/generators/infiniteQueryGenerator.tsx +131 -0
- package/src/generators/mutationGenerator.tsx +96 -0
- package/src/generators/queryGenerator.tsx +124 -0
- package/src/index.ts +2 -0
- package/src/plugin.ts +152 -0
- package/src/types.ts +179 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../plugin-client/src/generators/clientGenerator.tsx","../../plugin-client/src/generators/operationsGenerator.tsx","../../plugin-client/src/plugin.ts","../src/generators/queryGenerator.tsx","../src/generators/mutationGenerator.tsx","../src/generators/infiniteQueryGenerator.tsx"],"names":["createReactGenerator","useApp","jsx","File","transformers","pluginZodName","options","useOperationManager","pluginTsName","jsxs"],"mappings":";;;;;;;;;;;;AAQO,IAAM,kBAAkB,oBAAmC,CAAA;AAAA,EAChE,IAAM,EAAA,QAAA;AAAA,EACN,SAAU,CAAA,EAAE,OAAS,EAAA,SAAA,EAAa,EAAA;AAChC,IAAM,MAAA;AAAA,MACJ,MAAQ,EAAA;AAAA,QACN,OAAA,EAAS,EAAE,MAAO,EAAA;AAAA,OACpB;AAAA,QACE,MAAqB,EAAA,CAAA;AACzB,IAAA,MAAM,EAAE,UAAA,EAAY,OAAS,EAAA,OAAA,KAAY,mBAAoB,EAAA,CAAA;AAE7D,IAAA,MAAM,MAAS,GAAA;AAAA,MACb,MAAM,OAAQ,CAAA,SAAA,EAAW,EAAE,IAAA,EAAM,YAAY,CAAA;AAAA,MAC7C,IAAA,EAAM,QAA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vB,kBAAkB,QAAS,CAAA,QAAA;AAAA,SAAA;AAAA,OAC7B;AAAA,KACF,EAAA,CAAA,CAAA;AAAA,GAEJ;AACF,CAAC","file":"chunk-3HD4DCDR.js","sourcesContent":["import { 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 { Client } from '../components/Client'\nimport type { PluginClient } from '../types'\n\nexport const clientGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operation({ options, operation }) {\n const {\n plugin: {\n options: { output },\n },\n } = useApp<PluginClient>()\n const { getSchemas, getName, getFile } = useOperationManager()\n\n const client = {\n name: getName(operation, { type: 'function' }),\n file: getFile(operation),\n }\n\n const type = {\n file: getFile(operation, { pluginKey: [pluginTsName] }),\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 return (\n <File baseName={client.file.baseName} path={client.file.path} meta={client.file.meta} banner={output?.banner} footer={output?.footer}>\n <File.Import name={'client'} path={options.importPath} />\n <File.Import name={['RequestConfig']} path={options.importPath} isTypeOnly />\n {options.parser === 'zod' && <File.Import extName={output?.extName} name={[zod.schemas.response.name]} root={client.file.path} path={zod.file.path} />}\n <File.Import\n extName={output?.extName}\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={client.file.path}\n path={type.file.path}\n isTypeOnly\n />\n\n <Client\n name={client.name}\n baseURL={options.baseURL}\n dataReturnType={options.dataReturnType}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n operation={operation}\n parser={options.parser}\n zodSchemas={zod.schemas}\n />\n </File>\n )\n },\n})\n","import { pluginClientName } from '@kubb/plugin-client'\nimport { createReactGenerator } from '@kubb/plugin-oas'\nimport { File, useApp } from '@kubb/react'\nimport { Operations } from '../components/Operations'\nimport type { PluginClient } from '../types'\n\nexport const operationsGenerator = createReactGenerator<PluginClient>({\n name: 'client',\n Operations({ operations }) {\n const {\n pluginManager,\n plugin: {\n options: { output },\n },\n } = useApp<PluginClient>()\n\n const name = 'operations'\n const file = pluginManager.getFile({ name, extName: '.ts', pluginKey: [pluginClientName] })\n\n return (\n <File baseName={file.baseName} path={file.path} meta={file.meta} banner={output?.banner} footer={output?.footer}>\n <Operations name={name} operations={operations} />\n </File>\n )\n },\n})\n","import path from 'node:path'\n\nimport { FileManager, PluginManager, createPlugin } from '@kubb/core'\nimport { camelCase } from '@kubb/core/transformers'\nimport { renderTemplate } from '@kubb/core/utils'\nimport { OperationGenerator, pluginOasName } from '@kubb/plugin-oas'\n\nimport type { Plugin } from '@kubb/core'\nimport type { PluginOas as SwaggerPluginOptions } from '@kubb/plugin-oas'\nimport { pluginZodName } from '@kubb/plugin-zod'\nimport { operationsGenerator } from './generators'\nimport { clientGenerator } from './generators/clientGenerator.tsx'\nimport type { PluginClient } from './types.ts'\n\nexport const pluginClientName = 'plugin-client' satisfies PluginClient['name']\n\nexport const pluginClient = createPlugin<PluginClient>((options) => {\n const {\n output = { path: 'clients' },\n group,\n exclude = [],\n include,\n override = [],\n transformers = {},\n dataReturnType = 'data',\n pathParamsType = 'inline',\n operations = false,\n importPath = '@kubb/plugin-client/client',\n parser = 'client',\n } = options\n\n const template = group?.output ? group.output : `${output.path}/{{tag}}Controller`\n\n return {\n name: pluginClientName,\n options: {\n output: {\n exportType: 'barrelNamed',\n ...output,\n },\n parser,\n dataReturnType,\n importPath,\n pathParamsType,\n baseURL: undefined,\n },\n pre: [pluginOasName, parser === 'zod' ? pluginZodName : undefined].filter(Boolean),\n resolvePath(baseName, pathMode, options) {\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = pathMode ?? FileManager.getMode(path.resolve(root, output.path))\n\n if (mode === 'single') {\n /**\n * when output is a file then we will always append to the same file(output file), see fileManager.addOrAppend\n * Other plugins then need to call addOrAppend instead of just add from the fileManager class\n */\n return path.resolve(root, output.path)\n }\n\n if (options?.tag && group?.type === 'tag') {\n const tag = camelCase(options.tag)\n\n return path.resolve(root, renderTemplate(template, { tag }), baseName)\n }\n\n return path.resolve(root, output.path, baseName)\n },\n resolveName(name, type) {\n const resolvedName = camelCase(name, { isFile: type === 'file' })\n\n if (type) {\n return transformers?.name?.(resolvedName, type) || resolvedName\n }\n\n return resolvedName\n },\n async buildStart() {\n const [swaggerPlugin]: [Plugin<SwaggerPluginOptions>] = PluginManager.getDependedPlugins<SwaggerPluginOptions>(this.plugins, [pluginOasName])\n\n const oas = await swaggerPlugin.context.getOas()\n const root = path.resolve(this.config.root, this.config.output.path)\n const mode = FileManager.getMode(path.resolve(root, output.path))\n const baseURL = await swaggerPlugin.context.getBaseURL()\n\n const operationGenerator = new OperationGenerator(\n {\n ...this.plugin.options,\n baseURL,\n },\n {\n oas,\n pluginManager: this.pluginManager,\n plugin: this.plugin,\n contentType: swaggerPlugin.context.contentType,\n exclude,\n include,\n override,\n mode,\n },\n )\n\n const files = await operationGenerator.build(...[clientGenerator, operations ? operationsGenerator : undefined].filter(Boolean))\n\n await this.addFile(...files)\n\n if (this.config.output.exportType) {\n const barrelFiles = await this.fileManager.getBarrelFiles({\n root,\n output,\n files: this.fileManager.files,\n meta: {\n pluginKey: this.plugin.key,\n },\n logger: this.logger,\n })\n\n await this.addFile(...barrelFiles)\n }\n },\n }\n})\n","import transformers from '@kubb/core/transformers'\nimport { 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 { 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 = !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method)\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', pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: transformers.camelCase(`${operation.getOperationId()} QueryOptions`),\n }\n\n const queryKey = {\n name: transformers.camelCase(`${operation.getOperationId()} QueryKey`),\n typeName: transformers.pascalCase(`${operation.getOperationId()} 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 || typeof options.query === 'boolean') {\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 extName={output?.extName} name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['useQuery', 'queryOptions']} path={options.query.importPath} />\n <File.Import name={['QueryKey', 'WithRequired', 'QueryObserverOptions', 'UseQueryReturnType']} path={options.query.importPath} isTypeOnly />\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']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n extName={output?.extName}\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\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n keysFn={options.query.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <QueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n />\n <Query\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\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 { Mutation } 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 = typeof options.query === 'boolean' ? true : options.query?.methods.some((method) => operation.method === method)\n const isMutation = !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method)\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', pluginKey: [pluginClientName] }),\n }\n\n if (!isMutation || typeof options.mutation === 'boolean') {\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' && (\n <File.Import extName={output?.extName} name={[zod.schemas.response.name]} root={mutation.file.path} path={zod.file.path} />\n )}\n <File.Import name={['useMutation']} path={options.mutation.importPath} />\n <File.Import name={['UseMutationOptions']} path={options.mutation.importPath} isTypeOnly />\n <File.Import name={'client'} path={options.client.importPath} />\n <File.Import name={['RequestConfig', 'ResponseConfig']} path={options.client.importPath} isTypeOnly />\n <File.Import\n extName={output?.extName}\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 <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <Mutation\n name={mutation.name}\n clientName={client.name}\n typeName={mutation.typeName}\n typeSchemas={type.schemas}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n />\n </File>\n )\n },\n})\n","import transformers from '@kubb/core/transformers'\nimport { 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 { 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 const isQuery = typeof options.query === 'boolean' ? options.query : !!options.query.methods?.some((method) => operation.method === method)\n const isInfinite = isQuery && !!options.infinite\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', pluginKey: [pluginClientName] }),\n }\n\n const queryOptions = {\n name: transformers.camelCase(`${operation.getOperationId()} InfiniteQueryOptions`),\n }\n\n const queryKey = {\n name: transformers.camelCase(`${operation.getOperationId()} InfiniteQueryKey`),\n typeName: transformers.pascalCase(`${operation.getOperationId()} 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 || !isInfinite || typeof options.query === 'boolean' || typeof options.infinite === 'boolean') {\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 extName={output?.extName} name={[zod.schemas.response.name]} root={query.file.path} path={zod.file.path} />}\n <File.Import name={['useInfiniteQuery', 'infiniteQueryOptions']} path={options.query.importPath} />\n <File.Import\n name={['QueryKey', 'WithRequired', 'InfiniteQueryObserverOptions', 'UseInfiniteQueryReturnType']}\n path={options.query.importPath}\n isTypeOnly\n />\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']} path={options.client.importPath} isTypeOnly />\n {options.client.dataReturnType === 'full' && <File.Import name={['ResponseConfig']} path={options.client.importPath} isTypeOnly />}\n <File.Import\n extName={output?.extName}\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\n <QueryKey\n name={queryKey.name}\n typeName={queryKey.typeName}\n operation={operation}\n pathParamsType={options.pathParamsType}\n typeSchemas={type.schemas}\n keysFn={options.query.key}\n />\n <Client\n name={client.name}\n isExportable={false}\n isIndexable={false}\n baseURL={options.baseURL}\n operation={operation}\n typeSchemas={type.schemas}\n zodSchemas={zod.schemas}\n dataReturnType={options.client.dataReturnType}\n pathParamsType={options.pathParamsType}\n parser={options.parser}\n />\n <InfiniteQueryOptions\n name={queryOptions.name}\n clientName={client.name}\n queryKeyName={queryKey.name}\n typeSchemas={type.schemas}\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 <InfiniteQuery\n name={query.name}\n queryOptionsName={queryOptions.name}\n typeSchemas={type.schemas}\n pathParamsType={options.pathParamsType}\n operation={operation}\n dataReturnType={options.client.dataReturnType}\n queryKeyName={queryKey.name}\n queryKeyTypeName={queryKey.typeName}\n />\n </File>\n )\n },\n})\n"]}
|
|
@@ -0,0 +1,514 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunkFRKJLBA5_cjs = require('./chunk-FRKJLBA5.cjs');
|
|
4
|
+
var transformers = require('@kubb/core/transformers');
|
|
5
|
+
var path = require('path');
|
|
6
|
+
var core = require('@kubb/core');
|
|
7
|
+
var utils = require('@kubb/core/utils');
|
|
8
|
+
var pluginOas = require('@kubb/plugin-oas');
|
|
9
|
+
var pluginZod = require('@kubb/plugin-zod');
|
|
10
|
+
var hooks = require('@kubb/plugin-oas/hooks');
|
|
11
|
+
var pluginTs = require('@kubb/plugin-ts');
|
|
12
|
+
var react = require('@kubb/react');
|
|
13
|
+
var jsxRuntime = require('@kubb/react/jsx-runtime');
|
|
14
|
+
|
|
15
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
+
|
|
17
|
+
var transformers__default = /*#__PURE__*/_interopDefault(transformers);
|
|
18
|
+
var path__default = /*#__PURE__*/_interopDefault(path);
|
|
19
|
+
|
|
20
|
+
var clientGenerator = pluginOas.createReactGenerator({
|
|
21
|
+
name: "client",
|
|
22
|
+
Operation({ options, operation }) {
|
|
23
|
+
const {
|
|
24
|
+
plugin: {
|
|
25
|
+
options: { output }
|
|
26
|
+
}
|
|
27
|
+
} = react.useApp();
|
|
28
|
+
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
29
|
+
const client = {
|
|
30
|
+
name: getName(operation, { type: "function" }),
|
|
31
|
+
file: getFile(operation)
|
|
32
|
+
};
|
|
33
|
+
const type = {
|
|
34
|
+
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
35
|
+
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
36
|
+
};
|
|
37
|
+
const zod = {
|
|
38
|
+
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
39
|
+
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(react.File, { baseName: client.file.baseName, path: client.file.path, meta: client.file.meta, banner: output?.banner, footer: output?.footer, children: [
|
|
42
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.importPath }),
|
|
43
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig"], path: options.importPath, isTypeOnly: true }),
|
|
44
|
+
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: client.file.path, path: zod.file.path }),
|
|
45
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
46
|
+
react.File.Import,
|
|
47
|
+
{
|
|
48
|
+
extName: output?.extName,
|
|
49
|
+
name: [
|
|
50
|
+
type.schemas.request?.name,
|
|
51
|
+
type.schemas.response.name,
|
|
52
|
+
type.schemas.pathParams?.name,
|
|
53
|
+
type.schemas.queryParams?.name,
|
|
54
|
+
type.schemas.headerParams?.name,
|
|
55
|
+
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
56
|
+
].filter(Boolean),
|
|
57
|
+
root: client.file.path,
|
|
58
|
+
path: type.file.path,
|
|
59
|
+
isTypeOnly: true
|
|
60
|
+
}
|
|
61
|
+
),
|
|
62
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
63
|
+
chunkFRKJLBA5_cjs.Client,
|
|
64
|
+
{
|
|
65
|
+
name: client.name,
|
|
66
|
+
baseURL: options.baseURL,
|
|
67
|
+
dataReturnType: options.dataReturnType,
|
|
68
|
+
pathParamsType: options.pathParamsType,
|
|
69
|
+
typeSchemas: type.schemas,
|
|
70
|
+
operation,
|
|
71
|
+
parser: options.parser,
|
|
72
|
+
zodSchemas: zod.schemas
|
|
73
|
+
}
|
|
74
|
+
)
|
|
75
|
+
] });
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
var operationsGenerator = pluginOas.createReactGenerator({
|
|
79
|
+
name: "client",
|
|
80
|
+
Operations({ operations }) {
|
|
81
|
+
const {
|
|
82
|
+
pluginManager,
|
|
83
|
+
plugin: {
|
|
84
|
+
options: { output }
|
|
85
|
+
}
|
|
86
|
+
} = react.useApp();
|
|
87
|
+
const name = "operations";
|
|
88
|
+
const file = pluginManager.getFile({ name, extName: ".ts", pluginKey: [pluginClientName] });
|
|
89
|
+
return /* @__PURE__ */ jsxRuntime.jsx(react.File, { baseName: file.baseName, path: file.path, meta: file.meta, banner: output?.banner, footer: output?.footer, children: /* @__PURE__ */ jsxRuntime.jsx(chunkFRKJLBA5_cjs.Operations, { name, operations }) });
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// ../plugin-client/src/plugin.ts
|
|
94
|
+
var pluginClientName = "plugin-client";
|
|
95
|
+
core.createPlugin((options) => {
|
|
96
|
+
const {
|
|
97
|
+
output = { path: "clients" },
|
|
98
|
+
group,
|
|
99
|
+
exclude = [],
|
|
100
|
+
include,
|
|
101
|
+
override = [],
|
|
102
|
+
transformers: transformers3 = {},
|
|
103
|
+
dataReturnType = "data",
|
|
104
|
+
pathParamsType = "inline",
|
|
105
|
+
operations = false,
|
|
106
|
+
importPath = "@kubb/plugin-client/client",
|
|
107
|
+
parser = "client"
|
|
108
|
+
} = options;
|
|
109
|
+
const template = group?.output ? group.output : `${output.path}/{{tag}}Controller`;
|
|
110
|
+
return {
|
|
111
|
+
name: pluginClientName,
|
|
112
|
+
options: {
|
|
113
|
+
output: {
|
|
114
|
+
exportType: "barrelNamed",
|
|
115
|
+
...output
|
|
116
|
+
},
|
|
117
|
+
parser,
|
|
118
|
+
dataReturnType,
|
|
119
|
+
importPath,
|
|
120
|
+
pathParamsType,
|
|
121
|
+
baseURL: void 0
|
|
122
|
+
},
|
|
123
|
+
pre: [pluginOas.pluginOasName, parser === "zod" ? pluginZod.pluginZodName : void 0].filter(Boolean),
|
|
124
|
+
resolvePath(baseName, pathMode, options2) {
|
|
125
|
+
const root = path__default.default.resolve(this.config.root, this.config.output.path);
|
|
126
|
+
const mode = pathMode ?? core.FileManager.getMode(path__default.default.resolve(root, output.path));
|
|
127
|
+
if (mode === "single") {
|
|
128
|
+
return path__default.default.resolve(root, output.path);
|
|
129
|
+
}
|
|
130
|
+
if (options2?.tag && group?.type === "tag") {
|
|
131
|
+
const tag = transformers.camelCase(options2.tag);
|
|
132
|
+
return path__default.default.resolve(root, utils.renderTemplate(template, { tag }), baseName);
|
|
133
|
+
}
|
|
134
|
+
return path__default.default.resolve(root, output.path, baseName);
|
|
135
|
+
},
|
|
136
|
+
resolveName(name, type) {
|
|
137
|
+
const resolvedName = transformers.camelCase(name, { isFile: type === "file" });
|
|
138
|
+
if (type) {
|
|
139
|
+
return transformers3?.name?.(resolvedName, type) || resolvedName;
|
|
140
|
+
}
|
|
141
|
+
return resolvedName;
|
|
142
|
+
},
|
|
143
|
+
async buildStart() {
|
|
144
|
+
const [swaggerPlugin] = core.PluginManager.getDependedPlugins(this.plugins, [pluginOas.pluginOasName]);
|
|
145
|
+
const oas = await swaggerPlugin.context.getOas();
|
|
146
|
+
const root = path__default.default.resolve(this.config.root, this.config.output.path);
|
|
147
|
+
const mode = core.FileManager.getMode(path__default.default.resolve(root, output.path));
|
|
148
|
+
const baseURL = await swaggerPlugin.context.getBaseURL();
|
|
149
|
+
const operationGenerator = new pluginOas.OperationGenerator(
|
|
150
|
+
{
|
|
151
|
+
...this.plugin.options,
|
|
152
|
+
baseURL
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
oas,
|
|
156
|
+
pluginManager: this.pluginManager,
|
|
157
|
+
plugin: this.plugin,
|
|
158
|
+
contentType: swaggerPlugin.context.contentType,
|
|
159
|
+
exclude,
|
|
160
|
+
include,
|
|
161
|
+
override,
|
|
162
|
+
mode
|
|
163
|
+
}
|
|
164
|
+
);
|
|
165
|
+
const files = await operationGenerator.build(...[clientGenerator, operations ? operationsGenerator : void 0].filter(Boolean));
|
|
166
|
+
await this.addFile(...files);
|
|
167
|
+
if (this.config.output.exportType) {
|
|
168
|
+
const barrelFiles = await this.fileManager.getBarrelFiles({
|
|
169
|
+
root,
|
|
170
|
+
output,
|
|
171
|
+
files: this.fileManager.files,
|
|
172
|
+
meta: {
|
|
173
|
+
pluginKey: this.plugin.key
|
|
174
|
+
},
|
|
175
|
+
logger: this.logger
|
|
176
|
+
});
|
|
177
|
+
await this.addFile(...barrelFiles);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
};
|
|
181
|
+
});
|
|
182
|
+
var queryGenerator = pluginOas.createReactGenerator({
|
|
183
|
+
name: "vue-query",
|
|
184
|
+
Operation({ options, operation }) {
|
|
185
|
+
const {
|
|
186
|
+
plugin: {
|
|
187
|
+
options: { output }
|
|
188
|
+
}
|
|
189
|
+
} = react.useApp();
|
|
190
|
+
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
191
|
+
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
192
|
+
!isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method);
|
|
193
|
+
const query = {
|
|
194
|
+
name: getName(operation, { type: "function", prefix: "use" }),
|
|
195
|
+
typeName: getName(operation, { type: "type" }),
|
|
196
|
+
file: getFile(operation, { prefix: "use" })
|
|
197
|
+
};
|
|
198
|
+
const client = {
|
|
199
|
+
name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
|
|
200
|
+
};
|
|
201
|
+
const queryOptions = {
|
|
202
|
+
name: transformers__default.default.camelCase(`${operation.getOperationId()} QueryOptions`)
|
|
203
|
+
};
|
|
204
|
+
const queryKey = {
|
|
205
|
+
name: transformers__default.default.camelCase(`${operation.getOperationId()} QueryKey`),
|
|
206
|
+
typeName: transformers__default.default.pascalCase(`${operation.getOperationId()} QueryKey`)
|
|
207
|
+
};
|
|
208
|
+
const type = {
|
|
209
|
+
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
210
|
+
//todo remove type?
|
|
211
|
+
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
212
|
+
};
|
|
213
|
+
const zod = {
|
|
214
|
+
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
215
|
+
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
216
|
+
};
|
|
217
|
+
if (!isQuery || typeof options.query === "boolean") {
|
|
218
|
+
return null;
|
|
219
|
+
}
|
|
220
|
+
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: [
|
|
221
|
+
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
|
|
222
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useQuery", "queryOptions"], path: options.query.importPath }),
|
|
223
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["QueryKey", "WithRequired", "QueryObserverOptions", "UseQueryReturnType"], path: options.query.importPath, isTypeOnly: true }),
|
|
224
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["unref"], path: "vue" }),
|
|
225
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
226
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
227
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
228
|
+
options.client.dataReturnType === "full" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
229
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
230
|
+
react.File.Import,
|
|
231
|
+
{
|
|
232
|
+
extName: output?.extName,
|
|
233
|
+
name: [
|
|
234
|
+
type.schemas.request?.name,
|
|
235
|
+
type.schemas.response.name,
|
|
236
|
+
type.schemas.pathParams?.name,
|
|
237
|
+
type.schemas.queryParams?.name,
|
|
238
|
+
type.schemas.headerParams?.name,
|
|
239
|
+
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
240
|
+
].filter(Boolean),
|
|
241
|
+
root: query.file.path,
|
|
242
|
+
path: type.file.path,
|
|
243
|
+
isTypeOnly: true
|
|
244
|
+
}
|
|
245
|
+
),
|
|
246
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
247
|
+
chunkFRKJLBA5_cjs.QueryKey,
|
|
248
|
+
{
|
|
249
|
+
name: queryKey.name,
|
|
250
|
+
typeName: queryKey.typeName,
|
|
251
|
+
operation,
|
|
252
|
+
pathParamsType: options.pathParamsType,
|
|
253
|
+
typeSchemas: type.schemas,
|
|
254
|
+
keysFn: options.query.key
|
|
255
|
+
}
|
|
256
|
+
),
|
|
257
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
258
|
+
chunkFRKJLBA5_cjs.Client,
|
|
259
|
+
{
|
|
260
|
+
name: client.name,
|
|
261
|
+
isExportable: false,
|
|
262
|
+
isIndexable: false,
|
|
263
|
+
baseURL: options.baseURL,
|
|
264
|
+
operation,
|
|
265
|
+
typeSchemas: type.schemas,
|
|
266
|
+
zodSchemas: zod.schemas,
|
|
267
|
+
dataReturnType: options.client.dataReturnType,
|
|
268
|
+
pathParamsType: options.pathParamsType,
|
|
269
|
+
parser: options.parser
|
|
270
|
+
}
|
|
271
|
+
),
|
|
272
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
273
|
+
chunkFRKJLBA5_cjs.QueryOptions,
|
|
274
|
+
{
|
|
275
|
+
name: queryOptions.name,
|
|
276
|
+
clientName: client.name,
|
|
277
|
+
queryKeyName: queryKey.name,
|
|
278
|
+
typeSchemas: type.schemas,
|
|
279
|
+
pathParamsType: options.pathParamsType
|
|
280
|
+
}
|
|
281
|
+
),
|
|
282
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
283
|
+
chunkFRKJLBA5_cjs.Query,
|
|
284
|
+
{
|
|
285
|
+
name: query.name,
|
|
286
|
+
queryOptionsName: queryOptions.name,
|
|
287
|
+
typeSchemas: type.schemas,
|
|
288
|
+
pathParamsType: options.pathParamsType,
|
|
289
|
+
operation,
|
|
290
|
+
dataReturnType: options.client.dataReturnType,
|
|
291
|
+
queryKeyName: queryKey.name,
|
|
292
|
+
queryKeyTypeName: queryKey.typeName
|
|
293
|
+
}
|
|
294
|
+
)
|
|
295
|
+
] });
|
|
296
|
+
}
|
|
297
|
+
});
|
|
298
|
+
var mutationGenerator = pluginOas.createReactGenerator({
|
|
299
|
+
name: "vue-query",
|
|
300
|
+
Operation({ options, operation }) {
|
|
301
|
+
const {
|
|
302
|
+
plugin: {
|
|
303
|
+
options: { output }
|
|
304
|
+
}
|
|
305
|
+
} = react.useApp();
|
|
306
|
+
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
307
|
+
const isQuery = typeof options.query === "boolean" ? true : options.query?.methods.some((method) => operation.method === method);
|
|
308
|
+
const isMutation = !isQuery && options.mutation && options.mutation.methods.some((method) => operation.method === method);
|
|
309
|
+
const mutation = {
|
|
310
|
+
name: getName(operation, { type: "function", prefix: "use" }),
|
|
311
|
+
typeName: getName(operation, { type: "type" }),
|
|
312
|
+
file: getFile(operation, { prefix: "use" })
|
|
313
|
+
};
|
|
314
|
+
const type = {
|
|
315
|
+
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
316
|
+
//todo remove type?
|
|
317
|
+
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
318
|
+
};
|
|
319
|
+
const zod = {
|
|
320
|
+
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
321
|
+
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
322
|
+
};
|
|
323
|
+
const client = {
|
|
324
|
+
name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
|
|
325
|
+
};
|
|
326
|
+
if (!isMutation || typeof options.mutation === "boolean") {
|
|
327
|
+
return null;
|
|
328
|
+
}
|
|
329
|
+
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: [
|
|
330
|
+
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: mutation.file.path, path: zod.file.path }),
|
|
331
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useMutation"], path: options.mutation.importPath }),
|
|
332
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["UseMutationOptions"], path: options.mutation.importPath, isTypeOnly: true }),
|
|
333
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
334
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig", "ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
335
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
336
|
+
react.File.Import,
|
|
337
|
+
{
|
|
338
|
+
extName: output?.extName,
|
|
339
|
+
name: [
|
|
340
|
+
type.schemas.request?.name,
|
|
341
|
+
type.schemas.response.name,
|
|
342
|
+
type.schemas.pathParams?.name,
|
|
343
|
+
type.schemas.queryParams?.name,
|
|
344
|
+
type.schemas.headerParams?.name,
|
|
345
|
+
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
346
|
+
].filter(Boolean),
|
|
347
|
+
root: mutation.file.path,
|
|
348
|
+
path: type.file.path,
|
|
349
|
+
isTypeOnly: true
|
|
350
|
+
}
|
|
351
|
+
),
|
|
352
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
353
|
+
chunkFRKJLBA5_cjs.Client,
|
|
354
|
+
{
|
|
355
|
+
name: client.name,
|
|
356
|
+
isExportable: false,
|
|
357
|
+
isIndexable: false,
|
|
358
|
+
baseURL: options.baseURL,
|
|
359
|
+
operation,
|
|
360
|
+
typeSchemas: type.schemas,
|
|
361
|
+
zodSchemas: zod.schemas,
|
|
362
|
+
dataReturnType: options.client.dataReturnType,
|
|
363
|
+
pathParamsType: options.pathParamsType,
|
|
364
|
+
parser: options.parser
|
|
365
|
+
}
|
|
366
|
+
),
|
|
367
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
368
|
+
chunkFRKJLBA5_cjs.Mutation,
|
|
369
|
+
{
|
|
370
|
+
name: mutation.name,
|
|
371
|
+
clientName: client.name,
|
|
372
|
+
typeName: mutation.typeName,
|
|
373
|
+
typeSchemas: type.schemas,
|
|
374
|
+
operation,
|
|
375
|
+
dataReturnType: options.client.dataReturnType,
|
|
376
|
+
pathParamsType: options.pathParamsType
|
|
377
|
+
}
|
|
378
|
+
)
|
|
379
|
+
] });
|
|
380
|
+
}
|
|
381
|
+
});
|
|
382
|
+
var infiniteQueryGenerator = pluginOas.createReactGenerator({
|
|
383
|
+
name: "vue-infinite-query",
|
|
384
|
+
Operation({ options, operation }) {
|
|
385
|
+
const {
|
|
386
|
+
plugin: {
|
|
387
|
+
options: { output }
|
|
388
|
+
}
|
|
389
|
+
} = react.useApp();
|
|
390
|
+
const { getSchemas, getName, getFile } = hooks.useOperationManager();
|
|
391
|
+
const isQuery = typeof options.query === "boolean" ? options.query : !!options.query.methods?.some((method) => operation.method === method);
|
|
392
|
+
const isInfinite = isQuery && !!options.infinite;
|
|
393
|
+
const query = {
|
|
394
|
+
name: getName(operation, { type: "function", prefix: "use", suffix: "infinite" }),
|
|
395
|
+
typeName: getName(operation, { type: "type" }),
|
|
396
|
+
file: getFile(operation, { prefix: "use", suffix: "infinite" })
|
|
397
|
+
};
|
|
398
|
+
const client = {
|
|
399
|
+
name: getName(operation, { type: "function", pluginKey: [pluginClientName] })
|
|
400
|
+
};
|
|
401
|
+
const queryOptions = {
|
|
402
|
+
name: transformers__default.default.camelCase(`${operation.getOperationId()} InfiniteQueryOptions`)
|
|
403
|
+
};
|
|
404
|
+
const queryKey = {
|
|
405
|
+
name: transformers__default.default.camelCase(`${operation.getOperationId()} InfiniteQueryKey`),
|
|
406
|
+
typeName: transformers__default.default.pascalCase(`${operation.getOperationId()} InfiniteQueryKey`)
|
|
407
|
+
};
|
|
408
|
+
const type = {
|
|
409
|
+
file: getFile(operation, { pluginKey: [pluginTs.pluginTsName] }),
|
|
410
|
+
//todo remove type?
|
|
411
|
+
schemas: getSchemas(operation, { pluginKey: [pluginTs.pluginTsName], type: "type" })
|
|
412
|
+
};
|
|
413
|
+
const zod = {
|
|
414
|
+
file: getFile(operation, { pluginKey: [pluginZod.pluginZodName] }),
|
|
415
|
+
schemas: getSchemas(operation, { pluginKey: [pluginZod.pluginZodName], type: "function" })
|
|
416
|
+
};
|
|
417
|
+
if (!isQuery || !isInfinite || typeof options.query === "boolean" || typeof options.infinite === "boolean") {
|
|
418
|
+
return null;
|
|
419
|
+
}
|
|
420
|
+
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: [
|
|
421
|
+
options.parser === "zod" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { extName: output?.extName, name: [zod.schemas.response.name], root: query.file.path, path: zod.file.path }),
|
|
422
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["useInfiniteQuery", "infiniteQueryOptions"], path: options.query.importPath }),
|
|
423
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
424
|
+
react.File.Import,
|
|
425
|
+
{
|
|
426
|
+
name: ["QueryKey", "WithRequired", "InfiniteQueryObserverOptions", "UseInfiniteQueryReturnType"],
|
|
427
|
+
path: options.query.importPath,
|
|
428
|
+
isTypeOnly: true
|
|
429
|
+
}
|
|
430
|
+
),
|
|
431
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["unref"], path: "vue" }),
|
|
432
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["MaybeRef"], path: "vue", isTypeOnly: true }),
|
|
433
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: "client", path: options.client.importPath }),
|
|
434
|
+
/* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["RequestConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
435
|
+
options.client.dataReturnType === "full" && /* @__PURE__ */ jsxRuntime.jsx(react.File.Import, { name: ["ResponseConfig"], path: options.client.importPath, isTypeOnly: true }),
|
|
436
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
437
|
+
react.File.Import,
|
|
438
|
+
{
|
|
439
|
+
extName: output?.extName,
|
|
440
|
+
name: [
|
|
441
|
+
type.schemas.request?.name,
|
|
442
|
+
type.schemas.response.name,
|
|
443
|
+
type.schemas.pathParams?.name,
|
|
444
|
+
type.schemas.queryParams?.name,
|
|
445
|
+
type.schemas.headerParams?.name,
|
|
446
|
+
...type.schemas.statusCodes?.map((item) => item.name) || []
|
|
447
|
+
].filter(Boolean),
|
|
448
|
+
root: query.file.path,
|
|
449
|
+
path: type.file.path,
|
|
450
|
+
isTypeOnly: true
|
|
451
|
+
}
|
|
452
|
+
),
|
|
453
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
454
|
+
chunkFRKJLBA5_cjs.QueryKey,
|
|
455
|
+
{
|
|
456
|
+
name: queryKey.name,
|
|
457
|
+
typeName: queryKey.typeName,
|
|
458
|
+
operation,
|
|
459
|
+
pathParamsType: options.pathParamsType,
|
|
460
|
+
typeSchemas: type.schemas,
|
|
461
|
+
keysFn: options.query.key
|
|
462
|
+
}
|
|
463
|
+
),
|
|
464
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
465
|
+
chunkFRKJLBA5_cjs.Client,
|
|
466
|
+
{
|
|
467
|
+
name: client.name,
|
|
468
|
+
isExportable: false,
|
|
469
|
+
isIndexable: false,
|
|
470
|
+
baseURL: options.baseURL,
|
|
471
|
+
operation,
|
|
472
|
+
typeSchemas: type.schemas,
|
|
473
|
+
zodSchemas: zod.schemas,
|
|
474
|
+
dataReturnType: options.client.dataReturnType,
|
|
475
|
+
pathParamsType: options.pathParamsType,
|
|
476
|
+
parser: options.parser
|
|
477
|
+
}
|
|
478
|
+
),
|
|
479
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
480
|
+
chunkFRKJLBA5_cjs.InfiniteQueryOptions,
|
|
481
|
+
{
|
|
482
|
+
name: queryOptions.name,
|
|
483
|
+
clientName: client.name,
|
|
484
|
+
queryKeyName: queryKey.name,
|
|
485
|
+
typeSchemas: type.schemas,
|
|
486
|
+
pathParamsType: options.pathParamsType,
|
|
487
|
+
dataReturnType: options.client.dataReturnType,
|
|
488
|
+
cursorParam: options.infinite.cursorParam,
|
|
489
|
+
initialPageParam: options.infinite.initialPageParam,
|
|
490
|
+
queryParam: options.infinite.queryParam
|
|
491
|
+
}
|
|
492
|
+
),
|
|
493
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
494
|
+
chunkFRKJLBA5_cjs.InfiniteQuery,
|
|
495
|
+
{
|
|
496
|
+
name: query.name,
|
|
497
|
+
queryOptionsName: queryOptions.name,
|
|
498
|
+
typeSchemas: type.schemas,
|
|
499
|
+
pathParamsType: options.pathParamsType,
|
|
500
|
+
operation,
|
|
501
|
+
dataReturnType: options.client.dataReturnType,
|
|
502
|
+
queryKeyName: queryKey.name,
|
|
503
|
+
queryKeyTypeName: queryKey.typeName
|
|
504
|
+
}
|
|
505
|
+
)
|
|
506
|
+
] });
|
|
507
|
+
}
|
|
508
|
+
});
|
|
509
|
+
|
|
510
|
+
exports.infiniteQueryGenerator = infiniteQueryGenerator;
|
|
511
|
+
exports.mutationGenerator = mutationGenerator;
|
|
512
|
+
exports.queryGenerator = queryGenerator;
|
|
513
|
+
//# sourceMappingURL=chunk-4YY5DUPV.cjs.map
|
|
514
|
+
//# sourceMappingURL=chunk-4YY5DUPV.cjs.map
|