diff --git a/src/app/services/api/api/warehouses.service.ts b/src/app/services/api/api/warehouses.service.ts new file mode 100644 index 0000000..08242ce --- /dev/null +++ b/src/app/services/api/api/warehouses.service.ts @@ -0,0 +1,104 @@ +/** + * PyroFetes + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import {Inject, Injectable, Optional} from '@angular/core'; +import { + HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext +} from '@angular/common/http'; +import {CustomHttpParameterCodec} from '../encoder'; +import {Observable} from 'rxjs'; + +// @ts-ignore +import {GetWareHouseDto} from '../model/get-ware-house-dto'; + +// @ts-ignore +import {BASE_PATH, COLLECTION_FORMATS} from '../variables'; +import {Configuration} from '../configuration'; +import {BaseService} from '../api.base.service'; + + +@Injectable({ + providedIn: 'root' +}) +export class WarehousesService extends BaseService { + + constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string | string[], @Optional() configuration?: Configuration) { + super(basePath, configuration); + } + + /** + * @endpoint get /API/wareHouses + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getAllWarehouseEndpoint(observe?: 'body', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>; + public getAllWarehouseEndpoint(observe?: 'response', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllWarehouseEndpoint(observe?: 'events', reportProgress?: boolean, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable>>; + public getAllWarehouseEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: { + httpHeaderAccept?: 'application/json', + context?: HttpContext, + transferCache?: boolean + }): Observable { + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + const localVarHttpContext: HttpContext = options?.context ?? new HttpContext(); + + const localVarTransferCache: boolean = options?.transferCache ?? true; + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/API/wareHouses`; + const {basePath, withCredentials} = this.configuration; + return this.httpClient.request>('get', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + ...(withCredentials ? {withCredentials} : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}), + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/services/api/model/get-ware-house-dto.ts b/src/app/services/api/model/get-ware-house-dto.ts new file mode 100644 index 0000000..f98b212 --- /dev/null +++ b/src/app/services/api/model/get-ware-house-dto.ts @@ -0,0 +1,16 @@ +/** + * PyroFetes + * + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface GetWareHouseDto { + id?: number; + name?: string | null; +} +