| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- /* tslint:disable */
- /* eslint-disable */
- /**
- * Swagger Petstore - OpenAPI 3.0 - version 1.0.27
- *
- * This is a sample Pet Store Server based on the OpenAPI 3.0 specification. You can find out more about
- Swagger at [https://swagger.io](https://swagger.io). In the third iteration of the pet store, we've switched to the design first approach!
- You can now help us improve the API whether it's by making changes to the definition itself or to the code.
- That way, with time, we can improve the API in general, and expose some of the new features in OAS3.
- Some useful links:
- - [The Pet Store repository](https://github.com/swagger-api/swagger-petstore)
- - [The source API definition for the Pet Store](https://github.com/swagger-api/swagger-petstore/blob/master/src/main/resources/openapi.yaml)
- *
- * OpenAPI version: 3.0.4
- *
- * Contact:
- *
- * NOTE: This file is auto generated by the alova's vscode plugin.
- *
- * https://alova.js.org/devtools/vscode
- *
- * **Do not edit the file manually.**
- */
- import type { Alova, AlovaMethodCreateConfig, AlovaGenerics, Method } from 'alova';
- import type { $$userConfigMap, alovaInstance } from './index';
- import type apiDefinitions from './apiDefinitions';
- type CollapsedAlova = typeof alovaInstance;
- type UserMethodConfigMap = typeof $$userConfigMap;
- type Alova2MethodConfig<Responded> =
- CollapsedAlova extends Alova<
- AlovaGenerics<
- any,
- any,
- infer RequestConfig,
- infer Response,
- infer ResponseHeader,
- infer L1Cache,
- infer L2Cache,
- infer SE
- >
- >
- ? Omit<
- AlovaMethodCreateConfig<
- AlovaGenerics<Responded, any, RequestConfig, Response, ResponseHeader, L1Cache, L2Cache, SE>,
- any,
- Responded
- >,
- 'params'
- >
- : never;
- // Extract the return type of transform function that define in $$userConfigMap, if it not exists, use the default type.
- type ExtractUserDefinedTransformed<
- DefinitionKey extends keyof typeof apiDefinitions,
- Default
- > = DefinitionKey extends keyof UserMethodConfigMap
- ? UserMethodConfigMap[DefinitionKey]['transform'] extends (...args: any[]) => any
- ? Awaited<ReturnType<UserMethodConfigMap[DefinitionKey]['transform']>>
- : Default
- : Default;
- type Alova2Method<
- Responded,
- DefinitionKey extends keyof typeof apiDefinitions,
- CurrentConfig extends Alova2MethodConfig<any>
- > =
- CollapsedAlova extends Alova<
- AlovaGenerics<
- any,
- any,
- infer RequestConfig,
- infer Response,
- infer ResponseHeader,
- infer L1Cache,
- infer L2Cache,
- infer SE
- >
- >
- ? Method<
- AlovaGenerics<
- CurrentConfig extends undefined
- ? ExtractUserDefinedTransformed<DefinitionKey, Responded>
- : CurrentConfig['transform'] extends (...args: any[]) => any
- ? Awaited<ReturnType<CurrentConfig['transform']>>
- : ExtractUserDefinedTransformed<DefinitionKey, Responded>,
- any,
- RequestConfig,
- Response,
- ResponseHeader,
- L1Cache,
- L2Cache,
- SE
- >
- >
- : never;
- export interface ApiResponse {
- code?: number;
- type?: string;
- message?: string;
- }
- declare global {
- interface Apis {
- sys: {
- auth<
- Config extends Alova2MethodConfig<loginModel> & {
- data: loginModel;
- }
- >(
- config: Config
- ): Alova2Method<loginModel, 'sys.auth', Config>;
- }
- }
- var Apis: Apis;
- }
- export interface loginModel{
- captchaCode?: string;
- code?: string;
- grant_type?: string;
- mobile?: string;
- password?: string;
- [property: string]: any;
- }
|