diff --git a/examples/openapi-ts-tanstack-angular-query-experimental/openapi-ts.config.ts b/examples/openapi-ts-tanstack-angular-query-experimental/openapi-ts.config.ts index 1475ba634..b73a6c454 100644 --- a/examples/openapi-ts-tanstack-angular-query-experimental/openapi-ts.config.ts +++ b/examples/openapi-ts-tanstack-angular-query-experimental/openapi-ts.config.ts @@ -16,6 +16,9 @@ export default defineConfig({ enums: 'javascript', name: '@hey-api/typescript', }, - '@tanstack/angular-query-experimental', + { + name: '@tanstack/angular-query-experimental', + runtimeConfigPath: './src/runtimeConfig.ts', + }, ], }); diff --git a/examples/openapi-ts-tanstack-angular-query-experimental/src/client/@tanstack/angular-query-experimental.gen.ts b/examples/openapi-ts-tanstack-angular-query-experimental/src/client/@tanstack/angular-query-experimental.gen.ts index fddf7d7e5..d9e75b1e2 100644 --- a/examples/openapi-ts-tanstack-angular-query-experimental/src/client/@tanstack/angular-query-experimental.gen.ts +++ b/examples/openapi-ts-tanstack-angular-query-experimental/src/client/@tanstack/angular-query-experimental.gen.ts @@ -6,6 +6,7 @@ import { queryOptions, } from '@tanstack/angular-query-experimental'; +import { transformQueryKey } from '../../runtimeConfig'; import { client as _heyApiClient } from '../client.gen'; import { addPet, @@ -57,7 +58,7 @@ import type { UploadFileResponse, } from '../types.gen'; -type QueryKey = [ +export type QueryKey = [ Pick & { _id: string; _infinite?: boolean; @@ -68,7 +69,7 @@ const createQueryKey = ( id: string, options?: TOptions, infinite?: boolean, -): QueryKey[0] => { +): [QueryKey[0]] => { const params: QueryKey[0] = { _id: id, baseUrl: (options?.client ?? _heyApiClient).getConfig().baseUrl, @@ -88,16 +89,16 @@ const createQueryKey = ( if (options?.query) { params.query = options.query; } - return params; + return [params]; }; -export const addPetQueryKey = (options: Options) => [ - createQueryKey('addPet', options), -]; +export const addPetQueryKey = (options: Options) => + createQueryKey('addPet', options); export const addPetOptions = (options: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = addPetQueryKey(options); const { data } = await addPet({ ...options, ...queryKey[0], @@ -106,7 +107,7 @@ export const addPetOptions = (options: Options) => }); return data; }, - queryKey: addPetQueryKey(options), + queryKey: transformQueryKey(addPetQueryKey(options)), }); export const addPetMutation = (options?: Partial>) => { @@ -149,13 +150,14 @@ export const updatePetMutation = ( export const findPetsByStatusQueryKey = ( options?: Options, -) => [createQueryKey('findPetsByStatus', options)]; +) => createQueryKey('findPetsByStatus', options); export const findPetsByStatusOptions = ( options?: Options, ) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = findPetsByStatusQueryKey(options); const { data } = await findPetsByStatus({ ...options, ...queryKey[0], @@ -164,16 +166,16 @@ export const findPetsByStatusOptions = ( }); return data; }, - queryKey: findPetsByStatusQueryKey(options), + queryKey: transformQueryKey(findPetsByStatusQueryKey(options)), }); -export const findPetsByTagsQueryKey = ( - options?: Options, -) => [createQueryKey('findPetsByTags', options)]; +export const findPetsByTagsQueryKey = (options?: Options) => + createQueryKey('findPetsByTags', options); export const findPetsByTagsOptions = (options?: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = findPetsByTagsQueryKey(options); const { data } = await findPetsByTags({ ...options, ...queryKey[0], @@ -182,7 +184,7 @@ export const findPetsByTagsOptions = (options?: Options) => }); return data; }, - queryKey: findPetsByTagsQueryKey(options), + queryKey: transformQueryKey(findPetsByTagsQueryKey(options)), }); export const deletePetMutation = ( @@ -205,13 +207,13 @@ export const deletePetMutation = ( return mutationOptions; }; -export const getPetByIdQueryKey = (options: Options) => [ - createQueryKey('getPetById', options), -]; +export const getPetByIdQueryKey = (options: Options) => + createQueryKey('getPetById', options); export const getPetByIdOptions = (options: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = getPetByIdQueryKey(options); const { data } = await getPetById({ ...options, ...queryKey[0], @@ -220,18 +222,19 @@ export const getPetByIdOptions = (options: Options) => }); return data; }, - queryKey: getPetByIdQueryKey(options), + queryKey: transformQueryKey(getPetByIdQueryKey(options)), }); export const updatePetWithFormQueryKey = ( options: Options, -) => [createQueryKey('updatePetWithForm', options)]; +) => createQueryKey('updatePetWithForm', options); export const updatePetWithFormOptions = ( options: Options, ) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = updatePetWithFormQueryKey(options); const { data } = await updatePetWithForm({ ...options, ...queryKey[0], @@ -240,7 +243,7 @@ export const updatePetWithFormOptions = ( }); return data; }, - queryKey: updatePetWithFormQueryKey(options), + queryKey: transformQueryKey(updatePetWithFormQueryKey(options)), }); export const updatePetWithFormMutation = ( @@ -263,13 +266,13 @@ export const updatePetWithFormMutation = ( return mutationOptions; }; -export const uploadFileQueryKey = (options: Options) => [ - createQueryKey('uploadFile', options), -]; +export const uploadFileQueryKey = (options: Options) => + createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = uploadFileQueryKey(options); const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -278,7 +281,7 @@ export const uploadFileOptions = (options: Options) => }); return data; }, - queryKey: uploadFileQueryKey(options), + queryKey: transformQueryKey(uploadFileQueryKey(options)), }); export const uploadFileMutation = ( @@ -301,13 +304,13 @@ export const uploadFileMutation = ( return mutationOptions; }; -export const getInventoryQueryKey = (options?: Options) => [ - createQueryKey('getInventory', options), -]; +export const getInventoryQueryKey = (options?: Options) => + createQueryKey('getInventory', options); export const getInventoryOptions = (options?: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = getInventoryQueryKey(options); const { data } = await getInventory({ ...options, ...queryKey[0], @@ -316,16 +319,16 @@ export const getInventoryOptions = (options?: Options) => }); return data; }, - queryKey: getInventoryQueryKey(options), + queryKey: transformQueryKey(getInventoryQueryKey(options)), }); -export const placeOrderQueryKey = (options?: Options) => [ - createQueryKey('placeOrder', options), -]; +export const placeOrderQueryKey = (options?: Options) => + createQueryKey('placeOrder', options); export const placeOrderOptions = (options?: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = placeOrderQueryKey(options); const { data } = await placeOrder({ ...options, ...queryKey[0], @@ -334,7 +337,7 @@ export const placeOrderOptions = (options?: Options) => }); return data; }, - queryKey: placeOrderQueryKey(options), + queryKey: transformQueryKey(placeOrderQueryKey(options)), }); export const placeOrderMutation = ( @@ -377,13 +380,13 @@ export const deleteOrderMutation = ( return mutationOptions; }; -export const getOrderByIdQueryKey = (options: Options) => [ - createQueryKey('getOrderById', options), -]; +export const getOrderByIdQueryKey = (options: Options) => + createQueryKey('getOrderById', options); export const getOrderByIdOptions = (options: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = getOrderByIdQueryKey(options); const { data } = await getOrderById({ ...options, ...queryKey[0], @@ -392,16 +395,16 @@ export const getOrderByIdOptions = (options: Options) => }); return data; }, - queryKey: getOrderByIdQueryKey(options), + queryKey: transformQueryKey(getOrderByIdQueryKey(options)), }); -export const createUserQueryKey = (options?: Options) => [ - createQueryKey('createUser', options), -]; +export const createUserQueryKey = (options?: Options) => + createQueryKey('createUser', options); export const createUserOptions = (options?: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = createUserQueryKey(options); const { data } = await createUser({ ...options, ...queryKey[0], @@ -410,7 +413,7 @@ export const createUserOptions = (options?: Options) => }); return data; }, - queryKey: createUserQueryKey(options), + queryKey: transformQueryKey(createUserQueryKey(options)), }); export const createUserMutation = ( @@ -435,13 +438,14 @@ export const createUserMutation = ( export const createUsersWithListInputQueryKey = ( options?: Options, -) => [createQueryKey('createUsersWithListInput', options)]; +) => createQueryKey('createUsersWithListInput', options); export const createUsersWithListInputOptions = ( options?: Options, ) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = createUsersWithListInputQueryKey(options); const { data } = await createUsersWithListInput({ ...options, ...queryKey[0], @@ -450,7 +454,7 @@ export const createUsersWithListInputOptions = ( }); return data; }, - queryKey: createUsersWithListInputQueryKey(options), + queryKey: transformQueryKey(createUsersWithListInputQueryKey(options)), }); export const createUsersWithListInputMutation = ( @@ -473,13 +477,13 @@ export const createUsersWithListInputMutation = ( return mutationOptions; }; -export const loginUserQueryKey = (options?: Options) => [ - createQueryKey('loginUser', options), -]; +export const loginUserQueryKey = (options?: Options) => + createQueryKey('loginUser', options); export const loginUserOptions = (options?: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = loginUserQueryKey(options); const { data } = await loginUser({ ...options, ...queryKey[0], @@ -488,16 +492,16 @@ export const loginUserOptions = (options?: Options) => }); return data; }, - queryKey: loginUserQueryKey(options), + queryKey: transformQueryKey(loginUserQueryKey(options)), }); -export const logoutUserQueryKey = (options?: Options) => [ - createQueryKey('logoutUser', options), -]; +export const logoutUserQueryKey = (options?: Options) => + createQueryKey('logoutUser', options); export const logoutUserOptions = (options?: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = logoutUserQueryKey(options); const { data } = await logoutUser({ ...options, ...queryKey[0], @@ -506,7 +510,7 @@ export const logoutUserOptions = (options?: Options) => }); return data; }, - queryKey: logoutUserQueryKey(options), + queryKey: transformQueryKey(logoutUserQueryKey(options)), }); export const deleteUserMutation = ( @@ -529,13 +533,13 @@ export const deleteUserMutation = ( return mutationOptions; }; -export const getUserByNameQueryKey = (options: Options) => [ - createQueryKey('getUserByName', options), -]; +export const getUserByNameQueryKey = (options: Options) => + createQueryKey('getUserByName', options); export const getUserByNameOptions = (options: Options) => queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { + const queryKey = getUserByNameQueryKey(options); const { data } = await getUserByName({ ...options, ...queryKey[0], @@ -544,7 +548,7 @@ export const getUserByNameOptions = (options: Options) => }); return data; }, - queryKey: getUserByNameQueryKey(options), + queryKey: transformQueryKey(getUserByNameQueryKey(options)), }); export const updateUserMutation = ( diff --git a/examples/openapi-ts-tanstack-angular-query-experimental/src/client/client.gen.ts b/examples/openapi-ts-tanstack-angular-query-experimental/src/client/client.gen.ts index 3e10f75c8..01ba79f34 100644 --- a/examples/openapi-ts-tanstack-angular-query-experimental/src/client/client.gen.ts +++ b/examples/openapi-ts-tanstack-angular-query-experimental/src/client/client.gen.ts @@ -1,5 +1,25 @@ // This file is auto-generated by @hey-api/openapi-ts -import { createClient, createConfig } from '@hey-api/client-fetch'; +import { + type ClientOptions as DefaultClientOptions, + type Config, + createClient, + createConfig, +} from '@hey-api/client-fetch'; -export const client = createClient(createConfig()); +import type { ClientOptions } from './types.gen'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = + ( + override?: Config, + ) => Config & T>; + +export const client = createClient(createConfig()); diff --git a/examples/openapi-ts-tanstack-angular-query-experimental/src/client/sdk.gen.ts b/examples/openapi-ts-tanstack-angular-query-experimental/src/client/sdk.gen.ts index bbf5f6189..8b00b7d5c 100644 --- a/examples/openapi-ts-tanstack-angular-query-experimental/src/client/sdk.gen.ts +++ b/examples/openapi-ts-tanstack-angular-query-experimental/src/client/sdk.gen.ts @@ -52,6 +52,11 @@ export type Options< * custom client. */ client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; }; /** diff --git a/examples/openapi-ts-tanstack-angular-query-experimental/src/client/types.gen.ts b/examples/openapi-ts-tanstack-angular-query-experimental/src/client/types.gen.ts index afa2bda0d..3de79caa5 100644 --- a/examples/openapi-ts-tanstack-angular-query-experimental/src/client/types.gen.ts +++ b/examples/openapi-ts-tanstack-angular-query-experimental/src/client/types.gen.ts @@ -561,3 +561,7 @@ export type UpdateUserResponses = { */ default: unknown; }; + +export type ClientOptions = { + baseUrl: `${string}://${string}/v3` | (string & {}); +}; diff --git a/examples/openapi-ts-tanstack-angular-query-experimental/src/runtimeConfig.ts b/examples/openapi-ts-tanstack-angular-query-experimental/src/runtimeConfig.ts new file mode 100644 index 000000000..b2a49f06c --- /dev/null +++ b/examples/openapi-ts-tanstack-angular-query-experimental/src/runtimeConfig.ts @@ -0,0 +1,7 @@ +import type { QueryKey } from './client/@tanstack/angular-query-experimental.gen'; +import type { Options } from './client/sdk.gen'; + +export const transformQueryKey = (queryKey: QueryKey) => [ + 'SOME_FEATURE_NAME', + ...queryKey, +]; diff --git a/mise.toml b/mise.toml new file mode 100644 index 000000000..93c173b64 --- /dev/null +++ b/mise.toml @@ -0,0 +1,2 @@ +[tools] +pnpm = "9.15" diff --git a/packages/client-nuxt/vitest.config.ts.timestamp-1737651110450-37e012e606fce.mjs b/packages/client-nuxt/vitest.config.ts.timestamp-1737651110450-37e012e606fce.mjs new file mode 100644 index 000000000..354fc7edc --- /dev/null +++ b/packages/client-nuxt/vitest.config.ts.timestamp-1737651110450-37e012e606fce.mjs @@ -0,0 +1,26 @@ +// vitest.config.ts +import { fileURLToPath } from 'node:url'; + +import { defineVitestConfig } from 'file:///Users/thomstaal/Documents/Projects/openapi-ts/node_modules/.pnpm/@nuxt+test-utils@3.15.1_@types+node@22.10.5_@vue+test-utils@2.4.6_jsdom@24.1.0_less@4.2.0_mag_topk3w3mocpsy4nxvzk5c7kt34/node_modules/@nuxt/test-utils/dist/config.mjs'; +var __vite_injected_original_import_meta_url = + 'file:///Users/thomstaal/Documents/Projects/openapi-ts/packages/client-nuxt/vitest.config.ts'; +var vitest_config_default = defineVitestConfig({ + test: { + coverage: { + exclude: ['dist', 'src/**/*.d.ts'], + include: ['src/**/*.ts'], + provider: 'v8', + }, + environment: 'nuxt', + environmentOptions: { + nuxt: { + domEnvironment: 'jsdom', + }, + }, + root: fileURLToPath( + new URL('./', __vite_injected_original_import_meta_url), + ), + }, +}); +export { vitest_config_default as default }; +//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZXN0LmNvbmZpZy50cyJdLAogICJzb3VyY2VzQ29udGVudCI6IFsiY29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2Rpcm5hbWUgPSBcIi9Vc2Vycy90aG9tc3RhYWwvRG9jdW1lbnRzL1Byb2plY3RzL29wZW5hcGktdHMvcGFja2FnZXMvY2xpZW50LW51eHRcIjtjb25zdCBfX3ZpdGVfaW5qZWN0ZWRfb3JpZ2luYWxfZmlsZW5hbWUgPSBcIi9Vc2Vycy90aG9tc3RhYWwvRG9jdW1lbnRzL1Byb2plY3RzL29wZW5hcGktdHMvcGFja2FnZXMvY2xpZW50LW51eHQvdml0ZXN0LmNvbmZpZy50c1wiO2NvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9pbXBvcnRfbWV0YV91cmwgPSBcImZpbGU6Ly8vVXNlcnMvdGhvbXN0YWFsL0RvY3VtZW50cy9Qcm9qZWN0cy9vcGVuYXBpLXRzL3BhY2thZ2VzL2NsaWVudC1udXh0L3ZpdGVzdC5jb25maWcudHNcIjtpbXBvcnQgeyBmaWxlVVJMVG9QYXRoIH0gZnJvbSAnbm9kZTp1cmwnO1xuXG5pbXBvcnQgeyBkZWZpbmVWaXRlc3RDb25maWcgfSBmcm9tICdAbnV4dC90ZXN0LXV0aWxzL2NvbmZpZyc7XG5cbmV4cG9ydCBkZWZhdWx0IGRlZmluZVZpdGVzdENvbmZpZyh7XG4gIHRlc3Q6IHtcbiAgICBjb3ZlcmFnZToge1xuICAgICAgZXhjbHVkZTogWydkaXN0JywgJ3NyYy8qKi8qLmQudHMnXSxcbiAgICAgIGluY2x1ZGU6IFsnc3JjLyoqLyoudHMnXSxcbiAgICAgIHByb3ZpZGVyOiAndjgnLFxuICAgIH0sXG4gICAgZW52aXJvbm1lbnQ6ICdudXh0JyxcbiAgICBlbnZpcm9ubWVudE9wdGlvbnM6IHtcbiAgICAgIG51eHQ6IHtcbiAgICAgICAgZG9tRW52aXJvbm1lbnQ6ICdqc2RvbScsXG4gICAgICB9LFxuICAgIH0sXG4gICAgcm9vdDogZmlsZVVSTFRvUGF0aChuZXcgVVJMKCcuLycsIGltcG9ydC5tZXRhLnVybCkpLFxuICB9LFxufSk7XG4iXSwKICAibWFwcGluZ3MiOiAiO0FBQStYLFNBQVMscUJBQXFCO0FBRTdaLFNBQVMsMEJBQTBCO0FBRjZNLElBQU0sMkNBQTJDO0FBSWpTLElBQU8sd0JBQVEsbUJBQW1CO0FBQUEsRUFDaEMsTUFBTTtBQUFBLElBQ0osVUFBVTtBQUFBLE1BQ1IsU0FBUyxDQUFDLFFBQVEsZUFBZTtBQUFBLE1BQ2pDLFNBQVMsQ0FBQyxhQUFhO0FBQUEsTUFDdkIsVUFBVTtBQUFBLElBQ1o7QUFBQSxJQUNBLGFBQWE7QUFBQSxJQUNiLG9CQUFvQjtBQUFBLE1BQ2xCLE1BQU07QUFBQSxRQUNKLGdCQUFnQjtBQUFBLE1BQ2xCO0FBQUEsSUFDRjtBQUFBLElBQ0EsTUFBTSxjQUFjLElBQUksSUFBSSxNQUFNLHdDQUFlLENBQUM7QUFBQSxFQUNwRDtBQUNGLENBQUM7IiwKICAibmFtZXMiOiBbXQp9Cg== diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts index b6e248a17..1eb11501f 100644 --- a/packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts @@ -333,6 +333,13 @@ export const createInfiniteQueryOptions = ({ }, ], statements: [ + compiler.constVariable({ + expression: compiler.callExpression({ + functionName: identifierQueryKey.name || '', + parameters: ['options'], + }), + name: 'queryKey', + }), compiler.returnFunctionCall({ args: [ compiler.objectExpression({ @@ -354,9 +361,7 @@ export const createInfiniteQueryOptions = ({ { name: 'pageParam', }, - { - name: 'queryKey', - }, + { name: 'signal', }, @@ -453,23 +458,25 @@ export const createInfiniteQueryOptions = ({ }, { key: 'queryKey', - value: compiler.callExpression({ - functionName: identifierQueryKey.name || '', - parameters: ['options'], - }), + value: plugin.runtimeConfigPath + ? compiler.callExpression({ + functionName: 'transformQueryKey', + parameters: ['queryKey'], + }) + : 'queryKey', }, ], }), ], name: infiniteQueryOptionsFn, - // TODO: better types syntax types: [ typeResponse, typeError.name, `${typeof state.typeInfiniteData === 'string' ? state.typeInfiniteData : state.typeInfiniteData.name}<${typeResponse}>`, - typeQueryKey, + 'unknown[]', typePageParam, ], + // TODO: better types syntax }), ], }), diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts index ab3e7e526..6382d5fb3 100644 --- a/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts @@ -230,6 +230,7 @@ const createQueryKeyLiteral = ({ $ref: `#/ir/${createQueryKeyFn}`, namespace: 'value', }); + const createQueryKeyCallExpression = compiler.callExpression({ functionName: identifierCreateQueryKey.name || '', parameters: [ diff --git a/packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts index 35e2e3e3b..d32ca6f95 100644 --- a/packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts @@ -86,6 +86,16 @@ export const createQueryOptions = ({ namespace: 'value', }); + if (plugin.runtimeConfigPath) { + file.import({ + module: file.relativePathToFile({ + context, + id: plugin.runtimeConfigPath, + }), + name: 'transformQueryKey', + }); + } + const statement = compiler.constVariable({ // TODO: describe options, same as the actual function call comment: [], @@ -99,6 +109,13 @@ export const createQueryOptions = ({ }, ], statements: [ + compiler.constVariable({ + expression: compiler.callExpression({ + functionName: identifierQueryKey.name || '', + parameters: ['options'], + }), + name: 'queryKey', + }), compiler.returnFunctionCall({ args: [ compiler.objectExpression({ @@ -111,9 +128,6 @@ export const createQueryOptions = ({ parameters: [ { destructure: [ - { - name: 'queryKey', - }, { name: 'signal', }, @@ -162,10 +176,15 @@ export const createQueryOptions = ({ }, { key: 'queryKey', - value: compiler.callExpression({ - functionName: identifierQueryKey.name || '', - parameters: ['options'], - }), + shorthand: !plugin.runtimeConfigPath, + value: plugin.runtimeConfigPath + ? compiler.callExpression({ + functionName: 'transformQueryKey', + parameters: ['queryKey'], + }) + : compiler.identifier({ + text: 'queryKey', + }), }, ], }), 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 index 89a09df10..9ee819f05 100644 --- a/packages/openapi-ts/src/plugins/@tanstack/query-core/types.d.ts +++ b/packages/openapi-ts/src/plugins/@tanstack/query-core/types.d.ts @@ -44,5 +44,9 @@ export namespace TanStackQuery { * @default false */ exportFromIndex?: boolean; + /** + * TODO + */ + runtimeConfigPath?: string; }; } diff --git a/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts index 6512bbcec..f0e7cdcb2 100644 --- a/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts @@ -39,8 +39,9 @@ const createQueryKey = (id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -109,7 +111,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -140,7 +143,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -185,7 +189,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -216,7 +221,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -247,7 +253,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -278,15 +285,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -354,15 +363,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -371,7 +381,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -406,8 +416,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -416,15 +427,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -433,15 +445,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -450,15 +463,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -467,15 +481,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -484,15 +499,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -501,7 +517,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -546,15 +563,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -563,15 +581,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -580,15 +599,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -597,7 +617,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -628,7 +649,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -649,8 +670,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -659,7 +681,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -690,7 +713,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options = [ + Pick & { + _id: string; + _infinite?: boolean; + } +]; + +const createQueryKey = (id: string, options?: TOptions, infinite?: boolean): [ + QueryKey[0] +] => { + const params: QueryKey[0] = { _id: id, baseUrl: (options?.client ?? _heyApiClient).getConfig().baseUrl } as QueryKey[0]; + if (infinite) { + params._infinite = infinite; + } + if (options?.body) { + params.body = options.body; + } + if (options?.headers) { + params.headers = options.headers; + } + if (options?.path) { + params.path = options.path; + } + if (options?.query) { + params.query = options.query; + } + return [ + params + ]; +}; + +export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); + +export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await serviceWithEmptyTag({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await patchApiVbyApiVersionNoTag({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const fooWowMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await fooWow({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await deleteCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); + +export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await getCallWithoutParametersAndResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const patchCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await patchCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const postCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); + +export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postCallWithoutParametersAndResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const putCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await putCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); + +export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDescriptions({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDescriptionsMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDescriptions({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithParametersQueryKey = (options: Options) => createQueryKey('callWithParameters', options); + +export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithParametersMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithParameters({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithWeirdParameterNamesQueryKey = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); + +export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithWeirdParameterNames({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithWeirdParameterNamesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithWeirdParameterNames({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithDefaultParametersQueryKey = (options: Options) => createQueryKey('callWithDefaultParameters', options); + +export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDefaultParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDefaultOptionalParametersQueryKey = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); + +export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDefaultOptionalParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDefaultOptionalParametersMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDefaultOptionalParameters({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callToTestOrderOfParamsMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callToTestOrderOfParams({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateNameMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateName2QueryKey = (options?: Options) => createQueryKey('duplicateName2', options); + +export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await duplicateName2({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); + +export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await duplicateName3({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const duplicateName3Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName3({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateName4Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName4({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey('callWithNoContentResponse', options); + +export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithNoContentResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); + +export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResponseAndNoContentResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const dummyAQueryKey = (options?: Options) => createQueryKey('dummyA', options); + +export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await dummyA({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); + +export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await dummyB({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); + +export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); + +export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDuplicateResponses({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDuplicateResponsesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDuplicateResponses({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithResponsesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithResponses({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const collectionFormatQueryKey = (options: Options) => createQueryKey('collectionFormat', options); + +export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await collectionFormat({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const typesQueryKey = (options: Options) => createQueryKey('types', options); + +export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await types({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); + +export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await complexTypes({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); + +export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResultFromHeader({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResultFromHeaderMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithResultFromHeader({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const testErrorCodeQueryKey = (options: Options) => createQueryKey('testErrorCode', options); + +export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await testErrorCode({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const testErrorCodeMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await testErrorCode({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串QueryKey = (options: Options) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); + +export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const postApiVbyApiVersionBodyQueryKey = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); + +export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postApiVbyApiVersionBody({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postApiVbyApiVersionBodyMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postApiVbyApiVersionBody({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts new file mode 100644 index 000000000..fdbaafa48 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { ClientOptions } from './types.gen'; +import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = (override?: Config) => Config & T>; + +export const client = createClient(createConfig({ + baseUrl: 'http://localhost:3000/base' +})); \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts new file mode 100644 index 000000000..e64537d21 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; +export * from './sdk.gen'; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts new file mode 100644 index 000000000..8c3eadef9 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts @@ -0,0 +1,277 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { Options as ClientOptions, TDataShape, Client } from '@hey-api/client-fetch'; +import type { ServiceWithEmptyTagData, PatchApiVbyApiVersionNoTagData, FooWowData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, OptionsCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, CallWithDescriptionsData, CallWithParametersData, CallWithWeirdParameterNamesData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DummyAData, DummyBData, CallWithResponseData, CallWithResponseResponse, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, CallWithResponsesData, CallWithResponsesResponse, CallWithResponsesError, CollectionFormatData, TypesData, TypesResponse, ComplexTypesData, ComplexTypesResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PostApiVbyApiVersionBodyData, PostApiVbyApiVersionBodyResponse, PostApiVbyApiVersionBodyError } from './types.gen'; +import { client as _heyApiClient } from './client.gen'; + +export type Options = ClientOptions & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +export const serviceWithEmptyTag = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const patchApiVbyApiVersionNoTag = (options?: Options) => { + return (options?.client ?? _heyApiClient).patch({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const fooWow = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const deleteCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const getCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const headCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).head({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const optionsCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).options({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const patchCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).patch({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const postCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const putCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const callWithDescriptions = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/descriptions/', + ...options + }); +}; + +export const callWithParameters = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters/{parameterPath}', + ...options + }); +}; + +export const callWithWeirdParameterNames = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', + ...options + }); +}; + +export const callWithDefaultParameters = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const callWithDefaultOptionalParameters = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const callToTestOrderOfParams = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const duplicateName = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName2 = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName3 = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName4 = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const callWithNoContentResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/no-content', + ...options + }); +}; + +export const callWithResponseAndNoContentResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + ...options + }); +}; + +export const dummyA = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/a', + ...options + }); +}; + +export const dummyB = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/b', + ...options + }); +}; + +export const callWithResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const callWithDuplicateResponses = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const callWithResponses = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const collectionFormat = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/api/v{api-version}/collectionFormat', + ...options + }); +}; + +export const types = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + querySerializer: { + array: { + explode: false, + style: 'form' + } + }, + url: '/api/v{api-version}/types', + ...options + }); +}; + +export const complexTypes = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/complex', + ...options + }); +}; + +export const callWithResultFromHeader = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/header', + ...options + }); +}; + +export const testErrorCode = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/error', + ...options + }); +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + ...options + }); +}; + +/** + * Body should not be unknown + * Body should not be unknown + */ +export const postApiVbyApiVersionBody = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/body', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts new file mode 100644 index 000000000..c59f6f961 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts @@ -0,0 +1,1130 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ +export type CommentWithBreaks = number; + +/** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ +export type CommentWithBackticks = number; + +/** + * Testing backticks and quotes in string: `backticks`, 'quotes', "double quotes" and ```multiple backticks``` should work + */ +export type CommentWithBackticksAndQuotes = number; + +/** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ +export type CommentWithSlashes = number; + +/** + * Testing expression placeholders in string: ${expression} should work + */ +export type CommentWithExpressionPlaceholders = number; + +/** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ +export type CommentWithQuotes = number; + +/** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ +export type CommentWithReservedCharacters = number; + +/** + * This is a simple number + */ +export type SimpleInteger = number; + +/** + * This is a simple boolean + */ +export type SimpleBoolean = boolean; + +/** + * This is a simple string + */ +export type SimpleString = string; + +/** + * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串) + */ +export type NonAsciiStringæøåÆøÅöôêÊ字符串 = string; + +/** + * This is a simple file + */ +export type SimpleFile = Blob | File; + +export type SimpleReference = ModelWithString; + +/** + * This is a simple string + */ +export type SimpleStringWithPattern = string; + +/** + * This is a simple enum with strings + */ +export type EnumWithStrings = 'Success' | 'Warning' | 'Error' | "'Single Quote'" | '"Double Quotes"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + +/** + * This is a simple enum with numbers + */ +export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; + +/** + * Success=1,Warning=2,Error=3 + */ +export type EnumFromDescription = number; + +/** + * This is a simple enum with numbers + */ +export type EnumWithExtensions = 200 | 400 | 500; + +/** + * This is a simple array with numbers + */ +export type ArrayWithNumbers = Array; + +/** + * This is a simple array with booleans + */ +export type ArrayWithBooleans = Array; + +/** + * This is a simple array with strings + */ +export type ArrayWithStrings = Array; + +/** + * This is a simple array with references + */ +export type ArrayWithReferences = Array; + +/** + * This is a simple array containing an array + */ +export type ArrayWithArray = Array>; + +/** + * This is a simple array with properties + */ +export type ArrayWithProperties = Array<{ + foo?: string; + bar?: string; +}>; + +/** + * This is a string dictionary + */ +export type DictionaryWithString = { + [key: string]: string; +}; + +/** + * This is a string reference + */ +export type DictionaryWithReference = { + [key: string]: ModelWithString; +}; + +/** + * This is a complex dictionary + */ +export type DictionaryWithArray = { + [key: string]: Array; +}; + +/** + * This is a string dictionary + */ +export type DictionaryWithDictionary = { + [key: string]: { + [key: string]: string; + }; +}; + +/** + * This is a complex dictionary + */ +export type DictionaryWithProperties = { + [key: string]: { + foo?: string; + bar?: string; + }; +}; + +/** + * This is a type-only model that defines Date as a string + */ +export type _Date = string; + +/** + * This is a model with one number property + */ +export type ModelWithInteger = { + /** + * This is a simple number property + */ + prop?: number; +}; + +/** + * This is a model with one boolean property + */ +export type ModelWithBoolean = { + /** + * This is a simple boolean property + */ + prop?: boolean; +}; + +/** + * This is a model with one string property + */ +export type ModelWithString = { + /** + * This is a simple string property + */ + prop?: string; +}; + +/** + * This is a model with one string property + */ +export type ModelWithStringError = { + /** + * This is a simple string property + */ + prop?: string; +}; + +/** + * This is a model with one string property + */ +export type ModelWithNullableString = { + /** + * This is a simple string property + */ + nullableProp?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp: string | null; +}; + +/** + * This is a model with one enum + */ +export type ModelWithEnum = { + /** + * This is a simple enum with strings + */ + test?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: true; +}; + +/** + * This is a model with one enum + */ +export type ModelWithEnumFromDescription = { + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; +}; + +/** + * This is a model with nested enums + */ +export type ModelWithNestedEnums = { + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; +}; + +/** + * This is a model with one property containing a reference + */ +export type ModelWithReference = { + prop?: ModelWithProperties; +}; + +/** + * This is a model with one property containing an array + */ +export type ModelWithArray = { + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; +}; + +/** + * This is a model with one property containing a dictionary + */ +export type ModelWithDictionary = { + prop?: { + [key: string]: string; + }; +}; + +/** + * This is a model with one property containing a circular reference + */ +export type ModelWithCircularReference = { + prop?: ModelWithCircularReference; +}; + +/** + * This is a model with one nested property + */ +export type ModelWithProperties = { + required: string; + readonly requiredAndReadOnly: string; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; +}; + +/** + * This is a model with one nested property + */ +export type ModelWithNestedProperties = { + readonly first: { + readonly second: { + readonly third: string; + }; + }; +}; + +/** + * This is a model with duplicated properties + */ +export type ModelWithDuplicateProperties = { + prop?: ModelWithString; +}; + +/** + * This is a model with ordered properties + */ +export type ModelWithOrderedProperties = { + zebra?: string; + apple?: string; + hawaii?: string; +}; + +/** + * This is a model with duplicated imports + */ +export type ModelWithDuplicateImports = { + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; +}; + +/** + * This is a model that extends another model + */ +export type ModelThatExtends = ModelWithString & { + propExtendsA?: string; + propExtendsB?: ModelWithString; +}; + +/** + * This is a model that extends another model + */ +export type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; +}; + +export type Default = { + name?: string; +}; + +/** + * This is a model that contains a some patterns + */ +export type ModelWithPattern = { + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: string; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; +}; + +export type ParameterActivityParams = { + description?: string; + graduate_id?: number; + organization_id?: number; + parent_activity?: number; + post_id?: number; +}; + +export type ResponsePostActivityResponse = { + description?: string; + graduate_id?: number; + organization_id?: number; + parent_activity_id?: number; + post_id?: number; +}; + +export type FailureFailure = { + error?: string; + message?: string; + reference_code?: string; +}; + +export type ServiceWithEmptyTagData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type PatchApiVbyApiVersionNoTagData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type PatchApiVbyApiVersionNoTagResponses = { + /** + * OK + */ + default: unknown; +}; + +export type FooWowData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type FooWowResponses = { + /** + * OK + */ + default: unknown; +}; + +export type DeleteCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type GetCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type HeadCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type OptionsCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PatchCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PostCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PutCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type CallWithDescriptionsData = { + body?: never; + path?: never; + query?: { + /** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ + parameterWithBreaks?: string; + /** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ + parameterWithBackticks?: string; + /** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ + parameterWithSlashes?: string; + /** + * Testing expression placeholders in string: ${expression} should work + */ + parameterWithExpressionPlaceholders?: string; + /** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ + parameterWithQuotes?: string; + /** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ + parameterWithReservedCharacters?: string; + }; + url: '/api/v{api-version}/descriptions/'; +}; + +export type CallWithParametersData = { + body?: never; + headers: { + /** + * This is the parameter that goes into the header + */ + parameterHeader: string; + }; + path: { + /** + * This is the parameter that goes into the path + */ + parameterPath: string; + /** + * api-version should be required in standalone clients + */ + 'api-version': string; + }; + query: { + /** + * This is the parameter that goes into the query params + */ + parameterQuery: string; + }; + url: '/api/v{api-version}/parameters/{parameterPath}'; +}; + +export type CallWithWeirdParameterNamesData = { + body?: never; + headers: { + /** + * This is the parameter that goes into the request header + */ + 'parameter.header': string; + }; + path: { + /** + * This is the parameter that goes into the path + */ + 'parameter.path.1'?: string; + /** + * This is the parameter that goes into the path + */ + 'parameter-path-2'?: string; + /** + * This is the parameter that goes into the path + */ + 'PARAMETER-PATH-3'?: string; + /** + * api-version should be required in standalone clients + */ + 'api-version': string; + }; + query: { + /** + * This is the parameter with a reserved keyword + */ + default?: string; + /** + * This is the parameter that goes into the request query params + */ + 'parameter-query': string; + }; + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}'; +}; + +export type CallWithDefaultParametersData = { + body?: never; + path?: never; + query: { + /** + * This is a simple string with default value + */ + parameterString: string; + /** + * This is a simple number with default value + */ + parameterNumber: number; + /** + * This is a simple boolean with default value + */ + parameterBoolean: boolean; + /** + * This is a simple enum with default value + */ + parameterEnum: 'Success' | 'Warning' | 'Error'; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type CallWithDefaultOptionalParametersData = { + body?: never; + path?: never; + query?: { + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type CallToTestOrderOfParamsData = { + body?: never; + path?: never; + query: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type DuplicateNameData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName2Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName3Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName4Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type CallWithNoContentResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no-content'; +}; + +export type CallWithNoContentResponseResponses = { + /** + * Success + */ + 204: unknown; +}; + +export type CallWithResponseAndNoContentResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/response-and-no-content'; +}; + +export type CallWithResponseAndNoContentResponseResponses = { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: unknown; +}; + +export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; + +export type DummyAData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/a'; +}; + +export type DummyAResponses = { + /** + * Success + */ + 204: unknown; +}; + +export type DummyBData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/b'; +}; + +export type DummyBResponses = { + /** + * Success + */ + 204: unknown; +}; + +export type CallWithResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithResponseResponses = { + /** + * Message for default response + */ + default: ModelWithString; +}; + +export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; + +export type CallWithDuplicateResponsesData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithDuplicateResponsesErrors = { + /** + * Message for 500 error + */ + 500: ModelWithStringError; + /** + * Message for 501 error + */ + 501: ModelWithStringError; + /** + * Message for 502 error + */ + 502: ModelWithStringError; + /** + * Message for default response + */ + default: ModelWithString; +}; + +export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; + +export type CallWithDuplicateResponsesResponses = { + /** + * Message for 201 response + */ + 201: ModelWithString; + /** + * Message for 202 response + */ + 202: ModelWithString; +}; + +export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; + +export type CallWithResponsesData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithResponsesErrors = { + /** + * Message for 500 error + */ + 500: ModelWithStringError; + /** + * Message for 501 error + */ + 501: ModelWithStringError; + /** + * Message for 502 error + */ + 502: ModelWithStringError; + /** + * Message for default response + */ + default: ModelWithString; +}; + +export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; + +export type CallWithResponsesResponses = { + /** + * Message for 200 response + */ + 200: { + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; + readonly value?: Array; + }; + /** + * Message for 201 response + */ + 201: ModelThatExtends; + /** + * Message for 202 response + */ + 202: ModelThatExtendsExtends; +}; + +export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; + +export type CollectionFormatData = { + body?: never; + path?: never; + query: { + /** + * This is an array parameter that is sent as csv format (comma-separated values) + */ + parameterArrayCSV: Array; + /** + * This is an array parameter that is sent as ssv format (space-separated values) + */ + parameterArraySSV: Array; + /** + * This is an array parameter that is sent as tsv format (tab-separated values) + */ + parameterArrayTSV: Array; + /** + * This is an array parameter that is sent as pipes format (pipe-separated values) + */ + parameterArrayPipes: Array; + /** + * This is an array parameter that is sent as multi format (multiple parameter instances) + */ + parameterArrayMulti: Array; + }; + url: '/api/v{api-version}/collectionFormat'; +}; + +export type TypesData = { + body?: never; + path?: { + /** + * This is a number parameter + */ + id?: number; + }; + query: { + /** + * This is a number parameter + */ + parameterNumber: number; + /** + * This is a string parameter + */ + parameterString: string; + /** + * This is a boolean parameter + */ + parameterBoolean: boolean; + /** + * This is an object parameter + */ + parameterObject: { + [key: string]: unknown; + }; + /** + * This is an array parameter + */ + parameterArray: Array; + /** + * This is a dictionary parameter + */ + parameterDictionary: { + [key: string]: unknown; + }; + /** + * This is an enum parameter + */ + parameterEnum: 'Success' | 'Warning' | 'Error'; + }; + url: '/api/v{api-version}/types'; +}; + +export type TypesResponses = { + /** + * Response is a simple number + */ + 200: number; + /** + * Response is a simple string + */ + 201: string; + /** + * Response is a simple boolean + */ + 202: boolean; + /** + * Response is a simple object + */ + 203: { + [key: string]: unknown; + }; +}; + +export type TypesResponse = TypesResponses[keyof TypesResponses]; + +export type ComplexTypesData = { + body?: never; + path?: never; + query: { + /** + * Parameter containing object + */ + parameterObject: { + first?: { + second?: { + third?: string; + }; + }; + }; + }; + url: '/api/v{api-version}/complex'; +}; + +export type ComplexTypesErrors = { + /** + * 400 server error + */ + 400: unknown; + /** + * 500 server error + */ + 500: unknown; +}; + +export type ComplexTypesResponses = { + /** + * Successful response + */ + 200: Array; +}; + +export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; + +export type CallWithResultFromHeaderData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/header'; +}; + +export type CallWithResultFromHeaderErrors = { + /** + * 400 server error + */ + 400: unknown; + /** + * 500 server error + */ + 500: unknown; +}; + +export type CallWithResultFromHeaderResponses = { + /** + * Successful response + */ + 200: unknown; +}; + +export type TestErrorCodeData = { + body?: never; + path?: never; + query: { + /** + * Status code to return + */ + status: string; + }; + url: '/api/v{api-version}/error'; +}; + +export type TestErrorCodeErrors = { + /** + * Custom message: Internal Server Error + */ + 500: unknown; + /** + * Custom message: Not Implemented + */ + 501: unknown; + /** + * Custom message: Bad Gateway + */ + 502: unknown; + /** + * Custom message: Service Unavailable + */ + 503: unknown; +}; + +export type TestErrorCodeResponses = { + /** + * Custom message: Successful response + */ + 200: unknown; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Data = { + body?: never; + path?: never; + query: { + /** + * Dummy input param + */ + nonAsciiParamæøåÆØÅöôêÊ: number; + }; + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串'; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { + /** + * Successful response + */ + 200: NonAsciiStringæøåÆøÅöôêÊ字符串; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; + +export type PostApiVbyApiVersionBodyData = { + /** + * Body should not be unknown + */ + body: ParameterActivityParams; + path?: never; + query?: never; + url: '/api/v{api-version}/body'; +}; + +export type PostApiVbyApiVersionBodyErrors = { + /** + * Bad Request + */ + 400: FailureFailure; + /** + * Internal Server Error + */ + 500: FailureFailure; +}; + +export type PostApiVbyApiVersionBodyError = PostApiVbyApiVersionBodyErrors[keyof PostApiVbyApiVersionBodyErrors]; + +export type PostApiVbyApiVersionBodyResponses = { + /** + * OK + */ + 200: ResponsePostActivityResponse; +}; + +export type PostApiVbyApiVersionBodyResponse = PostApiVbyApiVersionBodyResponses[keyof PostApiVbyApiVersionBodyResponses]; + +export type ClientOptions = { + baseUrl: 'http://localhost:3000/base' | (string & {}); +}; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts index 70aaf42e5..2ecee4fd0 100644 --- a/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/2.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts @@ -39,8 +39,9 @@ const createQueryKey = (id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -109,7 +111,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -140,7 +143,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -185,7 +189,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -216,7 +221,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -247,7 +253,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -278,15 +285,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -354,15 +363,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -371,7 +381,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -406,8 +416,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -416,15 +427,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -433,15 +445,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -450,15 +463,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -467,15 +481,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -484,15 +499,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -501,7 +517,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -546,15 +563,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -563,15 +581,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -580,15 +599,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -597,7 +617,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -628,7 +649,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -649,8 +670,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -659,7 +681,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -690,7 +713,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -109,7 +111,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -140,7 +143,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -185,7 +189,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -216,7 +221,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -247,7 +253,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -278,15 +285,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -354,15 +363,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -371,7 +381,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -406,8 +416,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -416,15 +427,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -433,15 +445,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -450,15 +463,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -467,15 +481,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -484,15 +499,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -501,7 +517,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -546,15 +563,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -563,15 +581,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -580,15 +599,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -597,7 +617,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -628,7 +649,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -649,8 +670,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -659,7 +681,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -690,7 +713,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -109,7 +111,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -140,7 +143,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -185,7 +189,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -216,7 +221,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -247,7 +253,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -278,15 +285,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -354,15 +363,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -371,7 +381,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -406,8 +416,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -416,15 +427,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -433,15 +445,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -450,15 +463,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -467,15 +481,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -484,15 +499,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -501,7 +517,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -546,15 +563,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -563,15 +581,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -580,15 +599,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -597,7 +617,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -628,7 +649,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -649,8 +670,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -659,7 +681,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -690,7 +713,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -109,7 +111,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -140,7 +143,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -185,7 +189,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -216,7 +221,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -247,7 +253,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -278,15 +285,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -354,15 +363,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -371,7 +381,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -406,8 +416,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -416,15 +427,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -433,15 +445,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -450,15 +463,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -467,15 +481,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -484,15 +499,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -501,7 +517,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -546,15 +563,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -563,15 +581,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -580,15 +599,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -597,7 +617,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -628,7 +649,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -649,8 +670,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -659,7 +681,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -690,7 +713,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const serviceWithEmptyTagQueryKey = (options?: Options) => createQueryKey('serviceWithEmptyTag', options); export const serviceWithEmptyTagOptions = (options?: Options) => { + const queryKey = serviceWithEmptyTagQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await serviceWithEmptyTag({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const serviceWithEmptyTagOptions = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -108,7 +110,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -139,7 +142,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -184,7 +188,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -215,7 +220,7 @@ export const callWithParametersOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -246,7 +252,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -277,15 +284,16 @@ export const callWithDefaultParametersOptions = (options: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -353,15 +362,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -370,7 +380,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -405,8 +415,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -415,15 +426,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -432,15 +444,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -449,15 +462,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -466,15 +480,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -483,15 +498,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -500,7 +516,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -545,15 +562,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -562,15 +580,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -579,15 +598,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -596,7 +616,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -627,7 +648,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -648,8 +669,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -658,7 +680,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => createQueryKey('postApiVbyApiVersionBody', options); export const postApiVbyApiVersionBodyOptions = (options: Options) => { + const queryKey = postApiVbyApiVersionBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionBody({ ...options, ...queryKey[0], @@ -689,7 +712,7 @@ export const postApiVbyApiVersionBodyOptions = (options: Options(id: string, options?: TOptions export const createQueryKey2 = (options?: Options) => createQueryKey('create', options); export const createOptions = (options?: Options) => { + const queryKey = createQueryKey2(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await create({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const createOptions = (options?: Options) => { }); return data; }, - queryKey: createQueryKey2(options) + queryKey }); }; 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 b93951b28..8a7333567 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 @@ -39,8 +39,9 @@ const createQueryKey = (id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options = [ + Pick & { + _id: string; + _infinite?: boolean; + } +]; + +const createQueryKey = (id: string, options?: TOptions, infinite?: boolean): [ + QueryKey[0] +] => { + const params: QueryKey[0] = { _id: id, baseUrl: (options?.client ?? _heyApiClient).getConfig().baseUrl } as QueryKey[0]; + if (infinite) { + params._infinite = infinite; + } + if (options?.body) { + params.body = options.body; + } + if (options?.headers) { + params.headers = options.headers; + } + if (options?.path) { + params.path = options.path; + } + if (options?.query) { + params.query = options.query; + } + return [ + params + ]; +}; + +export const exportQueryKey = (options?: Options) => createQueryKey('export', options); + +export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await export_({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await patchApiVbyApiVersionNoTag({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const importQueryKey = (options: Options) => createQueryKey('import', options); + +export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await import_({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const importMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await import_({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const fooWowMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await fooWow({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); + +export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await apiVVersionODataControllerCount({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); + +export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await getApiVbyApiVersionSimpleOperation({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await deleteCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); + +export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await getCallWithoutParametersAndResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const patchCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await patchCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const postCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); + +export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postCallWithoutParametersAndResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const putCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await putCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const deleteFooMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await deleteFoo({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); + +export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDescriptions({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDescriptionsMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDescriptions({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const deprecatedCallQueryKey = (options: Options) => createQueryKey('deprecatedCall', options); + +export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await deprecatedCall({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const deprecatedCallMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await deprecatedCall({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithParametersQueryKey = (options: Options) => createQueryKey('callWithParameters', options); + +export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +const createInfiniteParams = [0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey, page: K) => { + const params = queryKey[0]; + if (page.body) { + params.body = { + ...queryKey[0].body as any, + ...page.body as any + }; + } + if (page.headers) { + params.headers = { + ...queryKey[0].headers, + ...page.headers + }; + } + if (page.path) { + params.path = { + ...queryKey[0].path as any, + ...page.path as any + }; + } + if (page.query) { + params.query = { + ...queryKey[0].query as any, + ...page.query as any + }; + } + return params as unknown as typeof page; +}; + +export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); + +export const callWithParametersInfiniteOptions = (options: Options) => { + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + // @ts-ignore + { + queryFn: async ({ pageParam, signal }) => { + // @ts-ignore + const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { + query: { + cursor: pageParam + } + }; + const params = createInfiniteParams(queryKey, page); + const { data } = await callWithParameters({ + ...options, + ...params, + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithParametersMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithParameters({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithWeirdParameterNamesQueryKey = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); + +export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithWeirdParameterNames({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithWeirdParameterNamesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithWeirdParameterNames({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey('getCallWithOptionalParam', options); + +export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await getCallWithOptionalParam({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); + +export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + // @ts-ignore + { + queryFn: async ({ pageParam, signal }) => { + // @ts-ignore + const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { + query: { + page: pageParam + } + }; + const params = createInfiniteParams(queryKey, page); + const { data } = await getCallWithOptionalParam({ + ...options, + ...params, + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithOptionalParamQueryKey = (options: Options) => createQueryKey('postCallWithOptionalParam', options); + +export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postCallWithOptionalParam({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); + +export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + // @ts-ignore + { + queryFn: async ({ pageParam, signal }) => { + // @ts-ignore + const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { + body: { + offset: pageParam + } + }; + const params = createInfiniteParams(queryKey, page); + const { data } = await postCallWithOptionalParam({ + ...options, + ...params, + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithOptionalParamMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postCallWithOptionalParam({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const postApiVbyApiVersionRequestBodyQueryKey = (options?: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); + +export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postApiVbyApiVersionRequestBody({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postApiVbyApiVersionRequestBodyMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postApiVbyApiVersionRequestBody({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const postApiVbyApiVersionFormDataQueryKey = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); + +export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postApiVbyApiVersionFormData({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postApiVbyApiVersionFormDataMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postApiVbyApiVersionFormData({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey('callWithDefaultParameters', options); + +export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDefaultParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDefaultOptionalParametersQueryKey = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); + +export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDefaultOptionalParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDefaultOptionalParametersMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDefaultOptionalParameters({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callToTestOrderOfParamsMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callToTestOrderOfParams({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateNameMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateName2QueryKey = (options?: Options) => createQueryKey('duplicateName2', options); + +export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await duplicateName2({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); + +export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await duplicateName3({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const duplicateName3Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName3({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateName4Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName4({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey('callWithNoContentResponse', options); + +export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithNoContentResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); + +export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResponseAndNoContentResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const dummyAQueryKey = (options?: Options) => createQueryKey('dummyA', options); + +export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await dummyA({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); + +export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await dummyB({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); + +export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); + +export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDuplicateResponses({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDuplicateResponsesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDuplicateResponses({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithResponsesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithResponses({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const collectionFormatQueryKey = (options: Options) => createQueryKey('collectionFormat', options); + +export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await collectionFormat({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const typesQueryKey = (options: Options) => createQueryKey('types', options); + +export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await types({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); + +export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await uploadFile({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const uploadFileMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await uploadFile({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); + +export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await fileResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); + +export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await complexTypes({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); + +export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await multipartResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const multipartRequestQueryKey = (options?: Options) => createQueryKey('multipartRequest', options); + +export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await multipartRequest({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const multipartRequestMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await multipartRequest({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const complexParamsMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await complexParams({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); + +export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResultFromHeader({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResultFromHeaderMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithResultFromHeader({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const testErrorCodeQueryKey = (options: Options) => createQueryKey('testErrorCode', options); + +export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await testErrorCode({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const testErrorCodeMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await testErrorCode({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串QueryKey = (options: Options) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); + +export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const putWithFormUrlEncodedMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await putWithFormUrlEncoded({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts new file mode 100644 index 000000000..fdbaafa48 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { ClientOptions } from './types.gen'; +import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = (override?: Config) => Config & T>; + +export const client = createClient(createConfig({ + baseUrl: 'http://localhost:3000/base' +})); \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts new file mode 100644 index 000000000..e64537d21 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; +export * from './sdk.gen'; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts new file mode 100644 index 000000000..7f932711f --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts @@ -0,0 +1,409 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { type Options as ClientOptions, type TDataShape, type Client, formDataBodySerializer, urlSearchParamsBodySerializer } from '@hey-api/client-fetch'; +import type { ExportData, PatchApiVbyApiVersionNoTagData, ImportData, ImportResponse, FooWowData, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, OptionsCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DummyAData, DummyAResponse, DummyBData, DummyBResponse, CallWithResponseData, CallWithResponseResponse, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, CallWithResponsesData, CallWithResponsesResponse, CallWithResponsesError, CollectionFormatData, TypesData, TypesResponse, UploadFileData, UploadFileResponse, FileResponseData, FileResponseResponse, ComplexTypesData, ComplexTypesResponse, MultipartResponseData, MultipartResponseResponse, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from './types.gen'; +import { client as _heyApiClient } from './client.gen'; + +export type Options = ClientOptions & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +export const export_ = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const patchApiVbyApiVersionNoTag = (options?: Options) => { + return (options?.client ?? _heyApiClient).patch({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const import_ = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/no+tag', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const fooWow = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const apiVVersionODataControllerCount = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/simple/$count', + ...options + }); +}; + +export const getApiVbyApiVersionSimpleOperation = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/simple:operation', + ...options + }); +}; + +export const deleteCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const getCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const headCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).head({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const optionsCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).options({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const patchCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).patch({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const postCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const putCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const deleteFoo = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', + ...options + }); +}; + +export const callWithDescriptions = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/descriptions', + ...options + }); +}; + +/** + * @deprecated + */ +export const deprecatedCall = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters/deprecated', + ...options + }); +}; + +export const callWithParameters = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters/{parameterPath}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const callWithWeirdParameterNames = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const getCallWithOptionalParam = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/parameters', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postCallWithOptionalParam = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postApiVbyApiVersionRequestBody = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/requestBody', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postApiVbyApiVersionFormData = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...formDataBodySerializer, + url: '/api/v{api-version}/formData', + ...options, + headers: { + 'Content-Type': null, + ...options?.headers + } + }); +}; + +export const callWithDefaultParameters = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const callWithDefaultOptionalParameters = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const callToTestOrderOfParams = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const duplicateName = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName2 = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName3 = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName4 = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const callWithNoContentResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/no-content', + ...options + }); +}; + +export const callWithResponseAndNoContentResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + ...options + }); +}; + +export const dummyA = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/a', + ...options + }); +}; + +export const dummyB = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/b', + ...options + }); +}; + +export const callWithResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const callWithDuplicateResponses = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const callWithResponses = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const collectionFormat = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/collectionFormat', + ...options + }); +}; + +export const types = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/types', + ...options + }); +}; + +export const uploadFile = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + url: '/api/v{api-version}/upload', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +export const fileResponse = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/file/{id}', + ...options + }); +}; + +export const complexTypes = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/complex', + ...options + }); +}; + +export const multipartResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multipart', + ...options + }); +}; + +export const multipartRequest = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...formDataBodySerializer, + url: '/api/v{api-version}/multipart', + ...options, + headers: { + 'Content-Type': null, + ...options?.headers + } + }); +}; + +export const complexParams = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/complex/{id}', + ...options, + headers: { + 'Content-Type': 'application/json-patch+json', + ...options?.headers + } + }); +}; + +export const callWithResultFromHeader = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/header', + ...options + }); +}; + +export const testErrorCode = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/error', + ...options + }); +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + ...options + }); +}; + +/** + * Login User + */ +export const putWithFormUrlEncoded = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + ...urlSearchParamsBodySerializer, + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts new file mode 100644 index 000000000..91de98382 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts @@ -0,0 +1,1961 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * Model with number-only name + */ +export type _400 = string; + +/** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ +export type CamelCaseCommentWithBreaks = number; + +/** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ +export type CommentWithBreaks = number; + +/** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ +export type CommentWithBackticks = number; + +/** + * Testing backticks and quotes in string: `backticks`, 'quotes', "double quotes" and ```multiple backticks``` should work + */ +export type CommentWithBackticksAndQuotes = number; + +/** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ +export type CommentWithSlashes = number; + +/** + * Testing expression placeholders in string: ${expression} should work + */ +export type CommentWithExpressionPlaceholders = number; + +/** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ +export type CommentWithQuotes = number; + +/** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ +export type CommentWithReservedCharacters = number; + +/** + * This is a simple number + */ +export type SimpleInteger = number; + +/** + * This is a simple boolean + */ +export type SimpleBoolean = boolean; + +/** + * This is a simple string + */ +export type SimpleString = string; + +/** + * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串) + */ +export type NonAsciiStringæøåÆøÅöôêÊ字符串 = string; + +/** + * This is a simple file + */ +export type SimpleFile = Blob | File; + +/** + * This is a simple reference + */ +export type SimpleReference = ModelWithString; + +/** + * This is a simple string + */ +export type SimpleStringWithPattern = string | null; + +/** + * This is a simple enum with strings + */ +export type EnumWithStrings = 'Success' | 'Warning' | 'Error' | "'Single Quote'" | '"Double Quotes"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + +export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; + +/** + * This is a simple enum with numbers + */ +export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; + +/** + * Success=1,Warning=2,Error=3 + */ +export type EnumFromDescription = number; + +/** + * This is a simple enum with numbers + */ +export type EnumWithExtensions = 200 | 400 | 500; + +export type EnumWithXEnumNames = 0 | 1 | 2; + +/** + * This is a simple array with numbers + */ +export type ArrayWithNumbers = Array; + +/** + * This is a simple array with booleans + */ +export type ArrayWithBooleans = Array; + +/** + * This is a simple array with strings + */ +export type ArrayWithStrings = Array; + +/** + * This is a simple array with references + */ +export type ArrayWithReferences = Array; + +/** + * This is a simple array containing an array + */ +export type ArrayWithArray = Array>; + +/** + * This is a simple array with properties + */ +export type ArrayWithProperties = Array<{ + '16x16'?: CamelCaseCommentWithBreaks; + bar?: string; +}>; + +/** + * This is a simple array with any of properties + */ +export type ArrayWithAnyOfProperties = Array<{ + foo?: string; +} | { + bar?: string; +}>; + +export type AnyOfAnyAndNull = { + data?: unknown; +}; + +/** + * This is a simple array with any of properties + */ +export type AnyOfArrays = { + results?: Array<{ + foo?: string; + } | { + bar?: string; + }>; +}; + +/** + * This is a string dictionary + */ +export type DictionaryWithString = { + [key: string]: string; +}; + +export type DictionaryWithPropertiesAndAdditionalProperties = { + foo?: number; + bar?: boolean; + [key: string]: string | number | boolean | undefined; +}; + +/** + * This is a string reference + */ +export type DictionaryWithReference = { + [key: string]: ModelWithString; +}; + +/** + * This is a complex dictionary + */ +export type DictionaryWithArray = { + [key: string]: Array; +}; + +/** + * This is a string dictionary + */ +export type DictionaryWithDictionary = { + [key: string]: { + [key: string]: string; + }; +}; + +/** + * This is a complex dictionary + */ +export type DictionaryWithProperties = { + [key: string]: { + foo?: string; + bar?: string; + }; +}; + +/** + * This is a model with one number property + */ +export type ModelWithInteger = { + /** + * This is a simple number property + */ + prop?: number; +}; + +/** + * This is a model with one boolean property + */ +export type ModelWithBoolean = { + /** + * This is a simple boolean property + */ + prop?: boolean; +}; + +/** + * This is a model with one string property + */ +export type ModelWithString = { + /** + * This is a simple string property + */ + prop?: string; +}; + +/** + * This is a model with one string property + */ +export type ModelWithStringError = { + /** + * This is a simple string property + */ + prop?: string; +}; + +/** + * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets) + */ +export type ModelFromZendesk = string; + +/** + * This is a model with one string property + */ +export type ModelWithNullableString = { + /** + * This is a simple string property + */ + nullableProp1?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp1: string | null; + /** + * This is a simple string property + */ + nullableProp2?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp2: string | null; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; +}; + +/** + * This is a model with one enum + */ +export type ModelWithEnum = { + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: true; +}; + +/** + * This is a model with one enum with escaped name + */ +export type ModelWithEnumWithHyphen = { + 'foo-bar-baz-qux'?: '3.0'; +}; + +/** + * This is a model with one enum + */ +export type ModelWithEnumFromDescription = { + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; +}; + +/** + * This is a model with nested enums + */ +export type ModelWithNestedEnums = { + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; +}; + +/** + * This is a model with one property containing a reference + */ +export type ModelWithReference = { + prop?: ModelWithProperties; +}; + +/** + * This is a model with one property containing an array + */ +export type ModelWithArrayReadOnlyAndWriteOnly = { + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; +}; + +/** + * This is a model with one property containing an array + */ +export type ModelWithArray = { + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; +}; + +/** + * This is a model with one property containing a dictionary + */ +export type ModelWithDictionary = { + prop?: { + [key: string]: string; + }; +}; + +/** + * This is a deprecated model with a deprecated property + * @deprecated + */ +export type DeprecatedModel = { + /** + * This is a deprecated property + * @deprecated + */ + prop?: string; +}; + +/** + * This is a model with one property containing a circular reference + */ +export type ModelWithCircularReference = { + prop?: ModelWithCircularReference; +}; + +/** + * This is a model with one property with a 'one of' relationship + */ +export type CompositionWithOneOf = { + propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; +}; + +/** + * This is a model with one property with a 'one of' relationship where the options are not $ref + */ +export type CompositionWithOneOfAnonymous = { + propA?: { + propA?: string; + } | string | number; +}; + +/** + * Circle + */ +export type ModelCircle = { + kind: string; + radius?: number; +}; + +/** + * Square + */ +export type ModelSquare = { + kind: string; + sideLength?: number; +}; + +/** + * This is a model with one property with a 'one of' relationship where the options are not $ref + */ +export type CompositionWithOneOfDiscriminator = ({ + kind?: 'circle'; +} & ModelCircle) | ({ + kind?: 'square'; +} & ModelSquare); + +/** + * This is a model with one property with a 'any of' relationship + */ +export type CompositionWithAnyOf = { + propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; +}; + +/** + * This is a model with one property with a 'any of' relationship where the options are not $ref + */ +export type CompositionWithAnyOfAnonymous = { + propA?: { + propA?: string; + } | string | number; +}; + +/** + * This is a model with nested 'any of' property with a type null + */ +export type CompositionWithNestedAnyAndTypeNull = { + propA?: Array | Array; +}; + +export type _3eNum1Период = 'Bird' | 'Dog'; + +export type ConstValue = 'ConstValue'; + +/** + * This is a model with one property with a 'any of' relationship where the options are not $ref + */ +export type CompositionWithNestedAnyOfAndNull = { + propA?: Array<_3eNum1Период | ConstValue> | null; +}; + +/** + * This is a model with one property with a 'one of' relationship + */ +export type CompositionWithOneOfAndNullable = { + propA?: { + boolean?: boolean; + } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null; +}; + +/** + * This is a model that contains a simple dictionary within composition + */ +export type CompositionWithOneOfAndSimpleDictionary = { + propA?: boolean | { + [key: string]: number; + }; +}; + +/** + * This is a model that contains a dictionary of simple arrays within composition + */ +export type CompositionWithOneOfAndSimpleArrayDictionary = { + propA?: boolean | { + [key: string]: Array; + }; +}; + +/** + * This is a model that contains a dictionary of complex arrays (composited) within composition + */ +export type CompositionWithOneOfAndComplexArrayDictionary = { + propA?: boolean | { + [key: string]: Array; + }; +}; + +/** + * This is a model with one property with a 'all of' relationship + */ +export type CompositionWithAllOfAndNullable = { + propA?: ({ + boolean?: boolean; + } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null; +}; + +/** + * This is a model with one property with a 'any of' relationship + */ +export type CompositionWithAnyOfAndNullable = { + propA?: { + boolean?: boolean; + } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null; +}; + +/** + * This is a base model with two simple optional properties + */ +export type CompositionBaseModel = { + firstName?: string; + lastname?: string; +}; + +/** + * This is a model that extends the base model + */ +export type CompositionExtendedModel = CompositionBaseModel & { + age: number; + firstName: string; + lastname: string; +}; + +/** + * This is a model with one nested property + */ +export type ModelWithProperties = { + required: string; + readonly requiredAndReadOnly: string; + requiredAndNullable: string | null; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; +}; + +/** + * This is a model with one nested property + */ +export type ModelWithNestedProperties = { + readonly first: { + readonly second: { + readonly third: string | null; + } | null; + } | null; +}; + +/** + * This is a model with duplicated properties + */ +export type ModelWithDuplicateProperties = { + prop?: ModelWithString; +}; + +/** + * This is a model with ordered properties + */ +export type ModelWithOrderedProperties = { + zebra?: string; + apple?: string; + hawaii?: string; +}; + +/** + * This is a model with duplicated imports + */ +export type ModelWithDuplicateImports = { + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; +}; + +/** + * This is a model that extends another model + */ +export type ModelThatExtends = ModelWithString & { + propExtendsA?: string; + propExtendsB?: ModelWithString; +}; + +/** + * This is a model that extends another model + */ +export type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; +}; + +/** + * This is a model that contains a some patterns + */ +export type ModelWithPattern = { + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: string; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; +}; + +export type File = { + readonly id?: string; + readonly updated_at?: string; + readonly created_at?: string; + mime: string; + readonly file?: string; +}; + +export type Default = { + name?: string; +}; + +export type Pageable = { + page?: number; + size?: number; + sort?: Array; +}; + +/** + * This is a free-form object without additionalProperties. + */ +export type FreeFormObjectWithoutAdditionalProperties = { + [key: string]: unknown; +}; + +/** + * This is a free-form object with additionalProperties: true. + */ +export type FreeFormObjectWithAdditionalPropertiesEqTrue = { + [key: string]: unknown; +}; + +/** + * This is a free-form object with additionalProperties: {}. + */ +export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {}; + +export type ModelWithConst = { + String?: 'String'; + number?: 0; + null?: unknown; + withType?: 'Some string'; +}; + +/** + * This is a model with one property and additionalProperties: true + */ +export type ModelWithAdditionalPropertiesEqTrue = { + /** + * This is a simple string property + */ + prop?: string; + [key: string]: unknown | string | undefined; +}; + +export type NestedAnyOfArraysNullable = { + nullableArray?: Array | null; +}; + +export type CompositionWithOneOfAndProperties = ({ + foo: SimpleParameter; +} | { + bar: NonAsciiStringæøåÆøÅöôêÊ字符串; +}) & { + baz: number | null; + qux: number; +}; + +/** + * An object that can be null + */ +export type NullableObject = { + foo?: string; +} | null; + +/** + * Some % character + */ +export type CharactersInDescription = string; + +export type ModelWithNullableObject = { + data?: NullableObject; +}; + +export type ModelWithOneOfEnum = { + foo: 'Bar'; +} | { + foo: 'Baz'; +} | { + foo: 'Qux'; +} | { + content: string; + foo: 'Quux'; +} | { + content: [ + string, + string + ]; + foo: 'Corge'; +}; + +export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; + +export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; + +export type ModelWithNestedArrayEnumsData = { + foo?: Array; + bar?: Array; +}; + +export type ModelWithNestedArrayEnums = { + array_strings?: Array; + data?: ModelWithNestedArrayEnumsData; +}; + +export type ModelWithNestedCompositionEnums = { + foo?: ModelWithNestedArrayEnumsDataFoo; +}; + +export type ModelWithReadOnlyAndWriteOnly = { + foo: string; + readonly bar: string; + baz: string; +}; + +export type ModelWithConstantSizeArray = [ + number, + number +]; + +export type ModelWithAnyOfConstantSizeArray = [ + number | string, + number | string, + number | string +]; + +export type ModelWithPrefixItemsConstantSizeArray = Array; + +export type ModelWithAnyOfConstantSizeArrayNullable = [ + number | null | string, + number | null | string, + number | null | string +]; + +export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ + number | Import, + number | Import +]; + +export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ + number & string, + number & string +]; + +export type ModelWithNumericEnumUnion = { + /** + * Период + */ + value?: -10 | -1 | 0 | 1 | 3 | 6 | 12; +}; + +/** + * Some description with `back ticks` + */ +export type ModelWithBackticksInDescription = { + /** + * The template `that` should be used for parsing and importing the contents of the CSV file. + * + *

There is one placeholder currently supported:

  • ${x} - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)

Example of a correct JSON template:

+ *
+     * [
+     * {
+     * "resourceType": "Asset",
+     * "identifier": {
+     * "name": "${1}",
+     * "domain": {
+     * "name": "${2}",
+     * "community": {
+     * "name": "Some Community"
+     * }
+     * }
+     * },
+     * "attributes" : {
+     * "00000000-0000-0000-0000-000000003115" : [ {
+     * "value" : "${3}"
+     * } ],
+     * "00000000-0000-0000-0000-000000000222" : [ {
+     * "value" : "${4}"
+     * } ]
+     * }
+     * }
+     * ]
+     * 
+ */ + template?: string; +}; + +export type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & { + baz: number | null; + qux: number; +}; + +/** + * Model used to test deduplication strategy (unused) + */ +export type ParameterSimpleParameterUnused = string; + +/** + * Model used to test deduplication strategy + */ +export type PostServiceWithEmptyTagResponse = string; + +/** + * Model used to test deduplication strategy + */ +export type PostServiceWithEmptyTagResponse2 = string; + +/** + * Model used to test deduplication strategy + */ +export type DeleteFooData = string; + +/** + * Model used to test deduplication strategy + */ +export type DeleteFooData2 = string; + +/** + * Model with restricted keyword name + */ +export type Import = string; + +export type SchemaWithFormRestrictedKeys = { + description?: string; + 'x-enum-descriptions'?: string; + 'x-enum-varnames'?: string; + 'x-enumNames'?: string; + title?: string; + object?: { + description?: string; + 'x-enum-descriptions'?: string; + 'x-enum-varnames'?: string; + 'x-enumNames'?: string; + title?: string; + }; + array?: Array<{ + description?: string; + 'x-enum-descriptions'?: string; + 'x-enum-varnames'?: string; + 'x-enumNames'?: string; + title?: string; + }>; +}; + +/** + * This schema was giving PascalCase transformations a hard time + */ +export type IoK8sApimachineryPkgApisMetaV1DeleteOptions = { + /** + * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. + */ + preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions; +}; + +/** + * This schema was giving PascalCase transformations a hard time + */ +export type IoK8sApimachineryPkgApisMetaV1Preconditions = { + /** + * Specifies the target ResourceVersion + */ + resourceVersion?: string; + /** + * Specifies the target UID. + */ + uid?: string; +}; + +export type AdditionalPropertiesUnknownIssue = { + [key: string]: string | number; +}; + +export type AdditionalPropertiesUnknownIssue2 = { + [key: string]: string | number; +}; + +export type AdditionalPropertiesUnknownIssue3 = string & { + entries: { + [key: string]: AdditionalPropertiesUnknownIssue; + }; +}; + +export type AdditionalPropertiesIntegerIssue = { + value: number; + [key: string]: number; +}; + +export type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString; + +export type GenericSchemaDuplicateIssue1SystemBoolean = { + item?: boolean; + error?: string | null; + readonly hasError?: boolean; + data?: { + [key: string]: never; + }; +}; + +export type GenericSchemaDuplicateIssue1SystemString = { + item?: string | null; + error?: string | null; + readonly hasError?: boolean; +}; + +/** + * This is a reusable parameter + */ +export type SimpleParameter = string; + +/** + * Parameter with illegal characters + */ +export type XFooBar = ModelWithString; + +export type SimpleRequestBody = ModelWithString; + +export type SimpleFormData = ModelWithString; + +export type ExportData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type PatchApiVbyApiVersionNoTagData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type PatchApiVbyApiVersionNoTagResponses = { + /** + * OK + */ + default: unknown; +}; + +export type ImportData = { + body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type ImportResponses = { + /** + * Success + */ + 200: ModelFromZendesk; + /** + * Default success response + */ + default: ModelWithReadOnlyAndWriteOnly; +}; + +export type ImportResponse = ImportResponses[keyof ImportResponses]; + +export type FooWowData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type FooWowResponses = { + /** + * OK + */ + default: unknown; +}; + +export type ApiVVersionODataControllerCountData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple/$count'; +}; + +export type ApiVVersionODataControllerCountResponses = { + /** + * Success + */ + 200: ModelFromZendesk; +}; + +export type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses]; + +export type GetApiVbyApiVersionSimpleOperationData = { + body?: never; + path: { + /** + * foo in method + */ + foo_param: string; + }; + query?: never; + url: '/api/v{api-version}/simple:operation'; +}; + +export type GetApiVbyApiVersionSimpleOperationErrors = { + /** + * Default error response + */ + default: ModelWithBoolean; +}; + +export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; + +export type GetApiVbyApiVersionSimpleOperationResponses = { + /** + * Response is a simple number + */ + 200: number; +}; + +export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; + +export type DeleteCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type GetCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type HeadCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type OptionsCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PatchCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PostCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PutCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type DeleteFooData3 = { + body?: never; + headers: { + /** + * Parameter with illegal characters + */ + 'x-Foo-Bar': ModelWithString; + }; + path: { + /** + * foo in method + */ + foo_param: string; + /** + * bar in method + */ + BarParam: string; + }; + query?: never; + url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}'; +}; + +export type CallWithDescriptionsData = { + body?: never; + path?: never; + query?: { + /** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ + parameterWithBreaks?: string; + /** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ + parameterWithBackticks?: string; + /** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ + parameterWithSlashes?: string; + /** + * Testing expression placeholders in string: ${expression} should work + */ + parameterWithExpressionPlaceholders?: string; + /** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ + parameterWithQuotes?: string; + /** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ + parameterWithReservedCharacters?: string; + }; + url: '/api/v{api-version}/descriptions'; +}; + +export type DeprecatedCallData = { + body?: never; + headers: { + /** + * This parameter is deprecated + * @deprecated + */ + parameter: DeprecatedModel | null; + }; + path?: never; + query?: never; + url: '/api/v{api-version}/parameters/deprecated'; +}; + +export type CallWithParametersData = { + /** + * This is the parameter that goes into the body + */ + body: { + [key: string]: unknown; + } | null; + headers: { + /** + * This is the parameter that goes into the header + */ + parameterHeader: string | null; + }; + path: { + /** + * This is the parameter that goes into the path + */ + parameterPath: string | null; + /** + * api-version should be required in standalone clients + */ + 'api-version': string | null; + }; + query: { + foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo; + foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo; + /** + * This is the parameter that goes into the query params + */ + cursor: string | null; + }; + url: '/api/v{api-version}/parameters/{parameterPath}'; +}; + +export type CallWithWeirdParameterNamesData = { + /** + * This is the parameter that goes into the body + */ + body: ModelWithString | null; + headers: { + /** + * This is the parameter that goes into the request header + */ + 'parameter.header': string | null; + }; + path: { + /** + * This is the parameter that goes into the path + */ + 'parameter.path.1'?: string; + /** + * This is the parameter that goes into the path + */ + 'parameter-path-2'?: string; + /** + * This is the parameter that goes into the path + */ + 'PARAMETER-PATH-3'?: string; + /** + * api-version should be required in standalone clients + */ + 'api-version': string | null; + }; + query: { + /** + * This is the parameter with a reserved keyword + */ + default?: string; + /** + * This is the parameter that goes into the request query params + */ + 'parameter-query': string | null; + }; + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}'; +}; + +export type GetCallWithOptionalParamData = { + /** + * This is a required parameter + */ + body: ModelWithOneOfEnum; + path?: never; + query?: { + /** + * This is an optional parameter + */ + page?: number; + }; + url: '/api/v{api-version}/parameters'; +}; + +export type PostCallWithOptionalParamData = { + /** + * This is an optional parameter + */ + body?: { + offset?: number | null; + }; + path?: never; + query: { + /** + * This is a required parameter + */ + parameter: Pageable; + }; + url: '/api/v{api-version}/parameters'; +}; + +export type PostCallWithOptionalParamResponses = { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: void; +}; + +export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; + +export type PostApiVbyApiVersionRequestBodyData = { + /** + * A reusable request body + */ + body?: SimpleRequestBody; + path?: never; + query?: { + /** + * This is a reusable parameter + */ + parameter?: string; + }; + url: '/api/v{api-version}/requestBody'; +}; + +export type PostApiVbyApiVersionFormDataData = { + /** + * A reusable request body + */ + body?: SimpleFormData; + path?: never; + query?: { + /** + * This is a reusable parameter + */ + parameter?: string; + }; + url: '/api/v{api-version}/formData'; +}; + +export type CallWithDefaultParametersData = { + body?: never; + path?: never; + query?: { + /** + * This is a simple string with default value + */ + parameterString?: string | null; + /** + * This is a simple number with default value + */ + parameterNumber?: number | null; + /** + * This is a simple boolean with default value + */ + parameterBoolean?: boolean | null; + /** + * This is a simple enum with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel?: ModelWithString | null; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type CallWithDefaultOptionalParametersData = { + body?: never; + path?: never; + query?: { + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel?: ModelWithString; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type CallToTestOrderOfParamsData = { + body?: never; + path?: never; + query: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type DuplicateNameData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName2Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName3Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName4Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type CallWithNoContentResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no-content'; +}; + +export type CallWithNoContentResponseResponses = { + /** + * Success + */ + 204: void; +}; + +export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; + +export type CallWithResponseAndNoContentResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/response-and-no-content'; +}; + +export type CallWithResponseAndNoContentResponseResponses = { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: void; +}; + +export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; + +export type DummyAData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/a'; +}; + +export type DummyAResponses = { + 200: _400; +}; + +export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; + +export type DummyBData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/b'; +}; + +export type DummyBResponses = { + /** + * Success + */ + 204: void; +}; + +export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; + +export type CallWithResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithResponseResponses = { + default: Import; +}; + +export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; + +export type CallWithDuplicateResponsesData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithDuplicateResponsesErrors = { + /** + * Message for 500 error + */ + 500: ModelWithStringError; + /** + * Message for 501 error + */ + 501: ModelWithStringError; + /** + * Message for 502 error + */ + 502: ModelWithStringError; + /** + * Message for 4XX errors + */ + '4XX': DictionaryWithArray; + /** + * Default error response + */ + default: ModelWithBoolean; +}; + +export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; + +export type CallWithDuplicateResponsesResponses = { + /** + * Message for 200 response + */ + 200: ModelWithBoolean & ModelWithInteger; + /** + * Message for 201 response + */ + 201: ModelWithString; + /** + * Message for 202 response + */ + 202: ModelWithString; +}; + +export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; + +export type CallWithResponsesData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithResponsesErrors = { + /** + * Message for 500 error + */ + 500: ModelWithStringError; + /** + * Message for 501 error + */ + 501: ModelWithStringError; + /** + * Message for 502 error + */ + 502: ModelWithStringError; + /** + * Message for default response + */ + default: ModelWithStringError; +}; + +export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; + +export type CallWithResponsesResponses = { + /** + * Message for 200 response + */ + 200: { + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; + readonly value?: Array; + }; + /** + * Message for 201 response + */ + 201: ModelThatExtends; + /** + * Message for 202 response + */ + 202: ModelThatExtendsExtends; +}; + +export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; + +export type CollectionFormatData = { + body?: never; + path?: never; + query: { + /** + * This is an array parameter that is sent as csv format (comma-separated values) + */ + parameterArrayCSV: Array | null; + /** + * This is an array parameter that is sent as ssv format (space-separated values) + */ + parameterArraySSV: Array | null; + /** + * This is an array parameter that is sent as tsv format (tab-separated values) + */ + parameterArrayTSV: Array | null; + /** + * This is an array parameter that is sent as pipes format (pipe-separated values) + */ + parameterArrayPipes: Array | null; + /** + * This is an array parameter that is sent as multi format (multiple parameter instances) + */ + parameterArrayMulti: Array | null; + }; + url: '/api/v{api-version}/collectionFormat'; +}; + +export type TypesData = { + body?: never; + path?: { + /** + * This is a number parameter + */ + id?: number; + }; + query: { + /** + * This is a number parameter + */ + parameterNumber: number; + /** + * This is a string parameter + */ + parameterString: string | null; + /** + * This is a boolean parameter + */ + parameterBoolean: boolean | null; + /** + * This is an object parameter + */ + parameterObject: { + [key: string]: unknown; + } | null; + /** + * This is an array parameter + */ + parameterArray: Array | null; + /** + * This is a dictionary parameter + */ + parameterDictionary: { + [key: string]: unknown; + } | null; + /** + * This is an enum parameter + */ + parameterEnum: 'Success' | 'Warning' | 'Error'; + }; + url: '/api/v{api-version}/types'; +}; + +export type TypesResponses = { + /** + * Response is a simple number + */ + 200: number; + /** + * Response is a simple string + */ + 201: string; + /** + * Response is a simple boolean + */ + 202: boolean; + /** + * Response is a simple object + */ + 203: { + [key: string]: unknown; + }; +}; + +export type TypesResponse = TypesResponses[keyof TypesResponses]; + +export type UploadFileData = { + body: Blob | File; + path: { + /** + * api-version should be required in standalone clients + */ + 'api-version': string | null; + }; + query?: never; + url: '/api/v{api-version}/upload'; +}; + +export type UploadFileResponses = { + 200: boolean; +}; + +export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; + +export type FileResponseData = { + body?: never; + path: { + id: string; + /** + * api-version should be required in standalone clients + */ + 'api-version': string; + }; + query?: never; + url: '/api/v{api-version}/file/{id}'; +}; + +export type FileResponseResponses = { + /** + * Success + */ + 200: Blob | File; +}; + +export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; + +export type ComplexTypesData = { + body?: never; + path?: never; + query: { + /** + * Parameter containing object + */ + parameterObject: { + first?: { + second?: { + third?: string; + }; + }; + }; + /** + * Parameter containing reference + */ + parameterReference: ModelWithString; + }; + url: '/api/v{api-version}/complex'; +}; + +export type ComplexTypesErrors = { + /** + * 400 `server` error + */ + 400: unknown; + /** + * 500 server error + */ + 500: unknown; +}; + +export type ComplexTypesResponses = { + /** + * Successful response + */ + 200: Array; +}; + +export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; + +export type MultipartResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multipart'; +}; + +export type MultipartResponseResponses = { + /** + * OK + */ + 200: { + file?: Blob | File; + metadata?: { + foo?: string; + bar?: string; + }; + }; +}; + +export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; + +export type MultipartRequestData = { + body?: { + content?: Blob | File; + data?: ModelWithString | null; + }; + path?: never; + query?: never; + url: '/api/v{api-version}/multipart'; +}; + +export type ComplexParamsData = { + body?: { + readonly key: string | null; + name: string | null; + enabled?: boolean; + type: 'Monkey' | 'Horse' | 'Bird'; + listOfModels?: Array | null; + listOfStrings?: Array | null; + parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + readonly user?: { + readonly id?: number; + readonly name?: string | null; + }; + }; + path: { + id: number; + /** + * api-version should be required in standalone clients + */ + 'api-version': string; + }; + query?: never; + url: '/api/v{api-version}/complex/{id}'; +}; + +export type ComplexParamsResponses = { + /** + * Success + */ + 200: ModelWithString; +}; + +export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; + +export type CallWithResultFromHeaderData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/header'; +}; + +export type CallWithResultFromHeaderErrors = { + /** + * 400 server error + */ + 400: unknown; + /** + * 500 server error + */ + 500: unknown; +}; + +export type CallWithResultFromHeaderResponses = { + /** + * Successful response + */ + 200: unknown; +}; + +export type TestErrorCodeData = { + body?: never; + path?: never; + query: { + /** + * Status code to return + */ + status: number; + }; + url: '/api/v{api-version}/error'; +}; + +export type TestErrorCodeErrors = { + /** + * Custom message: Internal Server Error + */ + 500: unknown; + /** + * Custom message: Not Implemented + */ + 501: unknown; + /** + * Custom message: Bad Gateway + */ + 502: unknown; + /** + * Custom message: Service Unavailable + */ + 503: unknown; +}; + +export type TestErrorCodeResponses = { + /** + * Custom message: Successful response + */ + 200: unknown; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Data = { + body?: never; + path?: never; + query: { + /** + * Dummy input param + */ + nonAsciiParamæøåÆØÅöôêÊ: number; + }; + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串'; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { + /** + * Successful response + */ + 200: Array; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; + +export type PutWithFormUrlEncodedData = { + body: ArrayWithStrings; + path?: never; + query?: never; + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串'; +}; + +export type ClientOptions = { + baseUrl: 'http://localhost:3000/base' | (string & {}); +}; \ No newline at end of file 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 b4ecaeb19..2fc37229b 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 @@ -39,8 +39,9 @@ const createQueryKey = (id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const createQueryKey2 = (options?: Options) => createQueryKey('create', options); export const createOptions = (options?: Options) => { + const queryKey = createQueryKey2(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await create({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const createOptions = (options?: Options) => { }); return data; }, - queryKey: createQueryKey2(options) + queryKey }); }; diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/pagination-ref-any-of/@tanstack/react-query.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/pagination-ref-any-of/@tanstack/react-query.gen.ts index 975c60353..aa6eec413 100644 --- a/packages/openapi-ts/test/__snapshots__/3.1.x/pagination-ref-any-of/@tanstack/react-query.gen.ts +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/pagination-ref-any-of/@tanstack/react-query.gen.ts @@ -39,8 +39,9 @@ const createQueryKey = (id: string, options?: TOptions export const postFooQueryKey = (options: Options) => createQueryKey('postFoo', options); export const postFooOptions = (options: Options) => { + const queryKey = postFooQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postFoo({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const postFooOptions = (options: Options) => { }); return data; }, - queryKey: postFooQueryKey(options) + queryKey }); }; @@ -85,10 +86,11 @@ const createInfiniteParams = [0], 'body' | 'hea export const postFooInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('postFoo', options, true); export const postFooInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postFooInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -104,7 +106,7 @@ export const postFooInfiniteOptions = (options: Options) => { }); return data; }, - queryKey: postFooInfiniteQueryKey(options) + queryKey: 'queryKey' }); }; 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 b93951b28..8a7333567 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 @@ -39,8 +39,9 @@ const createQueryKey = (id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options = [ + Pick & { + _id: string; + _infinite?: boolean; + } +]; + +const createQueryKey = (id: string, options?: TOptions, infinite?: boolean): [ + QueryKey[0] +] => { + const params: QueryKey[0] = { _id: id, baseUrl: (options?.client ?? _heyApiClient).getConfig().baseUrl } as QueryKey[0]; + if (infinite) { + params._infinite = infinite; + } + if (options?.body) { + params.body = options.body; + } + if (options?.headers) { + params.headers = options.headers; + } + if (options?.path) { + params.path = options.path; + } + if (options?.query) { + params.query = options.query; + } + return [ + params + ]; +}; + +export const exportQueryKey = (options?: Options) => createQueryKey('export', options); + +export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await export_({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const patchApiVbyApiVersionNoTagMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await patchApiVbyApiVersionNoTag({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const importQueryKey = (options: Options) => createQueryKey('import', options); + +export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await import_({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const importMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await import_({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const fooWowMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await fooWow({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); + +export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await apiVVersionODataControllerCount({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const getApiVbyApiVersionSimpleOperationQueryKey = (options: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); + +export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await getApiVbyApiVersionSimpleOperation({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const deleteCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await deleteCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const getCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); + +export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await getCallWithoutParametersAndResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const patchCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await patchCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const postCallWithoutParametersAndResponseQueryKey = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); + +export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postCallWithoutParametersAndResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const putCallWithoutParametersAndResponseMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await putCallWithoutParametersAndResponse({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const deleteFooMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await deleteFoo({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); + +export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDescriptions({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDescriptionsMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDescriptions({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const deprecatedCallQueryKey = (options: Options) => createQueryKey('deprecatedCall', options); + +export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await deprecatedCall({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const deprecatedCallMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await deprecatedCall({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithParametersQueryKey = (options: Options) => createQueryKey('callWithParameters', options); + +export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +const createInfiniteParams = [0], 'body' | 'headers' | 'path' | 'query'>>(queryKey: QueryKey, page: K) => { + const params = queryKey[0]; + if (page.body) { + params.body = { + ...queryKey[0].body as any, + ...page.body as any + }; + } + if (page.headers) { + params.headers = { + ...queryKey[0].headers, + ...page.headers + }; + } + if (page.path) { + params.path = { + ...queryKey[0].path as any, + ...page.path as any + }; + } + if (page.query) { + params.query = { + ...queryKey[0].query as any, + ...page.query as any + }; + } + return params as unknown as typeof page; +}; + +export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); + +export const callWithParametersInfiniteOptions = (options: Options) => { + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + // @ts-ignore + { + queryFn: async ({ pageParam, signal }) => { + // @ts-ignore + const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { + query: { + cursor: pageParam + } + }; + const params = createInfiniteParams(queryKey, page); + const { data } = await callWithParameters({ + ...options, + ...params, + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithParametersMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithParameters({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithWeirdParameterNamesQueryKey = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); + +export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithWeirdParameterNames({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithWeirdParameterNamesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithWeirdParameterNames({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const getCallWithOptionalParamQueryKey = (options: Options) => createQueryKey('getCallWithOptionalParam', options); + +export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await getCallWithOptionalParam({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const getCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); + +export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + // @ts-ignore + { + queryFn: async ({ pageParam, signal }) => { + // @ts-ignore + const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { + query: { + page: pageParam + } + }; + const params = createInfiniteParams(queryKey, page); + const { data } = await getCallWithOptionalParam({ + ...options, + ...params, + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithOptionalParamQueryKey = (options: Options) => createQueryKey('postCallWithOptionalParam', options); + +export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postCallWithOptionalParam({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithOptionalParamInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); + +export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + // @ts-ignore + { + queryFn: async ({ pageParam, signal }) => { + // @ts-ignore + const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { + body: { + offset: pageParam + } + }; + const params = createInfiniteParams(queryKey, page); + const { data } = await postCallWithOptionalParam({ + ...options, + ...params, + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postCallWithOptionalParamMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postCallWithOptionalParam({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const postApiVbyApiVersionRequestBodyQueryKey = (options?: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); + +export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postApiVbyApiVersionRequestBody({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postApiVbyApiVersionRequestBodyMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postApiVbyApiVersionRequestBody({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const postApiVbyApiVersionFormDataQueryKey = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); + +export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await postApiVbyApiVersionFormData({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const postApiVbyApiVersionFormDataMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await postApiVbyApiVersionFormData({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithDefaultParametersQueryKey = (options?: Options) => createQueryKey('callWithDefaultParameters', options); + +export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDefaultParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDefaultOptionalParametersQueryKey = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); + +export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDefaultOptionalParameters({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDefaultOptionalParametersMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDefaultOptionalParameters({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callToTestOrderOfParamsMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callToTestOrderOfParams({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateNameMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateName2QueryKey = (options?: Options) => createQueryKey('duplicateName2', options); + +export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await duplicateName2({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); + +export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await duplicateName3({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const duplicateName3Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName3({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const duplicateName4Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await duplicateName4({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithNoContentResponseQueryKey = (options?: Options) => createQueryKey('callWithNoContentResponse', options); + +export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithNoContentResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResponseAndNoContentResponseQueryKey = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); + +export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResponseAndNoContentResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const dummyAQueryKey = (options?: Options) => createQueryKey('dummyA', options); + +export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await dummyA({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); + +export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await dummyB({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); + +export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); + +export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithDuplicateResponses({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithDuplicateResponsesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithDuplicateResponses({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithResponsesMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithResponses({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const collectionFormatQueryKey = (options: Options) => createQueryKey('collectionFormat', options); + +export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await collectionFormat({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const typesQueryKey = (options: Options) => createQueryKey('types', options); + +export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await types({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); + +export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await uploadFile({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const uploadFileMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await uploadFile({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); + +export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await fileResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); + +export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await complexTypes({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); + +export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await multipartResponse({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const multipartRequestQueryKey = (options?: Options) => createQueryKey('multipartRequest', options); + +export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await multipartRequest({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const multipartRequestMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await multipartRequest({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const complexParamsMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await complexParams({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const callWithResultFromHeaderQueryKey = (options?: Options) => createQueryKey('callWithResultFromHeader', options); + +export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await callWithResultFromHeader({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const callWithResultFromHeaderMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await callWithResultFromHeader({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const testErrorCodeQueryKey = (options: Options) => createQueryKey('testErrorCode', options); + +export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await testErrorCode({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const testErrorCodeMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await testErrorCode({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串QueryKey = (options: Options) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); + +export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); + return queryOptions({ + queryFn: async ({ signal }) => { + const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ + ...options, + ...queryKey[0], + signal, + throwOnError: true + }); + return data; + }, + queryKey: transformQueryKey(queryKey) + }); +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串Mutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; + +export const putWithFormUrlEncodedMutation = (options?: Partial>) => { + const mutationOptions: MutationOptions> = { + mutationFn: async (localOptions) => { + const { data } = await putWithFormUrlEncoded({ + ...options, + ...localOptions, + throwOnError: true + }); + return data; + } + }; + return mutationOptions; +}; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts new file mode 100644 index 000000000..fdbaafa48 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/client.gen.ts @@ -0,0 +1,18 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import type { ClientOptions } from './types.gen'; +import { type Config, type ClientOptions as DefaultClientOptions, createClient, createConfig } from '@hey-api/client-fetch'; + +/** + * The `createClientConfig()` function will be called on client initialization + * and the returned object will become the client's initial configuration. + * + * You may want to initialize your client this way instead of calling + * `setConfig()`. This is useful for example if you're using Next.js + * to ensure your client always has the correct values. + */ +export type CreateClientConfig = (override?: Config) => Config & T>; + +export const client = createClient(createConfig({ + baseUrl: 'http://localhost:3000/base' +})); \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts new file mode 100644 index 000000000..e64537d21 --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/index.ts @@ -0,0 +1,3 @@ +// This file is auto-generated by @hey-api/openapi-ts +export * from './types.gen'; +export * from './sdk.gen'; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts new file mode 100644 index 000000000..7f932711f --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/sdk.gen.ts @@ -0,0 +1,409 @@ +// This file is auto-generated by @hey-api/openapi-ts + +import { type Options as ClientOptions, type TDataShape, type Client, formDataBodySerializer, urlSearchParamsBodySerializer } from '@hey-api/client-fetch'; +import type { ExportData, PatchApiVbyApiVersionNoTagData, ImportData, ImportResponse, FooWowData, ApiVVersionODataControllerCountData, ApiVVersionODataControllerCountResponse, GetApiVbyApiVersionSimpleOperationData, GetApiVbyApiVersionSimpleOperationResponse, GetApiVbyApiVersionSimpleOperationError, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, HeadCallWithoutParametersAndResponseData, OptionsCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithNoContentResponseResponse, CallWithResponseAndNoContentResponseData, CallWithResponseAndNoContentResponseResponse, DummyAData, DummyAResponse, DummyBData, DummyBResponse, CallWithResponseData, CallWithResponseResponse, CallWithDuplicateResponsesData, CallWithDuplicateResponsesResponse, CallWithDuplicateResponsesError, CallWithResponsesData, CallWithResponsesResponse, CallWithResponsesError, CollectionFormatData, TypesData, TypesResponse, UploadFileData, UploadFileResponse, FileResponseData, FileResponseResponse, ComplexTypesData, ComplexTypesResponse, MultipartResponseData, MultipartResponseResponse, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from './types.gen'; +import { client as _heyApiClient } from './client.gen'; + +export type Options = ClientOptions & { + /** + * You can provide a client instance returned by `createClient()` instead of + * individual options. This might be also useful if you want to implement a + * custom client. + */ + client?: Client; + /** + * You can pass arbitrary values through the `meta` object. This can be + * used to access values that aren't defined as part of the SDK function. + */ + meta?: Record; +}; + +export const export_ = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const patchApiVbyApiVersionNoTag = (options?: Options) => { + return (options?.client ?? _heyApiClient).patch({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const import_ = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/no+tag', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const fooWow = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/no+tag', + ...options + }); +}; + +export const apiVVersionODataControllerCount = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/simple/$count', + ...options + }); +}; + +export const getApiVbyApiVersionSimpleOperation = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/simple:operation', + ...options + }); +}; + +export const deleteCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const getCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const headCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).head({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const optionsCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).options({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const patchCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).patch({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const postCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const putCallWithoutParametersAndResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/simple', + ...options + }); +}; + +export const deleteFoo = (options: Options) => { + return (options.client ?? _heyApiClient).delete({ + url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}', + ...options + }); +}; + +export const callWithDescriptions = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/descriptions', + ...options + }); +}; + +/** + * @deprecated + */ +export const deprecatedCall = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters/deprecated', + ...options + }); +}; + +export const callWithParameters = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters/{parameterPath}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const callWithWeirdParameterNames = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const getCallWithOptionalParam = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/parameters', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postCallWithOptionalParam = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/parameters', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postApiVbyApiVersionRequestBody = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/requestBody', + ...options, + headers: { + 'Content-Type': 'application/json', + ...options?.headers + } + }); +}; + +export const postApiVbyApiVersionFormData = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...formDataBodySerializer, + url: '/api/v{api-version}/formData', + ...options, + headers: { + 'Content-Type': null, + ...options?.headers + } + }); +}; + +export const callWithDefaultParameters = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const callWithDefaultOptionalParameters = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const callToTestOrderOfParams = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/defaults', + ...options + }); +}; + +export const duplicateName = (options?: Options) => { + return (options?.client ?? _heyApiClient).delete({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName2 = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName3 = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const duplicateName4 = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/duplicate', + ...options + }); +}; + +export const callWithNoContentResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/no-content', + ...options + }); +}; + +export const callWithResponseAndNoContentResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/response-and-no-content', + ...options + }); +}; + +export const dummyA = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/a', + ...options + }); +}; + +export const dummyB = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multiple-tags/b', + ...options + }); +}; + +export const callWithResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const callWithDuplicateResponses = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const callWithResponses = (options?: Options) => { + return (options?.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/response', + ...options + }); +}; + +export const collectionFormat = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/collectionFormat', + ...options + }); +}; + +export const types = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/types', + ...options + }); +}; + +export const uploadFile = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + ...urlSearchParamsBodySerializer, + url: '/api/v{api-version}/upload', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; + +export const fileResponse = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/file/{id}', + ...options + }); +}; + +export const complexTypes = (options: Options) => { + return (options.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/complex', + ...options + }); +}; + +export const multipartResponse = (options?: Options) => { + return (options?.client ?? _heyApiClient).get({ + url: '/api/v{api-version}/multipart', + ...options + }); +}; + +export const multipartRequest = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + ...formDataBodySerializer, + url: '/api/v{api-version}/multipart', + ...options, + headers: { + 'Content-Type': null, + ...options?.headers + } + }); +}; + +export const complexParams = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + url: '/api/v{api-version}/complex/{id}', + ...options, + headers: { + 'Content-Type': 'application/json-patch+json', + ...options?.headers + } + }); +}; + +export const callWithResultFromHeader = (options?: Options) => { + return (options?.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/header', + ...options + }); +}; + +export const testErrorCode = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/error', + ...options + }); +}; + +export const nonAsciiæøåÆøÅöôêÊ字符串 = (options: Options) => { + return (options.client ?? _heyApiClient).post({ + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + ...options + }); +}; + +/** + * Login User + */ +export const putWithFormUrlEncoded = (options: Options) => { + return (options.client ?? _heyApiClient).put({ + ...urlSearchParamsBodySerializer, + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串', + ...options, + headers: { + 'Content-Type': 'application/x-www-form-urlencoded', + ...options?.headers + } + }); +}; \ No newline at end of file diff --git a/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts new file mode 100644 index 000000000..e0d7a6dbf --- /dev/null +++ b/packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/runtimeConfigPath/types.gen.ts @@ -0,0 +1,1971 @@ +// This file is auto-generated by @hey-api/openapi-ts + +/** + * Model with number-only name + */ +export type _400 = string; + +/** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ +export type CamelCaseCommentWithBreaks = number; + +/** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ +export type CommentWithBreaks = number; + +/** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ +export type CommentWithBackticks = number; + +/** + * Testing backticks and quotes in string: `backticks`, 'quotes', "double quotes" and ```multiple backticks``` should work + */ +export type CommentWithBackticksAndQuotes = number; + +/** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ +export type CommentWithSlashes = number; + +/** + * Testing expression placeholders in string: ${expression} should work + */ +export type CommentWithExpressionPlaceholders = number; + +/** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ +export type CommentWithQuotes = number; + +/** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ +export type CommentWithReservedCharacters = number; + +/** + * This is a simple number + */ +export type SimpleInteger = number; + +/** + * This is a simple boolean + */ +export type SimpleBoolean = boolean; + +/** + * This is a simple string + */ +export type SimpleString = string; + +/** + * A string with non-ascii (unicode) characters valid in typescript identifiers (æøåÆØÅöÔèÈ字符串) + */ +export type NonAsciiStringæøåÆøÅöôêÊ字符串 = string; + +/** + * This is a simple file + */ +export type SimpleFile = Blob | File; + +/** + * This is a simple reference + */ +export type SimpleReference = ModelWithString; + +/** + * This is a simple string + */ +export type SimpleStringWithPattern = string | null; + +/** + * This is a simple enum with strings + */ +export type EnumWithStrings = 'Success' | 'Warning' | 'Error' | "'Single Quote'" | '"Double Quotes"' | 'Non-ascii: øæåôöØÆÅÔÖ字符串'; + +export type EnumWithReplacedCharacters = "'Single Quote'" | '"Double Quotes"' | 'øæåôöØÆÅÔÖ字符串' | 3.1 | ''; + +/** + * This is a simple enum with numbers + */ +export type EnumWithNumbers = 1 | 2 | 3 | 1.1 | 1.2 | 1.3 | 100 | 200 | 300 | -100 | -200 | -300 | -1.1 | -1.2 | -1.3; + +/** + * Success=1,Warning=2,Error=3 + */ +export type EnumFromDescription = number; + +/** + * This is a simple enum with numbers + */ +export type EnumWithExtensions = 200 | 400 | 500; + +export type EnumWithXEnumNames = 0 | 1 | 2; + +/** + * This is a simple array with numbers + */ +export type ArrayWithNumbers = Array; + +/** + * This is a simple array with booleans + */ +export type ArrayWithBooleans = Array; + +/** + * This is a simple array with strings + */ +export type ArrayWithStrings = Array; + +/** + * This is a simple array with references + */ +export type ArrayWithReferences = Array; + +/** + * This is a simple array containing an array + */ +export type ArrayWithArray = Array>; + +/** + * This is a simple array with properties + */ +export type ArrayWithProperties = Array<{ + '16x16'?: CamelCaseCommentWithBreaks; + bar?: string; +}>; + +/** + * This is a simple array with any of properties + */ +export type ArrayWithAnyOfProperties = Array<{ + foo?: string; +} | { + bar?: string; +}>; + +export type AnyOfAnyAndNull = { + data?: unknown | null; +}; + +/** + * This is a simple array with any of properties + */ +export type AnyOfArrays = { + results?: Array<{ + foo?: string; + } | { + bar?: string; + }>; +}; + +/** + * This is a string dictionary + */ +export type DictionaryWithString = { + [key: string]: string; +}; + +export type DictionaryWithPropertiesAndAdditionalProperties = { + foo?: number; + bar?: boolean; + [key: string]: string | number | boolean | undefined; +}; + +/** + * This is a string reference + */ +export type DictionaryWithReference = { + [key: string]: ModelWithString; +}; + +/** + * This is a complex dictionary + */ +export type DictionaryWithArray = { + [key: string]: Array; +}; + +/** + * This is a string dictionary + */ +export type DictionaryWithDictionary = { + [key: string]: { + [key: string]: string; + }; +}; + +/** + * This is a complex dictionary + */ +export type DictionaryWithProperties = { + [key: string]: { + foo?: string; + bar?: string; + }; +}; + +/** + * This is a model with one number property + */ +export type ModelWithInteger = { + /** + * This is a simple number property + */ + prop?: number; +}; + +/** + * This is a model with one boolean property + */ +export type ModelWithBoolean = { + /** + * This is a simple boolean property + */ + prop?: boolean; +}; + +/** + * This is a model with one string property + */ +export type ModelWithString = { + /** + * This is a simple string property + */ + prop?: string; +}; + +/** + * This is a model with one string property + */ +export type ModelWithStringError = { + /** + * This is a simple string property + */ + prop?: string; +}; + +/** + * `Comment` or `VoiceComment`. The JSON object for adding voice comments to tickets is different. See [Adding voice comments to tickets](/documentation/ticketing/managing-tickets/adding-voice-comments-to-tickets) + */ +export type ModelFromZendesk = string; + +/** + * This is a model with one string property + */ +export type ModelWithNullableString = { + /** + * This is a simple string property + */ + nullableProp1?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp1: string | null; + /** + * This is a simple string property + */ + nullableProp2?: string | null; + /** + * This is a simple string property + */ + nullableRequiredProp2: string | null; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; +}; + +/** + * This is a model with one enum + */ +export type ModelWithEnum = { + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; + /** + * These are the HTTP error code enums + */ + statusCode?: '100' | '200 FOO' | '300 FOO_BAR' | '400 foo-bar' | '500 foo.bar' | '600 foo&bar'; + /** + * Simple boolean enum + */ + bool?: true; +}; + +/** + * This is a model with one enum with escaped name + */ +export type ModelWithEnumWithHyphen = { + 'foo-bar-baz-qux'?: '3.0'; +}; + +/** + * This is a model with one enum + */ +export type ModelWithEnumFromDescription = { + /** + * Success=1,Warning=2,Error=3 + */ + test?: number; +}; + +/** + * This is a model with nested enums + */ +export type ModelWithNestedEnums = { + dictionaryWithEnum?: { + [key: string]: 'Success' | 'Warning' | 'Error'; + }; + dictionaryWithEnumFromDescription?: { + [key: string]: number; + }; + arrayWithEnum?: Array<'Success' | 'Warning' | 'Error'>; + arrayWithDescription?: Array; + /** + * This is a simple enum with strings + */ + 'foo_bar-enum'?: 'Success' | 'Warning' | 'Error' | 'ØÆÅ字符串'; +}; + +/** + * This is a model with one property containing a reference + */ +export type ModelWithReference = { + prop?: ModelWithProperties; +}; + +/** + * This is a model with one property containing an array + */ +export type ModelWithArrayReadOnlyAndWriteOnly = { + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; +}; + +/** + * This is a model with one property containing an array + */ +export type ModelWithArray = { + prop?: Array; + propWithFile?: Array; + propWithNumber?: Array; +}; + +/** + * This is a model with one property containing a dictionary + */ +export type ModelWithDictionary = { + prop?: { + [key: string]: string; + }; +}; + +/** + * This is a deprecated model with a deprecated property + * @deprecated + */ +export type DeprecatedModel = { + /** + * This is a deprecated property + * @deprecated + */ + prop?: string; +}; + +/** + * This is a model with one property containing a circular reference + */ +export type ModelWithCircularReference = { + prop?: ModelWithCircularReference; +}; + +/** + * This is a model with one property with a 'one of' relationship + */ +export type CompositionWithOneOf = { + propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; +}; + +/** + * This is a model with one property with a 'one of' relationship where the options are not $ref + */ +export type CompositionWithOneOfAnonymous = { + propA?: { + propA?: string; + } | string | number; +}; + +/** + * Circle + */ +export type ModelCircle = { + kind: string; + radius?: number; +}; + +/** + * Square + */ +export type ModelSquare = { + kind: string; + sideLength?: number; +}; + +/** + * This is a model with one property with a 'one of' relationship where the options are not $ref + */ +export type CompositionWithOneOfDiscriminator = ({ + kind?: 'circle'; +} & ModelCircle) | ({ + kind?: 'square'; +} & ModelSquare); + +/** + * This is a model with one property with a 'any of' relationship + */ +export type CompositionWithAnyOf = { + propA?: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; +}; + +/** + * This is a model with one property with a 'any of' relationship where the options are not $ref + */ +export type CompositionWithAnyOfAnonymous = { + propA?: { + propA?: string; + } | string | number; +}; + +/** + * This is a model with nested 'any of' property with a type null + */ +export type CompositionWithNestedAnyAndTypeNull = { + propA?: Array | Array; +}; + +export type _3eNum1Период = 'Bird' | 'Dog'; + +export type ConstValue = 'ConstValue'; + +/** + * This is a model with one property with a 'any of' relationship where the options are not $ref + */ +export type CompositionWithNestedAnyOfAndNull = { + propA?: Array<_3eNum1Период | ConstValue> | null; +}; + +/** + * This is a model with one property with a 'one of' relationship + */ +export type CompositionWithOneOfAndNullable = { + propA?: { + boolean?: boolean; + } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null; +}; + +/** + * This is a model that contains a simple dictionary within composition + */ +export type CompositionWithOneOfAndSimpleDictionary = { + propA?: boolean | { + [key: string]: number; + }; +}; + +/** + * This is a model that contains a dictionary of simple arrays within composition + */ +export type CompositionWithOneOfAndSimpleArrayDictionary = { + propA?: boolean | { + [key: string]: Array; + }; +}; + +/** + * This is a model that contains a dictionary of complex arrays (composited) within composition + */ +export type CompositionWithOneOfAndComplexArrayDictionary = { + propA?: boolean | { + [key: string]: Array; + }; +}; + +/** + * This is a model with one property with a 'all of' relationship + */ +export type CompositionWithAllOfAndNullable = { + propA?: ({ + boolean?: boolean; + } & ModelWithEnum & ModelWithArray & ModelWithDictionary) | null; +}; + +/** + * This is a model with one property with a 'any of' relationship + */ +export type CompositionWithAnyOfAndNullable = { + propA?: { + boolean?: boolean; + } | ModelWithEnum | ModelWithArray | ModelWithDictionary | null; +}; + +/** + * This is a base model with two simple optional properties + */ +export type CompositionBaseModel = { + firstName?: string; + lastname?: string; +}; + +/** + * This is a model that extends the base model + */ +export type CompositionExtendedModel = CompositionBaseModel & { + age: number; + firstName: string; + lastname: string; +}; + +/** + * This is a model with one nested property + */ +export type ModelWithProperties = { + required: string; + readonly requiredAndReadOnly: string; + requiredAndNullable: string | null; + string?: string; + number?: number; + boolean?: boolean; + reference?: ModelWithString; + 'property with space'?: string; + default?: string; + try?: string; + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; +}; + +/** + * This is a model with one nested property + */ +export type ModelWithNestedProperties = { + readonly first: { + readonly second: { + readonly third: string | null; + } | null; + } | null; +}; + +/** + * This is a model with duplicated properties + */ +export type ModelWithDuplicateProperties = { + prop?: ModelWithString; +}; + +/** + * This is a model with ordered properties + */ +export type ModelWithOrderedProperties = { + zebra?: string; + apple?: string; + hawaii?: string; +}; + +/** + * This is a model with duplicated imports + */ +export type ModelWithDuplicateImports = { + propA?: ModelWithString; + propB?: ModelWithString; + propC?: ModelWithString; +}; + +/** + * This is a model that extends another model + */ +export type ModelThatExtends = ModelWithString & { + propExtendsA?: string; + propExtendsB?: ModelWithString; +}; + +/** + * This is a model that extends another model + */ +export type ModelThatExtendsExtends = ModelWithString & ModelThatExtends & { + propExtendsC?: string; + propExtendsD?: ModelWithString; +}; + +/** + * This is a model that contains a some patterns + */ +export type ModelWithPattern = { + key: string; + name: string; + readonly enabled?: boolean; + readonly modified?: string; + id?: string; + text?: string; + patternWithSingleQuotes?: string; + patternWithNewline?: string; + patternWithBacktick?: string; +}; + +export type File = { + readonly id?: string; + readonly updated_at?: string; + readonly created_at?: string; + mime: string; + readonly file?: string; +}; + +export type Default = { + name?: string; +}; + +export type Pageable = { + page?: number; + size?: number; + sort?: Array; +}; + +/** + * This is a free-form object without additionalProperties. + */ +export type FreeFormObjectWithoutAdditionalProperties = { + [key: string]: unknown; +}; + +/** + * This is a free-form object with additionalProperties: true. + */ +export type FreeFormObjectWithAdditionalPropertiesEqTrue = { + [key: string]: unknown; +}; + +/** + * This is a free-form object with additionalProperties: {}. + */ +export type FreeFormObjectWithAdditionalPropertiesEqEmptyObject = {}; + +export type ModelWithConst = { + String?: 'String'; + number?: 0; + null?: null; + withType?: 'Some string'; +}; + +/** + * This is a model with one property and additionalProperties: true + */ +export type ModelWithAdditionalPropertiesEqTrue = { + /** + * This is a simple string property + */ + prop?: string; + [key: string]: unknown | string | undefined; +}; + +export type NestedAnyOfArraysNullable = { + nullableArray?: Array | null; +}; + +export type CompositionWithOneOfAndProperties = ({ + foo: SimpleParameter; +} | { + bar: NonAsciiStringæøåÆøÅöôêÊ字符串; +}) & { + baz: number | null; + qux: number; +}; + +/** + * An object that can be null + */ +export type NullableObject = { + foo?: string; +} | null; + +/** + * Some % character + */ +export type CharactersInDescription = string; + +export type ModelWithNullableObject = { + data?: NullableObject; +}; + +export type ModelWithOneOfEnum = { + foo: 'Bar'; +} | { + foo: 'Baz'; +} | { + foo: 'Qux'; +} | { + content: string; + foo: 'Quux'; +} | { + content: [ + string, + string + ]; + foo: 'Corge'; +}; + +export type ModelWithNestedArrayEnumsDataFoo = 'foo' | 'bar'; + +export type ModelWithNestedArrayEnumsDataBar = 'baz' | 'qux'; + +export type ModelWithNestedArrayEnumsData = { + foo?: Array; + bar?: Array; +}; + +export type ModelWithNestedArrayEnums = { + array_strings?: Array; + data?: ModelWithNestedArrayEnumsData; +}; + +export type ModelWithNestedCompositionEnums = { + foo?: ModelWithNestedArrayEnumsDataFoo; +}; + +export type ModelWithReadOnlyAndWriteOnly = { + foo: string; + readonly bar: string; + baz: string; +}; + +export type ModelWithConstantSizeArray = [ + number, + number +]; + +export type ModelWithAnyOfConstantSizeArray = [ + number | string, + number | string, + number | string +]; + +export type ModelWithPrefixItemsConstantSizeArray = [ + ModelWithInteger, + number | string, + string +]; + +export type ModelWithAnyOfConstantSizeArrayNullable = [ + number | null | string, + number | null | string, + number | null | string +]; + +export type ModelWithAnyOfConstantSizeArrayWithNSizeAndOptions = [ + number | Import, + number | Import +]; + +export type ModelWithAnyOfConstantSizeArrayAndIntersect = [ + number & string, + number & string +]; + +export type ModelWithNumericEnumUnion = { + /** + * Период + */ + value?: -10 | -1 | 0 | 1 | 3 | 6 | 12; +}; + +/** + * Some description with `back ticks` + */ +export type ModelWithBackticksInDescription = { + /** + * The template `that` should be used for parsing and importing the contents of the CSV file. + * + *

There is one placeholder currently supported:

  • ${x} - refers to the n-th column in the CSV file, e.g. ${1}, ${2}, ...)

Example of a correct JSON template:

+ *
+     * [
+     * {
+     * "resourceType": "Asset",
+     * "identifier": {
+     * "name": "${1}",
+     * "domain": {
+     * "name": "${2}",
+     * "community": {
+     * "name": "Some Community"
+     * }
+     * }
+     * },
+     * "attributes" : {
+     * "00000000-0000-0000-0000-000000003115" : [ {
+     * "value" : "${3}"
+     * } ],
+     * "00000000-0000-0000-0000-000000000222" : [ {
+     * "value" : "${4}"
+     * } ]
+     * }
+     * }
+     * ]
+     * 
+ */ + template?: string; +}; + +export type ModelWithOneOfAndProperties = (SimpleParameter | NonAsciiStringæøåÆøÅöôêÊ字符串) & { + baz: number | null; + qux: number; +}; + +/** + * Model used to test deduplication strategy (unused) + */ +export type ParameterSimpleParameterUnused = string; + +/** + * Model used to test deduplication strategy + */ +export type PostServiceWithEmptyTagResponse = string; + +/** + * Model used to test deduplication strategy + */ +export type PostServiceWithEmptyTagResponse2 = string; + +/** + * Model used to test deduplication strategy + */ +export type DeleteFooData = string; + +/** + * Model used to test deduplication strategy + */ +export type DeleteFooData2 = string; + +/** + * Model with restricted keyword name + */ +export type Import = string; + +export type SchemaWithFormRestrictedKeys = { + description?: string; + 'x-enum-descriptions'?: string; + 'x-enum-varnames'?: string; + 'x-enumNames'?: string; + title?: string; + object?: { + description?: string; + 'x-enum-descriptions'?: string; + 'x-enum-varnames'?: string; + 'x-enumNames'?: string; + title?: string; + }; + array?: Array<{ + description?: string; + 'x-enum-descriptions'?: string; + 'x-enum-varnames'?: string; + 'x-enumNames'?: string; + title?: string; + }>; +}; + +/** + * This schema was giving PascalCase transformations a hard time + */ +export type IoK8sApimachineryPkgApisMetaV1DeleteOptions = { + /** + * Must be fulfilled before a deletion is carried out. If not possible, a 409 Conflict status will be returned. + */ + preconditions?: IoK8sApimachineryPkgApisMetaV1Preconditions; +}; + +/** + * This schema was giving PascalCase transformations a hard time + */ +export type IoK8sApimachineryPkgApisMetaV1Preconditions = { + /** + * Specifies the target ResourceVersion + */ + resourceVersion?: string; + /** + * Specifies the target UID. + */ + uid?: string; +}; + +export type AdditionalPropertiesUnknownIssue = { + [key: string]: string | number; +}; + +export type AdditionalPropertiesUnknownIssue2 = { + [key: string]: string | number; +}; + +export type AdditionalPropertiesUnknownIssue3 = string & { + entries: { + [key: string]: AdditionalPropertiesUnknownIssue; + }; +}; + +export type AdditionalPropertiesIntegerIssue = { + value: number; + [key: string]: number; +}; + +export type OneOfAllOfIssue = ((ConstValue | GenericSchemaDuplicateIssue1SystemBoolean) & _3eNum1Период) | GenericSchemaDuplicateIssue1SystemString; + +export type GenericSchemaDuplicateIssue1SystemBoolean = { + item?: boolean; + error?: string | null; + readonly hasError?: boolean; + data?: { + [key: string]: never; + }; +}; + +export type GenericSchemaDuplicateIssue1SystemString = { + item?: string | null; + error?: string | null; + readonly hasError?: boolean; +}; + +/** + * This is a reusable parameter + */ +export type SimpleParameter = string; + +/** + * Parameter with illegal characters + */ +export type XFooBar = ModelWithString; + +/** + * A reusable request body + */ +export type SimpleRequestBody = ModelWithString; + +/** + * A reusable request body + */ +export type SimpleFormData = ModelWithString; + +export type ExportData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type PatchApiVbyApiVersionNoTagData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type PatchApiVbyApiVersionNoTagResponses = { + /** + * OK + */ + default: unknown; +}; + +export type ImportData = { + body: ModelWithReadOnlyAndWriteOnly | ModelWithArrayReadOnlyAndWriteOnly; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type ImportResponses = { + /** + * Success + */ + 200: ModelFromZendesk; + /** + * Default success response + */ + default: ModelWithReadOnlyAndWriteOnly; +}; + +export type ImportResponse = ImportResponses[keyof ImportResponses]; + +export type FooWowData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no+tag'; +}; + +export type FooWowResponses = { + /** + * OK + */ + default: unknown; +}; + +export type ApiVVersionODataControllerCountData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple/$count'; +}; + +export type ApiVVersionODataControllerCountResponses = { + /** + * Success + */ + 200: ModelFromZendesk; +}; + +export type ApiVVersionODataControllerCountResponse = ApiVVersionODataControllerCountResponses[keyof ApiVVersionODataControllerCountResponses]; + +export type GetApiVbyApiVersionSimpleOperationData = { + body?: never; + path: { + /** + * foo in method + */ + foo_param: string; + }; + query?: never; + url: '/api/v{api-version}/simple:operation'; +}; + +export type GetApiVbyApiVersionSimpleOperationErrors = { + /** + * Default error response + */ + default: ModelWithBoolean; +}; + +export type GetApiVbyApiVersionSimpleOperationError = GetApiVbyApiVersionSimpleOperationErrors[keyof GetApiVbyApiVersionSimpleOperationErrors]; + +export type GetApiVbyApiVersionSimpleOperationResponses = { + /** + * Response is a simple number + */ + 200: number; +}; + +export type GetApiVbyApiVersionSimpleOperationResponse = GetApiVbyApiVersionSimpleOperationResponses[keyof GetApiVbyApiVersionSimpleOperationResponses]; + +export type DeleteCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type GetCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type HeadCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type OptionsCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PatchCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PostCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type PutCallWithoutParametersAndResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/simple'; +}; + +export type DeleteFooData3 = { + body?: never; + headers: { + /** + * Parameter with illegal characters + */ + 'x-Foo-Bar': ModelWithString; + }; + path: { + /** + * foo in method + */ + foo_param: string; + /** + * bar in method + */ + BarParam: string; + }; + query?: never; + url: '/api/v{api-version}/foo/{foo_param}/bar/{BarParam}'; +}; + +export type CallWithDescriptionsData = { + body?: never; + path?: never; + query?: { + /** + * Testing multiline comments in string: First line + * Second line + * + * Fourth line + */ + parameterWithBreaks?: string; + /** + * Testing backticks in string: `backticks` and ```multiple backticks``` should work + */ + parameterWithBackticks?: string; + /** + * Testing slashes in string: \backwards\\\ and /forwards/// should work + */ + parameterWithSlashes?: string; + /** + * Testing expression placeholders in string: ${expression} should work + */ + parameterWithExpressionPlaceholders?: string; + /** + * Testing quotes in string: 'single quote''' and "double quotes""" should work + */ + parameterWithQuotes?: string; + /** + * Testing reserved characters in string: * inline * and ** inline ** should work + */ + parameterWithReservedCharacters?: string; + }; + url: '/api/v{api-version}/descriptions'; +}; + +export type DeprecatedCallData = { + body?: never; + headers: { + /** + * This parameter is deprecated + * @deprecated + */ + parameter: DeprecatedModel | null; + }; + path?: never; + query?: never; + url: '/api/v{api-version}/parameters/deprecated'; +}; + +export type CallWithParametersData = { + /** + * This is the parameter that goes into the body + */ + body: { + [key: string]: unknown; + } | null; + headers: { + /** + * This is the parameter that goes into the header + */ + parameterHeader: string | null; + }; + path: { + /** + * This is the parameter that goes into the path + */ + parameterPath: string | null; + /** + * api-version should be required in standalone clients + */ + 'api-version': string | null; + }; + query: { + foo_ref_enum?: ModelWithNestedArrayEnumsDataFoo; + foo_all_of_enum: ModelWithNestedArrayEnumsDataFoo; + /** + * This is the parameter that goes into the query params + */ + cursor: string | null; + }; + url: '/api/v{api-version}/parameters/{parameterPath}'; +}; + +export type CallWithWeirdParameterNamesData = { + /** + * This is the parameter that goes into the body + */ + body: ModelWithString | null; + headers: { + /** + * This is the parameter that goes into the request header + */ + 'parameter.header': string | null; + }; + path: { + /** + * This is the parameter that goes into the path + */ + 'parameter.path.1'?: string; + /** + * This is the parameter that goes into the path + */ + 'parameter-path-2'?: string; + /** + * This is the parameter that goes into the path + */ + 'PARAMETER-PATH-3'?: string; + /** + * api-version should be required in standalone clients + */ + 'api-version': string | null; + }; + query: { + /** + * This is the parameter with a reserved keyword + */ + default?: string; + /** + * This is the parameter that goes into the request query params + */ + 'parameter-query': string | null; + }; + url: '/api/v{api-version}/parameters/{parameter.path.1}/{parameter-path-2}/{PARAMETER-PATH-3}'; +}; + +export type GetCallWithOptionalParamData = { + /** + * This is a required parameter + */ + body: ModelWithOneOfEnum; + path?: never; + query?: { + /** + * This is an optional parameter + */ + page?: number; + }; + url: '/api/v{api-version}/parameters'; +}; + +export type PostCallWithOptionalParamData = { + /** + * This is an optional parameter + */ + body?: { + offset?: number | null; + }; + path?: never; + query: { + /** + * This is a required parameter + */ + parameter: Pageable; + }; + url: '/api/v{api-version}/parameters'; +}; + +export type PostCallWithOptionalParamResponses = { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: void; +}; + +export type PostCallWithOptionalParamResponse = PostCallWithOptionalParamResponses[keyof PostCallWithOptionalParamResponses]; + +export type PostApiVbyApiVersionRequestBodyData = { + /** + * A reusable request body + */ + body?: SimpleRequestBody; + path?: never; + query?: { + /** + * This is a reusable parameter + */ + parameter?: string; + }; + url: '/api/v{api-version}/requestBody'; +}; + +export type PostApiVbyApiVersionFormDataData = { + /** + * A reusable request body + */ + body?: SimpleFormData; + path?: never; + query?: { + /** + * This is a reusable parameter + */ + parameter?: string; + }; + url: '/api/v{api-version}/formData'; +}; + +export type CallWithDefaultParametersData = { + body?: never; + path?: never; + query?: { + /** + * This is a simple string with default value + */ + parameterString?: string | null; + /** + * This is a simple number with default value + */ + parameterNumber?: number | null; + /** + * This is a simple boolean with default value + */ + parameterBoolean?: boolean | null; + /** + * This is a simple enum with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model with default value + */ + parameterModel?: ModelWithString | null; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type CallWithDefaultOptionalParametersData = { + body?: never; + path?: never; + query?: { + /** + * This is a simple string that is optional with default value + */ + parameterString?: string; + /** + * This is a simple number that is optional with default value + */ + parameterNumber?: number; + /** + * This is a simple boolean that is optional with default value + */ + parameterBoolean?: boolean; + /** + * This is a simple enum that is optional with default value + */ + parameterEnum?: 'Success' | 'Warning' | 'Error'; + /** + * This is a simple model that is optional with default value + */ + parameterModel?: ModelWithString; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type CallToTestOrderOfParamsData = { + body?: never; + path?: never; + query: { + /** + * This is a optional string with default + */ + parameterOptionalStringWithDefault?: string; + /** + * This is a optional string with empty default + */ + parameterOptionalStringWithEmptyDefault?: string; + /** + * This is a optional string with no default + */ + parameterOptionalStringWithNoDefault?: string; + /** + * This is a string with default + */ + parameterStringWithDefault: string; + /** + * This is a string with empty default + */ + parameterStringWithEmptyDefault: string; + /** + * This is a string with no default + */ + parameterStringWithNoDefault: string; + /** + * This is a string that can be null with no default + */ + parameterStringNullableWithNoDefault?: string | null; + /** + * This is a string that can be null with default + */ + parameterStringNullableWithDefault?: string | null; + }; + url: '/api/v{api-version}/defaults'; +}; + +export type DuplicateNameData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName2Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName3Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type DuplicateName4Data = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/duplicate'; +}; + +export type CallWithNoContentResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/no-content'; +}; + +export type CallWithNoContentResponseResponses = { + /** + * Success + */ + 204: void; +}; + +export type CallWithNoContentResponseResponse = CallWithNoContentResponseResponses[keyof CallWithNoContentResponseResponses]; + +export type CallWithResponseAndNoContentResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/response-and-no-content'; +}; + +export type CallWithResponseAndNoContentResponseResponses = { + /** + * Response is a simple number + */ + 200: number; + /** + * Success + */ + 204: void; +}; + +export type CallWithResponseAndNoContentResponseResponse = CallWithResponseAndNoContentResponseResponses[keyof CallWithResponseAndNoContentResponseResponses]; + +export type DummyAData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/a'; +}; + +export type DummyAResponses = { + 200: _400; +}; + +export type DummyAResponse = DummyAResponses[keyof DummyAResponses]; + +export type DummyBData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multiple-tags/b'; +}; + +export type DummyBResponses = { + /** + * Success + */ + 204: void; +}; + +export type DummyBResponse = DummyBResponses[keyof DummyBResponses]; + +export type CallWithResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithResponseResponses = { + default: Import; +}; + +export type CallWithResponseResponse = CallWithResponseResponses[keyof CallWithResponseResponses]; + +export type CallWithDuplicateResponsesData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithDuplicateResponsesErrors = { + /** + * Message for 500 error + */ + 500: ModelWithStringError; + /** + * Message for 501 error + */ + 501: ModelWithStringError; + /** + * Message for 502 error + */ + 502: ModelWithStringError; + /** + * Message for 4XX errors + */ + '4XX': DictionaryWithArray; + /** + * Default error response + */ + default: ModelWithBoolean; +}; + +export type CallWithDuplicateResponsesError = CallWithDuplicateResponsesErrors[keyof CallWithDuplicateResponsesErrors]; + +export type CallWithDuplicateResponsesResponses = { + /** + * Message for 200 response + */ + 200: ModelWithBoolean & ModelWithInteger; + /** + * Message for 201 response + */ + 201: ModelWithString; + /** + * Message for 202 response + */ + 202: ModelWithString; +}; + +export type CallWithDuplicateResponsesResponse = CallWithDuplicateResponsesResponses[keyof CallWithDuplicateResponsesResponses]; + +export type CallWithResponsesData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/response'; +}; + +export type CallWithResponsesErrors = { + /** + * Message for 500 error + */ + 500: ModelWithStringError; + /** + * Message for 501 error + */ + 501: ModelWithStringError; + /** + * Message for 502 error + */ + 502: ModelWithStringError; + /** + * Message for default response + */ + default: ModelWithStringError; +}; + +export type CallWithResponsesError = CallWithResponsesErrors[keyof CallWithResponsesErrors]; + +export type CallWithResponsesResponses = { + /** + * Message for 200 response + */ + 200: { + readonly '@namespace.string'?: string; + readonly '@namespace.integer'?: number; + readonly value?: Array; + }; + /** + * Message for 201 response + */ + 201: ModelThatExtends; + /** + * Message for 202 response + */ + 202: ModelThatExtendsExtends; +}; + +export type CallWithResponsesResponse = CallWithResponsesResponses[keyof CallWithResponsesResponses]; + +export type CollectionFormatData = { + body?: never; + path?: never; + query: { + /** + * This is an array parameter that is sent as csv format (comma-separated values) + */ + parameterArrayCSV: Array | null; + /** + * This is an array parameter that is sent as ssv format (space-separated values) + */ + parameterArraySSV: Array | null; + /** + * This is an array parameter that is sent as tsv format (tab-separated values) + */ + parameterArrayTSV: Array | null; + /** + * This is an array parameter that is sent as pipes format (pipe-separated values) + */ + parameterArrayPipes: Array | null; + /** + * This is an array parameter that is sent as multi format (multiple parameter instances) + */ + parameterArrayMulti: Array | null; + }; + url: '/api/v{api-version}/collectionFormat'; +}; + +export type TypesData = { + body?: never; + path?: { + /** + * This is a number parameter + */ + id?: number; + }; + query: { + /** + * This is a number parameter + */ + parameterNumber: number; + /** + * This is a string parameter + */ + parameterString: string | null; + /** + * This is a boolean parameter + */ + parameterBoolean: boolean | null; + /** + * This is an object parameter + */ + parameterObject: { + [key: string]: unknown; + } | null; + /** + * This is an array parameter + */ + parameterArray: Array | null; + /** + * This is a dictionary parameter + */ + parameterDictionary: { + [key: string]: unknown; + } | null; + /** + * This is an enum parameter + */ + parameterEnum: 'Success' | 'Warning' | 'Error' | null; + }; + url: '/api/v{api-version}/types'; +}; + +export type TypesResponses = { + /** + * Response is a simple number + */ + 200: number; + /** + * Response is a simple string + */ + 201: string; + /** + * Response is a simple boolean + */ + 202: boolean; + /** + * Response is a simple object + */ + 203: { + [key: string]: unknown; + }; +}; + +export type TypesResponse = TypesResponses[keyof TypesResponses]; + +export type UploadFileData = { + body: Blob | File; + path: { + /** + * api-version should be required in standalone clients + */ + 'api-version': string | null; + }; + query?: never; + url: '/api/v{api-version}/upload'; +}; + +export type UploadFileResponses = { + 200: boolean; +}; + +export type UploadFileResponse = UploadFileResponses[keyof UploadFileResponses]; + +export type FileResponseData = { + body?: never; + path: { + id: string; + /** + * api-version should be required in standalone clients + */ + 'api-version': string; + }; + query?: never; + url: '/api/v{api-version}/file/{id}'; +}; + +export type FileResponseResponses = { + /** + * Success + */ + 200: Blob | File; +}; + +export type FileResponseResponse = FileResponseResponses[keyof FileResponseResponses]; + +export type ComplexTypesData = { + body?: never; + path?: never; + query: { + /** + * Parameter containing object + */ + parameterObject: { + first?: { + second?: { + third?: string; + }; + }; + }; + /** + * Parameter containing reference + */ + parameterReference: ModelWithString; + }; + url: '/api/v{api-version}/complex'; +}; + +export type ComplexTypesErrors = { + /** + * 400 `server` error + */ + 400: unknown; + /** + * 500 server error + */ + 500: unknown; +}; + +export type ComplexTypesResponses = { + /** + * Successful response + */ + 200: Array; +}; + +export type ComplexTypesResponse = ComplexTypesResponses[keyof ComplexTypesResponses]; + +export type MultipartResponseData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/multipart'; +}; + +export type MultipartResponseResponses = { + /** + * OK + */ + 200: { + file?: Blob | File; + metadata?: { + foo?: string; + bar?: string; + }; + }; +}; + +export type MultipartResponseResponse = MultipartResponseResponses[keyof MultipartResponseResponses]; + +export type MultipartRequestData = { + body?: { + content?: Blob | File; + data?: ModelWithString | null; + }; + path?: never; + query?: never; + url: '/api/v{api-version}/multipart'; +}; + +export type ComplexParamsData = { + body?: { + readonly key: string | null; + name: string | null; + enabled?: boolean; + type: 'Monkey' | 'Horse' | 'Bird'; + listOfModels?: Array | null; + listOfStrings?: Array | null; + parameters: ModelWithString | ModelWithEnum | ModelWithArray | ModelWithDictionary; + readonly user?: { + readonly id?: number; + readonly name?: string | null; + }; + }; + path: { + id: number; + /** + * api-version should be required in standalone clients + */ + 'api-version': string; + }; + query?: never; + url: '/api/v{api-version}/complex/{id}'; +}; + +export type ComplexParamsResponses = { + /** + * Success + */ + 200: ModelWithString; +}; + +export type ComplexParamsResponse = ComplexParamsResponses[keyof ComplexParamsResponses]; + +export type CallWithResultFromHeaderData = { + body?: never; + path?: never; + query?: never; + url: '/api/v{api-version}/header'; +}; + +export type CallWithResultFromHeaderErrors = { + /** + * 400 server error + */ + 400: unknown; + /** + * 500 server error + */ + 500: unknown; +}; + +export type CallWithResultFromHeaderResponses = { + /** + * Successful response + */ + 200: unknown; +}; + +export type TestErrorCodeData = { + body?: never; + path?: never; + query: { + /** + * Status code to return + */ + status: number; + }; + url: '/api/v{api-version}/error'; +}; + +export type TestErrorCodeErrors = { + /** + * Custom message: Internal Server Error + */ + 500: unknown; + /** + * Custom message: Not Implemented + */ + 501: unknown; + /** + * Custom message: Bad Gateway + */ + 502: unknown; + /** + * Custom message: Service Unavailable + */ + 503: unknown; +}; + +export type TestErrorCodeResponses = { + /** + * Custom message: Successful response + */ + 200: unknown; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Data = { + body?: never; + path?: never; + query: { + /** + * Dummy input param + */ + nonAsciiParamæøåÆØÅöôêÊ: number; + }; + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串'; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Responses = { + /** + * Successful response + */ + 200: Array; +}; + +export type NonAsciiæøåÆøÅöôêÊ字符串Response = NonAsciiæøåÆøÅöôêÊ字符串Responses[keyof NonAsciiæøåÆøÅöôêÊ字符串Responses]; + +export type PutWithFormUrlEncodedData = { + body: ArrayWithStrings; + path?: never; + query?: never; + url: '/api/v{api-version}/non-ascii-æøåÆØÅöôêÊ字符串'; +}; + +export type ClientOptions = { + baseUrl: 'http://localhost:3000/base' | (string & {}); +}; \ No newline at end of file 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 b4ecaeb19..2fc37229b 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 @@ -39,8 +39,9 @@ const createQueryKey = (id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.export({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.import({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultService.getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await SimpleService.postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DescriptionsService.callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DeprecatedService.deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ParametersService.postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await RequestBodyService.postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FormDataService.postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DefaultsService.callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await DuplicateService.duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NoContentService.callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipleTags1Service.dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ResponseService.callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await CollectionFormatService.collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await TypesService.types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await UploadService.uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await FileResponseService.fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ComplexService.complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await MultipartService.multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await HeaderService.callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await ErrorService.testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await NonAsciiÆøåÆøÅöôêÊService.nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -50,7 +51,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -71,8 +72,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -81,7 +83,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -116,8 +118,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -126,15 +129,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -143,7 +147,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -174,7 +179,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -205,7 +211,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -264,7 +271,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -295,7 +303,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -316,8 +324,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -326,7 +335,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -381,7 +391,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -412,7 +423,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -443,17 +455,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -469,15 +482,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -486,17 +500,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, InfiniteData, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, InfiniteData, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -512,7 +527,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -543,7 +559,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -574,7 +591,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -605,15 +623,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -622,7 +641,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -681,15 +701,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -698,7 +719,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -733,8 +754,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -743,15 +765,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -760,15 +783,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -777,15 +801,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -794,15 +819,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -811,15 +837,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -828,7 +855,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -873,15 +901,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -890,15 +919,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -907,7 +937,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -928,8 +958,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -938,15 +969,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -955,15 +987,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -972,15 +1005,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -989,7 +1023,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1024,8 +1058,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1034,7 +1069,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1065,7 +1101,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1086,8 +1122,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1096,7 +1133,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options(id: string, options?: TOptions export const exportQueryKey = (options?: Options) => createQueryKey('export', options); export const exportOptions = (options?: Options) => { + const queryKey = exportQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await export_({ ...options, ...queryKey[0], @@ -49,7 +50,7 @@ export const exportOptions = (options?: Options) => { }); return data; }, - queryKey: exportQueryKey(options) + queryKey }); }; @@ -70,8 +71,9 @@ export const patchApiVbyApiVersionNoTagMutation = (options?: Partial) => createQueryKey('import', options); export const importOptions = (options: Options) => { + const queryKey = importQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await import_({ ...options, ...queryKey[0], @@ -80,7 +82,7 @@ export const importOptions = (options: Options) => { }); return data; }, - queryKey: importQueryKey(options) + queryKey }); }; @@ -115,8 +117,9 @@ export const fooWowMutation = (options?: Partial>) => { export const apiVVersionODataControllerCountQueryKey = (options?: Options) => createQueryKey('apiVVersionODataControllerCount', options); export const apiVVersionODataControllerCountOptions = (options?: Options) => { + const queryKey = apiVVersionODataControllerCountQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await apiVVersionODataControllerCount({ ...options, ...queryKey[0], @@ -125,15 +128,16 @@ export const apiVVersionODataControllerCountOptions = (options?: Options) => createQueryKey('getApiVbyApiVersionSimpleOperation', options); export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => { + const queryKey = getApiVbyApiVersionSimpleOperationQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getApiVbyApiVersionSimpleOperation({ ...options, ...queryKey[0], @@ -142,7 +146,7 @@ export const getApiVbyApiVersionSimpleOperationOptions = (options: Options) => createQueryKey('getCallWithoutParametersAndResponse', options); export const getCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = getCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -173,7 +178,7 @@ export const getCallWithoutParametersAndResponseOptions = (options?: Options) => createQueryKey('postCallWithoutParametersAndResponse', options); export const postCallWithoutParametersAndResponseOptions = (options?: Options) => { + const queryKey = postCallWithoutParametersAndResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithoutParametersAndResponse({ ...options, ...queryKey[0], @@ -204,7 +210,7 @@ export const postCallWithoutParametersAndResponseOptions = (options?: Options>) => export const callWithDescriptionsQueryKey = (options?: Options) => createQueryKey('callWithDescriptions', options); export const callWithDescriptionsOptions = (options?: Options) => { + const queryKey = callWithDescriptionsQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDescriptions({ ...options, ...queryKey[0], @@ -263,7 +270,7 @@ export const callWithDescriptionsOptions = (options?: Options) => createQueryKey('deprecatedCall', options); export const deprecatedCallOptions = (options: Options) => { + const queryKey = deprecatedCallQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await deprecatedCall({ ...options, ...queryKey[0], @@ -294,7 +302,7 @@ export const deprecatedCallOptions = (options: Options) => { }); return data; }, - queryKey: deprecatedCallQueryKey(options) + queryKey }); }; @@ -315,8 +323,9 @@ export const deprecatedCallMutation = (options?: Partial) => createQueryKey('callWithParameters', options); export const callWithParametersOptions = (options: Options) => { + const queryKey = callWithParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithParameters({ ...options, ...queryKey[0], @@ -325,7 +334,7 @@ export const callWithParametersOptions = (options: Options[0], 'body' | 'hea export const callWithParametersInfiniteQueryKey = (options: Options): QueryKey> => createQueryKey('callWithParameters', options, true); export const callWithParametersInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = callWithParametersInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], string | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -380,7 +390,7 @@ export const callWithParametersInfiniteOptions = (options: Options) => createQueryKey('callWithWeirdParameterNames', options); export const callWithWeirdParameterNamesOptions = (options: Options) => { + const queryKey = callWithWeirdParameterNamesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithWeirdParameterNames({ ...options, ...queryKey[0], @@ -411,7 +422,7 @@ export const callWithWeirdParameterNamesOptions = (options: Options) => createQueryKey('getCallWithOptionalParam', options); export const getCallWithOptionalParamOptions = (options: Options) => { + const queryKey = getCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await getCallWithOptionalParam({ ...options, ...queryKey[0], @@ -442,17 +454,18 @@ export const getCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('getCallWithOptionalParam', options, true); export const getCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = getCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { query: { @@ -468,15 +481,16 @@ export const getCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postCallWithOptionalParam', options); export const postCallWithOptionalParamOptions = (options: Options) => { + const queryKey = postCallWithOptionalParamQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postCallWithOptionalParam({ ...options, ...queryKey[0], @@ -485,17 +499,18 @@ export const postCallWithOptionalParamOptions = (options: Options): QueryKey> => createQueryKey('postCallWithOptionalParam', options, true); export const postCallWithOptionalParamInfiniteOptions = (options: Options) => { - return infiniteQueryOptions, QueryKey>, number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( + const queryKey = postCallWithOptionalParamInfiniteQueryKey(options); + return infiniteQueryOptions, unknown[], number | null | Pick>[0], 'body' | 'headers' | 'path' | 'query'>>( // @ts-ignore { - queryFn: async ({ pageParam, queryKey, signal }) => { + queryFn: async ({ pageParam, signal }) => { // @ts-ignore const page: Pick>[0], 'body' | 'headers' | 'path' | 'query'> = typeof pageParam === 'object' ? pageParam : { body: { @@ -511,7 +526,7 @@ export const postCallWithOptionalParamInfiniteOptions = (options: Options) => createQueryKey('postApiVbyApiVersionRequestBody', options); export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionRequestBodyQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionRequestBody({ ...options, ...queryKey[0], @@ -542,7 +558,7 @@ export const postApiVbyApiVersionRequestBodyOptions = (options?: Options) => createQueryKey('postApiVbyApiVersionFormData', options); export const postApiVbyApiVersionFormDataOptions = (options?: Options) => { + const queryKey = postApiVbyApiVersionFormDataQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await postApiVbyApiVersionFormData({ ...options, ...queryKey[0], @@ -573,7 +590,7 @@ export const postApiVbyApiVersionFormDataOptions = (options?: Options) => createQueryKey('callWithDefaultParameters', options); export const callWithDefaultParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultParameters({ ...options, ...queryKey[0], @@ -604,15 +622,16 @@ export const callWithDefaultParametersOptions = (options?: Options) => createQueryKey('callWithDefaultOptionalParameters', options); export const callWithDefaultOptionalParametersOptions = (options?: Options) => { + const queryKey = callWithDefaultOptionalParametersQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDefaultOptionalParameters({ ...options, ...queryKey[0], @@ -621,7 +640,7 @@ export const callWithDefaultOptionalParametersOptions = (options?: Options) => createQueryKey('duplicateName2', options); export const duplicateName2Options = (options?: Options) => { + const queryKey = duplicateName2QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName2({ ...options, ...queryKey[0], @@ -680,15 +700,16 @@ export const duplicateName2Options = (options?: Options) => }); return data; }, - queryKey: duplicateName2QueryKey(options) + queryKey }); }; export const duplicateName3QueryKey = (options?: Options) => createQueryKey('duplicateName3', options); export const duplicateName3Options = (options?: Options) => { + const queryKey = duplicateName3QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await duplicateName3({ ...options, ...queryKey[0], @@ -697,7 +718,7 @@ export const duplicateName3Options = (options?: Options) => }); return data; }, - queryKey: duplicateName3QueryKey(options) + queryKey }); }; @@ -732,8 +753,9 @@ export const duplicateName4Mutation = (options?: Partial) => createQueryKey('callWithNoContentResponse', options); export const callWithNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithNoContentResponse({ ...options, ...queryKey[0], @@ -742,15 +764,16 @@ export const callWithNoContentResponseOptions = (options?: Options) => createQueryKey('callWithResponseAndNoContentResponse', options); export const callWithResponseAndNoContentResponseOptions = (options?: Options) => { + const queryKey = callWithResponseAndNoContentResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponseAndNoContentResponse({ ...options, ...queryKey[0], @@ -759,15 +782,16 @@ export const callWithResponseAndNoContentResponseOptions = (options?: Options) => createQueryKey('dummyA', options); export const dummyAOptions = (options?: Options) => { + const queryKey = dummyAQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyA({ ...options, ...queryKey[0], @@ -776,15 +800,16 @@ export const dummyAOptions = (options?: Options) => { }); return data; }, - queryKey: dummyAQueryKey(options) + queryKey }); }; export const dummyBQueryKey = (options?: Options) => createQueryKey('dummyB', options); export const dummyBOptions = (options?: Options) => { + const queryKey = dummyBQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await dummyB({ ...options, ...queryKey[0], @@ -793,15 +818,16 @@ export const dummyBOptions = (options?: Options) => { }); return data; }, - queryKey: dummyBQueryKey(options) + queryKey }); }; export const callWithResponseQueryKey = (options?: Options) => createQueryKey('callWithResponse', options); export const callWithResponseOptions = (options?: Options) => { + const queryKey = callWithResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResponse({ ...options, ...queryKey[0], @@ -810,15 +836,16 @@ export const callWithResponseOptions = (options?: Options) }); return data; }, - queryKey: callWithResponseQueryKey(options) + queryKey }); }; export const callWithDuplicateResponsesQueryKey = (options?: Options) => createQueryKey('callWithDuplicateResponses', options); export const callWithDuplicateResponsesOptions = (options?: Options) => { + const queryKey = callWithDuplicateResponsesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithDuplicateResponses({ ...options, ...queryKey[0], @@ -827,7 +854,7 @@ export const callWithDuplicateResponsesOptions = (options?: Options) => createQueryKey('collectionFormat', options); export const collectionFormatOptions = (options: Options) => { + const queryKey = collectionFormatQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await collectionFormat({ ...options, ...queryKey[0], @@ -872,15 +900,16 @@ export const collectionFormatOptions = (options: Options) }); return data; }, - queryKey: collectionFormatQueryKey(options) + queryKey }); }; export const typesQueryKey = (options: Options) => createQueryKey('types', options); export const typesOptions = (options: Options) => { + const queryKey = typesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await types({ ...options, ...queryKey[0], @@ -889,15 +918,16 @@ export const typesOptions = (options: Options) => { }); return data; }, - queryKey: typesQueryKey(options) + queryKey }); }; export const uploadFileQueryKey = (options: Options) => createQueryKey('uploadFile', options); export const uploadFileOptions = (options: Options) => { + const queryKey = uploadFileQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await uploadFile({ ...options, ...queryKey[0], @@ -906,7 +936,7 @@ export const uploadFileOptions = (options: Options) => { }); return data; }, - queryKey: uploadFileQueryKey(options) + queryKey }); }; @@ -927,8 +957,9 @@ export const uploadFileMutation = (options?: Partial>) = export const fileResponseQueryKey = (options: Options) => createQueryKey('fileResponse', options); export const fileResponseOptions = (options: Options) => { + const queryKey = fileResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await fileResponse({ ...options, ...queryKey[0], @@ -937,15 +968,16 @@ export const fileResponseOptions = (options: Options) => { }); return data; }, - queryKey: fileResponseQueryKey(options) + queryKey }); }; export const complexTypesQueryKey = (options: Options) => createQueryKey('complexTypes', options); export const complexTypesOptions = (options: Options) => { + const queryKey = complexTypesQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await complexTypes({ ...options, ...queryKey[0], @@ -954,15 +986,16 @@ export const complexTypesOptions = (options: Options) => { }); return data; }, - queryKey: complexTypesQueryKey(options) + queryKey }); }; export const multipartResponseQueryKey = (options?: Options) => createQueryKey('multipartResponse', options); export const multipartResponseOptions = (options?: Options) => { + const queryKey = multipartResponseQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartResponse({ ...options, ...queryKey[0], @@ -971,15 +1004,16 @@ export const multipartResponseOptions = (options?: Options) => createQueryKey('multipartRequest', options); export const multipartRequestOptions = (options?: Options) => { + const queryKey = multipartRequestQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await multipartRequest({ ...options, ...queryKey[0], @@ -988,7 +1022,7 @@ export const multipartRequestOptions = (options?: Options) }); return data; }, - queryKey: multipartRequestQueryKey(options) + queryKey }); }; @@ -1023,8 +1057,9 @@ export const complexParamsMutation = (options?: Partial) => createQueryKey('callWithResultFromHeader', options); export const callWithResultFromHeaderOptions = (options?: Options) => { + const queryKey = callWithResultFromHeaderQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await callWithResultFromHeader({ ...options, ...queryKey[0], @@ -1033,7 +1068,7 @@ export const callWithResultFromHeaderOptions = (options?: Options) => createQueryKey('testErrorCode', options); export const testErrorCodeOptions = (options: Options) => { + const queryKey = testErrorCodeQueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await testErrorCode({ ...options, ...queryKey[0], @@ -1064,7 +1100,7 @@ export const testErrorCodeOptions = (options: Options) => { }); return data; }, - queryKey: testErrorCodeQueryKey(options) + queryKey }); }; @@ -1085,8 +1121,9 @@ export const testErrorCodeMutation = (options?: Partial) => createQueryKey('nonAsciiæøåÆøÅöôêÊ字符串', options); export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options) => { + const queryKey = nonAsciiæøåÆøÅöôêÊ字符串QueryKey(options); return queryOptions({ - queryFn: async ({ queryKey, signal }) => { + queryFn: async ({ signal }) => { const { data } = await nonAsciiæøåÆøÅöôêÊ字符串({ ...options, ...queryKey[0], @@ -1095,7 +1132,7 @@ export const nonAsciiæøåÆøÅöôêÊ字符串Options = (options: Options = [ + Pick & { + _id: string; + _infinite?: boolean; + }, +]; + +export const createQueryKey = ( + id: string, + options?: TOptions, + infinite?: boolean, +): [QueryKey[0]] => { + const params: QueryKey[0] = { + _id: id, + baseUrl: (options?.client ?? _heyApiClient).getConfig().baseUrl, + } as QueryKey[0]; + if (infinite) { + params._infinite = infinite; + } + if (options?.body) { + params.body = options.body; + } + if (options?.headers) { + params.headers = options.headers; + } + if (options?.path) { + params.path = options.path; + } + if (options?.query) { + params.query = options.query; + } + return [params]; +}; + +export const createInfiniteParams = < + K extends Pick[0], 'body' | 'headers' | 'path' | 'query'>, +>( + queryKey: QueryKey, + page: K, +) => { + const params = queryKey[0]; + if (page.body) { + params.body = { + ...(queryKey[0].body as any), + ...(page.body as any), + }; + } + if (page.headers) { + params.headers = { + ...queryKey[0].headers, + ...page.headers, + }; + } + if (page.path) { + params.path = { + ...(queryKey[0].path as any), + ...(page.path as any), + }; + } + if (page.query) { + params.query = { + ...(queryKey[0].query as any), + ...(page.query as any), + }; + } + return params as unknown as typeof page; +}; diff --git a/packages/openapi-ts/test/openapi-ts.config.ts b/packages/openapi-ts/test/openapi-ts.config.ts index 096e06f39..9dd08ba3f 100644 --- a/packages/openapi-ts/test/openapi-ts.config.ts +++ b/packages/openapi-ts/test/openapi-ts.config.ts @@ -78,6 +78,7 @@ export default defineConfig({ // @ts-ignore { name: '@tanstack/react-query', + runtimeConfigPath: './hey-api.ts', }, // @ts-ignore { diff --git a/packages/openapi-ts/test/plugins.test.ts b/packages/openapi-ts/test/plugins.test.ts index 45f1aa774..55f900d58 100644 --- a/packages/openapi-ts/test/plugins.test.ts +++ b/packages/openapi-ts/test/plugins.test.ts @@ -260,6 +260,20 @@ for (const version of versions) { }), description: 'handles various schema types and formats', }, + { + config: createConfig({ + output: 'runtimeConfigPath', + plugins: [ + { + name: '@tanstack/angular-query-experimental', + runtimeConfigPath: './runtimeConfigPath', + }, + '@hey-api/client-fetch', + ], + }), + description: + 'generate Fetch API client with TanStack Angular Query Experimental plugin providing a runtimeConfigPath that includes a transformQueryKey method', + }, ]; it.each(scenarios)('$description', async ({ config }) => { diff --git a/packages/openapi-ts/test/runtimeConfigPath.ts b/packages/openapi-ts/test/runtimeConfigPath.ts new file mode 100644 index 000000000..6ec7a3b07 --- /dev/null +++ b/packages/openapi-ts/test/runtimeConfigPath.ts @@ -0,0 +1,6 @@ +import type { QueryKey } from './hey-api'; + +export const transformQueryKey = >(queryKey: T) => [ + 'somePrefix', + ...queryKey, +];