From a6523a4e86db365fdea6eb27395f1602a0c7dd11 Mon Sep 17 00:00:00 2001 From: Lubos Date: Thu, 26 Dec 2024 23:46:52 +0100 Subject: [PATCH] refactor: split tanstack query plugin into modules --- .../plugins/@tanstack/query-core/client.ts | 7 + .../query-core/infiniteQueryOptions.ts | 482 ++++++ .../@tanstack/query-core/mutationOptions.ts | 145 ++ .../plugins/@tanstack/query-core/plugin.ts | 1290 +---------------- .../plugins/@tanstack/query-core/queryKey.ts | 359 +++++ .../@tanstack/query-core/queryOptions.ts | 184 +++ .../plugins/@tanstack/query-core/types.d.ts | 33 + .../plugins/@tanstack/query-core/useType.ts | 109 ++ .../@tanstack/react-query.gen.ts | 2 +- .../angular-query-experimental.gen.ts | 2 +- .../angular-query-experimental.gen.ts | 2 +- .../angular-query-experimental.gen.ts | 2 +- .../asClass/@tanstack/react-query.gen.ts | 2 +- .../axios/@tanstack/react-query.gen.ts | 2 +- .../fetch/@tanstack/react-query.gen.ts | 2 +- .../asClass/@tanstack/solid-query.gen.ts | 2 +- .../axios/@tanstack/solid-query.gen.ts | 2 +- .../fetch/@tanstack/solid-query.gen.ts | 2 +- .../asClass/@tanstack/svelte-query.gen.ts | 2 +- .../axios/@tanstack/svelte-query.gen.ts | 2 +- .../fetch/@tanstack/svelte-query.gen.ts | 2 +- .../asClass/@tanstack/vue-query.gen.ts | 2 +- .../axios/@tanstack/vue-query.gen.ts | 2 +- .../fetch/@tanstack/vue-query.gen.ts | 2 +- .../@tanstack/react-query.gen.ts | 2 +- .../angular-query-experimental.gen.ts | 2 +- .../angular-query-experimental.gen.ts | 2 +- .../angular-query-experimental.gen.ts | 2 +- .../asClass/@tanstack/react-query.gen.ts | 2 +- .../axios/@tanstack/react-query.gen.ts | 2 +- .../fetch/@tanstack/react-query.gen.ts | 2 +- .../asClass/@tanstack/solid-query.gen.ts | 2 +- .../axios/@tanstack/solid-query.gen.ts | 2 +- .../fetch/@tanstack/solid-query.gen.ts | 2 +- .../asClass/@tanstack/svelte-query.gen.ts | 2 +- .../axios/@tanstack/svelte-query.gen.ts | 2 +- .../fetch/@tanstack/svelte-query.gen.ts | 2 +- .../asClass/@tanstack/vue-query.gen.ts | 2 +- .../axios/@tanstack/vue-query.gen.ts | 2 +- .../fetch/@tanstack/vue-query.gen.ts | 2 +- packages/openapi-ts/test/openapi-ts.config.ts | 2 +- 41 files changed, 1406 insertions(+), 1269 deletions(-) create mode 100644 packages/openapi-ts/src/plugins/@tanstack/query-core/client.ts create mode 100644 packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts create mode 100644 packages/openapi-ts/src/plugins/@tanstack/query-core/mutationOptions.ts create mode 100644 packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts create mode 100644 packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts create mode 100644 packages/openapi-ts/src/plugins/@tanstack/query-core/types.d.ts create mode 100644 packages/openapi-ts/src/plugins/@tanstack/query-core/useType.ts diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/client.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/client.ts new file mode 100644 index 000000000..642f30c35 --- /dev/null +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/client.ts @@ -0,0 +1,7 @@ +import { getConfig } from '../../../utils/config'; + +// TODO: this function could be moved so other plugins can reuse it +export const getClientBaseUrlKey = () => { + const config = getConfig(); + return config.client.name === '@hey-api/client-axios' ? 'baseURL' : 'baseUrl'; +}; diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts new file mode 100644 index 000000000..4cd743403 --- /dev/null +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts @@ -0,0 +1,482 @@ +import ts from 'typescript'; + +import { compiler } from '../../../compiler'; +import { tsNodeToString } from '../../../compiler/utils'; +import { clientApi } from '../../../generate/client'; +import { + hasOperationDataRequired, + operationPagination, +} from '../../../ir/operation'; +import type { IR } from '../../../ir/types'; +import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; +import { schemaToType } from '../../@hey-api/typescript/plugin'; +import { + createQueryKeyFunction, + createQueryKeyType, + queryKeyFunctionIdentifier, + queryKeyName, + queryKeyStatement, +} from './queryKey'; +import type { PluginInstance, PluginState } from './types'; +import { useTypeData, useTypeError, useTypeResponse } from './useType'; + +const createInfiniteParamsFn = 'createInfiniteParams'; +const infiniteQueryOptionsFn = 'infiniteQueryOptions'; + +const createInfiniteParamsFunction = ({ + context, + plugin, +}: { + context: IR.Context; + plugin: PluginInstance; +}) => { + const file = context.file({ id: plugin.name })!; + + const fn = compiler.constVariable({ + expression: compiler.arrowFunction({ + multiLine: true, + parameters: [ + { + name: 'queryKey', + type: compiler.typeReferenceNode({ + typeName: `QueryKey<${clientApi.Options.name}>`, + }), + }, + { + name: 'page', + type: compiler.typeReferenceNode({ typeName: 'K' }), + }, + ], + statements: [ + compiler.constVariable({ + expression: compiler.identifier({ + text: 'queryKey[0]', + }), + name: 'params', + }), + compiler.ifStatement({ + expression: compiler.propertyAccessExpression({ + expression: compiler.identifier({ + text: 'page', + }), + name: compiler.identifier({ text: 'body' }), + }), + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: 'body', + }), + right: compiler.objectExpression({ + multiLine: true, + obj: [ + { + assertion: 'any', + spread: 'queryKey[0].body', + }, + { + assertion: 'any', + spread: 'page.body', + }, + ], + }), + }), + }), + ], + }), + }), + compiler.ifStatement({ + expression: compiler.propertyAccessExpression({ + expression: compiler.identifier({ + text: 'page', + }), + name: compiler.identifier({ text: 'headers' }), + }), + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: 'headers', + }), + right: compiler.objectExpression({ + multiLine: true, + obj: [ + { + spread: 'queryKey[0].headers', + }, + { + spread: 'page.headers', + }, + ], + }), + }), + }), + ], + }), + }), + compiler.ifStatement({ + expression: compiler.propertyAccessExpression({ + expression: compiler.identifier({ + text: 'page', + }), + name: compiler.identifier({ text: 'path' }), + }), + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: 'path', + }), + right: compiler.objectExpression({ + multiLine: true, + obj: [ + { + assertion: 'any', + spread: 'queryKey[0].path', + }, + { + assertion: 'any', + spread: 'page.path', + }, + ], + }), + }), + }), + ], + }), + }), + compiler.ifStatement({ + expression: compiler.propertyAccessExpression({ + expression: compiler.identifier({ + text: 'page', + }), + name: compiler.identifier({ text: 'query' }), + }), + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: 'query', + }), + right: compiler.objectExpression({ + multiLine: true, + obj: [ + { + assertion: 'any', + spread: 'queryKey[0].query', + }, + { + assertion: 'any', + spread: 'page.query', + }, + ], + }), + }), + }), + ], + }), + }), + compiler.returnVariable({ + expression: ts.factory.createAsExpression( + ts.factory.createAsExpression( + compiler.identifier({ text: 'params' }), + ts.factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword), + ), + ts.factory.createTypeQueryNode( + compiler.identifier({ text: 'page' }), + ), + ), + }), + ], + types: [ + { + extends: compiler.typeReferenceNode({ + typeName: compiler.identifier({ + text: `Pick[0], 'body' | 'headers' | 'path' | 'query'>`, + }), + }), + name: 'K', + }, + ], + }), + name: createInfiniteParamsFn, + }); + file.add(fn); +}; + +const infiniteQueryOptionsFunctionIdentifier = ({ + context, + operation, +}: { + context: IR.Context; + operation: IR.OperationObject; +}) => + `${serviceFunctionIdentifier({ + config: context.config, + id: operation.id, + operation, + })}InfiniteOptions`; + +export const createInfiniteQueryOptions = ({ + context, + operation, + plugin, + queryFn, + state, +}: { + context: IR.Context; + operation: IR.OperationObject; + plugin: PluginInstance; + queryFn: string; + state: PluginState; +}) => { + if ( + !plugin.infiniteQueryOptions || + !(['get', 'post'] as (typeof operation.method)[]).includes(operation.method) + ) { + return state; + } + + const pagination = operationPagination({ context, operation }); + + if (!pagination) { + return state; + } + + const file = context.file({ id: plugin.name })!; + const isRequired = hasOperationDataRequired(operation); + + if (!state.hasInfiniteQueries) { + state.hasInfiniteQueries = true; + + if (!state.hasCreateQueryKeyParamsFunction) { + createQueryKeyType({ context, plugin }); + createQueryKeyFunction({ context, plugin }); + state.hasCreateQueryKeyParamsFunction = true; + } + + if (!state.hasCreateInfiniteParamsFunction) { + createInfiniteParamsFunction({ context, plugin }); + state.hasCreateInfiniteParamsFunction = true; + } + + file.import({ + module: plugin.name, + name: infiniteQueryOptionsFn, + }); + + state.typeInfiniteData = file.import({ + asType: true, + module: plugin.name, + name: 'InfiniteData', + }); + } + + state.hasUsedQueryFn = true; + + const typeData = useTypeData({ context, operation, plugin }); + const typeError = useTypeError({ context, operation, plugin }); + const typeResponse = useTypeResponse({ context, operation, plugin }); + + const typeQueryKey = `${queryKeyName}<${typeData}>`; + const typePageObjectParam = `Pick<${typeQueryKey}[0], 'body' | 'headers' | 'path' | 'query'>`; + // TODO: parser - this is a bit clunky, need to compile type to string because + // `compiler.returnFunctionCall()` accepts only strings, should be cleaned up + const typePageParam = `${tsNodeToString({ + node: schemaToType({ + context, + plugin: context.config.plugins['@hey-api/typescript'] as Parameters< + typeof schemaToType + >[0]['plugin'], + schema: pagination.schema, + }), + unescape: true, + })} | ${typePageObjectParam}`; + + const node = queryKeyStatement({ + context, + isInfinite: true, + operation, + plugin, + typeQueryKey, + }); + file.add(node); + + const infiniteQueryKeyName = queryKeyFunctionIdentifier({ + context, + isInfinite: true, + operation, + }); + const identifierQueryKey = file.identifier({ + $ref: `#/queryKey/${infiniteQueryKeyName}`, + namespace: 'value', + }); + + const statement = compiler.constVariable({ + // TODO: describe options, same as the actual function call + comment: [], + exportConst: true, + expression: compiler.arrowFunction({ + parameters: [ + { + isRequired, + name: 'options', + type: typeData, + }, + ], + statements: [ + compiler.returnFunctionCall({ + args: [ + compiler.objectExpression({ + comments: [ + { + jsdoc: false, + lines: ['@ts-ignore'], + }, + ], + obj: [ + { + key: 'queryFn', + value: compiler.arrowFunction({ + async: true, + multiLine: true, + parameters: [ + { + destructure: [ + { + name: 'pageParam', + }, + { + name: 'queryKey', + }, + { + name: 'signal', + }, + ], + }, + ], + statements: [ + compiler.constVariable({ + comment: [ + { + jsdoc: false, + lines: ['@ts-ignore'], + }, + ], + expression: compiler.conditionalExpression({ + condition: compiler.binaryExpression({ + left: compiler.typeOfExpression({ + text: 'pageParam', + }), + operator: '===', + right: compiler.ots.string('object'), + }), + whenFalse: compiler.objectExpression({ + multiLine: true, + obj: [ + { + key: pagination.in, + value: compiler.objectExpression({ + multiLine: true, + obj: [ + { + key: pagination.name, + value: compiler.identifier({ + text: 'pageParam', + }), + }, + ], + }), + }, + ], + }), + whenTrue: compiler.identifier({ + text: 'pageParam', + }), + }), + name: 'page', + typeName: typePageObjectParam, + }), + compiler.constVariable({ + expression: compiler.callExpression({ + functionName: createInfiniteParamsFn, + parameters: ['queryKey', 'page'], + }), + name: 'params', + }), + compiler.constVariable({ + destructure: true, + expression: compiler.awaitExpression({ + expression: compiler.callExpression({ + functionName: queryFn, + parameters: [ + compiler.objectExpression({ + multiLine: true, + obj: [ + { + spread: 'options', + }, + { + spread: 'params', + }, + { + key: 'signal', + shorthand: true, + value: compiler.identifier({ + text: 'signal', + }), + }, + { + key: 'throwOnError', + value: true, + }, + ], + }), + ], + }), + }), + name: 'data', + }), + compiler.returnVariable({ + expression: 'data', + }), + ], + }), + }, + { + key: 'queryKey', + value: compiler.callExpression({ + functionName: identifierQueryKey.name || '', + parameters: ['options'], + }), + }, + ], + }), + ], + name: infiniteQueryOptionsFn, + // TODO: better types syntax + types: [ + typeResponse, + typeError.name, + `${typeof state.typeInfiniteData === 'string' ? state.typeInfiniteData : state.typeInfiniteData.name}<${typeResponse}>`, + typeQueryKey, + typePageParam, + ], + }), + ], + }), + name: infiniteQueryOptionsFunctionIdentifier({ + context, + operation, + }), + }); + file.add(statement); +}; diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/mutationOptions.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/mutationOptions.ts new file mode 100644 index 000000000..1e7721661 --- /dev/null +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/mutationOptions.ts @@ -0,0 +1,145 @@ +import { compiler } from '../../../compiler'; +import type { IR } from '../../../ir/types'; +import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; +import type { PluginInstance, PluginState } from './types'; +import { useTypeData, useTypeError, useTypeResponse } from './useType'; + +const mutationOptionsFn = 'mutationOptions'; + +const mutationOptionsFunctionIdentifier = ({ + context, + operation, +}: { + context: IR.Context; + operation: IR.OperationObject; +}) => + `${serviceFunctionIdentifier({ + config: context.config, + id: operation.id, + operation, + })}Mutation`; + +export const createMutationOptions = ({ + context, + operation, + plugin, + queryFn, + state, +}: { + context: IR.Context; + operation: IR.OperationObject; + plugin: PluginInstance; + queryFn: string; + state: PluginState; +}) => { + if ( + !plugin.mutationOptions || + !( + ['delete', 'patch', 'post', 'put'] as (typeof operation.method)[] + ).includes(operation.method) + ) { + return state; + } + + const mutationsType = + plugin.name === '@tanstack/angular-query-experimental' || + plugin.name === '@tanstack/svelte-query' || + plugin.name === '@tanstack/solid-query' + ? 'MutationOptions' + : 'UseMutationOptions'; + + const file = context.file({ id: plugin.name })!; + + if (!state.hasMutations) { + state.hasMutations = true; + + file.import({ + asType: true, + module: plugin.name, + name: mutationsType, + }); + } + + state.hasUsedQueryFn = true; + + const typeData = useTypeData({ context, operation, plugin }); + const typeError = useTypeError({ context, operation, plugin }); + const typeResponse = useTypeResponse({ context, operation, plugin }); + + const expression = compiler.arrowFunction({ + parameters: [ + { + isRequired: false, + name: 'options', + type: `Partial<${typeData}>`, + }, + ], + statements: [ + compiler.constVariable({ + expression: compiler.objectExpression({ + obj: [ + { + key: 'mutationFn', + value: compiler.arrowFunction({ + async: true, + multiLine: true, + parameters: [ + { + name: 'localOptions', + }, + ], + statements: [ + compiler.constVariable({ + destructure: true, + expression: compiler.awaitExpression({ + expression: compiler.callExpression({ + functionName: queryFn, + parameters: [ + compiler.objectExpression({ + multiLine: true, + obj: [ + { + spread: 'options', + }, + { + spread: 'localOptions', + }, + { + key: 'throwOnError', + value: true, + }, + ], + }), + ], + }), + }), + name: 'data', + }), + compiler.returnVariable({ + expression: 'data', + }), + ], + }), + }, + ], + }), + name: mutationOptionsFn, + // TODO: better types syntax + typeName: `${mutationsType}<${typeResponse}, ${typeError.name}, ${typeData}>`, + }), + compiler.returnVariable({ + expression: mutationOptionsFn, + }), + ], + }); + const statement = compiler.constVariable({ + // TODO: describe options, same as the actual function call + comment: [], + exportConst: true, + expression, + name: mutationOptionsFunctionIdentifier({ context, operation }), + }); + file.add(statement); + + return state; +}; diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/plugin.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/plugin.ts index 5553d72a8..f16787ae2 100644 --- a/packages/openapi-ts/src/plugins/@tanstack/query-core/plugin.ts +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/plugin.ts @@ -1,767 +1,42 @@ -import ts from 'typescript'; - -import { compiler, type Property } from '../../../compiler'; -import type { ImportExportItem } from '../../../compiler/module'; -import { - type ImportExportItemObject, - tsNodeToString, -} from '../../../compiler/utils'; import { clientApi, clientModulePath } from '../../../generate/client'; -import { - hasOperationDataRequired, - operationPagination, -} from '../../../ir/operation'; -import type { IR } from '../../../ir/types'; -import { getConfig } from '../../../utils/config'; import { getServiceName } from '../../../utils/postprocess'; import { transformServiceName } from '../../../utils/transform'; -import { operationOptionsType } from '../../@hey-api/sdk/plugin'; import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; -import { schemaToType } from '../../@hey-api/typescript/plugin'; -import { operationIrRef } from '../../shared/utils/ref'; -import type { Plugin } from '../../types'; -import type { Config as AngularQueryConfig } from '../angular-query-experimental'; -import type { Config as ReactQueryConfig } from '../react-query'; -import type { Config as SolidQueryConfig } from '../solid-query'; -import type { Config as SvelteQueryConfig } from '../svelte-query'; -import type { Config as VueQueryConfig } from '../vue-query'; - -type PluginInstance = Plugin.Instance< - | AngularQueryConfig - | ReactQueryConfig - | SolidQueryConfig - | SvelteQueryConfig - | VueQueryConfig ->; - -const infiniteQueryOptionsFunctionIdentifier = ({ - context, - operation, -}: { - context: IR.Context; - operation: IR.OperationObject; -}) => - `${serviceFunctionIdentifier({ - config: context.config, - id: operation.id, - operation, - })}InfiniteOptions`; - -const mutationOptionsFunctionIdentifier = ({ - context, - operation, -}: { - context: IR.Context; - operation: IR.OperationObject; -}) => - `${serviceFunctionIdentifier({ - config: context.config, - id: operation.id, - operation, - })}Mutation`; - -const queryOptionsFunctionIdentifier = ({ - context, - operation, -}: { - context: IR.Context; - operation: IR.OperationObject; -}) => - `${serviceFunctionIdentifier({ - config: context.config, - id: operation.id, - operation, - })}Options`; - -const queryKeyFunctionIdentifier = ({ - context, - isInfinite, - operation, -}: { - context: IR.Context; - isInfinite?: boolean; - operation: IR.OperationObject; -}) => - `${serviceFunctionIdentifier({ - config: context.config, - id: operation.id, - operation, - })}${isInfinite ? 'Infinite' : ''}QueryKey`; - -const createInfiniteParamsFn = 'createInfiniteParams'; -const createQueryKeyFn = 'createQueryKey'; -const infiniteQueryOptionsFn = 'infiniteQueryOptions'; -const mutationOptionsFn = 'mutationOptions'; -const queryKeyName = 'QueryKey'; -const queryOptionsFn = 'queryOptions'; -const TOptionsType = 'TOptions'; - -const getClientBaseUrlKey = () => { - const config = getConfig(); - return config.client.name === '@hey-api/client-axios' ? 'baseURL' : 'baseUrl'; -}; - -const createInfiniteParamsFunction = ({ - context, - plugin, -}: { - context: IR.Context; - plugin: PluginInstance; -}) => { - const file = context.file({ id: plugin.name })!; - - const fn = compiler.constVariable({ - expression: compiler.arrowFunction({ - multiLine: true, - parameters: [ - { - name: 'queryKey', - type: compiler.typeReferenceNode({ - typeName: `QueryKey<${clientApi.Options.name}>`, - }), - }, - { - name: 'page', - type: compiler.typeReferenceNode({ typeName: 'K' }), - }, - ], - statements: [ - compiler.constVariable({ - expression: compiler.identifier({ - text: 'queryKey[0]', - }), - name: 'params', - }), - compiler.ifStatement({ - expression: compiler.propertyAccessExpression({ - expression: compiler.identifier({ - text: 'page', - }), - name: compiler.identifier({ text: 'body' }), - }), - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: 'body', - }), - right: compiler.objectExpression({ - multiLine: true, - obj: [ - { - assertion: 'any', - spread: 'queryKey[0].body', - }, - { - assertion: 'any', - spread: 'page.body', - }, - ], - }), - }), - }), - ], - }), - }), - compiler.ifStatement({ - expression: compiler.propertyAccessExpression({ - expression: compiler.identifier({ - text: 'page', - }), - name: compiler.identifier({ text: 'headers' }), - }), - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: 'headers', - }), - right: compiler.objectExpression({ - multiLine: true, - obj: [ - { - spread: 'queryKey[0].headers', - }, - { - spread: 'page.headers', - }, - ], - }), - }), - }), - ], - }), - }), - compiler.ifStatement({ - expression: compiler.propertyAccessExpression({ - expression: compiler.identifier({ - text: 'page', - }), - name: compiler.identifier({ text: 'path' }), - }), - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: 'path', - }), - right: compiler.objectExpression({ - multiLine: true, - obj: [ - { - assertion: 'any', - spread: 'queryKey[0].path', - }, - { - assertion: 'any', - spread: 'page.path', - }, - ], - }), - }), - }), - ], - }), - }), - compiler.ifStatement({ - expression: compiler.propertyAccessExpression({ - expression: compiler.identifier({ - text: 'page', - }), - name: compiler.identifier({ text: 'query' }), - }), - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: 'query', - }), - right: compiler.objectExpression({ - multiLine: true, - obj: [ - { - assertion: 'any', - spread: 'queryKey[0].query', - }, - { - assertion: 'any', - spread: 'page.query', - }, - ], - }), - }), - }), - ], - }), - }), - compiler.returnVariable({ - expression: ts.factory.createAsExpression( - ts.factory.createAsExpression( - compiler.identifier({ text: 'params' }), - ts.factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword), - ), - ts.factory.createTypeQueryNode( - compiler.identifier({ text: 'page' }), - ), - ), - }), - ], - types: [ - { - extends: compiler.typeReferenceNode({ - typeName: compiler.identifier({ - text: `Pick[0], 'body' | 'headers' | 'path' | 'query'>`, - }), - }), - name: 'K', - }, - ], - }), - name: createInfiniteParamsFn, - }); - file.add(fn); -}; - -const createQueryKeyFunction = ({ - context, - plugin, -}: { - context: IR.Context; - plugin: PluginInstance; -}) => { - const file = context.file({ id: plugin.name })!; - - const returnType = compiler.indexedAccessTypeNode({ - indexType: compiler.literalTypeNode({ - literal: compiler.ots.number(0), - }), - objectType: compiler.typeReferenceNode({ - typeArguments: [compiler.typeReferenceNode({ typeName: TOptionsType })], - typeName: queryKeyName, - }), - }); - - const infiniteIdentifier = compiler.identifier({ text: 'infinite' }); - - const identifierCreateQueryKey = file.identifier({ - $ref: `#/ir/${createQueryKeyFn}`, - create: true, - namespace: 'value', - }); - - const fn = compiler.constVariable({ - expression: compiler.arrowFunction({ - multiLine: true, - parameters: [ - { - name: 'id', - type: compiler.typeReferenceNode({ typeName: 'string' }), - }, - { - isRequired: false, - name: 'options', - type: compiler.typeReferenceNode({ typeName: TOptionsType }), - }, - { - isRequired: false, - name: 'infinite', - type: compiler.typeReferenceNode({ typeName: 'boolean' }), - }, - ], - returnType, - statements: [ - compiler.constVariable({ - assertion: returnType, - expression: compiler.objectExpression({ - multiLine: false, - obj: [ - { - key: '_id', - value: compiler.identifier({ text: 'id' }), - }, - { - key: getClientBaseUrlKey(), - value: compiler.identifier({ - text: `(options?.client ?? client).getConfig().${getClientBaseUrlKey()}`, - }), - }, - ], - }), - name: 'params', - typeName: returnType, - }), - compiler.ifStatement({ - expression: infiniteIdentifier, - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: '_infinite', - }), - right: infiniteIdentifier, - }), - }), - ], - }), - }), - compiler.ifStatement({ - expression: compiler.propertyAccessExpression({ - expression: compiler.identifier({ text: 'options' }), - isOptional: true, - name: compiler.identifier({ text: 'body' }), - }), - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: 'body', - }), - right: compiler.propertyAccessExpression({ - expression: 'options', - name: 'body', - }), - }), - }), - ], - }), - }), - compiler.ifStatement({ - expression: compiler.propertyAccessExpression({ - expression: compiler.identifier({ text: 'options' }), - isOptional: true, - name: compiler.identifier({ text: 'headers' }), - }), - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: 'headers', - }), - right: compiler.propertyAccessExpression({ - expression: 'options', - name: 'headers', - }), - }), - }), - ], - }), - }), - compiler.ifStatement({ - expression: compiler.propertyAccessExpression({ - expression: compiler.identifier({ text: 'options' }), - isOptional: true, - name: compiler.identifier({ text: 'path' }), - }), - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: 'path', - }), - right: compiler.propertyAccessExpression({ - expression: 'options', - name: 'path', - }), - }), - }), - ], - }), - }), - compiler.ifStatement({ - expression: compiler.propertyAccessExpression({ - expression: compiler.identifier({ text: 'options' }), - isOptional: true, - name: compiler.identifier({ text: 'query' }), - }), - thenStatement: compiler.block({ - statements: [ - compiler.expressionToStatement({ - expression: compiler.binaryExpression({ - left: compiler.propertyAccessExpression({ - expression: 'params', - name: 'query', - }), - right: compiler.propertyAccessExpression({ - expression: 'options', - name: 'query', - }), - }), - }), - ], - }), - }), - compiler.returnVariable({ - expression: 'params', - }), - ], - types: [ - { - extends: compiler.typeReferenceNode({ - typeName: compiler.identifier({ - text: clientApi.Options.name, - }), - }), - name: TOptionsType, - }, - ], - }), - name: identifierCreateQueryKey.name || '', - }); - file.add(fn); -}; - -const createQueryKeyType = ({ - context, - plugin, -}: { - context: IR.Context; - plugin: PluginInstance; -}) => { - const file = context.file({ id: plugin.name })!; - - const properties: Property[] = [ - { - name: '_id', - type: compiler.keywordTypeNode({ - keyword: 'string', - }), - }, - { - isRequired: false, - name: '_infinite', - type: compiler.keywordTypeNode({ - keyword: 'boolean', - }), - }, - ]; - - const queryKeyType = compiler.typeAliasDeclaration({ - name: queryKeyName, - type: compiler.typeTupleNode({ - types: [ - compiler.typeIntersectionNode({ - types: [ - compiler.typeReferenceNode({ - typeName: `Pick<${TOptionsType}, '${getClientBaseUrlKey()}' | 'body' | 'headers' | 'path' | 'query'>`, - }), - compiler.typeInterfaceNode({ - properties, - useLegacyResolution: true, - }), - ], - }), - ], - }), - typeParameters: [ - { - extends: compiler.typeReferenceNode({ - typeName: compiler.identifier({ - text: clientApi.Options.name, - }), - }), - name: TOptionsType, - }, - ], - }); - file.add(queryKeyType); -}; - -const createQueryKeyLiteral = ({ - context, - id, - isInfinite, - plugin, -}: { - context: IR.Context; - id: string; - isInfinite?: boolean; - plugin: PluginInstance; -}) => { - const file = context.file({ id: plugin.name })!; - const identifierCreateQueryKey = file.identifier({ - $ref: `#/ir/${createQueryKeyFn}`, - namespace: 'value', - }); - const queryKeyLiteral = compiler.arrayLiteralExpression({ - elements: [ - compiler.callExpression({ - functionName: identifierCreateQueryKey.name || '', - parameters: [ - compiler.ots.string(id), - 'options', - isInfinite ? compiler.ots.boolean(true) : undefined, - ], - }), - ], - multiLine: false, - }); - return queryKeyLiteral; -}; - -const useTypeData = ({ - context, - operation, - plugin, -}: { - context: IR.Context; - operation: IR.OperationObject; - plugin: PluginInstance; -}) => { - const identifierData = context.file({ id: 'types' })!.identifier({ - $ref: operationIrRef({ id: operation.id, type: 'data' }), - namespace: 'type', - }); - if (identifierData.name) { - const file = context.file({ id: plugin.name })!; - file.import({ - asType: true, - module: context - .file({ id: plugin.name })! - .relativePathToFile({ context, id: 'types' }), - name: identifierData.name, - }); - } - const typeData = operationOptionsType({ - importedType: identifierData.name, - }); - return typeData; -}; - -const useTypeError = ({ - context, - operation, - plugin, -}: { - context: IR.Context; - operation: IR.OperationObject; - plugin: PluginInstance; -}) => { - const file = context.file({ id: plugin.name })!; - const identifierError = context.file({ id: 'types' })!.identifier({ - $ref: operationIrRef({ id: operation.id, type: 'error' }), - namespace: 'type', - }); - if (identifierError.name) { - file.import({ - asType: true, - module: context - .file({ id: plugin.name })! - .relativePathToFile({ context, id: 'types' }), - name: identifierError.name, - }); - } - let typeError: ImportExportItemObject = { - asType: true, - name: identifierError.name || '', - }; - if (!typeError.name) { - typeError = file.import({ - asType: true, - module: plugin.name, - name: 'DefaultError', - }); - } - if (context.config.client.name === '@hey-api/client-axios') { - const axiosError = file.import({ - asType: true, - module: 'axios', - name: 'AxiosError', - }); - typeError = { - ...axiosError, - name: `${axiosError.name}<${typeError.name}>`, - }; - } - return typeError; -}; +import { createInfiniteQueryOptions } from './infiniteQueryOptions'; +import { createMutationOptions } from './mutationOptions'; +import { createQueryOptions } from './queryOptions'; +import type { PluginHandler, PluginState } from './types'; -const useTypeResponse = ({ - context, - operation, - plugin, -}: { - context: IR.Context; - operation: IR.OperationObject; - plugin: PluginInstance; -}) => { - const identifierResponse = context.file({ id: 'types' })!.identifier({ - $ref: operationIrRef({ id: operation.id, type: 'response' }), - namespace: 'type', - }); - if (identifierResponse.name) { - const file = context.file({ id: plugin.name })!; - file.import({ - asType: true, - module: context - .file({ id: plugin.name })! - .relativePathToFile({ context, id: 'types' }), - name: identifierResponse.name, - }); - } - const typeResponse = identifierResponse.name || 'unknown'; - return typeResponse; -}; - -const queryKeyStatement = ({ - context, - isInfinite, - operation, - plugin, - typeQueryKey, -}: { - context: IR.Context; - isInfinite: boolean; - operation: IR.OperationObject; - plugin: PluginInstance; - typeQueryKey?: string; -}) => { - const file = context.file({ id: plugin.name })!; - const typeData = useTypeData({ context, operation, plugin }); - const name = queryKeyFunctionIdentifier({ - context, - isInfinite, - operation, - }); - const identifierQueryKey = file.identifier({ - $ref: `#/queryKey/${name}`, - create: true, - namespace: 'value', - }); - const statement = compiler.constVariable({ - exportConst: true, - expression: compiler.arrowFunction({ - parameters: [ - { - isRequired: hasOperationDataRequired(operation), - name: 'options', - type: typeData, - }, - ], - returnType: isInfinite ? typeQueryKey : undefined, - statements: createQueryKeyLiteral({ - context, - id: operation.id, - isInfinite, - plugin, - }), - }), - name: identifierQueryKey.name || '', - }); - return statement; -}; - -export const handler: Plugin.Handler< - | ReactQueryConfig - | AngularQueryConfig - | SolidQueryConfig - | SvelteQueryConfig - | VueQueryConfig -> = ({ context, plugin }) => { +export const handler: PluginHandler = ({ context, plugin }) => { const file = context.createFile({ exportFromIndex: plugin.exportFromIndex, id: plugin.name, path: plugin.output, }); - file.import({ - ...clientApi.Options, - module: clientModulePath({ - config: context.config, - sourceOutput: plugin.output, - }), - }); - - const mutationsType = - plugin.name === '@tanstack/angular-query-experimental' || - plugin.name === '@tanstack/svelte-query' || - plugin.name === '@tanstack/solid-query' - ? 'MutationOptions' - : 'UseMutationOptions'; + const state: PluginState = { + hasCreateInfiniteParamsFunction: false, + hasCreateQueryKeyParamsFunction: false, + hasInfiniteQueries: false, + hasMutations: false, + hasQueries: false, + hasUsedQueryFn: false, + typeInfiniteData: undefined!, + }; - let typeInfiniteData!: ImportExportItem; - let hasCreateInfiniteParamsFunction = false; - let hasCreateQueryKeyParamsFunction = false; - let hasInfiniteQueries = false; - let hasMutations = false; - let hasQueries = false; + context.subscribe('before', () => { + file.import({ + ...clientApi.Options, + module: clientModulePath({ + config: context.config, + sourceOutput: plugin.output, + }), + }); + }); context.subscribe('operation', ({ operation }) => { + state.hasUsedQueryFn = false; + const queryFn = [ context.config.plugins['@hey-api/sdk']?.asClass && transformServiceName({ @@ -777,501 +52,44 @@ export const handler: Plugin.Handler< ] .filter(Boolean) .join('.'); - let hasUsedQueryFn = false; - - const isRequired = hasOperationDataRequired(operation); - - // queries - if ( - plugin.queryOptions && - (['get', 'post'] as (typeof operation.method)[]).includes( - operation.method, - ) - ) { - if (!hasQueries) { - hasQueries = true; - - if (!hasCreateQueryKeyParamsFunction) { - createQueryKeyType({ context, plugin }); - createQueryKeyFunction({ context, plugin }); - hasCreateQueryKeyParamsFunction = true; - } - - file.import({ - module: plugin.name, - name: queryOptionsFn, - }); - } - hasUsedQueryFn = true; - - const node = queryKeyStatement({ - context, - isInfinite: false, - operation, - plugin, - }); - file.add(node); - - const typeData = useTypeData({ context, operation, plugin }); - - const queryKeyName = queryKeyFunctionIdentifier({ - context, - isInfinite: false, - operation, - }); - const identifierQueryKey = file.identifier({ - $ref: `#/queryKey/${queryKeyName}`, - namespace: 'value', - }); - - const statement = compiler.constVariable({ - // TODO: describe options, same as the actual function call - comment: [], - exportConst: true, - expression: compiler.arrowFunction({ - parameters: [ - { - isRequired, - name: 'options', - type: typeData, - }, - ], - statements: [ - compiler.returnFunctionCall({ - args: [ - compiler.objectExpression({ - obj: [ - { - key: 'queryFn', - value: compiler.arrowFunction({ - async: true, - multiLine: true, - parameters: [ - { - destructure: [ - { - name: 'queryKey', - }, - { - name: 'signal', - }, - ], - }, - ], - statements: [ - compiler.constVariable({ - destructure: true, - expression: compiler.awaitExpression({ - expression: compiler.callExpression({ - functionName: queryFn, - parameters: [ - compiler.objectExpression({ - multiLine: true, - obj: [ - { - spread: 'options', - }, - { - spread: 'queryKey[0]', - }, - { - key: 'signal', - shorthand: true, - value: compiler.identifier({ - text: 'signal', - }), - }, - { - key: 'throwOnError', - value: true, - }, - ], - }), - ], - }), - }), - name: 'data', - }), - compiler.returnVariable({ - expression: 'data', - }), - ], - }), - }, - { - key: 'queryKey', - value: compiler.callExpression({ - functionName: identifierQueryKey.name || '', - parameters: ['options'], - }), - }, - ], - }), - ], - name: queryOptionsFn, - }), - ], - }), - name: queryOptionsFunctionIdentifier({ context, operation }), - // TODO: add type error - // TODO: AxiosError - }); - file.add(statement); - } - - // infinite queries - if ( - plugin.infiniteQueryOptions && - (['get', 'post'] as (typeof operation.method)[]).includes( - operation.method, - ) - ) { - const pagination = operationPagination({ context, operation }); - - if (pagination) { - if (!hasInfiniteQueries) { - hasInfiniteQueries = true; - - if (!hasCreateQueryKeyParamsFunction) { - createQueryKeyType({ context, plugin }); - createQueryKeyFunction({ context, plugin }); - hasCreateQueryKeyParamsFunction = true; - } - - if (!hasCreateInfiniteParamsFunction) { - createInfiniteParamsFunction({ context, plugin }); - hasCreateInfiniteParamsFunction = true; - } - - file.import({ - module: plugin.name, - name: infiniteQueryOptionsFn, - }); - - typeInfiniteData = file.import({ - asType: true, - module: plugin.name, - name: 'InfiniteData', - }); - } - - hasUsedQueryFn = true; - - const typeData = useTypeData({ context, operation, plugin }); - const typeError = useTypeError({ context, operation, plugin }); - const typeResponse = useTypeResponse({ context, operation, plugin }); - - const typeQueryKey = `${queryKeyName}<${typeData}>`; - const typePageObjectParam = `Pick<${typeQueryKey}[0], 'body' | 'headers' | 'path' | 'query'>`; - // TODO: parser - this is a bit clunky, need to compile type to string because - // `compiler.returnFunctionCall()` accepts only strings, should be cleaned up - const typePageParam = `${tsNodeToString({ - node: schemaToType({ - context, - plugin: context.config.plugins['@hey-api/typescript'] as Parameters< - typeof schemaToType - >[0]['plugin'], - schema: pagination.schema, - }), - unescape: true, - })} | ${typePageObjectParam}`; - - const node = queryKeyStatement({ - context, - isInfinite: true, - operation, - plugin, - typeQueryKey, - }); - file.add(node); - - const infiniteQueryKeyName = queryKeyFunctionIdentifier({ - context, - isInfinite: true, - operation, - }); - const identifierQueryKey = file.identifier({ - $ref: `#/queryKey/${infiniteQueryKeyName}`, - namespace: 'value', - }); - - const statement = compiler.constVariable({ - // TODO: describe options, same as the actual function call - comment: [], - exportConst: true, - expression: compiler.arrowFunction({ - parameters: [ - { - isRequired, - name: 'options', - type: typeData, - }, - ], - statements: [ - compiler.returnFunctionCall({ - args: [ - compiler.objectExpression({ - comments: [ - { - jsdoc: false, - lines: ['@ts-ignore'], - }, - ], - obj: [ - { - key: 'queryFn', - value: compiler.arrowFunction({ - async: true, - multiLine: true, - parameters: [ - { - destructure: [ - { - name: 'pageParam', - }, - { - name: 'queryKey', - }, - { - name: 'signal', - }, - ], - }, - ], - statements: [ - compiler.constVariable({ - comment: [ - { - jsdoc: false, - lines: ['@ts-ignore'], - }, - ], - expression: compiler.conditionalExpression({ - condition: compiler.binaryExpression({ - left: compiler.typeOfExpression({ - text: 'pageParam', - }), - operator: '===', - right: compiler.ots.string('object'), - }), - whenFalse: compiler.objectExpression({ - multiLine: true, - obj: [ - { - key: pagination.in, - value: compiler.objectExpression({ - multiLine: true, - obj: [ - { - key: pagination.name, - value: compiler.identifier({ - text: 'pageParam', - }), - }, - ], - }), - }, - ], - }), - whenTrue: compiler.identifier({ - text: 'pageParam', - }), - }), - name: 'page', - typeName: typePageObjectParam, - }), - compiler.constVariable({ - expression: compiler.callExpression({ - functionName: createInfiniteParamsFn, - parameters: ['queryKey', 'page'], - }), - name: 'params', - }), - compiler.constVariable({ - destructure: true, - expression: compiler.awaitExpression({ - expression: compiler.callExpression({ - functionName: queryFn, - parameters: [ - compiler.objectExpression({ - multiLine: true, - obj: [ - { - spread: 'options', - }, - { - spread: 'params', - }, - { - key: 'signal', - shorthand: true, - value: compiler.identifier({ - text: 'signal', - }), - }, - { - key: 'throwOnError', - value: true, - }, - ], - }), - ], - }), - }), - name: 'data', - }), - compiler.returnVariable({ - expression: 'data', - }), - ], - }), - }, - { - key: 'queryKey', - value: compiler.callExpression({ - functionName: identifierQueryKey.name || '', - parameters: ['options'], - }), - }, - ], - }), - ], - name: infiniteQueryOptionsFn, - // TODO: better types syntax - types: [ - typeResponse, - typeError.name, - `${typeof typeInfiniteData === 'string' ? typeInfiniteData : typeInfiniteData.name}<${typeResponse}>`, - typeQueryKey, - typePageParam, - ], - }), - ], - }), - name: infiniteQueryOptionsFunctionIdentifier({ - context, - operation, - }), - }); - file.add(statement); - } - } - - // mutations - if ( - plugin.mutationOptions && - ( - ['delete', 'patch', 'post', 'put'] as (typeof operation.method)[] - ).includes(operation.method) - ) { - if (!hasMutations) { - hasMutations = true; - - file.import({ - asType: true, - module: plugin.name, - name: mutationsType, - }); - } - - hasUsedQueryFn = true; + createQueryOptions({ + context, + operation, + plugin, + queryFn, + state, + }); - const typeData = useTypeData({ context, operation, plugin }); - const typeError = useTypeError({ context, operation, plugin }); - const typeResponse = useTypeResponse({ context, operation, plugin }); + createInfiniteQueryOptions({ + context, + operation, + plugin, + queryFn, + state, + }); - const expression = compiler.arrowFunction({ - parameters: [ - { - isRequired: false, - name: 'options', - type: `Partial<${typeData}>`, - }, - ], - statements: [ - compiler.constVariable({ - expression: compiler.objectExpression({ - obj: [ - { - key: 'mutationFn', - value: compiler.arrowFunction({ - async: true, - multiLine: true, - parameters: [ - { - name: 'localOptions', - }, - ], - statements: [ - compiler.constVariable({ - destructure: true, - expression: compiler.awaitExpression({ - expression: compiler.callExpression({ - functionName: queryFn, - parameters: [ - compiler.objectExpression({ - multiLine: true, - obj: [ - { - spread: 'options', - }, - { - spread: 'localOptions', - }, - { - key: 'throwOnError', - value: true, - }, - ], - }), - ], - }), - }), - name: 'data', - }), - compiler.returnVariable({ - expression: 'data', - }), - ], - }), - }, - ], - }), - name: mutationOptionsFn, - // TODO: better types syntax - typeName: `${mutationsType}<${typeResponse}, ${typeError.name}, ${typeData}>`, - }), - compiler.returnVariable({ - expression: mutationOptionsFn, - }), - ], - }); - const statement = compiler.constVariable({ - // TODO: describe options, same as the actual function call - comment: [], - exportConst: true, - expression, - name: mutationOptionsFunctionIdentifier({ context, operation }), - }); - file.add(statement); - } + createMutationOptions({ + context, + operation, + plugin, + queryFn, + state, + }); - if (hasQueries || hasInfiniteQueries) { + if (state.hasUsedQueryFn) { file.import({ - module: context - .file({ id: plugin.name })! - .relativePathToFile({ context, id: 'sdk' }), - name: 'client', + module: file.relativePathToFile({ context, id: 'sdk' }), + name: queryFn.split('.')[0]!, }); } + }); - if (hasUsedQueryFn) { + context.subscribe('after', () => { + if (state.hasQueries || state.hasInfiniteQueries) { file.import({ - module: context - .file({ id: plugin.name })! - .relativePathToFile({ context, id: 'sdk' }), - name: queryFn.split('.')[0]!, + module: file.relativePathToFile({ context, id: 'sdk' }), + name: 'client', }); } }); diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts new file mode 100644 index 000000000..86bf3f3d0 --- /dev/null +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts @@ -0,0 +1,359 @@ +import { compiler, type Property } from '../../../compiler'; +import { clientApi } from '../../../generate/client'; +import { hasOperationDataRequired } from '../../../ir/operation'; +import type { IR } from '../../../ir/types'; +import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; +import { getClientBaseUrlKey } from './client'; +import type { PluginInstance } from './types'; +import { useTypeData } from './useType'; + +const createQueryKeyFn = 'createQueryKey'; +export const queryKeyName = 'QueryKey'; +const TOptionsType = 'TOptions'; + +export const createQueryKeyFunction = ({ + context, + plugin, +}: { + context: IR.Context; + plugin: PluginInstance; +}) => { + const file = context.file({ id: plugin.name })!; + + const returnType = compiler.indexedAccessTypeNode({ + indexType: compiler.literalTypeNode({ + literal: compiler.ots.number(0), + }), + objectType: compiler.typeReferenceNode({ + typeArguments: [compiler.typeReferenceNode({ typeName: TOptionsType })], + typeName: queryKeyName, + }), + }); + + const infiniteIdentifier = compiler.identifier({ text: 'infinite' }); + + const identifierCreateQueryKey = file.identifier({ + $ref: `#/ir/${createQueryKeyFn}`, + create: true, + namespace: 'value', + }); + + const fn = compiler.constVariable({ + expression: compiler.arrowFunction({ + multiLine: true, + parameters: [ + { + name: 'id', + type: compiler.typeReferenceNode({ typeName: 'string' }), + }, + { + isRequired: false, + name: 'options', + type: compiler.typeReferenceNode({ typeName: TOptionsType }), + }, + { + isRequired: false, + name: 'infinite', + type: compiler.typeReferenceNode({ typeName: 'boolean' }), + }, + ], + returnType, + statements: [ + compiler.constVariable({ + assertion: returnType, + expression: compiler.objectExpression({ + multiLine: false, + obj: [ + { + key: '_id', + value: compiler.identifier({ text: 'id' }), + }, + { + key: getClientBaseUrlKey(), + value: compiler.identifier({ + text: `(options?.client ?? client).getConfig().${getClientBaseUrlKey()}`, + }), + }, + ], + }), + name: 'params', + typeName: returnType, + }), + compiler.ifStatement({ + expression: infiniteIdentifier, + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: '_infinite', + }), + right: infiniteIdentifier, + }), + }), + ], + }), + }), + compiler.ifStatement({ + expression: compiler.propertyAccessExpression({ + expression: compiler.identifier({ text: 'options' }), + isOptional: true, + name: compiler.identifier({ text: 'body' }), + }), + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: 'body', + }), + right: compiler.propertyAccessExpression({ + expression: 'options', + name: 'body', + }), + }), + }), + ], + }), + }), + compiler.ifStatement({ + expression: compiler.propertyAccessExpression({ + expression: compiler.identifier({ text: 'options' }), + isOptional: true, + name: compiler.identifier({ text: 'headers' }), + }), + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: 'headers', + }), + right: compiler.propertyAccessExpression({ + expression: 'options', + name: 'headers', + }), + }), + }), + ], + }), + }), + compiler.ifStatement({ + expression: compiler.propertyAccessExpression({ + expression: compiler.identifier({ text: 'options' }), + isOptional: true, + name: compiler.identifier({ text: 'path' }), + }), + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: 'path', + }), + right: compiler.propertyAccessExpression({ + expression: 'options', + name: 'path', + }), + }), + }), + ], + }), + }), + compiler.ifStatement({ + expression: compiler.propertyAccessExpression({ + expression: compiler.identifier({ text: 'options' }), + isOptional: true, + name: compiler.identifier({ text: 'query' }), + }), + thenStatement: compiler.block({ + statements: [ + compiler.expressionToStatement({ + expression: compiler.binaryExpression({ + left: compiler.propertyAccessExpression({ + expression: 'params', + name: 'query', + }), + right: compiler.propertyAccessExpression({ + expression: 'options', + name: 'query', + }), + }), + }), + ], + }), + }), + compiler.returnVariable({ + expression: 'params', + }), + ], + types: [ + { + extends: compiler.typeReferenceNode({ + typeName: compiler.identifier({ + text: clientApi.Options.name, + }), + }), + name: TOptionsType, + }, + ], + }), + name: identifierCreateQueryKey.name || '', + }); + file.add(fn); +}; + +const createQueryKeyLiteral = ({ + context, + id, + isInfinite, + plugin, +}: { + context: IR.Context; + id: string; + isInfinite?: boolean; + plugin: PluginInstance; +}) => { + const file = context.file({ id: plugin.name })!; + const identifierCreateQueryKey = file.identifier({ + $ref: `#/ir/${createQueryKeyFn}`, + namespace: 'value', + }); + const queryKeyLiteral = compiler.arrayLiteralExpression({ + elements: [ + compiler.callExpression({ + functionName: identifierCreateQueryKey.name || '', + parameters: [ + compiler.ots.string(id), + 'options', + isInfinite ? compiler.ots.boolean(true) : undefined, + ], + }), + ], + multiLine: false, + }); + return queryKeyLiteral; +}; + +export const createQueryKeyType = ({ + context, + plugin, +}: { + context: IR.Context; + plugin: PluginInstance; +}) => { + const file = context.file({ id: plugin.name })!; + + const properties: Property[] = [ + { + name: '_id', + type: compiler.keywordTypeNode({ + keyword: 'string', + }), + }, + { + isRequired: false, + name: '_infinite', + type: compiler.keywordTypeNode({ + keyword: 'boolean', + }), + }, + ]; + + const queryKeyType = compiler.typeAliasDeclaration({ + name: queryKeyName, + type: compiler.typeTupleNode({ + types: [ + compiler.typeIntersectionNode({ + types: [ + compiler.typeReferenceNode({ + typeName: `Pick<${TOptionsType}, '${getClientBaseUrlKey()}' | 'body' | 'headers' | 'path' | 'query'>`, + }), + compiler.typeInterfaceNode({ + properties, + useLegacyResolution: true, + }), + ], + }), + ], + }), + typeParameters: [ + { + extends: compiler.typeReferenceNode({ + typeName: compiler.identifier({ + text: clientApi.Options.name, + }), + }), + name: TOptionsType, + }, + ], + }); + file.add(queryKeyType); +}; + +export const queryKeyFunctionIdentifier = ({ + context, + isInfinite, + operation, +}: { + context: IR.Context; + isInfinite?: boolean; + operation: IR.OperationObject; +}) => + `${serviceFunctionIdentifier({ + config: context.config, + id: operation.id, + operation, + })}${isInfinite ? 'Infinite' : ''}QueryKey`; + +export const queryKeyStatement = ({ + context, + isInfinite, + operation, + plugin, + typeQueryKey, +}: { + context: IR.Context; + isInfinite: boolean; + operation: IR.OperationObject; + plugin: PluginInstance; + typeQueryKey?: string; +}) => { + const file = context.file({ id: plugin.name })!; + const typeData = useTypeData({ context, operation, plugin }); + const name = queryKeyFunctionIdentifier({ + context, + isInfinite, + operation, + }); + const identifierQueryKey = file.identifier({ + $ref: `#/queryKey/${name}`, + create: true, + namespace: 'value', + }); + const statement = compiler.constVariable({ + exportConst: true, + expression: compiler.arrowFunction({ + parameters: [ + { + isRequired: hasOperationDataRequired(operation), + name: 'options', + type: typeData, + }, + ], + returnType: isInfinite ? typeQueryKey : undefined, + statements: createQueryKeyLiteral({ + context, + id: operation.id, + isInfinite, + plugin, + }), + }), + name: identifierQueryKey.name || '', + }); + return statement; +}; diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts new file mode 100644 index 000000000..35e2e3e3b --- /dev/null +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts @@ -0,0 +1,184 @@ +import { compiler } from '../../../compiler'; +import { hasOperationDataRequired } from '../../../ir/operation'; +import type { IR } from '../../../ir/types'; +import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; +import { + createQueryKeyFunction, + createQueryKeyType, + queryKeyFunctionIdentifier, + queryKeyStatement, +} from './queryKey'; +import type { PluginInstance, PluginState } from './types'; +import { useTypeData } from './useType'; + +const queryOptionsFn = 'queryOptions'; + +const queryOptionsFunctionIdentifier = ({ + context, + operation, +}: { + context: IR.Context; + operation: IR.OperationObject; +}) => + `${serviceFunctionIdentifier({ + config: context.config, + id: operation.id, + operation, + })}Options`; + +export const createQueryOptions = ({ + context, + operation, + plugin, + queryFn, + state, +}: { + context: IR.Context; + operation: IR.OperationObject; + plugin: PluginInstance; + queryFn: string; + state: PluginState; +}) => { + if ( + !plugin.queryOptions || + !(['get', 'post'] as (typeof operation.method)[]).includes(operation.method) + ) { + return state; + } + + const file = context.file({ id: plugin.name })!; + const isRequired = hasOperationDataRequired(operation); + + if (!state.hasQueries) { + state.hasQueries = true; + + if (!state.hasCreateQueryKeyParamsFunction) { + createQueryKeyType({ context, plugin }); + createQueryKeyFunction({ context, plugin }); + state.hasCreateQueryKeyParamsFunction = true; + } + + file.import({ + module: plugin.name, + name: queryOptionsFn, + }); + } + + state.hasUsedQueryFn = true; + + const node = queryKeyStatement({ + context, + isInfinite: false, + operation, + plugin, + }); + file.add(node); + + const typeData = useTypeData({ context, operation, plugin }); + + const queryKeyName = queryKeyFunctionIdentifier({ + context, + isInfinite: false, + operation, + }); + const identifierQueryKey = file.identifier({ + $ref: `#/queryKey/${queryKeyName}`, + namespace: 'value', + }); + + const statement = compiler.constVariable({ + // TODO: describe options, same as the actual function call + comment: [], + exportConst: true, + expression: compiler.arrowFunction({ + parameters: [ + { + isRequired, + name: 'options', + type: typeData, + }, + ], + statements: [ + compiler.returnFunctionCall({ + args: [ + compiler.objectExpression({ + obj: [ + { + key: 'queryFn', + value: compiler.arrowFunction({ + async: true, + multiLine: true, + parameters: [ + { + destructure: [ + { + name: 'queryKey', + }, + { + name: 'signal', + }, + ], + }, + ], + statements: [ + compiler.constVariable({ + destructure: true, + expression: compiler.awaitExpression({ + expression: compiler.callExpression({ + functionName: queryFn, + parameters: [ + compiler.objectExpression({ + multiLine: true, + obj: [ + { + spread: 'options', + }, + { + spread: 'queryKey[0]', + }, + { + key: 'signal', + shorthand: true, + value: compiler.identifier({ + text: 'signal', + }), + }, + { + key: 'throwOnError', + value: true, + }, + ], + }), + ], + }), + }), + name: 'data', + }), + compiler.returnVariable({ + expression: 'data', + }), + ], + }), + }, + { + key: 'queryKey', + value: compiler.callExpression({ + functionName: identifierQueryKey.name || '', + parameters: ['options'], + }), + }, + ], + }), + ], + name: queryOptionsFn, + }), + ], + }), + name: queryOptionsFunctionIdentifier({ context, operation }), + // TODO: add type error + // TODO: AxiosError + }); + file.add(statement); + + return state; +}; diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/types.d.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/types.d.ts new file mode 100644 index 000000000..a4cfffc4f --- /dev/null +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/types.d.ts @@ -0,0 +1,33 @@ +import type { ImportExportItem } from '../../../compiler/module'; +import type { Plugin } from '../../types'; +import type { Config as AngularQueryConfig } from '../angular-query-experimental'; +import type { Config as ReactQueryConfig } from '../react-query'; +import type { Config as SolidQueryConfig } from '../solid-query'; +import type { Config as SvelteQueryConfig } from '../svelte-query'; +import type { Config as VueQueryConfig } from '../vue-query'; + +export type PluginHandler = Plugin.Handler< + | ReactQueryConfig + | AngularQueryConfig + | SolidQueryConfig + | SvelteQueryConfig + | VueQueryConfig +>; + +export type PluginInstance = Plugin.Instance< + | AngularQueryConfig + | ReactQueryConfig + | SolidQueryConfig + | SvelteQueryConfig + | VueQueryConfig +>; + +export interface PluginState { + hasCreateInfiniteParamsFunction: boolean; + hasCreateQueryKeyParamsFunction: boolean; + hasInfiniteQueries: boolean; + hasMutations: boolean; + hasQueries: boolean; + hasUsedQueryFn: boolean; + typeInfiniteData: ImportExportItem; +} diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/useType.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/useType.ts new file mode 100644 index 000000000..bda71b38f --- /dev/null +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/useType.ts @@ -0,0 +1,109 @@ +import type { ImportExportItemObject } from '../../../compiler/utils'; +import type { IR } from '../../../ir/types'; +import { operationOptionsType } from '../../@hey-api/sdk/plugin'; +import { operationIrRef } from '../../shared/utils/ref'; +import type { PluginInstance } from './types'; + +export const useTypeData = ({ + context, + operation, + plugin, +}: { + context: IR.Context; + operation: IR.OperationObject; + plugin: PluginInstance; +}) => { + const identifierData = context.file({ id: 'types' })!.identifier({ + $ref: operationIrRef({ id: operation.id, type: 'data' }), + namespace: 'type', + }); + if (identifierData.name) { + const file = context.file({ id: plugin.name })!; + file.import({ + asType: true, + module: context + .file({ id: plugin.name })! + .relativePathToFile({ context, id: 'types' }), + name: identifierData.name, + }); + } + const typeData = operationOptionsType({ + importedType: identifierData.name, + }); + return typeData; +}; + +export const useTypeError = ({ + context, + operation, + plugin, +}: { + context: IR.Context; + operation: IR.OperationObject; + plugin: PluginInstance; +}) => { + const file = context.file({ id: plugin.name })!; + const identifierError = context.file({ id: 'types' })!.identifier({ + $ref: operationIrRef({ id: operation.id, type: 'error' }), + namespace: 'type', + }); + if (identifierError.name) { + file.import({ + asType: true, + module: context + .file({ id: plugin.name })! + .relativePathToFile({ context, id: 'types' }), + name: identifierError.name, + }); + } + let typeError: ImportExportItemObject = { + asType: true, + name: identifierError.name || '', + }; + if (!typeError.name) { + typeError = file.import({ + asType: true, + module: plugin.name, + name: 'DefaultError', + }); + } + if (context.config.client.name === '@hey-api/client-axios') { + const axiosError = file.import({ + asType: true, + module: 'axios', + name: 'AxiosError', + }); + typeError = { + ...axiosError, + name: `${axiosError.name}<${typeError.name}>`, + }; + } + return typeError; +}; + +export const useTypeResponse = ({ + context, + operation, + plugin, +}: { + context: IR.Context; + operation: IR.OperationObject; + plugin: PluginInstance; +}) => { + const identifierResponse = context.file({ id: 'types' })!.identifier({ + $ref: operationIrRef({ id: operation.id, type: 'response' }), + namespace: 'type', + }); + if (identifierResponse.name) { + const file = context.file({ id: plugin.name })!; + file.import({ + asType: true, + module: context + .file({ id: plugin.name })! + .relativePathToFile({ context, id: 'types' }), + name: identifierResponse.name, + }); + } + const typeResponse = identifierResponse.name || 'unknown'; + return typeResponse; +}; diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts index 2da79fbca..6d9a762d9 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError } from '@tanstack/react-query'; import type { CreateData } from '../types.gen'; -import { client, create } from '../sdk.gen'; +import { create, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts index 18f963ffa..bd859a197 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts index f33df0458..db8ef59b5 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts index 901ad1b5e..4a3d6c103 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts index e52c3f3d8..66412cb38 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts index 65adbaf29..e3fa47677 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts index 4b8ed9325..e25d621ff 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts index 21c5aacac..870c3b5a3 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts index 6f9f62137..93de65d9b 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts index 4b0376865..499bf5b1a 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts index 9dd90044e..2c395b5f1 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts index 97f6c43a0..85aea52dc 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts index 3ea2a76ee..d7b64468c 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts index b98929c0a..d7a0fdf2b 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts index 5c85f3468..0d245a8c7 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts index 307948b3e..52b88cc8a 100644 --- a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts index 2da79fbca..6d9a762d9 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError } from '@tanstack/react-query'; import type { CreateData } from '../types.gen'; -import { client, create } from '../sdk.gen'; +import { create, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts index 18f963ffa..bd859a197 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts index f33df0458..db8ef59b5 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts index 901ad1b5e..4a3d6c103 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts index e52c3f3d8..66412cb38 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts index 65adbaf29..e3fa47677 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts index 4b8ed9325..e25d621ff 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts index 21c5aacac..870c3b5a3 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts index 6f9f62137..93de65d9b 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts index 4b0376865..499bf5b1a 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts index 9dd90044e..2c395b5f1 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts index 97f6c43a0..85aea52dc 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts index 3ea2a76ee..d7b64468c 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts index b98929c0a..d7a0fdf2b 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; +import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts index 5c85f3468..0d245a8c7 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-axios'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; import type { AxiosError } from 'axios'; type QueryKey = [ diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts index 307948b3e..52b88cc8a 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts @@ -3,7 +3,7 @@ import type { Options } from '@hey-api/client-fetch'; import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; -import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; +import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; type QueryKey = [ Pick & { diff --git a/packages/openapi-ts/test/openapi-ts.config.ts b/packages/openapi-ts/test/openapi-ts.config.ts index 9deef0ba8..c85276052 100644 --- a/packages/openapi-ts/test/openapi-ts.config.ts +++ b/packages/openapi-ts/test/openapi-ts.config.ts @@ -68,7 +68,7 @@ export default defineConfig({ }, // @ts-ignore { - // name: '@tanstack/vue-query', + name: '@tanstack/react-query', }, // @ts-ignore {