@@ -22,11 +22,17 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
2222// @ts -ignore
2323import { BASE_PATH , COLLECTION_FORMATS , type RequestArgs , BaseAPI , RequiredError , operationServerMap } from '../base' ;
2424// @ts -ignore
25+ import type { AccessTokenPayloadResponse } from '../models' ;
26+ // @ts -ignore
27+ import type { AccessTokenResponse } from '../models' ;
28+ // @ts -ignore
2529import type { ApiValidationError } from '../models' ;
2630// @ts -ignore
2731import type { AuthorizationBodyParams } from '../models' ;
2832// @ts -ignore
29- import type { AuthorizedReponse } from '../models' ;
33+ import type { AuthorizedResponse } from '../models' ;
34+ // @ts -ignore
35+ import type { CreateAccessTokenParams } from '../models' ;
3036/**
3137 * AuthorizationApi - axios parameter creator
3238 * @export
@@ -68,6 +74,82 @@ export const AuthorizationApiAxiosParamCreator = function (configuration?: Confi
6874 localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
6975 localVarRequestOptions . data = serializeDataIfNeeded ( authorizationBodyParams , localVarRequestOptions , configuration )
7076
77+ return {
78+ url : toPathString ( localVarUrlObj ) ,
79+ options : localVarRequestOptions ,
80+ } ;
81+ } ,
82+ /**
83+ *
84+ * @param {CreateAccessTokenParams } createAccessTokenParams
85+ * @param {* } [options] Override http request option.
86+ * @throws {RequiredError }
87+ */
88+ authorizationReferenceControllerCreateToken : async ( createAccessTokenParams : CreateAccessTokenParams , options : RawAxiosRequestConfig = { } ) : Promise < RequestArgs > => {
89+ // verify required parameter 'createAccessTokenParams' is not null or undefined
90+ assertParamExists ( 'authorizationReferenceControllerCreateToken' , 'createAccessTokenParams' , createAccessTokenParams )
91+ const localVarPath = `/authorization/create-token` ;
92+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
93+ const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
94+ let baseOptions ;
95+ if ( configuration ) {
96+ baseOptions = configuration . baseOptions ;
97+ }
98+
99+ const localVarRequestOptions = { method : 'POST' , ...baseOptions , ...options } ;
100+ const localVarHeaderParameter = { } as any ;
101+ const localVarQueryParameter = { } as any ;
102+
103+ // authentication bearer required
104+ // http bearer authentication required
105+ await setBearerAuthToObject ( localVarHeaderParameter , configuration )
106+
107+
108+
109+ localVarHeaderParameter [ 'Content-Type' ] = 'application/json' ;
110+
111+ setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
112+ let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
113+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
114+ localVarRequestOptions . data = serializeDataIfNeeded ( createAccessTokenParams , localVarRequestOptions , configuration )
115+
116+ return {
117+ url : toPathString ( localVarUrlObj ) ,
118+ options : localVarRequestOptions ,
119+ } ;
120+ } ,
121+ /**
122+ *
123+ * @param {string } token The access token to be resolved.
124+ * @param {number } tokenTtlInSeconds Lifetime of token
125+ * @param {* } [options] Override http request option.
126+ * @throws {RequiredError }
127+ */
128+ authorizationReferenceControllerResolveToken : async ( token : string , tokenTtlInSeconds : number , options : RawAxiosRequestConfig = { } ) : Promise < RequestArgs > => {
129+ // verify required parameter 'token' is not null or undefined
130+ assertParamExists ( 'authorizationReferenceControllerResolveToken' , 'token' , token )
131+ // verify required parameter 'tokenTtlInSeconds' is not null or undefined
132+ assertParamExists ( 'authorizationReferenceControllerResolveToken' , 'tokenTtlInSeconds' , tokenTtlInSeconds )
133+ const localVarPath = `/authorization/resolve-token/{token}/ttl/{tokenTtlInSeconds}`
134+ . replace ( `{${ "token" } }` , encodeURIComponent ( String ( token ) ) )
135+ . replace ( `{${ "tokenTtlInSeconds" } }` , encodeURIComponent ( String ( tokenTtlInSeconds ) ) ) ;
136+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
137+ const localVarUrlObj = new URL ( localVarPath , DUMMY_BASE_URL ) ;
138+ let baseOptions ;
139+ if ( configuration ) {
140+ baseOptions = configuration . baseOptions ;
141+ }
142+
143+ const localVarRequestOptions = { method : 'GET' , ...baseOptions , ...options } ;
144+ const localVarHeaderParameter = { } as any ;
145+ const localVarQueryParameter = { } as any ;
146+
147+
148+
149+ setSearchParams ( localVarUrlObj , localVarQueryParameter ) ;
150+ let headersFromBaseOptions = baseOptions && baseOptions . headers ? baseOptions . headers : { } ;
151+ localVarRequestOptions . headers = { ...localVarHeaderParameter , ...headersFromBaseOptions , ...options . headers } ;
152+
71153 return {
72154 url : toPathString ( localVarUrlObj ) ,
73155 options : localVarRequestOptions ,
@@ -90,12 +172,37 @@ export const AuthorizationApiFp = function(configuration?: Configuration) {
90172 * @param {* } [options] Override http request option.
91173 * @throws {RequiredError }
92174 */
93- async authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams : AuthorizationBodyParams , options ?: RawAxiosRequestConfig ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < AuthorizedReponse > > {
175+ async authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams : AuthorizationBodyParams , options ?: RawAxiosRequestConfig ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < AuthorizedResponse > > {
94176 const localVarAxiosArgs = await localVarAxiosParamCreator . authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams , options ) ;
95177 const localVarOperationServerIndex = configuration ?. serverIndex ?? 0 ;
96178 const localVarOperationServerBasePath = operationServerMap [ 'AuthorizationApi.authorizationReferenceControllerAuthorizeByReference' ] ?. [ localVarOperationServerIndex ] ?. url ;
97179 return ( axios , basePath ) => createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
98180 } ,
181+ /**
182+ *
183+ * @param {CreateAccessTokenParams } createAccessTokenParams
184+ * @param {* } [options] Override http request option.
185+ * @throws {RequiredError }
186+ */
187+ async authorizationReferenceControllerCreateToken ( createAccessTokenParams : CreateAccessTokenParams , options ?: RawAxiosRequestConfig ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < AccessTokenResponse > > {
188+ const localVarAxiosArgs = await localVarAxiosParamCreator . authorizationReferenceControllerCreateToken ( createAccessTokenParams , options ) ;
189+ const localVarOperationServerIndex = configuration ?. serverIndex ?? 0 ;
190+ const localVarOperationServerBasePath = operationServerMap [ 'AuthorizationApi.authorizationReferenceControllerCreateToken' ] ?. [ localVarOperationServerIndex ] ?. url ;
191+ return ( axios , basePath ) => createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
192+ } ,
193+ /**
194+ *
195+ * @param {string } token The access token to be resolved.
196+ * @param {number } tokenTtlInSeconds Lifetime of token
197+ * @param {* } [options] Override http request option.
198+ * @throws {RequiredError }
199+ */
200+ async authorizationReferenceControllerResolveToken ( token : string , tokenTtlInSeconds : number , options ?: RawAxiosRequestConfig ) : Promise < ( axios ?: AxiosInstance , basePath ?: string ) => AxiosPromise < AccessTokenPayloadResponse > > {
201+ const localVarAxiosArgs = await localVarAxiosParamCreator . authorizationReferenceControllerResolveToken ( token , tokenTtlInSeconds , options ) ;
202+ const localVarOperationServerIndex = configuration ?. serverIndex ?? 0 ;
203+ const localVarOperationServerBasePath = operationServerMap [ 'AuthorizationApi.authorizationReferenceControllerResolveToken' ] ?. [ localVarOperationServerIndex ] ?. url ;
204+ return ( axios , basePath ) => createRequestFunction ( localVarAxiosArgs , globalAxios , BASE_PATH , configuration ) ( axios , localVarOperationServerBasePath || basePath ) ;
205+ } ,
99206 }
100207} ;
101208
@@ -113,9 +220,28 @@ export const AuthorizationApiFactory = function (configuration?: Configuration,
113220 * @param {* } [options] Override http request option.
114221 * @throws {RequiredError }
115222 */
116- authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams : AuthorizationBodyParams , options ?: any ) : AxiosPromise < AuthorizedReponse > {
223+ authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams : AuthorizationBodyParams , options ?: any ) : AxiosPromise < AuthorizedResponse > {
117224 return localVarFp . authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
118225 } ,
226+ /**
227+ *
228+ * @param {CreateAccessTokenParams } createAccessTokenParams
229+ * @param {* } [options] Override http request option.
230+ * @throws {RequiredError }
231+ */
232+ authorizationReferenceControllerCreateToken ( createAccessTokenParams : CreateAccessTokenParams , options ?: any ) : AxiosPromise < AccessTokenResponse > {
233+ return localVarFp . authorizationReferenceControllerCreateToken ( createAccessTokenParams , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
234+ } ,
235+ /**
236+ *
237+ * @param {string } token The access token to be resolved.
238+ * @param {number } tokenTtlInSeconds Lifetime of token
239+ * @param {* } [options] Override http request option.
240+ * @throws {RequiredError }
241+ */
242+ authorizationReferenceControllerResolveToken ( token : string , tokenTtlInSeconds : number , options ?: any ) : AxiosPromise < AccessTokenPayloadResponse > {
243+ return localVarFp . authorizationReferenceControllerResolveToken ( token , tokenTtlInSeconds , options ) . then ( ( request ) => request ( axios , basePath ) ) ;
244+ } ,
119245 } ;
120246} ;
121247
@@ -133,7 +259,26 @@ export interface AuthorizationApiInterface {
133259 * @throws {RequiredError }
134260 * @memberof AuthorizationApiInterface
135261 */
136- authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams : AuthorizationBodyParams , options ?: RawAxiosRequestConfig ) : AxiosPromise < AuthorizedReponse > ;
262+ authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams : AuthorizationBodyParams , options ?: RawAxiosRequestConfig ) : AxiosPromise < AuthorizedResponse > ;
263+
264+ /**
265+ *
266+ * @param {CreateAccessTokenParams } createAccessTokenParams
267+ * @param {* } [options] Override http request option.
268+ * @throws {RequiredError }
269+ * @memberof AuthorizationApiInterface
270+ */
271+ authorizationReferenceControllerCreateToken ( createAccessTokenParams : CreateAccessTokenParams , options ?: RawAxiosRequestConfig ) : AxiosPromise < AccessTokenResponse > ;
272+
273+ /**
274+ *
275+ * @param {string } token The access token to be resolved.
276+ * @param {number } tokenTtlInSeconds Lifetime of token
277+ * @param {* } [options] Override http request option.
278+ * @throws {RequiredError }
279+ * @memberof AuthorizationApiInterface
280+ */
281+ authorizationReferenceControllerResolveToken ( token : string , tokenTtlInSeconds : number , options ?: RawAxiosRequestConfig ) : AxiosPromise < AccessTokenPayloadResponse > ;
137282
138283}
139284
@@ -155,5 +300,28 @@ export class AuthorizationApi extends BaseAPI implements AuthorizationApiInterfa
155300 public authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams : AuthorizationBodyParams , options ?: RawAxiosRequestConfig ) {
156301 return AuthorizationApiFp ( this . configuration ) . authorizationReferenceControllerAuthorizeByReference ( authorizationBodyParams , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
157302 }
303+
304+ /**
305+ *
306+ * @param {CreateAccessTokenParams } createAccessTokenParams
307+ * @param {* } [options] Override http request option.
308+ * @throws {RequiredError }
309+ * @memberof AuthorizationApi
310+ */
311+ public authorizationReferenceControllerCreateToken ( createAccessTokenParams : CreateAccessTokenParams , options ?: RawAxiosRequestConfig ) {
312+ return AuthorizationApiFp ( this . configuration ) . authorizationReferenceControllerCreateToken ( createAccessTokenParams , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
313+ }
314+
315+ /**
316+ *
317+ * @param {string } token The access token to be resolved.
318+ * @param {number } tokenTtlInSeconds Lifetime of token
319+ * @param {* } [options] Override http request option.
320+ * @throws {RequiredError }
321+ * @memberof AuthorizationApi
322+ */
323+ public authorizationReferenceControllerResolveToken ( token : string , tokenTtlInSeconds : number , options ?: RawAxiosRequestConfig ) {
324+ return AuthorizationApiFp ( this . configuration ) . authorizationReferenceControllerResolveToken ( token , tokenTtlInSeconds , options ) . then ( ( request ) => request ( this . axios , this . basePath ) ) ;
325+ }
158326}
159327
0 commit comments