import * as i0 from '@angular/core'; import { InjectionToken, Injectable, Optional, Inject, NgModule, SkipSelf } from '@angular/core'; import * as i1 from '@angular/common/http'; import { HttpHeaders, HttpContext, HttpParams } from '@angular/common/http'; /** * Custom HttpParameterCodec * Workaround for https://github.com/angular/angular/issues/18261 */ class CustomHttpParameterCodec { encodeKey(k) { return encodeURIComponent(k); } encodeValue(v) { return encodeURIComponent(v); } decodeKey(k) { return decodeURIComponent(k); } decodeValue(v) { return decodeURIComponent(v); } } const BASE_PATH = new InjectionToken('basePath'); const COLLECTION_FORMATS = { 'csv': ',', 'tsv': ' ', 'ssv': ' ', 'pipes': '|' }; class Configuration { /** * @deprecated Since 5.0. Use credentials instead */ apiKeys; username; password; /** * @deprecated Since 5.0. Use credentials instead */ accessToken; basePath; withCredentials; /** * Takes care of encoding query- and form-parameters. */ encoder; /** * Encoding of various path parameter * styles. *

* See {@link README.md} for more details *

*/ encodeParam; /** * The keys are the names in the securitySchemes section of the OpenAPI * document. They should map to the value used for authentication * minus any standard prefixes such as 'Basic' or 'Bearer'. */ credentials; constructor(configurationParameters = {}) { this.apiKeys = configurationParameters.apiKeys; this.username = configurationParameters.username; this.password = configurationParameters.password; this.accessToken = configurationParameters.accessToken; this.basePath = configurationParameters.basePath; this.withCredentials = configurationParameters.withCredentials; this.encoder = configurationParameters.encoder; if (configurationParameters.encodeParam) { this.encodeParam = configurationParameters.encodeParam; } else { this.encodeParam = param => this.defaultEncodeParam(param); } if (configurationParameters.credentials) { this.credentials = configurationParameters.credentials; } else { this.credentials = {}; } // init default OAuth2PasswordBearer credential if (!this.credentials['OAuth2PasswordBearer']) { this.credentials['OAuth2PasswordBearer'] = () => { return typeof this.accessToken === 'function' ? this.accessToken() : this.accessToken; }; } } /** * Select the correct content-type to use for a request. * Uses {@link Configuration#isJsonMime} to determine the correct content-type. * If no content type is found return the first found type if the contentTypes is not empty * @param contentTypes - the array of content types that are available for selection * @returns the selected content-type or undefined if no selection could be made. */ selectHeaderContentType(contentTypes) { if (contentTypes.length === 0) { return undefined; } const type = contentTypes.find((x) => this.isJsonMime(x)); if (type === undefined) { return contentTypes[0]; } return type; } /** * Select the correct accept content-type to use for a request. * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. * If no content type is found return the first found type if the contentTypes is not empty * @param accepts - the array of content types that are available for selection. * @returns the selected content-type or undefined if no selection could be made. */ selectHeaderAccept(accepts) { if (accepts.length === 0) { return undefined; } const type = accepts.find((x) => this.isJsonMime(x)); if (type === undefined) { return accepts[0]; } return type; } /** * Check if the given MIME is a JSON MIME. * JSON MIME examples: * application/json * application/json; charset=UTF8 * APPLICATION/JSON * application/vnd.company+json * @param mime - MIME (Multipurpose Internet Mail Extensions) * @return True if the given MIME is JSON, false otherwise. */ isJsonMime(mime) { const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } lookupCredential(key) { const value = this.credentials[key]; return typeof value === 'function' ? value() : value; } defaultEncodeParam(param) { // This implementation exists as fallback for missing configuration // and for backwards compatibility to older typescript-angular generator versions. // It only works for the 'simple' parameter style. // Date-handling only works for the 'date-time' format. // All other styles and Date-formats are probably handled incorrectly. // // But: if that's all you need (i.e.: the most common use-case): no need for customization! const value = param.dataFormat === 'date-time' && param.value instanceof Date ? param.value.toISOString() : param.value; return encodeURIComponent(String(value)); } } /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * 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 */ class ActuatorsService { httpClient; basePath = 'http://localhost'; defaultHeaders = new HttpHeaders(); configuration = new Configuration(); encoder; constructor(httpClient, basePath, configuration) { this.httpClient = httpClient; if (configuration) { this.configuration = configuration; } if (typeof this.configuration.basePath !== 'string') { if (Array.isArray(basePath) && basePath.length > 0) { basePath = basePath[0]; } if (typeof basePath !== 'string') { basePath = this.basePath; } this.configuration.basePath = basePath; } this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } // @ts-ignore addToHttpParams(httpParams, value, key) { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); } return httpParams; } addToHttpParamsRecursive(httpParams, value, key) { if (value == null) { return httpParams; } if (typeof value === "object") { if (Array.isArray(value)) { value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { httpParams = httpParams.append(key, value.toISOString().substring(0, 10)); } else { throw Error("key may not be null if value is Date"); } } else { Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)); } } else if (key != null) { httpParams = httpParams.append(key, value); } else { throw Error("key may not be null if value is not object or array"); } return httpParams; } actuators(prototypeId, observe = 'body', reportProgress = false, options) { if (prototypeId === null || prototypeId === undefined) { throw new Error('Required parameter prototypeId was null or undefined when calling actuators.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/actuators/${this.configuration.encodeParam({ name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } updateActuators(actuator, observe = 'body', reportProgress = false, options) { if (actuator === null || actuator === undefined) { throw new Error('Required parameter actuator was null or undefined when calling updateActuators.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } // to determine the Content-Type header const consumes = [ 'application/json' ]; const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/actuators`; return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, body: actuator, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ActuatorsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ActuatorsService, providedIn: 'root' }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ActuatorsService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [BASE_PATH] }] }, { type: Configuration, decorators: [{ type: Optional }] }] }); /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * 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 */ class DefaultService { httpClient; basePath = 'http://localhost'; defaultHeaders = new HttpHeaders(); configuration = new Configuration(); encoder; constructor(httpClient, basePath, configuration) { this.httpClient = httpClient; if (configuration) { this.configuration = configuration; } if (typeof this.configuration.basePath !== 'string') { if (Array.isArray(basePath) && basePath.length > 0) { basePath = basePath[0]; } if (typeof basePath !== 'string') { basePath = this.basePath; } this.configuration.basePath = basePath; } this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } /** * @param consumes string[] mime-types * @return true: consumes contains 'multipart/form-data', false: otherwise */ canConsumeForm(consumes) { const form = 'multipart/form-data'; for (const consume of consumes) { if (form === consume) { return true; } } return false; } // @ts-ignore addToHttpParams(httpParams, value, key) { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); } return httpParams; } addToHttpParamsRecursive(httpParams, value, key) { if (value == null) { return httpParams; } if (typeof value === "object") { if (Array.isArray(value)) { value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { httpParams = httpParams.append(key, value.toISOString().substring(0, 10)); } else { throw Error("key may not be null if value is Date"); } } else { Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)); } } else if (key != null) { httpParams = httpParams.append(key, value); } else { throw Error("key may not be null if value is not object or array"); } return httpParams; } createUserAccessToken(username, password, grantType, scope, clientId, clientSecret, observe = 'body', reportProgress = false, options) { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling createUserAccessToken.'); } if (password === null || password === undefined) { throw new Error('Required parameter password was null or undefined when calling createUserAccessToken.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } // to determine the Content-Type header const consumes = [ 'application/x-www-form-urlencoded' ]; const canConsumeForm = this.canConsumeForm(consumes); let localVarFormParams; let localVarUseForm = false; let localVarConvertFormParamsToString = false; if (localVarUseForm) { localVarFormParams = new FormData(); } else { localVarFormParams = new HttpParams({ encoder: this.encoder }); } if (grantType !== undefined) { localVarFormParams = localVarFormParams.append('grant_type', grantType) || localVarFormParams; } if (username !== undefined) { localVarFormParams = localVarFormParams.append('username', username) || localVarFormParams; } if (password !== undefined) { localVarFormParams = localVarFormParams.append('password', password) || localVarFormParams; } if (scope !== undefined) { localVarFormParams = localVarFormParams.append('scope', scope) || localVarFormParams; } if (clientId !== undefined) { localVarFormParams = localVarFormParams.append('client_id', clientId) || localVarFormParams; } if (clientSecret !== undefined) { localVarFormParams = localVarFormParams.append('client_secret', clientSecret) || localVarFormParams; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/users/new/`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } loginForAccessToken(username, password, grantType, scope, clientId, clientSecret, observe = 'body', reportProgress = false, options) { if (username === null || username === undefined) { throw new Error('Required parameter username was null or undefined when calling loginForAccessToken.'); } if (password === null || password === undefined) { throw new Error('Required parameter password was null or undefined when calling loginForAccessToken.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } // to determine the Content-Type header const consumes = [ 'application/x-www-form-urlencoded' ]; const canConsumeForm = this.canConsumeForm(consumes); let localVarFormParams; let localVarUseForm = false; let localVarConvertFormParamsToString = false; if (localVarUseForm) { localVarFormParams = new FormData(); } else { localVarFormParams = new HttpParams({ encoder: this.encoder }); } if (grantType !== undefined) { localVarFormParams = localVarFormParams.append('grant_type', grantType) || localVarFormParams; } if (username !== undefined) { localVarFormParams = localVarFormParams.append('username', username) || localVarFormParams; } if (password !== undefined) { localVarFormParams = localVarFormParams.append('password', password) || localVarFormParams; } if (scope !== undefined) { localVarFormParams = localVarFormParams.append('scope', scope) || localVarFormParams; } if (clientId !== undefined) { localVarFormParams = localVarFormParams.append('client_id', clientId) || localVarFormParams; } if (clientSecret !== undefined) { localVarFormParams = localVarFormParams.append('client_secret', clientSecret) || localVarFormParams; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/token`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } picture(observe = 'body', reportProgress = false, options) { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/picture`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } readItems(observe = 'body', reportProgress = false, options) { let localVarHeaders = this.defaultHeaders; let localVarCredential; // authentication (OAuth2PasswordBearer) required localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/users/items/`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } userLogOut(observe = 'body', reportProgress = false, options) { let localVarHeaders = this.defaultHeaders; let localVarCredential; // authentication (OAuth2PasswordBearer) required localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/users/logout/`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DefaultService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DefaultService, providedIn: 'root' }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: DefaultService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [BASE_PATH] }] }, { type: Configuration, decorators: [{ type: Optional }] }] }); /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * 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 */ class MeasurementsService { httpClient; basePath = 'http://localhost'; defaultHeaders = new HttpHeaders(); configuration = new Configuration(); encoder; constructor(httpClient, basePath, configuration) { this.httpClient = httpClient; if (configuration) { this.configuration = configuration; } if (typeof this.configuration.basePath !== 'string') { if (Array.isArray(basePath) && basePath.length > 0) { basePath = basePath[0]; } if (typeof basePath !== 'string') { basePath = this.basePath; } this.configuration.basePath = basePath; } this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } // @ts-ignore addToHttpParams(httpParams, value, key) { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); } return httpParams; } addToHttpParamsRecursive(httpParams, value, key) { if (value == null) { return httpParams; } if (typeof value === "object") { if (Array.isArray(value)) { value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { httpParams = httpParams.append(key, value.toISOString().substring(0, 10)); } else { throw Error("key may not be null if value is Date"); } } else { Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)); } } else if (key != null) { httpParams = httpParams.append(key, value); } else { throw Error("key may not be null if value is not object or array"); } return httpParams; } measurements(prototypeId, sensorType, observe = 'body', reportProgress = false, options) { if (prototypeId === null || prototypeId === undefined) { throw new Error('Required parameter prototypeId was null or undefined when calling measurements.'); } if (sensorType === null || sensorType === undefined) { throw new Error('Required parameter sensorType was null or undefined when calling measurements.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/measurements/${this.configuration.encodeParam({ name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "sensorType", value: sensorType, in: "path", style: "simple", explode: false, dataType: "SensorType", dataFormat: undefined })}`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } postMeasurement(prototypeId, sensorType, value, observe = 'body', reportProgress = false, options) { if (prototypeId === null || prototypeId === undefined) { throw new Error('Required parameter prototypeId was null or undefined when calling postMeasurement.'); } if (sensorType === null || sensorType === undefined) { throw new Error('Required parameter sensorType was null or undefined when calling postMeasurement.'); } if (value === null || value === undefined) { throw new Error('Required parameter value was null or undefined when calling postMeasurement.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (value !== undefined && value !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, value, 'value'); } let localVarHeaders = this.defaultHeaders; let localVarCredential; // authentication (OAuth2PasswordBearer) required localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/measurements/${this.configuration.encodeParam({ name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}/${this.configuration.encodeParam({ name: "sensorType", value: sensorType, in: "path", style: "simple", explode: false, dataType: "SensorType", dataFormat: undefined })}`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: MeasurementsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: MeasurementsService, providedIn: 'root' }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: MeasurementsService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [BASE_PATH] }] }, { type: Configuration, decorators: [{ type: Optional }] }] }); /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * 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 */ class PrototypesService { httpClient; basePath = 'http://localhost'; defaultHeaders = new HttpHeaders(); configuration = new Configuration(); encoder; constructor(httpClient, basePath, configuration) { this.httpClient = httpClient; if (configuration) { this.configuration = configuration; } if (typeof this.configuration.basePath !== 'string') { if (Array.isArray(basePath) && basePath.length > 0) { basePath = basePath[0]; } if (typeof basePath !== 'string') { basePath = this.basePath; } this.configuration.basePath = basePath; } this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } // @ts-ignore addToHttpParams(httpParams, value, key) { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); } return httpParams; } addToHttpParamsRecursive(httpParams, value, key) { if (value == null) { return httpParams; } if (typeof value === "object") { if (Array.isArray(value)) { value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { httpParams = httpParams.append(key, value.toISOString().substring(0, 10)); } else { throw Error("key may not be null if value is Date"); } } else { Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)); } } else if (key != null) { httpParams = httpParams.append(key, value); } else { throw Error("key may not be null if value is not object or array"); } return httpParams; } postPrototype(prototype, observe = 'body', reportProgress = false, options) { if (prototype === null || prototype === undefined) { throw new Error('Required parameter prototype was null or undefined when calling postPrototype.'); } let localVarHeaders = this.defaultHeaders; let localVarCredential; // authentication (OAuth2PasswordBearer) required localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer'); if (localVarCredential) { localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential); } let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } // to determine the Content-Type header const consumes = [ 'application/json' ]; const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/prototypes`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, body: prototype, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } prototype(prototypeId, observe = 'body', reportProgress = false, options) { if (prototypeId === null || prototypeId === undefined) { throw new Error('Required parameter prototypeId was null or undefined when calling prototype.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/prototypes/${this.configuration.encodeParam({ name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } prototypes(observe = 'body', reportProgress = false, options) { let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/prototypes`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PrototypesService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PrototypesService, providedIn: 'root' }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: PrototypesService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [BASE_PATH] }] }, { type: Configuration, decorators: [{ type: Optional }] }] }); /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * 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 */ class SensorsService { httpClient; basePath = 'http://localhost'; defaultHeaders = new HttpHeaders(); configuration = new Configuration(); encoder; constructor(httpClient, basePath, configuration) { this.httpClient = httpClient; if (configuration) { this.configuration = configuration; } if (typeof this.configuration.basePath !== 'string') { if (Array.isArray(basePath) && basePath.length > 0) { basePath = basePath[0]; } if (typeof basePath !== 'string') { basePath = this.basePath; } this.configuration.basePath = basePath; } this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } // @ts-ignore addToHttpParams(httpParams, value, key) { if (typeof value === "object" && value instanceof Date === false) { httpParams = this.addToHttpParamsRecursive(httpParams, value); } else { httpParams = this.addToHttpParamsRecursive(httpParams, value, key); } return httpParams; } addToHttpParamsRecursive(httpParams, value, key) { if (value == null) { return httpParams; } if (typeof value === "object") { if (Array.isArray(value)) { value.forEach(elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); } else if (value instanceof Date) { if (key != null) { httpParams = httpParams.append(key, value.toISOString().substring(0, 10)); } else { throw Error("key may not be null if value is Date"); } } else { Object.keys(value).forEach(k => httpParams = this.addToHttpParamsRecursive(httpParams, value[k], key != null ? `${key}.${k}` : k)); } } else if (key != null) { httpParams = httpParams.append(key, value); } else { throw Error("key may not be null if value is not object or array"); } return httpParams; } postSensor(prototypeId, sensorType, observe = 'body', reportProgress = false, options) { if (prototypeId === null || prototypeId === undefined) { throw new Error('Required parameter prototypeId was null or undefined when calling postSensor.'); } if (sensorType === null || sensorType === undefined) { throw new Error('Required parameter sensorType was null or undefined when calling postSensor.'); } let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (sensorType !== undefined && sensorType !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, sensorType, 'sensor_type'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/sensors/${this.configuration.encodeParam({ name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`; return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } sensor(prototypeId, observe = 'body', reportProgress = false, options) { if (prototypeId === null || prototypeId === undefined) { throw new Error('Required parameter prototypeId was null or undefined when calling sensor.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/sensors/${this.configuration.encodeParam({ name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined })}`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } sensors(prototypeId, sensorType, observe = 'body', reportProgress = false, options) { let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); if (prototypeId !== undefined && prototypeId !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, prototypeId, 'prototype_id'); } if (sensorType !== undefined && sensorType !== null) { localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, sensorType, 'sensor_type'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/sensors`; return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } updateSensors(sensor, observe = 'body', reportProgress = false, options) { if (sensor === null || sensor === undefined) { throw new Error('Required parameter sensor was null or undefined when calling updateSensors.'); } let localVarHeaders = this.defaultHeaders; let localVarHttpHeaderAcceptSelected = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts = [ 'application/json' ]; localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } let localVarHttpContext = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } let localVarTransferCache = options && options.transferCache; if (localVarTransferCache === undefined) { localVarTransferCache = true; } // to determine the Content-Type header const consumes = [ 'application/json' ]; const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_ = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } let localVarPath = `/sensors`; return this.httpClient.request('put', `${this.configuration.basePath}${localVarPath}`, { context: localVarHttpContext, body: sensor, responseType: responseType_, withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, transferCache: localVarTransferCache, reportProgress: reportProgress }); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SensorsService, deps: [{ token: i1.HttpClient }, { token: BASE_PATH, optional: true }, { token: Configuration, optional: true }], target: i0.ɵɵFactoryTarget.Injectable }); static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SensorsService, providedIn: 'root' }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: SensorsService, decorators: [{ type: Injectable, args: [{ providedIn: 'root' }] }], ctorParameters: () => [{ type: i1.HttpClient }, { type: undefined, decorators: [{ type: Optional }, { type: Inject, args: [BASE_PATH] }] }, { type: Configuration, decorators: [{ type: Optional }] }] }); const APIS = [ActuatorsService, DefaultService, MeasurementsService, PrototypesService, SensorsService]; /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ const SensorType = { Temperature: 'temperature', Humidity: 'humidity', Ec: 'ec', Ph: 'ph', WaterLevel: 'water_level', BooleanWaterLevel: 'boolean_water_level', Oxygen: 'oxygen' }; /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ /** * FastAPI * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 0.1.0 * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech * Do not edit the class manually. */ class ApiModule { static forRoot(configurationFactory) { return { ngModule: ApiModule, providers: [{ provide: Configuration, useFactory: configurationFactory }] }; } constructor(parentModule, http) { if (parentModule) { throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); } if (!http) { throw new Error('You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575'); } } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ApiModule, deps: [{ token: ApiModule, optional: true, skipSelf: true }, { token: i1.HttpClient, optional: true }], target: i0.ɵɵFactoryTarget.NgModule }); static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.1.3", ngImport: i0, type: ApiModule }); static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ApiModule }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.1.3", ngImport: i0, type: ApiModule, decorators: [{ type: NgModule, args: [{ imports: [], declarations: [], exports: [], providers: [] }] }], ctorParameters: () => [{ type: ApiModule, decorators: [{ type: Optional }, { type: SkipSelf }] }, { type: i1.HttpClient, decorators: [{ type: Optional }] }] }); /** * Generated bundle index. Do not edit. */ export { APIS, ActuatorsService, ApiModule, BASE_PATH, COLLECTION_FORMATS, Configuration, DefaultService, MeasurementsService, PrototypesService, SensorType, SensorsService }; //# sourceMappingURL=aquadash-backend.mjs.map