63 lines
1.6 KiB
TypeScript
63 lines
1.6 KiB
TypeScript
/* tslint:disable */
|
|
import { Injectable } from '@angular/core';
|
|
import { HttpClient, HttpRequest, HttpResponse, HttpHeaders } from '@angular/common/http';
|
|
import { BaseService as __BaseService } from '../base-service';
|
|
import { ApiConfiguration as __Configuration } from '../api-configuration';
|
|
import { StrictHttpResponse as __StrictHttpResponse } from '../strict-http-response';
|
|
import { Observable as __Observable } from 'rxjs';
|
|
import { map as __map, filter as __filter } from 'rxjs/operators';
|
|
|
|
import { AzureADAuthModel } from '../models/azure-adauth-model';
|
|
@Injectable({
|
|
providedIn: 'root',
|
|
})
|
|
class AzureService extends __BaseService {
|
|
static readonly CreatePath = '/azure';
|
|
|
|
constructor(
|
|
config: __Configuration,
|
|
http: HttpClient
|
|
) {
|
|
super(config, http);
|
|
}
|
|
|
|
/**
|
|
* @param user undefined
|
|
*/
|
|
CreateResponse(user?: AzureADAuthModel): __Observable<__StrictHttpResponse<null>> {
|
|
let __params = this.newParams();
|
|
let __headers = new HttpHeaders();
|
|
let __body: any = null;
|
|
__body = user;
|
|
let req = new HttpRequest<any>(
|
|
'POST',
|
|
this.rootUrl + `/azure`,
|
|
__body,
|
|
{
|
|
headers: __headers,
|
|
params: __params,
|
|
responseType: 'json'
|
|
});
|
|
|
|
return this.http.request<any>(req).pipe(
|
|
__filter(_r => _r instanceof HttpResponse),
|
|
__map((_r) => {
|
|
return _r as __StrictHttpResponse<null>;
|
|
})
|
|
);
|
|
}
|
|
/**
|
|
* @param user undefined
|
|
*/
|
|
Create(user?: AzureADAuthModel): __Observable<null> {
|
|
return this.CreateResponse(user).pipe(
|
|
__map(_r => _r.body as null)
|
|
);
|
|
}
|
|
}
|
|
|
|
module AzureService {
|
|
}
|
|
|
|
export { AzureService }
|