22 * Onepanel
33 * Onepanel API
44 *
5- * The version of the OpenAPI document: 0.10 .0
5+ * The version of the OpenAPI document: 0.11 .0
66 *
77 *
88 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -18,6 +18,7 @@ import { CustomHttpParameterCodec } from '../encoder';
1818import { Observable } from 'rxjs' ;
1919
2020import { GrpcGatewayRuntimeError } from '../model/models' ;
21+ import { IsAuthorized } from '../model/models' ;
2122import { IsAuthorizedResponse } from '../model/models' ;
2223import { IsValidTokenResponse } from '../model/models' ;
2324import { TokenWrapper } from '../model/models' ;
@@ -89,13 +90,17 @@ export class AuthServiceService {
8990 }
9091
9192 /**
93+ * @param body
9294 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
9395 * @param reportProgress flag to report request and response progress.
9496 */
95- public isAuthorized ( observe ?: 'body' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' } ) : Observable < IsAuthorizedResponse > ;
96- public isAuthorized ( observe ?: 'response' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' } ) : Observable < HttpResponse < IsAuthorizedResponse > > ;
97- public isAuthorized ( observe ?: 'events' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' } ) : Observable < HttpEvent < IsAuthorizedResponse > > ;
98- public isAuthorized ( observe : any = 'body' , reportProgress : boolean = false , options ?: { httpHeaderAccept ?: 'application/json' } ) : Observable < any > {
97+ public isAuthorized ( body : IsAuthorized , observe ?: 'body' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' } ) : Observable < IsAuthorizedResponse > ;
98+ public isAuthorized ( body : IsAuthorized , observe ?: 'response' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' } ) : Observable < HttpResponse < IsAuthorizedResponse > > ;
99+ public isAuthorized ( body : IsAuthorized , observe ?: 'events' , reportProgress ?: boolean , options ?: { httpHeaderAccept ?: 'application/json' } ) : Observable < HttpEvent < IsAuthorizedResponse > > ;
100+ public isAuthorized ( body : IsAuthorized , observe : any = 'body' , reportProgress : boolean = false , options ?: { httpHeaderAccept ?: 'application/json' } ) : Observable < any > {
101+ if ( body === null || body === undefined ) {
102+ throw new Error ( 'Required parameter body was null or undefined when calling isAuthorized.' ) ;
103+ }
99104
100105 let headers = this . defaultHeaders ;
101106
@@ -120,13 +125,22 @@ export class AuthServiceService {
120125 }
121126
122127
128+ // to determine the Content-Type header
129+ const consumes : string [ ] = [
130+ 'application/json'
131+ ] ;
132+ const httpContentTypeSelected : string | undefined = this . configuration . selectHeaderContentType ( consumes ) ;
133+ if ( httpContentTypeSelected !== undefined ) {
134+ headers = headers . set ( 'Content-Type' , httpContentTypeSelected ) ;
135+ }
136+
123137 let responseType : 'text' | 'json' = 'json' ;
124138 if ( httpHeaderAcceptSelected && httpHeaderAcceptSelected . startsWith ( 'text' ) ) {
125139 responseType = 'text' ;
126140 }
127141
128142 return this . httpClient . post < IsAuthorizedResponse > ( `${ this . configuration . basePath } /apis/v1beta1/auth` ,
129- null ,
143+ body ,
130144 {
131145 responseType : < any > responseType ,
132146 withCredentials : this . configuration . withCredentials ,
0 commit comments