fork of hey-api/openapi-ts because I need some additional things

Merge pull request #1513 from hey-api/refactor/plugin-tanstack-query

refactor: split tanstack query plugin into modules

authored by

Lubos and committed by
GitHub
78e68db2 cc505ee2

+1406 -1269
+7
packages/openapi-ts/src/plugins/@tanstack/query-core/client.ts
··· 1 + import { getConfig } from '../../../utils/config'; 2 + 3 + // TODO: this function could be moved so other plugins can reuse it 4 + export const getClientBaseUrlKey = () => { 5 + const config = getConfig(); 6 + return config.client.name === '@hey-api/client-axios' ? 'baseURL' : 'baseUrl'; 7 + };
+482
packages/openapi-ts/src/plugins/@tanstack/query-core/infiniteQueryOptions.ts
··· 1 + import ts from 'typescript'; 2 + 3 + import { compiler } from '../../../compiler'; 4 + import { tsNodeToString } from '../../../compiler/utils'; 5 + import { clientApi } from '../../../generate/client'; 6 + import { 7 + hasOperationDataRequired, 8 + operationPagination, 9 + } from '../../../ir/operation'; 10 + import type { IR } from '../../../ir/types'; 11 + import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; 12 + import { schemaToType } from '../../@hey-api/typescript/plugin'; 13 + import { 14 + createQueryKeyFunction, 15 + createQueryKeyType, 16 + queryKeyFunctionIdentifier, 17 + queryKeyName, 18 + queryKeyStatement, 19 + } from './queryKey'; 20 + import type { PluginInstance, PluginState } from './types'; 21 + import { useTypeData, useTypeError, useTypeResponse } from './useType'; 22 + 23 + const createInfiniteParamsFn = 'createInfiniteParams'; 24 + const infiniteQueryOptionsFn = 'infiniteQueryOptions'; 25 + 26 + const createInfiniteParamsFunction = ({ 27 + context, 28 + plugin, 29 + }: { 30 + context: IR.Context; 31 + plugin: PluginInstance; 32 + }) => { 33 + const file = context.file({ id: plugin.name })!; 34 + 35 + const fn = compiler.constVariable({ 36 + expression: compiler.arrowFunction({ 37 + multiLine: true, 38 + parameters: [ 39 + { 40 + name: 'queryKey', 41 + type: compiler.typeReferenceNode({ 42 + typeName: `QueryKey<${clientApi.Options.name}>`, 43 + }), 44 + }, 45 + { 46 + name: 'page', 47 + type: compiler.typeReferenceNode({ typeName: 'K' }), 48 + }, 49 + ], 50 + statements: [ 51 + compiler.constVariable({ 52 + expression: compiler.identifier({ 53 + text: 'queryKey[0]', 54 + }), 55 + name: 'params', 56 + }), 57 + compiler.ifStatement({ 58 + expression: compiler.propertyAccessExpression({ 59 + expression: compiler.identifier({ 60 + text: 'page', 61 + }), 62 + name: compiler.identifier({ text: 'body' }), 63 + }), 64 + thenStatement: compiler.block({ 65 + statements: [ 66 + compiler.expressionToStatement({ 67 + expression: compiler.binaryExpression({ 68 + left: compiler.propertyAccessExpression({ 69 + expression: 'params', 70 + name: 'body', 71 + }), 72 + right: compiler.objectExpression({ 73 + multiLine: true, 74 + obj: [ 75 + { 76 + assertion: 'any', 77 + spread: 'queryKey[0].body', 78 + }, 79 + { 80 + assertion: 'any', 81 + spread: 'page.body', 82 + }, 83 + ], 84 + }), 85 + }), 86 + }), 87 + ], 88 + }), 89 + }), 90 + compiler.ifStatement({ 91 + expression: compiler.propertyAccessExpression({ 92 + expression: compiler.identifier({ 93 + text: 'page', 94 + }), 95 + name: compiler.identifier({ text: 'headers' }), 96 + }), 97 + thenStatement: compiler.block({ 98 + statements: [ 99 + compiler.expressionToStatement({ 100 + expression: compiler.binaryExpression({ 101 + left: compiler.propertyAccessExpression({ 102 + expression: 'params', 103 + name: 'headers', 104 + }), 105 + right: compiler.objectExpression({ 106 + multiLine: true, 107 + obj: [ 108 + { 109 + spread: 'queryKey[0].headers', 110 + }, 111 + { 112 + spread: 'page.headers', 113 + }, 114 + ], 115 + }), 116 + }), 117 + }), 118 + ], 119 + }), 120 + }), 121 + compiler.ifStatement({ 122 + expression: compiler.propertyAccessExpression({ 123 + expression: compiler.identifier({ 124 + text: 'page', 125 + }), 126 + name: compiler.identifier({ text: 'path' }), 127 + }), 128 + thenStatement: compiler.block({ 129 + statements: [ 130 + compiler.expressionToStatement({ 131 + expression: compiler.binaryExpression({ 132 + left: compiler.propertyAccessExpression({ 133 + expression: 'params', 134 + name: 'path', 135 + }), 136 + right: compiler.objectExpression({ 137 + multiLine: true, 138 + obj: [ 139 + { 140 + assertion: 'any', 141 + spread: 'queryKey[0].path', 142 + }, 143 + { 144 + assertion: 'any', 145 + spread: 'page.path', 146 + }, 147 + ], 148 + }), 149 + }), 150 + }), 151 + ], 152 + }), 153 + }), 154 + compiler.ifStatement({ 155 + expression: compiler.propertyAccessExpression({ 156 + expression: compiler.identifier({ 157 + text: 'page', 158 + }), 159 + name: compiler.identifier({ text: 'query' }), 160 + }), 161 + thenStatement: compiler.block({ 162 + statements: [ 163 + compiler.expressionToStatement({ 164 + expression: compiler.binaryExpression({ 165 + left: compiler.propertyAccessExpression({ 166 + expression: 'params', 167 + name: 'query', 168 + }), 169 + right: compiler.objectExpression({ 170 + multiLine: true, 171 + obj: [ 172 + { 173 + assertion: 'any', 174 + spread: 'queryKey[0].query', 175 + }, 176 + { 177 + assertion: 'any', 178 + spread: 'page.query', 179 + }, 180 + ], 181 + }), 182 + }), 183 + }), 184 + ], 185 + }), 186 + }), 187 + compiler.returnVariable({ 188 + expression: ts.factory.createAsExpression( 189 + ts.factory.createAsExpression( 190 + compiler.identifier({ text: 'params' }), 191 + ts.factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword), 192 + ), 193 + ts.factory.createTypeQueryNode( 194 + compiler.identifier({ text: 'page' }), 195 + ), 196 + ), 197 + }), 198 + ], 199 + types: [ 200 + { 201 + extends: compiler.typeReferenceNode({ 202 + typeName: compiler.identifier({ 203 + text: `Pick<QueryKey<${clientApi.Options.name}>[0], 'body' | 'headers' | 'path' | 'query'>`, 204 + }), 205 + }), 206 + name: 'K', 207 + }, 208 + ], 209 + }), 210 + name: createInfiniteParamsFn, 211 + }); 212 + file.add(fn); 213 + }; 214 + 215 + const infiniteQueryOptionsFunctionIdentifier = ({ 216 + context, 217 + operation, 218 + }: { 219 + context: IR.Context; 220 + operation: IR.OperationObject; 221 + }) => 222 + `${serviceFunctionIdentifier({ 223 + config: context.config, 224 + id: operation.id, 225 + operation, 226 + })}InfiniteOptions`; 227 + 228 + export const createInfiniteQueryOptions = ({ 229 + context, 230 + operation, 231 + plugin, 232 + queryFn, 233 + state, 234 + }: { 235 + context: IR.Context; 236 + operation: IR.OperationObject; 237 + plugin: PluginInstance; 238 + queryFn: string; 239 + state: PluginState; 240 + }) => { 241 + if ( 242 + !plugin.infiniteQueryOptions || 243 + !(['get', 'post'] as (typeof operation.method)[]).includes(operation.method) 244 + ) { 245 + return state; 246 + } 247 + 248 + const pagination = operationPagination({ context, operation }); 249 + 250 + if (!pagination) { 251 + return state; 252 + } 253 + 254 + const file = context.file({ id: plugin.name })!; 255 + const isRequired = hasOperationDataRequired(operation); 256 + 257 + if (!state.hasInfiniteQueries) { 258 + state.hasInfiniteQueries = true; 259 + 260 + if (!state.hasCreateQueryKeyParamsFunction) { 261 + createQueryKeyType({ context, plugin }); 262 + createQueryKeyFunction({ context, plugin }); 263 + state.hasCreateQueryKeyParamsFunction = true; 264 + } 265 + 266 + if (!state.hasCreateInfiniteParamsFunction) { 267 + createInfiniteParamsFunction({ context, plugin }); 268 + state.hasCreateInfiniteParamsFunction = true; 269 + } 270 + 271 + file.import({ 272 + module: plugin.name, 273 + name: infiniteQueryOptionsFn, 274 + }); 275 + 276 + state.typeInfiniteData = file.import({ 277 + asType: true, 278 + module: plugin.name, 279 + name: 'InfiniteData', 280 + }); 281 + } 282 + 283 + state.hasUsedQueryFn = true; 284 + 285 + const typeData = useTypeData({ context, operation, plugin }); 286 + const typeError = useTypeError({ context, operation, plugin }); 287 + const typeResponse = useTypeResponse({ context, operation, plugin }); 288 + 289 + const typeQueryKey = `${queryKeyName}<${typeData}>`; 290 + const typePageObjectParam = `Pick<${typeQueryKey}[0], 'body' | 'headers' | 'path' | 'query'>`; 291 + // TODO: parser - this is a bit clunky, need to compile type to string because 292 + // `compiler.returnFunctionCall()` accepts only strings, should be cleaned up 293 + const typePageParam = `${tsNodeToString({ 294 + node: schemaToType({ 295 + context, 296 + plugin: context.config.plugins['@hey-api/typescript'] as Parameters< 297 + typeof schemaToType 298 + >[0]['plugin'], 299 + schema: pagination.schema, 300 + }), 301 + unescape: true, 302 + })} | ${typePageObjectParam}`; 303 + 304 + const node = queryKeyStatement({ 305 + context, 306 + isInfinite: true, 307 + operation, 308 + plugin, 309 + typeQueryKey, 310 + }); 311 + file.add(node); 312 + 313 + const infiniteQueryKeyName = queryKeyFunctionIdentifier({ 314 + context, 315 + isInfinite: true, 316 + operation, 317 + }); 318 + const identifierQueryKey = file.identifier({ 319 + $ref: `#/queryKey/${infiniteQueryKeyName}`, 320 + namespace: 'value', 321 + }); 322 + 323 + const statement = compiler.constVariable({ 324 + // TODO: describe options, same as the actual function call 325 + comment: [], 326 + exportConst: true, 327 + expression: compiler.arrowFunction({ 328 + parameters: [ 329 + { 330 + isRequired, 331 + name: 'options', 332 + type: typeData, 333 + }, 334 + ], 335 + statements: [ 336 + compiler.returnFunctionCall({ 337 + args: [ 338 + compiler.objectExpression({ 339 + comments: [ 340 + { 341 + jsdoc: false, 342 + lines: ['@ts-ignore'], 343 + }, 344 + ], 345 + obj: [ 346 + { 347 + key: 'queryFn', 348 + value: compiler.arrowFunction({ 349 + async: true, 350 + multiLine: true, 351 + parameters: [ 352 + { 353 + destructure: [ 354 + { 355 + name: 'pageParam', 356 + }, 357 + { 358 + name: 'queryKey', 359 + }, 360 + { 361 + name: 'signal', 362 + }, 363 + ], 364 + }, 365 + ], 366 + statements: [ 367 + compiler.constVariable({ 368 + comment: [ 369 + { 370 + jsdoc: false, 371 + lines: ['@ts-ignore'], 372 + }, 373 + ], 374 + expression: compiler.conditionalExpression({ 375 + condition: compiler.binaryExpression({ 376 + left: compiler.typeOfExpression({ 377 + text: 'pageParam', 378 + }), 379 + operator: '===', 380 + right: compiler.ots.string('object'), 381 + }), 382 + whenFalse: compiler.objectExpression({ 383 + multiLine: true, 384 + obj: [ 385 + { 386 + key: pagination.in, 387 + value: compiler.objectExpression({ 388 + multiLine: true, 389 + obj: [ 390 + { 391 + key: pagination.name, 392 + value: compiler.identifier({ 393 + text: 'pageParam', 394 + }), 395 + }, 396 + ], 397 + }), 398 + }, 399 + ], 400 + }), 401 + whenTrue: compiler.identifier({ 402 + text: 'pageParam', 403 + }), 404 + }), 405 + name: 'page', 406 + typeName: typePageObjectParam, 407 + }), 408 + compiler.constVariable({ 409 + expression: compiler.callExpression({ 410 + functionName: createInfiniteParamsFn, 411 + parameters: ['queryKey', 'page'], 412 + }), 413 + name: 'params', 414 + }), 415 + compiler.constVariable({ 416 + destructure: true, 417 + expression: compiler.awaitExpression({ 418 + expression: compiler.callExpression({ 419 + functionName: queryFn, 420 + parameters: [ 421 + compiler.objectExpression({ 422 + multiLine: true, 423 + obj: [ 424 + { 425 + spread: 'options', 426 + }, 427 + { 428 + spread: 'params', 429 + }, 430 + { 431 + key: 'signal', 432 + shorthand: true, 433 + value: compiler.identifier({ 434 + text: 'signal', 435 + }), 436 + }, 437 + { 438 + key: 'throwOnError', 439 + value: true, 440 + }, 441 + ], 442 + }), 443 + ], 444 + }), 445 + }), 446 + name: 'data', 447 + }), 448 + compiler.returnVariable({ 449 + expression: 'data', 450 + }), 451 + ], 452 + }), 453 + }, 454 + { 455 + key: 'queryKey', 456 + value: compiler.callExpression({ 457 + functionName: identifierQueryKey.name || '', 458 + parameters: ['options'], 459 + }), 460 + }, 461 + ], 462 + }), 463 + ], 464 + name: infiniteQueryOptionsFn, 465 + // TODO: better types syntax 466 + types: [ 467 + typeResponse, 468 + typeError.name, 469 + `${typeof state.typeInfiniteData === 'string' ? state.typeInfiniteData : state.typeInfiniteData.name}<${typeResponse}>`, 470 + typeQueryKey, 471 + typePageParam, 472 + ], 473 + }), 474 + ], 475 + }), 476 + name: infiniteQueryOptionsFunctionIdentifier({ 477 + context, 478 + operation, 479 + }), 480 + }); 481 + file.add(statement); 482 + };
+145
packages/openapi-ts/src/plugins/@tanstack/query-core/mutationOptions.ts
··· 1 + import { compiler } from '../../../compiler'; 2 + import type { IR } from '../../../ir/types'; 3 + import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; 4 + import type { PluginInstance, PluginState } from './types'; 5 + import { useTypeData, useTypeError, useTypeResponse } from './useType'; 6 + 7 + const mutationOptionsFn = 'mutationOptions'; 8 + 9 + const mutationOptionsFunctionIdentifier = ({ 10 + context, 11 + operation, 12 + }: { 13 + context: IR.Context; 14 + operation: IR.OperationObject; 15 + }) => 16 + `${serviceFunctionIdentifier({ 17 + config: context.config, 18 + id: operation.id, 19 + operation, 20 + })}Mutation`; 21 + 22 + export const createMutationOptions = ({ 23 + context, 24 + operation, 25 + plugin, 26 + queryFn, 27 + state, 28 + }: { 29 + context: IR.Context; 30 + operation: IR.OperationObject; 31 + plugin: PluginInstance; 32 + queryFn: string; 33 + state: PluginState; 34 + }) => { 35 + if ( 36 + !plugin.mutationOptions || 37 + !( 38 + ['delete', 'patch', 'post', 'put'] as (typeof operation.method)[] 39 + ).includes(operation.method) 40 + ) { 41 + return state; 42 + } 43 + 44 + const mutationsType = 45 + plugin.name === '@tanstack/angular-query-experimental' || 46 + plugin.name === '@tanstack/svelte-query' || 47 + plugin.name === '@tanstack/solid-query' 48 + ? 'MutationOptions' 49 + : 'UseMutationOptions'; 50 + 51 + const file = context.file({ id: plugin.name })!; 52 + 53 + if (!state.hasMutations) { 54 + state.hasMutations = true; 55 + 56 + file.import({ 57 + asType: true, 58 + module: plugin.name, 59 + name: mutationsType, 60 + }); 61 + } 62 + 63 + state.hasUsedQueryFn = true; 64 + 65 + const typeData = useTypeData({ context, operation, plugin }); 66 + const typeError = useTypeError({ context, operation, plugin }); 67 + const typeResponse = useTypeResponse({ context, operation, plugin }); 68 + 69 + const expression = compiler.arrowFunction({ 70 + parameters: [ 71 + { 72 + isRequired: false, 73 + name: 'options', 74 + type: `Partial<${typeData}>`, 75 + }, 76 + ], 77 + statements: [ 78 + compiler.constVariable({ 79 + expression: compiler.objectExpression({ 80 + obj: [ 81 + { 82 + key: 'mutationFn', 83 + value: compiler.arrowFunction({ 84 + async: true, 85 + multiLine: true, 86 + parameters: [ 87 + { 88 + name: 'localOptions', 89 + }, 90 + ], 91 + statements: [ 92 + compiler.constVariable({ 93 + destructure: true, 94 + expression: compiler.awaitExpression({ 95 + expression: compiler.callExpression({ 96 + functionName: queryFn, 97 + parameters: [ 98 + compiler.objectExpression({ 99 + multiLine: true, 100 + obj: [ 101 + { 102 + spread: 'options', 103 + }, 104 + { 105 + spread: 'localOptions', 106 + }, 107 + { 108 + key: 'throwOnError', 109 + value: true, 110 + }, 111 + ], 112 + }), 113 + ], 114 + }), 115 + }), 116 + name: 'data', 117 + }), 118 + compiler.returnVariable({ 119 + expression: 'data', 120 + }), 121 + ], 122 + }), 123 + }, 124 + ], 125 + }), 126 + name: mutationOptionsFn, 127 + // TODO: better types syntax 128 + typeName: `${mutationsType}<${typeResponse}, ${typeError.name}, ${typeData}>`, 129 + }), 130 + compiler.returnVariable({ 131 + expression: mutationOptionsFn, 132 + }), 133 + ], 134 + }); 135 + const statement = compiler.constVariable({ 136 + // TODO: describe options, same as the actual function call 137 + comment: [], 138 + exportConst: true, 139 + expression, 140 + name: mutationOptionsFunctionIdentifier({ context, operation }), 141 + }); 142 + file.add(statement); 143 + 144 + return state; 145 + };
+54 -1236
packages/openapi-ts/src/plugins/@tanstack/query-core/plugin.ts
··· 1 - import ts from 'typescript'; 2 - 3 - import { compiler, type Property } from '../../../compiler'; 4 - import type { ImportExportItem } from '../../../compiler/module'; 5 - import { 6 - type ImportExportItemObject, 7 - tsNodeToString, 8 - } from '../../../compiler/utils'; 9 1 import { clientApi, clientModulePath } from '../../../generate/client'; 10 - import { 11 - hasOperationDataRequired, 12 - operationPagination, 13 - } from '../../../ir/operation'; 14 - import type { IR } from '../../../ir/types'; 15 - import { getConfig } from '../../../utils/config'; 16 2 import { getServiceName } from '../../../utils/postprocess'; 17 3 import { transformServiceName } from '../../../utils/transform'; 18 - import { operationOptionsType } from '../../@hey-api/sdk/plugin'; 19 4 import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; 20 - import { schemaToType } from '../../@hey-api/typescript/plugin'; 21 - import { operationIrRef } from '../../shared/utils/ref'; 22 - import type { Plugin } from '../../types'; 23 - import type { Config as AngularQueryConfig } from '../angular-query-experimental'; 24 - import type { Config as ReactQueryConfig } from '../react-query'; 25 - import type { Config as SolidQueryConfig } from '../solid-query'; 26 - import type { Config as SvelteQueryConfig } from '../svelte-query'; 27 - import type { Config as VueQueryConfig } from '../vue-query'; 28 - 29 - type PluginInstance = Plugin.Instance< 30 - | AngularQueryConfig 31 - | ReactQueryConfig 32 - | SolidQueryConfig 33 - | SvelteQueryConfig 34 - | VueQueryConfig 35 - >; 36 - 37 - const infiniteQueryOptionsFunctionIdentifier = ({ 38 - context, 39 - operation, 40 - }: { 41 - context: IR.Context; 42 - operation: IR.OperationObject; 43 - }) => 44 - `${serviceFunctionIdentifier({ 45 - config: context.config, 46 - id: operation.id, 47 - operation, 48 - })}InfiniteOptions`; 49 - 50 - const mutationOptionsFunctionIdentifier = ({ 51 - context, 52 - operation, 53 - }: { 54 - context: IR.Context; 55 - operation: IR.OperationObject; 56 - }) => 57 - `${serviceFunctionIdentifier({ 58 - config: context.config, 59 - id: operation.id, 60 - operation, 61 - })}Mutation`; 62 - 63 - const queryOptionsFunctionIdentifier = ({ 64 - context, 65 - operation, 66 - }: { 67 - context: IR.Context; 68 - operation: IR.OperationObject; 69 - }) => 70 - `${serviceFunctionIdentifier({ 71 - config: context.config, 72 - id: operation.id, 73 - operation, 74 - })}Options`; 75 - 76 - const queryKeyFunctionIdentifier = ({ 77 - context, 78 - isInfinite, 79 - operation, 80 - }: { 81 - context: IR.Context; 82 - isInfinite?: boolean; 83 - operation: IR.OperationObject; 84 - }) => 85 - `${serviceFunctionIdentifier({ 86 - config: context.config, 87 - id: operation.id, 88 - operation, 89 - })}${isInfinite ? 'Infinite' : ''}QueryKey`; 90 - 91 - const createInfiniteParamsFn = 'createInfiniteParams'; 92 - const createQueryKeyFn = 'createQueryKey'; 93 - const infiniteQueryOptionsFn = 'infiniteQueryOptions'; 94 - const mutationOptionsFn = 'mutationOptions'; 95 - const queryKeyName = 'QueryKey'; 96 - const queryOptionsFn = 'queryOptions'; 97 - const TOptionsType = 'TOptions'; 98 - 99 - const getClientBaseUrlKey = () => { 100 - const config = getConfig(); 101 - return config.client.name === '@hey-api/client-axios' ? 'baseURL' : 'baseUrl'; 102 - }; 103 - 104 - const createInfiniteParamsFunction = ({ 105 - context, 106 - plugin, 107 - }: { 108 - context: IR.Context; 109 - plugin: PluginInstance; 110 - }) => { 111 - const file = context.file({ id: plugin.name })!; 112 - 113 - const fn = compiler.constVariable({ 114 - expression: compiler.arrowFunction({ 115 - multiLine: true, 116 - parameters: [ 117 - { 118 - name: 'queryKey', 119 - type: compiler.typeReferenceNode({ 120 - typeName: `QueryKey<${clientApi.Options.name}>`, 121 - }), 122 - }, 123 - { 124 - name: 'page', 125 - type: compiler.typeReferenceNode({ typeName: 'K' }), 126 - }, 127 - ], 128 - statements: [ 129 - compiler.constVariable({ 130 - expression: compiler.identifier({ 131 - text: 'queryKey[0]', 132 - }), 133 - name: 'params', 134 - }), 135 - compiler.ifStatement({ 136 - expression: compiler.propertyAccessExpression({ 137 - expression: compiler.identifier({ 138 - text: 'page', 139 - }), 140 - name: compiler.identifier({ text: 'body' }), 141 - }), 142 - thenStatement: compiler.block({ 143 - statements: [ 144 - compiler.expressionToStatement({ 145 - expression: compiler.binaryExpression({ 146 - left: compiler.propertyAccessExpression({ 147 - expression: 'params', 148 - name: 'body', 149 - }), 150 - right: compiler.objectExpression({ 151 - multiLine: true, 152 - obj: [ 153 - { 154 - assertion: 'any', 155 - spread: 'queryKey[0].body', 156 - }, 157 - { 158 - assertion: 'any', 159 - spread: 'page.body', 160 - }, 161 - ], 162 - }), 163 - }), 164 - }), 165 - ], 166 - }), 167 - }), 168 - compiler.ifStatement({ 169 - expression: compiler.propertyAccessExpression({ 170 - expression: compiler.identifier({ 171 - text: 'page', 172 - }), 173 - name: compiler.identifier({ text: 'headers' }), 174 - }), 175 - thenStatement: compiler.block({ 176 - statements: [ 177 - compiler.expressionToStatement({ 178 - expression: compiler.binaryExpression({ 179 - left: compiler.propertyAccessExpression({ 180 - expression: 'params', 181 - name: 'headers', 182 - }), 183 - right: compiler.objectExpression({ 184 - multiLine: true, 185 - obj: [ 186 - { 187 - spread: 'queryKey[0].headers', 188 - }, 189 - { 190 - spread: 'page.headers', 191 - }, 192 - ], 193 - }), 194 - }), 195 - }), 196 - ], 197 - }), 198 - }), 199 - compiler.ifStatement({ 200 - expression: compiler.propertyAccessExpression({ 201 - expression: compiler.identifier({ 202 - text: 'page', 203 - }), 204 - name: compiler.identifier({ text: 'path' }), 205 - }), 206 - thenStatement: compiler.block({ 207 - statements: [ 208 - compiler.expressionToStatement({ 209 - expression: compiler.binaryExpression({ 210 - left: compiler.propertyAccessExpression({ 211 - expression: 'params', 212 - name: 'path', 213 - }), 214 - right: compiler.objectExpression({ 215 - multiLine: true, 216 - obj: [ 217 - { 218 - assertion: 'any', 219 - spread: 'queryKey[0].path', 220 - }, 221 - { 222 - assertion: 'any', 223 - spread: 'page.path', 224 - }, 225 - ], 226 - }), 227 - }), 228 - }), 229 - ], 230 - }), 231 - }), 232 - compiler.ifStatement({ 233 - expression: compiler.propertyAccessExpression({ 234 - expression: compiler.identifier({ 235 - text: 'page', 236 - }), 237 - name: compiler.identifier({ text: 'query' }), 238 - }), 239 - thenStatement: compiler.block({ 240 - statements: [ 241 - compiler.expressionToStatement({ 242 - expression: compiler.binaryExpression({ 243 - left: compiler.propertyAccessExpression({ 244 - expression: 'params', 245 - name: 'query', 246 - }), 247 - right: compiler.objectExpression({ 248 - multiLine: true, 249 - obj: [ 250 - { 251 - assertion: 'any', 252 - spread: 'queryKey[0].query', 253 - }, 254 - { 255 - assertion: 'any', 256 - spread: 'page.query', 257 - }, 258 - ], 259 - }), 260 - }), 261 - }), 262 - ], 263 - }), 264 - }), 265 - compiler.returnVariable({ 266 - expression: ts.factory.createAsExpression( 267 - ts.factory.createAsExpression( 268 - compiler.identifier({ text: 'params' }), 269 - ts.factory.createKeywordTypeNode(ts.SyntaxKind.UnknownKeyword), 270 - ), 271 - ts.factory.createTypeQueryNode( 272 - compiler.identifier({ text: 'page' }), 273 - ), 274 - ), 275 - }), 276 - ], 277 - types: [ 278 - { 279 - extends: compiler.typeReferenceNode({ 280 - typeName: compiler.identifier({ 281 - text: `Pick<QueryKey<${clientApi.Options.name}>[0], 'body' | 'headers' | 'path' | 'query'>`, 282 - }), 283 - }), 284 - name: 'K', 285 - }, 286 - ], 287 - }), 288 - name: createInfiniteParamsFn, 289 - }); 290 - file.add(fn); 291 - }; 292 - 293 - const createQueryKeyFunction = ({ 294 - context, 295 - plugin, 296 - }: { 297 - context: IR.Context; 298 - plugin: PluginInstance; 299 - }) => { 300 - const file = context.file({ id: plugin.name })!; 301 - 302 - const returnType = compiler.indexedAccessTypeNode({ 303 - indexType: compiler.literalTypeNode({ 304 - literal: compiler.ots.number(0), 305 - }), 306 - objectType: compiler.typeReferenceNode({ 307 - typeArguments: [compiler.typeReferenceNode({ typeName: TOptionsType })], 308 - typeName: queryKeyName, 309 - }), 310 - }); 311 - 312 - const infiniteIdentifier = compiler.identifier({ text: 'infinite' }); 313 - 314 - const identifierCreateQueryKey = file.identifier({ 315 - $ref: `#/ir/${createQueryKeyFn}`, 316 - create: true, 317 - namespace: 'value', 318 - }); 319 - 320 - const fn = compiler.constVariable({ 321 - expression: compiler.arrowFunction({ 322 - multiLine: true, 323 - parameters: [ 324 - { 325 - name: 'id', 326 - type: compiler.typeReferenceNode({ typeName: 'string' }), 327 - }, 328 - { 329 - isRequired: false, 330 - name: 'options', 331 - type: compiler.typeReferenceNode({ typeName: TOptionsType }), 332 - }, 333 - { 334 - isRequired: false, 335 - name: 'infinite', 336 - type: compiler.typeReferenceNode({ typeName: 'boolean' }), 337 - }, 338 - ], 339 - returnType, 340 - statements: [ 341 - compiler.constVariable({ 342 - assertion: returnType, 343 - expression: compiler.objectExpression({ 344 - multiLine: false, 345 - obj: [ 346 - { 347 - key: '_id', 348 - value: compiler.identifier({ text: 'id' }), 349 - }, 350 - { 351 - key: getClientBaseUrlKey(), 352 - value: compiler.identifier({ 353 - text: `(options?.client ?? client).getConfig().${getClientBaseUrlKey()}`, 354 - }), 355 - }, 356 - ], 357 - }), 358 - name: 'params', 359 - typeName: returnType, 360 - }), 361 - compiler.ifStatement({ 362 - expression: infiniteIdentifier, 363 - thenStatement: compiler.block({ 364 - statements: [ 365 - compiler.expressionToStatement({ 366 - expression: compiler.binaryExpression({ 367 - left: compiler.propertyAccessExpression({ 368 - expression: 'params', 369 - name: '_infinite', 370 - }), 371 - right: infiniteIdentifier, 372 - }), 373 - }), 374 - ], 375 - }), 376 - }), 377 - compiler.ifStatement({ 378 - expression: compiler.propertyAccessExpression({ 379 - expression: compiler.identifier({ text: 'options' }), 380 - isOptional: true, 381 - name: compiler.identifier({ text: 'body' }), 382 - }), 383 - thenStatement: compiler.block({ 384 - statements: [ 385 - compiler.expressionToStatement({ 386 - expression: compiler.binaryExpression({ 387 - left: compiler.propertyAccessExpression({ 388 - expression: 'params', 389 - name: 'body', 390 - }), 391 - right: compiler.propertyAccessExpression({ 392 - expression: 'options', 393 - name: 'body', 394 - }), 395 - }), 396 - }), 397 - ], 398 - }), 399 - }), 400 - compiler.ifStatement({ 401 - expression: compiler.propertyAccessExpression({ 402 - expression: compiler.identifier({ text: 'options' }), 403 - isOptional: true, 404 - name: compiler.identifier({ text: 'headers' }), 405 - }), 406 - thenStatement: compiler.block({ 407 - statements: [ 408 - compiler.expressionToStatement({ 409 - expression: compiler.binaryExpression({ 410 - left: compiler.propertyAccessExpression({ 411 - expression: 'params', 412 - name: 'headers', 413 - }), 414 - right: compiler.propertyAccessExpression({ 415 - expression: 'options', 416 - name: 'headers', 417 - }), 418 - }), 419 - }), 420 - ], 421 - }), 422 - }), 423 - compiler.ifStatement({ 424 - expression: compiler.propertyAccessExpression({ 425 - expression: compiler.identifier({ text: 'options' }), 426 - isOptional: true, 427 - name: compiler.identifier({ text: 'path' }), 428 - }), 429 - thenStatement: compiler.block({ 430 - statements: [ 431 - compiler.expressionToStatement({ 432 - expression: compiler.binaryExpression({ 433 - left: compiler.propertyAccessExpression({ 434 - expression: 'params', 435 - name: 'path', 436 - }), 437 - right: compiler.propertyAccessExpression({ 438 - expression: 'options', 439 - name: 'path', 440 - }), 441 - }), 442 - }), 443 - ], 444 - }), 445 - }), 446 - compiler.ifStatement({ 447 - expression: compiler.propertyAccessExpression({ 448 - expression: compiler.identifier({ text: 'options' }), 449 - isOptional: true, 450 - name: compiler.identifier({ text: 'query' }), 451 - }), 452 - thenStatement: compiler.block({ 453 - statements: [ 454 - compiler.expressionToStatement({ 455 - expression: compiler.binaryExpression({ 456 - left: compiler.propertyAccessExpression({ 457 - expression: 'params', 458 - name: 'query', 459 - }), 460 - right: compiler.propertyAccessExpression({ 461 - expression: 'options', 462 - name: 'query', 463 - }), 464 - }), 465 - }), 466 - ], 467 - }), 468 - }), 469 - compiler.returnVariable({ 470 - expression: 'params', 471 - }), 472 - ], 473 - types: [ 474 - { 475 - extends: compiler.typeReferenceNode({ 476 - typeName: compiler.identifier({ 477 - text: clientApi.Options.name, 478 - }), 479 - }), 480 - name: TOptionsType, 481 - }, 482 - ], 483 - }), 484 - name: identifierCreateQueryKey.name || '', 485 - }); 486 - file.add(fn); 487 - }; 488 - 489 - const createQueryKeyType = ({ 490 - context, 491 - plugin, 492 - }: { 493 - context: IR.Context; 494 - plugin: PluginInstance; 495 - }) => { 496 - const file = context.file({ id: plugin.name })!; 497 - 498 - const properties: Property[] = [ 499 - { 500 - name: '_id', 501 - type: compiler.keywordTypeNode({ 502 - keyword: 'string', 503 - }), 504 - }, 505 - { 506 - isRequired: false, 507 - name: '_infinite', 508 - type: compiler.keywordTypeNode({ 509 - keyword: 'boolean', 510 - }), 511 - }, 512 - ]; 513 - 514 - const queryKeyType = compiler.typeAliasDeclaration({ 515 - name: queryKeyName, 516 - type: compiler.typeTupleNode({ 517 - types: [ 518 - compiler.typeIntersectionNode({ 519 - types: [ 520 - compiler.typeReferenceNode({ 521 - typeName: `Pick<${TOptionsType}, '${getClientBaseUrlKey()}' | 'body' | 'headers' | 'path' | 'query'>`, 522 - }), 523 - compiler.typeInterfaceNode({ 524 - properties, 525 - useLegacyResolution: true, 526 - }), 527 - ], 528 - }), 529 - ], 530 - }), 531 - typeParameters: [ 532 - { 533 - extends: compiler.typeReferenceNode({ 534 - typeName: compiler.identifier({ 535 - text: clientApi.Options.name, 536 - }), 537 - }), 538 - name: TOptionsType, 539 - }, 540 - ], 541 - }); 542 - file.add(queryKeyType); 543 - }; 544 - 545 - const createQueryKeyLiteral = ({ 546 - context, 547 - id, 548 - isInfinite, 549 - plugin, 550 - }: { 551 - context: IR.Context; 552 - id: string; 553 - isInfinite?: boolean; 554 - plugin: PluginInstance; 555 - }) => { 556 - const file = context.file({ id: plugin.name })!; 557 - const identifierCreateQueryKey = file.identifier({ 558 - $ref: `#/ir/${createQueryKeyFn}`, 559 - namespace: 'value', 560 - }); 561 - const queryKeyLiteral = compiler.arrayLiteralExpression({ 562 - elements: [ 563 - compiler.callExpression({ 564 - functionName: identifierCreateQueryKey.name || '', 565 - parameters: [ 566 - compiler.ots.string(id), 567 - 'options', 568 - isInfinite ? compiler.ots.boolean(true) : undefined, 569 - ], 570 - }), 571 - ], 572 - multiLine: false, 573 - }); 574 - return queryKeyLiteral; 575 - }; 576 - 577 - const useTypeData = ({ 578 - context, 579 - operation, 580 - plugin, 581 - }: { 582 - context: IR.Context; 583 - operation: IR.OperationObject; 584 - plugin: PluginInstance; 585 - }) => { 586 - const identifierData = context.file({ id: 'types' })!.identifier({ 587 - $ref: operationIrRef({ id: operation.id, type: 'data' }), 588 - namespace: 'type', 589 - }); 590 - if (identifierData.name) { 591 - const file = context.file({ id: plugin.name })!; 592 - file.import({ 593 - asType: true, 594 - module: context 595 - .file({ id: plugin.name })! 596 - .relativePathToFile({ context, id: 'types' }), 597 - name: identifierData.name, 598 - }); 599 - } 600 - const typeData = operationOptionsType({ 601 - importedType: identifierData.name, 602 - }); 603 - return typeData; 604 - }; 605 - 606 - const useTypeError = ({ 607 - context, 608 - operation, 609 - plugin, 610 - }: { 611 - context: IR.Context; 612 - operation: IR.OperationObject; 613 - plugin: PluginInstance; 614 - }) => { 615 - const file = context.file({ id: plugin.name })!; 616 - const identifierError = context.file({ id: 'types' })!.identifier({ 617 - $ref: operationIrRef({ id: operation.id, type: 'error' }), 618 - namespace: 'type', 619 - }); 620 - if (identifierError.name) { 621 - file.import({ 622 - asType: true, 623 - module: context 624 - .file({ id: plugin.name })! 625 - .relativePathToFile({ context, id: 'types' }), 626 - name: identifierError.name, 627 - }); 628 - } 629 - let typeError: ImportExportItemObject = { 630 - asType: true, 631 - name: identifierError.name || '', 632 - }; 633 - if (!typeError.name) { 634 - typeError = file.import({ 635 - asType: true, 636 - module: plugin.name, 637 - name: 'DefaultError', 638 - }); 639 - } 640 - if (context.config.client.name === '@hey-api/client-axios') { 641 - const axiosError = file.import({ 642 - asType: true, 643 - module: 'axios', 644 - name: 'AxiosError', 645 - }); 646 - typeError = { 647 - ...axiosError, 648 - name: `${axiosError.name}<${typeError.name}>`, 649 - }; 650 - } 651 - return typeError; 652 - }; 653 - 654 - const useTypeResponse = ({ 655 - context, 656 - operation, 657 - plugin, 658 - }: { 659 - context: IR.Context; 660 - operation: IR.OperationObject; 661 - plugin: PluginInstance; 662 - }) => { 663 - const identifierResponse = context.file({ id: 'types' })!.identifier({ 664 - $ref: operationIrRef({ id: operation.id, type: 'response' }), 665 - namespace: 'type', 666 - }); 667 - if (identifierResponse.name) { 668 - const file = context.file({ id: plugin.name })!; 669 - file.import({ 670 - asType: true, 671 - module: context 672 - .file({ id: plugin.name })! 673 - .relativePathToFile({ context, id: 'types' }), 674 - name: identifierResponse.name, 675 - }); 676 - } 677 - const typeResponse = identifierResponse.name || 'unknown'; 678 - return typeResponse; 679 - }; 680 - 681 - const queryKeyStatement = ({ 682 - context, 683 - isInfinite, 684 - operation, 685 - plugin, 686 - typeQueryKey, 687 - }: { 688 - context: IR.Context; 689 - isInfinite: boolean; 690 - operation: IR.OperationObject; 691 - plugin: PluginInstance; 692 - typeQueryKey?: string; 693 - }) => { 694 - const file = context.file({ id: plugin.name })!; 695 - const typeData = useTypeData({ context, operation, plugin }); 696 - const name = queryKeyFunctionIdentifier({ 697 - context, 698 - isInfinite, 699 - operation, 700 - }); 701 - const identifierQueryKey = file.identifier({ 702 - $ref: `#/queryKey/${name}`, 703 - create: true, 704 - namespace: 'value', 705 - }); 706 - const statement = compiler.constVariable({ 707 - exportConst: true, 708 - expression: compiler.arrowFunction({ 709 - parameters: [ 710 - { 711 - isRequired: hasOperationDataRequired(operation), 712 - name: 'options', 713 - type: typeData, 714 - }, 715 - ], 716 - returnType: isInfinite ? typeQueryKey : undefined, 717 - statements: createQueryKeyLiteral({ 718 - context, 719 - id: operation.id, 720 - isInfinite, 721 - plugin, 722 - }), 723 - }), 724 - name: identifierQueryKey.name || '', 725 - }); 726 - return statement; 727 - }; 5 + import { createInfiniteQueryOptions } from './infiniteQueryOptions'; 6 + import { createMutationOptions } from './mutationOptions'; 7 + import { createQueryOptions } from './queryOptions'; 8 + import type { PluginHandler, PluginState } from './types'; 728 9 729 - export const handler: Plugin.Handler< 730 - | ReactQueryConfig 731 - | AngularQueryConfig 732 - | SolidQueryConfig 733 - | SvelteQueryConfig 734 - | VueQueryConfig 735 - > = ({ context, plugin }) => { 10 + export const handler: PluginHandler = ({ context, plugin }) => { 736 11 const file = context.createFile({ 737 12 exportFromIndex: plugin.exportFromIndex, 738 13 id: plugin.name, 739 14 path: plugin.output, 740 15 }); 741 16 742 - file.import({ 743 - ...clientApi.Options, 744 - module: clientModulePath({ 745 - config: context.config, 746 - sourceOutput: plugin.output, 747 - }), 17 + const state: PluginState = { 18 + hasCreateInfiniteParamsFunction: false, 19 + hasCreateQueryKeyParamsFunction: false, 20 + hasInfiniteQueries: false, 21 + hasMutations: false, 22 + hasQueries: false, 23 + hasUsedQueryFn: false, 24 + typeInfiniteData: undefined!, 25 + }; 26 + 27 + context.subscribe('before', () => { 28 + file.import({ 29 + ...clientApi.Options, 30 + module: clientModulePath({ 31 + config: context.config, 32 + sourceOutput: plugin.output, 33 + }), 34 + }); 748 35 }); 749 36 750 - const mutationsType = 751 - plugin.name === '@tanstack/angular-query-experimental' || 752 - plugin.name === '@tanstack/svelte-query' || 753 - plugin.name === '@tanstack/solid-query' 754 - ? 'MutationOptions' 755 - : 'UseMutationOptions'; 37 + context.subscribe('operation', ({ operation }) => { 38 + state.hasUsedQueryFn = false; 756 39 757 - let typeInfiniteData!: ImportExportItem; 758 - let hasCreateInfiniteParamsFunction = false; 759 - let hasCreateQueryKeyParamsFunction = false; 760 - let hasInfiniteQueries = false; 761 - let hasMutations = false; 762 - let hasQueries = false; 763 - 764 - context.subscribe('operation', ({ operation }) => { 765 40 const queryFn = [ 766 41 context.config.plugins['@hey-api/sdk']?.asClass && 767 42 transformServiceName({ ··· 777 52 ] 778 53 .filter(Boolean) 779 54 .join('.'); 780 - let hasUsedQueryFn = false; 781 55 782 - const isRequired = hasOperationDataRequired(operation); 56 + createQueryOptions({ 57 + context, 58 + operation, 59 + plugin, 60 + queryFn, 61 + state, 62 + }); 783 63 784 - // queries 785 - if ( 786 - plugin.queryOptions && 787 - (['get', 'post'] as (typeof operation.method)[]).includes( 788 - operation.method, 789 - ) 790 - ) { 791 - if (!hasQueries) { 792 - hasQueries = true; 64 + createInfiniteQueryOptions({ 65 + context, 66 + operation, 67 + plugin, 68 + queryFn, 69 + state, 70 + }); 793 71 794 - if (!hasCreateQueryKeyParamsFunction) { 795 - createQueryKeyType({ context, plugin }); 796 - createQueryKeyFunction({ context, plugin }); 797 - hasCreateQueryKeyParamsFunction = true; 798 - } 72 + createMutationOptions({ 73 + context, 74 + operation, 75 + plugin, 76 + queryFn, 77 + state, 78 + }); 799 79 800 - file.import({ 801 - module: plugin.name, 802 - name: queryOptionsFn, 803 - }); 804 - } 805 - 806 - hasUsedQueryFn = true; 807 - 808 - const node = queryKeyStatement({ 809 - context, 810 - isInfinite: false, 811 - operation, 812 - plugin, 80 + if (state.hasUsedQueryFn) { 81 + file.import({ 82 + module: file.relativePathToFile({ context, id: 'sdk' }), 83 + name: queryFn.split('.')[0]!, 813 84 }); 814 - file.add(node); 815 - 816 - const typeData = useTypeData({ context, operation, plugin }); 817 - 818 - const queryKeyName = queryKeyFunctionIdentifier({ 819 - context, 820 - isInfinite: false, 821 - operation, 822 - }); 823 - const identifierQueryKey = file.identifier({ 824 - $ref: `#/queryKey/${queryKeyName}`, 825 - namespace: 'value', 826 - }); 827 - 828 - const statement = compiler.constVariable({ 829 - // TODO: describe options, same as the actual function call 830 - comment: [], 831 - exportConst: true, 832 - expression: compiler.arrowFunction({ 833 - parameters: [ 834 - { 835 - isRequired, 836 - name: 'options', 837 - type: typeData, 838 - }, 839 - ], 840 - statements: [ 841 - compiler.returnFunctionCall({ 842 - args: [ 843 - compiler.objectExpression({ 844 - obj: [ 845 - { 846 - key: 'queryFn', 847 - value: compiler.arrowFunction({ 848 - async: true, 849 - multiLine: true, 850 - parameters: [ 851 - { 852 - destructure: [ 853 - { 854 - name: 'queryKey', 855 - }, 856 - { 857 - name: 'signal', 858 - }, 859 - ], 860 - }, 861 - ], 862 - statements: [ 863 - compiler.constVariable({ 864 - destructure: true, 865 - expression: compiler.awaitExpression({ 866 - expression: compiler.callExpression({ 867 - functionName: queryFn, 868 - parameters: [ 869 - compiler.objectExpression({ 870 - multiLine: true, 871 - obj: [ 872 - { 873 - spread: 'options', 874 - }, 875 - { 876 - spread: 'queryKey[0]', 877 - }, 878 - { 879 - key: 'signal', 880 - shorthand: true, 881 - value: compiler.identifier({ 882 - text: 'signal', 883 - }), 884 - }, 885 - { 886 - key: 'throwOnError', 887 - value: true, 888 - }, 889 - ], 890 - }), 891 - ], 892 - }), 893 - }), 894 - name: 'data', 895 - }), 896 - compiler.returnVariable({ 897 - expression: 'data', 898 - }), 899 - ], 900 - }), 901 - }, 902 - { 903 - key: 'queryKey', 904 - value: compiler.callExpression({ 905 - functionName: identifierQueryKey.name || '', 906 - parameters: ['options'], 907 - }), 908 - }, 909 - ], 910 - }), 911 - ], 912 - name: queryOptionsFn, 913 - }), 914 - ], 915 - }), 916 - name: queryOptionsFunctionIdentifier({ context, operation }), 917 - // TODO: add type error 918 - // TODO: AxiosError<PutSubmissionMetaError> 919 - }); 920 - file.add(statement); 921 85 } 922 - 923 - // infinite queries 924 - if ( 925 - plugin.infiniteQueryOptions && 926 - (['get', 'post'] as (typeof operation.method)[]).includes( 927 - operation.method, 928 - ) 929 - ) { 930 - const pagination = operationPagination({ context, operation }); 931 - 932 - if (pagination) { 933 - if (!hasInfiniteQueries) { 934 - hasInfiniteQueries = true; 935 - 936 - if (!hasCreateQueryKeyParamsFunction) { 937 - createQueryKeyType({ context, plugin }); 938 - createQueryKeyFunction({ context, plugin }); 939 - hasCreateQueryKeyParamsFunction = true; 940 - } 941 - 942 - if (!hasCreateInfiniteParamsFunction) { 943 - createInfiniteParamsFunction({ context, plugin }); 944 - hasCreateInfiniteParamsFunction = true; 945 - } 946 - 947 - file.import({ 948 - module: plugin.name, 949 - name: infiniteQueryOptionsFn, 950 - }); 86 + }); 951 87 952 - typeInfiniteData = file.import({ 953 - asType: true, 954 - module: plugin.name, 955 - name: 'InfiniteData', 956 - }); 957 - } 958 - 959 - hasUsedQueryFn = true; 960 - 961 - const typeData = useTypeData({ context, operation, plugin }); 962 - const typeError = useTypeError({ context, operation, plugin }); 963 - const typeResponse = useTypeResponse({ context, operation, plugin }); 964 - 965 - const typeQueryKey = `${queryKeyName}<${typeData}>`; 966 - const typePageObjectParam = `Pick<${typeQueryKey}[0], 'body' | 'headers' | 'path' | 'query'>`; 967 - // TODO: parser - this is a bit clunky, need to compile type to string because 968 - // `compiler.returnFunctionCall()` accepts only strings, should be cleaned up 969 - const typePageParam = `${tsNodeToString({ 970 - node: schemaToType({ 971 - context, 972 - plugin: context.config.plugins['@hey-api/typescript'] as Parameters< 973 - typeof schemaToType 974 - >[0]['plugin'], 975 - schema: pagination.schema, 976 - }), 977 - unescape: true, 978 - })} | ${typePageObjectParam}`; 979 - 980 - const node = queryKeyStatement({ 981 - context, 982 - isInfinite: true, 983 - operation, 984 - plugin, 985 - typeQueryKey, 986 - }); 987 - file.add(node); 988 - 989 - const infiniteQueryKeyName = queryKeyFunctionIdentifier({ 990 - context, 991 - isInfinite: true, 992 - operation, 993 - }); 994 - const identifierQueryKey = file.identifier({ 995 - $ref: `#/queryKey/${infiniteQueryKeyName}`, 996 - namespace: 'value', 997 - }); 998 - 999 - const statement = compiler.constVariable({ 1000 - // TODO: describe options, same as the actual function call 1001 - comment: [], 1002 - exportConst: true, 1003 - expression: compiler.arrowFunction({ 1004 - parameters: [ 1005 - { 1006 - isRequired, 1007 - name: 'options', 1008 - type: typeData, 1009 - }, 1010 - ], 1011 - statements: [ 1012 - compiler.returnFunctionCall({ 1013 - args: [ 1014 - compiler.objectExpression({ 1015 - comments: [ 1016 - { 1017 - jsdoc: false, 1018 - lines: ['@ts-ignore'], 1019 - }, 1020 - ], 1021 - obj: [ 1022 - { 1023 - key: 'queryFn', 1024 - value: compiler.arrowFunction({ 1025 - async: true, 1026 - multiLine: true, 1027 - parameters: [ 1028 - { 1029 - destructure: [ 1030 - { 1031 - name: 'pageParam', 1032 - }, 1033 - { 1034 - name: 'queryKey', 1035 - }, 1036 - { 1037 - name: 'signal', 1038 - }, 1039 - ], 1040 - }, 1041 - ], 1042 - statements: [ 1043 - compiler.constVariable({ 1044 - comment: [ 1045 - { 1046 - jsdoc: false, 1047 - lines: ['@ts-ignore'], 1048 - }, 1049 - ], 1050 - expression: compiler.conditionalExpression({ 1051 - condition: compiler.binaryExpression({ 1052 - left: compiler.typeOfExpression({ 1053 - text: 'pageParam', 1054 - }), 1055 - operator: '===', 1056 - right: compiler.ots.string('object'), 1057 - }), 1058 - whenFalse: compiler.objectExpression({ 1059 - multiLine: true, 1060 - obj: [ 1061 - { 1062 - key: pagination.in, 1063 - value: compiler.objectExpression({ 1064 - multiLine: true, 1065 - obj: [ 1066 - { 1067 - key: pagination.name, 1068 - value: compiler.identifier({ 1069 - text: 'pageParam', 1070 - }), 1071 - }, 1072 - ], 1073 - }), 1074 - }, 1075 - ], 1076 - }), 1077 - whenTrue: compiler.identifier({ 1078 - text: 'pageParam', 1079 - }), 1080 - }), 1081 - name: 'page', 1082 - typeName: typePageObjectParam, 1083 - }), 1084 - compiler.constVariable({ 1085 - expression: compiler.callExpression({ 1086 - functionName: createInfiniteParamsFn, 1087 - parameters: ['queryKey', 'page'], 1088 - }), 1089 - name: 'params', 1090 - }), 1091 - compiler.constVariable({ 1092 - destructure: true, 1093 - expression: compiler.awaitExpression({ 1094 - expression: compiler.callExpression({ 1095 - functionName: queryFn, 1096 - parameters: [ 1097 - compiler.objectExpression({ 1098 - multiLine: true, 1099 - obj: [ 1100 - { 1101 - spread: 'options', 1102 - }, 1103 - { 1104 - spread: 'params', 1105 - }, 1106 - { 1107 - key: 'signal', 1108 - shorthand: true, 1109 - value: compiler.identifier({ 1110 - text: 'signal', 1111 - }), 1112 - }, 1113 - { 1114 - key: 'throwOnError', 1115 - value: true, 1116 - }, 1117 - ], 1118 - }), 1119 - ], 1120 - }), 1121 - }), 1122 - name: 'data', 1123 - }), 1124 - compiler.returnVariable({ 1125 - expression: 'data', 1126 - }), 1127 - ], 1128 - }), 1129 - }, 1130 - { 1131 - key: 'queryKey', 1132 - value: compiler.callExpression({ 1133 - functionName: identifierQueryKey.name || '', 1134 - parameters: ['options'], 1135 - }), 1136 - }, 1137 - ], 1138 - }), 1139 - ], 1140 - name: infiniteQueryOptionsFn, 1141 - // TODO: better types syntax 1142 - types: [ 1143 - typeResponse, 1144 - typeError.name, 1145 - `${typeof typeInfiniteData === 'string' ? typeInfiniteData : typeInfiniteData.name}<${typeResponse}>`, 1146 - typeQueryKey, 1147 - typePageParam, 1148 - ], 1149 - }), 1150 - ], 1151 - }), 1152 - name: infiniteQueryOptionsFunctionIdentifier({ 1153 - context, 1154 - operation, 1155 - }), 1156 - }); 1157 - file.add(statement); 1158 - } 1159 - } 1160 - 1161 - // mutations 1162 - if ( 1163 - plugin.mutationOptions && 1164 - ( 1165 - ['delete', 'patch', 'post', 'put'] as (typeof operation.method)[] 1166 - ).includes(operation.method) 1167 - ) { 1168 - if (!hasMutations) { 1169 - hasMutations = true; 1170 - 1171 - file.import({ 1172 - asType: true, 1173 - module: plugin.name, 1174 - name: mutationsType, 1175 - }); 1176 - } 1177 - 1178 - hasUsedQueryFn = true; 1179 - 1180 - const typeData = useTypeData({ context, operation, plugin }); 1181 - const typeError = useTypeError({ context, operation, plugin }); 1182 - const typeResponse = useTypeResponse({ context, operation, plugin }); 1183 - 1184 - const expression = compiler.arrowFunction({ 1185 - parameters: [ 1186 - { 1187 - isRequired: false, 1188 - name: 'options', 1189 - type: `Partial<${typeData}>`, 1190 - }, 1191 - ], 1192 - statements: [ 1193 - compiler.constVariable({ 1194 - expression: compiler.objectExpression({ 1195 - obj: [ 1196 - { 1197 - key: 'mutationFn', 1198 - value: compiler.arrowFunction({ 1199 - async: true, 1200 - multiLine: true, 1201 - parameters: [ 1202 - { 1203 - name: 'localOptions', 1204 - }, 1205 - ], 1206 - statements: [ 1207 - compiler.constVariable({ 1208 - destructure: true, 1209 - expression: compiler.awaitExpression({ 1210 - expression: compiler.callExpression({ 1211 - functionName: queryFn, 1212 - parameters: [ 1213 - compiler.objectExpression({ 1214 - multiLine: true, 1215 - obj: [ 1216 - { 1217 - spread: 'options', 1218 - }, 1219 - { 1220 - spread: 'localOptions', 1221 - }, 1222 - { 1223 - key: 'throwOnError', 1224 - value: true, 1225 - }, 1226 - ], 1227 - }), 1228 - ], 1229 - }), 1230 - }), 1231 - name: 'data', 1232 - }), 1233 - compiler.returnVariable({ 1234 - expression: 'data', 1235 - }), 1236 - ], 1237 - }), 1238 - }, 1239 - ], 1240 - }), 1241 - name: mutationOptionsFn, 1242 - // TODO: better types syntax 1243 - typeName: `${mutationsType}<${typeResponse}, ${typeError.name}, ${typeData}>`, 1244 - }), 1245 - compiler.returnVariable({ 1246 - expression: mutationOptionsFn, 1247 - }), 1248 - ], 1249 - }); 1250 - const statement = compiler.constVariable({ 1251 - // TODO: describe options, same as the actual function call 1252 - comment: [], 1253 - exportConst: true, 1254 - expression, 1255 - name: mutationOptionsFunctionIdentifier({ context, operation }), 1256 - }); 1257 - file.add(statement); 1258 - } 1259 - 1260 - if (hasQueries || hasInfiniteQueries) { 88 + context.subscribe('after', () => { 89 + if (state.hasQueries || state.hasInfiniteQueries) { 1261 90 file.import({ 1262 - module: context 1263 - .file({ id: plugin.name })! 1264 - .relativePathToFile({ context, id: 'sdk' }), 91 + module: file.relativePathToFile({ context, id: 'sdk' }), 1265 92 name: 'client', 1266 - }); 1267 - } 1268 - 1269 - if (hasUsedQueryFn) { 1270 - file.import({ 1271 - module: context 1272 - .file({ id: plugin.name })! 1273 - .relativePathToFile({ context, id: 'sdk' }), 1274 - name: queryFn.split('.')[0]!, 1275 93 }); 1276 94 } 1277 95 });
+359
packages/openapi-ts/src/plugins/@tanstack/query-core/queryKey.ts
··· 1 + import { compiler, type Property } from '../../../compiler'; 2 + import { clientApi } from '../../../generate/client'; 3 + import { hasOperationDataRequired } from '../../../ir/operation'; 4 + import type { IR } from '../../../ir/types'; 5 + import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; 6 + import { getClientBaseUrlKey } from './client'; 7 + import type { PluginInstance } from './types'; 8 + import { useTypeData } from './useType'; 9 + 10 + const createQueryKeyFn = 'createQueryKey'; 11 + export const queryKeyName = 'QueryKey'; 12 + const TOptionsType = 'TOptions'; 13 + 14 + export const createQueryKeyFunction = ({ 15 + context, 16 + plugin, 17 + }: { 18 + context: IR.Context; 19 + plugin: PluginInstance; 20 + }) => { 21 + const file = context.file({ id: plugin.name })!; 22 + 23 + const returnType = compiler.indexedAccessTypeNode({ 24 + indexType: compiler.literalTypeNode({ 25 + literal: compiler.ots.number(0), 26 + }), 27 + objectType: compiler.typeReferenceNode({ 28 + typeArguments: [compiler.typeReferenceNode({ typeName: TOptionsType })], 29 + typeName: queryKeyName, 30 + }), 31 + }); 32 + 33 + const infiniteIdentifier = compiler.identifier({ text: 'infinite' }); 34 + 35 + const identifierCreateQueryKey = file.identifier({ 36 + $ref: `#/ir/${createQueryKeyFn}`, 37 + create: true, 38 + namespace: 'value', 39 + }); 40 + 41 + const fn = compiler.constVariable({ 42 + expression: compiler.arrowFunction({ 43 + multiLine: true, 44 + parameters: [ 45 + { 46 + name: 'id', 47 + type: compiler.typeReferenceNode({ typeName: 'string' }), 48 + }, 49 + { 50 + isRequired: false, 51 + name: 'options', 52 + type: compiler.typeReferenceNode({ typeName: TOptionsType }), 53 + }, 54 + { 55 + isRequired: false, 56 + name: 'infinite', 57 + type: compiler.typeReferenceNode({ typeName: 'boolean' }), 58 + }, 59 + ], 60 + returnType, 61 + statements: [ 62 + compiler.constVariable({ 63 + assertion: returnType, 64 + expression: compiler.objectExpression({ 65 + multiLine: false, 66 + obj: [ 67 + { 68 + key: '_id', 69 + value: compiler.identifier({ text: 'id' }), 70 + }, 71 + { 72 + key: getClientBaseUrlKey(), 73 + value: compiler.identifier({ 74 + text: `(options?.client ?? client).getConfig().${getClientBaseUrlKey()}`, 75 + }), 76 + }, 77 + ], 78 + }), 79 + name: 'params', 80 + typeName: returnType, 81 + }), 82 + compiler.ifStatement({ 83 + expression: infiniteIdentifier, 84 + thenStatement: compiler.block({ 85 + statements: [ 86 + compiler.expressionToStatement({ 87 + expression: compiler.binaryExpression({ 88 + left: compiler.propertyAccessExpression({ 89 + expression: 'params', 90 + name: '_infinite', 91 + }), 92 + right: infiniteIdentifier, 93 + }), 94 + }), 95 + ], 96 + }), 97 + }), 98 + compiler.ifStatement({ 99 + expression: compiler.propertyAccessExpression({ 100 + expression: compiler.identifier({ text: 'options' }), 101 + isOptional: true, 102 + name: compiler.identifier({ text: 'body' }), 103 + }), 104 + thenStatement: compiler.block({ 105 + statements: [ 106 + compiler.expressionToStatement({ 107 + expression: compiler.binaryExpression({ 108 + left: compiler.propertyAccessExpression({ 109 + expression: 'params', 110 + name: 'body', 111 + }), 112 + right: compiler.propertyAccessExpression({ 113 + expression: 'options', 114 + name: 'body', 115 + }), 116 + }), 117 + }), 118 + ], 119 + }), 120 + }), 121 + compiler.ifStatement({ 122 + expression: compiler.propertyAccessExpression({ 123 + expression: compiler.identifier({ text: 'options' }), 124 + isOptional: true, 125 + name: compiler.identifier({ text: 'headers' }), 126 + }), 127 + thenStatement: compiler.block({ 128 + statements: [ 129 + compiler.expressionToStatement({ 130 + expression: compiler.binaryExpression({ 131 + left: compiler.propertyAccessExpression({ 132 + expression: 'params', 133 + name: 'headers', 134 + }), 135 + right: compiler.propertyAccessExpression({ 136 + expression: 'options', 137 + name: 'headers', 138 + }), 139 + }), 140 + }), 141 + ], 142 + }), 143 + }), 144 + compiler.ifStatement({ 145 + expression: compiler.propertyAccessExpression({ 146 + expression: compiler.identifier({ text: 'options' }), 147 + isOptional: true, 148 + name: compiler.identifier({ text: 'path' }), 149 + }), 150 + thenStatement: compiler.block({ 151 + statements: [ 152 + compiler.expressionToStatement({ 153 + expression: compiler.binaryExpression({ 154 + left: compiler.propertyAccessExpression({ 155 + expression: 'params', 156 + name: 'path', 157 + }), 158 + right: compiler.propertyAccessExpression({ 159 + expression: 'options', 160 + name: 'path', 161 + }), 162 + }), 163 + }), 164 + ], 165 + }), 166 + }), 167 + compiler.ifStatement({ 168 + expression: compiler.propertyAccessExpression({ 169 + expression: compiler.identifier({ text: 'options' }), 170 + isOptional: true, 171 + name: compiler.identifier({ text: 'query' }), 172 + }), 173 + thenStatement: compiler.block({ 174 + statements: [ 175 + compiler.expressionToStatement({ 176 + expression: compiler.binaryExpression({ 177 + left: compiler.propertyAccessExpression({ 178 + expression: 'params', 179 + name: 'query', 180 + }), 181 + right: compiler.propertyAccessExpression({ 182 + expression: 'options', 183 + name: 'query', 184 + }), 185 + }), 186 + }), 187 + ], 188 + }), 189 + }), 190 + compiler.returnVariable({ 191 + expression: 'params', 192 + }), 193 + ], 194 + types: [ 195 + { 196 + extends: compiler.typeReferenceNode({ 197 + typeName: compiler.identifier({ 198 + text: clientApi.Options.name, 199 + }), 200 + }), 201 + name: TOptionsType, 202 + }, 203 + ], 204 + }), 205 + name: identifierCreateQueryKey.name || '', 206 + }); 207 + file.add(fn); 208 + }; 209 + 210 + const createQueryKeyLiteral = ({ 211 + context, 212 + id, 213 + isInfinite, 214 + plugin, 215 + }: { 216 + context: IR.Context; 217 + id: string; 218 + isInfinite?: boolean; 219 + plugin: PluginInstance; 220 + }) => { 221 + const file = context.file({ id: plugin.name })!; 222 + const identifierCreateQueryKey = file.identifier({ 223 + $ref: `#/ir/${createQueryKeyFn}`, 224 + namespace: 'value', 225 + }); 226 + const queryKeyLiteral = compiler.arrayLiteralExpression({ 227 + elements: [ 228 + compiler.callExpression({ 229 + functionName: identifierCreateQueryKey.name || '', 230 + parameters: [ 231 + compiler.ots.string(id), 232 + 'options', 233 + isInfinite ? compiler.ots.boolean(true) : undefined, 234 + ], 235 + }), 236 + ], 237 + multiLine: false, 238 + }); 239 + return queryKeyLiteral; 240 + }; 241 + 242 + export const createQueryKeyType = ({ 243 + context, 244 + plugin, 245 + }: { 246 + context: IR.Context; 247 + plugin: PluginInstance; 248 + }) => { 249 + const file = context.file({ id: plugin.name })!; 250 + 251 + const properties: Property[] = [ 252 + { 253 + name: '_id', 254 + type: compiler.keywordTypeNode({ 255 + keyword: 'string', 256 + }), 257 + }, 258 + { 259 + isRequired: false, 260 + name: '_infinite', 261 + type: compiler.keywordTypeNode({ 262 + keyword: 'boolean', 263 + }), 264 + }, 265 + ]; 266 + 267 + const queryKeyType = compiler.typeAliasDeclaration({ 268 + name: queryKeyName, 269 + type: compiler.typeTupleNode({ 270 + types: [ 271 + compiler.typeIntersectionNode({ 272 + types: [ 273 + compiler.typeReferenceNode({ 274 + typeName: `Pick<${TOptionsType}, '${getClientBaseUrlKey()}' | 'body' | 'headers' | 'path' | 'query'>`, 275 + }), 276 + compiler.typeInterfaceNode({ 277 + properties, 278 + useLegacyResolution: true, 279 + }), 280 + ], 281 + }), 282 + ], 283 + }), 284 + typeParameters: [ 285 + { 286 + extends: compiler.typeReferenceNode({ 287 + typeName: compiler.identifier({ 288 + text: clientApi.Options.name, 289 + }), 290 + }), 291 + name: TOptionsType, 292 + }, 293 + ], 294 + }); 295 + file.add(queryKeyType); 296 + }; 297 + 298 + export const queryKeyFunctionIdentifier = ({ 299 + context, 300 + isInfinite, 301 + operation, 302 + }: { 303 + context: IR.Context; 304 + isInfinite?: boolean; 305 + operation: IR.OperationObject; 306 + }) => 307 + `${serviceFunctionIdentifier({ 308 + config: context.config, 309 + id: operation.id, 310 + operation, 311 + })}${isInfinite ? 'Infinite' : ''}QueryKey`; 312 + 313 + export const queryKeyStatement = ({ 314 + context, 315 + isInfinite, 316 + operation, 317 + plugin, 318 + typeQueryKey, 319 + }: { 320 + context: IR.Context; 321 + isInfinite: boolean; 322 + operation: IR.OperationObject; 323 + plugin: PluginInstance; 324 + typeQueryKey?: string; 325 + }) => { 326 + const file = context.file({ id: plugin.name })!; 327 + const typeData = useTypeData({ context, operation, plugin }); 328 + const name = queryKeyFunctionIdentifier({ 329 + context, 330 + isInfinite, 331 + operation, 332 + }); 333 + const identifierQueryKey = file.identifier({ 334 + $ref: `#/queryKey/${name}`, 335 + create: true, 336 + namespace: 'value', 337 + }); 338 + const statement = compiler.constVariable({ 339 + exportConst: true, 340 + expression: compiler.arrowFunction({ 341 + parameters: [ 342 + { 343 + isRequired: hasOperationDataRequired(operation), 344 + name: 'options', 345 + type: typeData, 346 + }, 347 + ], 348 + returnType: isInfinite ? typeQueryKey : undefined, 349 + statements: createQueryKeyLiteral({ 350 + context, 351 + id: operation.id, 352 + isInfinite, 353 + plugin, 354 + }), 355 + }), 356 + name: identifierQueryKey.name || '', 357 + }); 358 + return statement; 359 + };
+184
packages/openapi-ts/src/plugins/@tanstack/query-core/queryOptions.ts
··· 1 + import { compiler } from '../../../compiler'; 2 + import { hasOperationDataRequired } from '../../../ir/operation'; 3 + import type { IR } from '../../../ir/types'; 4 + import { serviceFunctionIdentifier } from '../../@hey-api/sdk/plugin-legacy'; 5 + import { 6 + createQueryKeyFunction, 7 + createQueryKeyType, 8 + queryKeyFunctionIdentifier, 9 + queryKeyStatement, 10 + } from './queryKey'; 11 + import type { PluginInstance, PluginState } from './types'; 12 + import { useTypeData } from './useType'; 13 + 14 + const queryOptionsFn = 'queryOptions'; 15 + 16 + const queryOptionsFunctionIdentifier = ({ 17 + context, 18 + operation, 19 + }: { 20 + context: IR.Context; 21 + operation: IR.OperationObject; 22 + }) => 23 + `${serviceFunctionIdentifier({ 24 + config: context.config, 25 + id: operation.id, 26 + operation, 27 + })}Options`; 28 + 29 + export const createQueryOptions = ({ 30 + context, 31 + operation, 32 + plugin, 33 + queryFn, 34 + state, 35 + }: { 36 + context: IR.Context; 37 + operation: IR.OperationObject; 38 + plugin: PluginInstance; 39 + queryFn: string; 40 + state: PluginState; 41 + }) => { 42 + if ( 43 + !plugin.queryOptions || 44 + !(['get', 'post'] as (typeof operation.method)[]).includes(operation.method) 45 + ) { 46 + return state; 47 + } 48 + 49 + const file = context.file({ id: plugin.name })!; 50 + const isRequired = hasOperationDataRequired(operation); 51 + 52 + if (!state.hasQueries) { 53 + state.hasQueries = true; 54 + 55 + if (!state.hasCreateQueryKeyParamsFunction) { 56 + createQueryKeyType({ context, plugin }); 57 + createQueryKeyFunction({ context, plugin }); 58 + state.hasCreateQueryKeyParamsFunction = true; 59 + } 60 + 61 + file.import({ 62 + module: plugin.name, 63 + name: queryOptionsFn, 64 + }); 65 + } 66 + 67 + state.hasUsedQueryFn = true; 68 + 69 + const node = queryKeyStatement({ 70 + context, 71 + isInfinite: false, 72 + operation, 73 + plugin, 74 + }); 75 + file.add(node); 76 + 77 + const typeData = useTypeData({ context, operation, plugin }); 78 + 79 + const queryKeyName = queryKeyFunctionIdentifier({ 80 + context, 81 + isInfinite: false, 82 + operation, 83 + }); 84 + const identifierQueryKey = file.identifier({ 85 + $ref: `#/queryKey/${queryKeyName}`, 86 + namespace: 'value', 87 + }); 88 + 89 + const statement = compiler.constVariable({ 90 + // TODO: describe options, same as the actual function call 91 + comment: [], 92 + exportConst: true, 93 + expression: compiler.arrowFunction({ 94 + parameters: [ 95 + { 96 + isRequired, 97 + name: 'options', 98 + type: typeData, 99 + }, 100 + ], 101 + statements: [ 102 + compiler.returnFunctionCall({ 103 + args: [ 104 + compiler.objectExpression({ 105 + obj: [ 106 + { 107 + key: 'queryFn', 108 + value: compiler.arrowFunction({ 109 + async: true, 110 + multiLine: true, 111 + parameters: [ 112 + { 113 + destructure: [ 114 + { 115 + name: 'queryKey', 116 + }, 117 + { 118 + name: 'signal', 119 + }, 120 + ], 121 + }, 122 + ], 123 + statements: [ 124 + compiler.constVariable({ 125 + destructure: true, 126 + expression: compiler.awaitExpression({ 127 + expression: compiler.callExpression({ 128 + functionName: queryFn, 129 + parameters: [ 130 + compiler.objectExpression({ 131 + multiLine: true, 132 + obj: [ 133 + { 134 + spread: 'options', 135 + }, 136 + { 137 + spread: 'queryKey[0]', 138 + }, 139 + { 140 + key: 'signal', 141 + shorthand: true, 142 + value: compiler.identifier({ 143 + text: 'signal', 144 + }), 145 + }, 146 + { 147 + key: 'throwOnError', 148 + value: true, 149 + }, 150 + ], 151 + }), 152 + ], 153 + }), 154 + }), 155 + name: 'data', 156 + }), 157 + compiler.returnVariable({ 158 + expression: 'data', 159 + }), 160 + ], 161 + }), 162 + }, 163 + { 164 + key: 'queryKey', 165 + value: compiler.callExpression({ 166 + functionName: identifierQueryKey.name || '', 167 + parameters: ['options'], 168 + }), 169 + }, 170 + ], 171 + }), 172 + ], 173 + name: queryOptionsFn, 174 + }), 175 + ], 176 + }), 177 + name: queryOptionsFunctionIdentifier({ context, operation }), 178 + // TODO: add type error 179 + // TODO: AxiosError<PutSubmissionMetaError> 180 + }); 181 + file.add(statement); 182 + 183 + return state; 184 + };
+33
packages/openapi-ts/src/plugins/@tanstack/query-core/types.d.ts
··· 1 + import type { ImportExportItem } from '../../../compiler/module'; 2 + import type { Plugin } from '../../types'; 3 + import type { Config as AngularQueryConfig } from '../angular-query-experimental'; 4 + import type { Config as ReactQueryConfig } from '../react-query'; 5 + import type { Config as SolidQueryConfig } from '../solid-query'; 6 + import type { Config as SvelteQueryConfig } from '../svelte-query'; 7 + import type { Config as VueQueryConfig } from '../vue-query'; 8 + 9 + export type PluginHandler = Plugin.Handler< 10 + | ReactQueryConfig 11 + | AngularQueryConfig 12 + | SolidQueryConfig 13 + | SvelteQueryConfig 14 + | VueQueryConfig 15 + >; 16 + 17 + export type PluginInstance = Plugin.Instance< 18 + | AngularQueryConfig 19 + | ReactQueryConfig 20 + | SolidQueryConfig 21 + | SvelteQueryConfig 22 + | VueQueryConfig 23 + >; 24 + 25 + export interface PluginState { 26 + hasCreateInfiniteParamsFunction: boolean; 27 + hasCreateQueryKeyParamsFunction: boolean; 28 + hasInfiniteQueries: boolean; 29 + hasMutations: boolean; 30 + hasQueries: boolean; 31 + hasUsedQueryFn: boolean; 32 + typeInfiniteData: ImportExportItem; 33 + }
+109
packages/openapi-ts/src/plugins/@tanstack/query-core/useType.ts
··· 1 + import type { ImportExportItemObject } from '../../../compiler/utils'; 2 + import type { IR } from '../../../ir/types'; 3 + import { operationOptionsType } from '../../@hey-api/sdk/plugin'; 4 + import { operationIrRef } from '../../shared/utils/ref'; 5 + import type { PluginInstance } from './types'; 6 + 7 + export const useTypeData = ({ 8 + context, 9 + operation, 10 + plugin, 11 + }: { 12 + context: IR.Context; 13 + operation: IR.OperationObject; 14 + plugin: PluginInstance; 15 + }) => { 16 + const identifierData = context.file({ id: 'types' })!.identifier({ 17 + $ref: operationIrRef({ id: operation.id, type: 'data' }), 18 + namespace: 'type', 19 + }); 20 + if (identifierData.name) { 21 + const file = context.file({ id: plugin.name })!; 22 + file.import({ 23 + asType: true, 24 + module: context 25 + .file({ id: plugin.name })! 26 + .relativePathToFile({ context, id: 'types' }), 27 + name: identifierData.name, 28 + }); 29 + } 30 + const typeData = operationOptionsType({ 31 + importedType: identifierData.name, 32 + }); 33 + return typeData; 34 + }; 35 + 36 + export const useTypeError = ({ 37 + context, 38 + operation, 39 + plugin, 40 + }: { 41 + context: IR.Context; 42 + operation: IR.OperationObject; 43 + plugin: PluginInstance; 44 + }) => { 45 + const file = context.file({ id: plugin.name })!; 46 + const identifierError = context.file({ id: 'types' })!.identifier({ 47 + $ref: operationIrRef({ id: operation.id, type: 'error' }), 48 + namespace: 'type', 49 + }); 50 + if (identifierError.name) { 51 + file.import({ 52 + asType: true, 53 + module: context 54 + .file({ id: plugin.name })! 55 + .relativePathToFile({ context, id: 'types' }), 56 + name: identifierError.name, 57 + }); 58 + } 59 + let typeError: ImportExportItemObject = { 60 + asType: true, 61 + name: identifierError.name || '', 62 + }; 63 + if (!typeError.name) { 64 + typeError = file.import({ 65 + asType: true, 66 + module: plugin.name, 67 + name: 'DefaultError', 68 + }); 69 + } 70 + if (context.config.client.name === '@hey-api/client-axios') { 71 + const axiosError = file.import({ 72 + asType: true, 73 + module: 'axios', 74 + name: 'AxiosError', 75 + }); 76 + typeError = { 77 + ...axiosError, 78 + name: `${axiosError.name}<${typeError.name}>`, 79 + }; 80 + } 81 + return typeError; 82 + }; 83 + 84 + export const useTypeResponse = ({ 85 + context, 86 + operation, 87 + plugin, 88 + }: { 89 + context: IR.Context; 90 + operation: IR.OperationObject; 91 + plugin: PluginInstance; 92 + }) => { 93 + const identifierResponse = context.file({ id: 'types' })!.identifier({ 94 + $ref: operationIrRef({ id: operation.id, type: 'response' }), 95 + namespace: 'type', 96 + }); 97 + if (identifierResponse.name) { 98 + const file = context.file({ id: plugin.name })!; 99 + file.import({ 100 + asType: true, 101 + module: context 102 + .file({ id: plugin.name })! 103 + .relativePathToFile({ context, id: 'types' }), 104 + name: identifierResponse.name, 105 + }); 106 + } 107 + const typeResponse = identifierResponse.name || 'unknown'; 108 + return typeResponse; 109 + };
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/internal-name-conflict/@tanstack/react-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError } from '@tanstack/react-query'; 5 5 import type { CreateData } from '../types.gen'; 6 - import { client, create } from '../sdk.gen'; 6 + import { create, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.0.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/internal-name-conflict/@tanstack/react-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError } from '@tanstack/react-query'; 5 5 import type { CreateData } from '../types.gen'; 6 - import { client, create } from '../sdk.gen'; 6 + import { create, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/asClass/@tanstack/angular-query-experimental.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/axios/@tanstack/angular-query-experimental.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/angular-query-experimental/fetch/@tanstack/angular-query-experimental.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/angular-query-experimental'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/asClass/@tanstack/react-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/axios/@tanstack/react-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/react-query/fetch/@tanstack/react-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/react-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/asClass/@tanstack/solid-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/axios/@tanstack/solid-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/solid-query/fetch/@tanstack/solid-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/solid-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/asClass/@tanstack/svelte-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/axios/@tanstack/svelte-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/svelte-query/fetch/@tanstack/svelte-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type MutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/svelte-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/asClass/@tanstack/vue-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService } from '../sdk.gen'; 6 + import { DefaultService, SimpleService, ParametersService, DescriptionsService, DeprecatedService, RequestBodyService, FormDataService, DefaultsService, DuplicateService, NoContentService, ResponseService, MultipleTags1Service, CollectionFormatService, TypesService, UploadService, FileResponseService, ComplexService, MultipartService, HeaderService, ErrorService, NonAsciiÆøåÆøÅöôêÊService, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/axios/@tanstack/vue-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-axios'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 import type { AxiosError } from 'axios'; 8 8 9 9 type QueryKey<TOptions extends Options> = [
+1 -1
packages/openapi-ts/test/__snapshots__/3.1.x/plugins/@tanstack/vue-query/fetch/@tanstack/vue-query.gen.ts
··· 3 3 import type { Options } from '@hey-api/client-fetch'; 4 4 import { queryOptions, type UseMutationOptions, type DefaultError, infiniteQueryOptions, type InfiniteData } from '@tanstack/vue-query'; 5 5 import type { ExportData, ImportData, ImportResponse, ApiVVersionODataControllerCountData, GetApiVbyApiVersionSimpleOperationData, DeleteCallWithoutParametersAndResponseData, GetCallWithoutParametersAndResponseData, PatchCallWithoutParametersAndResponseData, PostCallWithoutParametersAndResponseData, PutCallWithoutParametersAndResponseData, DeleteFooData3, CallWithDescriptionsData, DeprecatedCallData, CallWithParametersData, CallWithWeirdParameterNamesData, GetCallWithOptionalParamData, PostCallWithOptionalParamData, PostCallWithOptionalParamResponse, PostApiVbyApiVersionRequestBodyData, PostApiVbyApiVersionFormDataData, CallWithDefaultParametersData, CallWithDefaultOptionalParametersData, CallToTestOrderOfParamsData, DuplicateNameData, DuplicateName2Data, DuplicateName3Data, DuplicateName4Data, CallWithNoContentResponseData, CallWithResponseAndNoContentResponseData, DummyAData, DummyBData, CallWithResponseData, CallWithDuplicateResponsesData, CallWithDuplicateResponsesError, CallWithDuplicateResponsesResponse, CallWithResponsesData, CallWithResponsesError, CallWithResponsesResponse, CollectionFormatData, TypesData, UploadFileData, UploadFileResponse, FileResponseData, ComplexTypesData, MultipartResponseData, MultipartRequestData, ComplexParamsData, ComplexParamsResponse, CallWithResultFromHeaderData, TestErrorCodeData, NonAsciiæøåÆøÅöôêÊ字符串Data, NonAsciiæøåÆøÅöôêÊ字符串Response, PutWithFormUrlEncodedData } from '../types.gen'; 6 - import { client, export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded } from '../sdk.gen'; 6 + import { export_, import_, apiVVersionODataControllerCount, getApiVbyApiVersionSimpleOperation, deleteCallWithoutParametersAndResponse, getCallWithoutParametersAndResponse, patchCallWithoutParametersAndResponse, postCallWithoutParametersAndResponse, putCallWithoutParametersAndResponse, deleteFoo, callWithDescriptions, deprecatedCall, callWithParameters, callWithWeirdParameterNames, getCallWithOptionalParam, postCallWithOptionalParam, postApiVbyApiVersionRequestBody, postApiVbyApiVersionFormData, callWithDefaultParameters, callWithDefaultOptionalParameters, callToTestOrderOfParams, duplicateName, duplicateName2, duplicateName3, duplicateName4, callWithNoContentResponse, callWithResponseAndNoContentResponse, dummyA, dummyB, callWithResponse, callWithDuplicateResponses, callWithResponses, collectionFormat, types, uploadFile, fileResponse, complexTypes, multipartResponse, multipartRequest, complexParams, callWithResultFromHeader, testErrorCode, nonAsciiæøåÆøÅöôêÊ字符串, putWithFormUrlEncoded, client } from '../sdk.gen'; 7 7 8 8 type QueryKey<TOptions extends Options> = [ 9 9 Pick<TOptions, 'baseUrl' | 'body' | 'headers' | 'path' | 'query'> & {
+1 -1
packages/openapi-ts/test/openapi-ts.config.ts
··· 68 68 }, 69 69 // @ts-ignore 70 70 { 71 - // name: '@tanstack/vue-query', 71 + name: '@tanstack/react-query', 72 72 }, 73 73 // @ts-ignore 74 74 {