55 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
66 *
77 * The version of the OpenAPI document: v0
8- *
8+ *
99 *
1010 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
1111 * https://openapi-generator.tech
1212 * Do not edit the class manually.
1313 */
1414
15-
1615import type { Configuration } from '../configuration' ;
1716import type { AxiosPromise , AxiosInstance , RawAxiosRequestConfig } from 'axios' ;
1817import globalAxios from 'axios' ;
1918// Some imports not used depending on template conditions
2019// @ts -ignore
21- import { DUMMY_BASE_URL , assertParamExists , setApiKeyToObject , setBasicAuthToObject , setBearerAuthToObject , setOAuthToObject , setSearchParams , serializeDataIfNeeded , toPathString , createRequestFunction } from '../common' ;
20+ import {
21+ DUMMY_BASE_URL ,
22+ assertParamExists ,
23+ setApiKeyToObject ,
24+ setBasicAuthToObject ,
25+ setBearerAuthToObject ,
26+ setOAuthToObject ,
27+ setSearchParams ,
28+ serializeDataIfNeeded ,
29+ toPathString ,
30+ createRequestFunction ,
31+ } from '../common' ;
2232// @ts -ignore
2333import { BASE_PATH , COLLECTION_FORMATS , type RequestArgs , BaseAPI , RequiredError , operationServerMap } from '../base' ;
2434// @ts -ignore
@@ -27,96 +37,99 @@ import type { LoginRequestDTO } from '../models';
2737 * AuthResourceApi - axios parameter creator
2838 */
2939export const AuthResourceApiAxiosParamCreator = function ( configuration ?: Configuration ) {
30- return {
31- /**
32- *
33- * @param {LoginRequestDTO } loginRequestDTO
34- * @param {* } [options] Override http request option.
35- * @throws {RequiredError }
36- */
37- login : async ( loginRequestDTO : LoginRequestDTO , options : RawAxiosRequestConfig = { } ) : Promise < RequestArgs > => {
38- // verify required parameter 'loginRequestDTO' is not null or undefined
39- assertParamExists ( 'login' , 'loginRequestDTO' , loginRequestDTO )
40- const localVarPath = `/api/auth/login` ;
41- // use dummy base URL string because the URL constructor only accepts absolute URLs.
42- const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
43- let baseOptions ;
44- if ( configuration ) {
45- baseOptions = configuration . baseOptions ;
46- }
47-
48- const localVarRequestOptions = { method : 'POST' , ...baseOptions , ...options } ;
49- const localVarHeaderParameter = { } as any ;
50- const localVarQueryParameter = { } as any ;
40+ return {
41+ /**
42+ *
43+ * @param {LoginRequestDTO } loginRequestDTO
44+ * @param {* } [options] Override http request option.
45+ * @throws {RequiredError }
46+ */
47+ login : async ( loginRequestDTO : LoginRequestDTO , options : RawAxiosRequestConfig = { } ) : Promise < RequestArgs > => {
48+ // verify required parameter 'loginRequestDTO' is not null or undefined
49+ assertParamExists ( 'login' , 'loginRequestDTO' , loginRequestDTO ) ;
50+ const localVarPath = `/api/auth/login` ;
51+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
52+ const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
53+ let baseOptions ;
54+ if ( configuration ) {
55+ baseOptions = configuration . baseOptions ;
56+ }
5157
58+ const localVarRequestOptions = { method : 'POST' , ...baseOptions , ...options } ;
59+ const localVarHeaderParameter = { } as any ;
60+ const localVarQueryParameter = { } as any ;
5261
53-
54- localVarHeaderParameter [ 'Content-Type' ] = 'application/json' ;
62+ localVarHeaderParameter [ 'Content-Type' ] = 'application/json' ;
5563
56- setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
57- let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
58- localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
59- localVarRequestOptions . data = serializeDataIfNeeded ( loginRequestDTO , localVarRequestOptions , configuration )
64+ setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
65+ let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
66+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
67+ localVarRequestOptions . data = serializeDataIfNeeded ( loginRequestDTO , localVarRequestOptions , configuration ) ;
6068
61- return {
62- url : toPathString ( localVarUrlObj ) ,
63- options : localVarRequestOptions ,
64- } ;
65- } ,
66- }
69+ return {
70+ url : toPathString ( localVarUrlObj ) ,
71+ options : localVarRequestOptions ,
72+ } ;
73+ } ,
74+ } ;
6775} ;
6876
6977/**
7078 * AuthResourceApi - functional programming interface
7179 */
72- export const AuthResourceApiFp = function ( configuration ?: Configuration ) {
73- const localVarAxiosParamCreator = AuthResourceApiAxiosParamCreator ( configuration )
74- return {
75- /**
76- *
77- * @param {LoginRequestDTO } loginRequestDTO
78- * @param {* } [options] Override http request option.
79- * @throws {RequiredError }
80- */
81- async login ( loginRequestDTO : LoginRequestDTO , options ?: RawAxiosRequestConfig ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < void > > {
82- const localVarAxiosArgs = await localVarAxiosParamCreator . login ( loginRequestDTO , options ) ;
83- const localVarOperationServerIndex = configuration ?. serverIndex ?? 0 ;
84- const localVarOperationServerBasePath = operationServerMap [ 'AuthResourceApi.login' ] ?. [ localVarOperationServerIndex ] ?. url ;
85- return ( axios , basePath ) => createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
86- } ,
87- }
80+ export const AuthResourceApiFp = function ( configuration ?: Configuration ) {
81+ const localVarAxiosParamCreator = AuthResourceApiAxiosParamCreator ( configuration ) ;
82+ return {
83+ /**
84+ *
85+ * @param {LoginRequestDTO } loginRequestDTO
86+ * @param {* } [options] Override http request option.
87+ * @throws {RequiredError }
88+ */
89+ async login (
90+ loginRequestDTO : LoginRequestDTO ,
91+ options ?: RawAxiosRequestConfig ,
92+ ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < void > > {
93+ const localVarAxiosArgs = await localVarAxiosParamCreator . login ( loginRequestDTO , options ) ;
94+ const localVarOperationServerIndex = configuration ?. serverIndex ?? 0 ;
95+ const localVarOperationServerBasePath = operationServerMap [ 'AuthResourceApi.login' ] ?. [ localVarOperationServerIndex ] ?. url ;
96+ return ( axios , basePath ) =>
97+ createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
98+ } ,
99+ } ;
88100} ;
89101
90102/**
91103 * AuthResourceApi - factory interface
92104 */
93105export const AuthResourceApiFactory = function ( configuration ?: Configuration , basePath ?: string , axios ?: AxiosInstance ) {
94- const localVarFp = AuthResourceApiFp ( configuration )
95- return {
96- /**
97- *
98- * @param {LoginRequestDTO } loginRequestDTO
99- * @param {* } [options] Override http request option.
100- * @throws {RequiredError }
101- */
102- login ( loginRequestDTO : LoginRequestDTO , options ?: RawAxiosRequestConfig ) : AxiosPromise < void > {
103- return localVarFp . login ( loginRequestDTO , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
104- } ,
105- } ;
106+ const localVarFp = AuthResourceApiFp ( configuration ) ;
107+ return {
108+ /**
109+ *
110+ * @param {LoginRequestDTO } loginRequestDTO
111+ * @param {* } [options] Override http request option.
112+ * @throws {RequiredError }
113+ */
114+ login ( loginRequestDTO : LoginRequestDTO , options ?: RawAxiosRequestConfig ) : AxiosPromise < void > {
115+ return localVarFp . login ( loginRequestDTO , options ) . then ( request => request ( axios , basePath ) ) ;
116+ } ,
117+ } ;
106118} ;
107119
108120/**
109121 * AuthResourceApi - object-oriented interface
110122 */
111123export class AuthResourceApi extends BaseAPI {
112- /**
113- *
114- * @param {LoginRequestDTO } loginRequestDTO
115- * @param {* } [options] Override http request option.
116- * @throws {RequiredError }
117- */
118- public login ( loginRequestDTO : LoginRequestDTO , options ?: RawAxiosRequestConfig ) {
119- return AuthResourceApiFp ( this . configuration ) . login ( loginRequestDTO , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
120- }
124+ /**
125+ *
126+ * @param {LoginRequestDTO } loginRequestDTO
127+ * @param {* } [options] Override http request option.
128+ * @throws {RequiredError }
129+ */
130+ public login ( loginRequestDTO : LoginRequestDTO , options ?: RawAxiosRequestConfig ) {
131+ return AuthResourceApiFp ( this . configuration )
132+ . login ( loginRequestDTO , options )
133+ . then ( request => request ( this . axios , this . basePath ) ) ;
134+ }
121135}
122-
0 commit comments