This commit is contained in:
Kyle Bouchard 2024-02-13 23:34:04 -05:00
parent bbcfd69a3d
commit 1c12db56aa
68 changed files with 4012 additions and 2195 deletions

2
.npmignore Normal file
View File

@ -0,0 +1,2 @@
# Nested package.json's are only needed for development.
**/package.json

View File

@ -1,23 +0,0 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator
# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.
# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs
# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md

View File

@ -1,29 +0,0 @@
.gitignore
README.md
api.module.ts
api/actuators.service.ts
api/api.ts
api/default.service.ts
api/measurements.service.ts
api/prototypes.service.ts
api/sensors.service.ts
configuration.ts
encoder.ts
git_push.sh
index.ts
model/actuator.ts
model/hTTPValidationError.ts
model/measurement.ts
model/models.ts
model/picture.ts
model/prototype.ts
model/sensor.ts
model/sensorType.ts
model/token.ts
model/validationError.ts
model/validationErrorLocInner.ts
ng-package.json
package.json
param.ts
tsconfig.json
variables.ts

View File

@ -1 +0,0 @@
7.3.0

11
api.module.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
import { ModuleWithProviders } from '@angular/core';
import { Configuration } from './configuration';
import { HttpClient } from '@angular/common/http';
import * as i0 from "@angular/core";
export declare class ApiModule {
static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule>;
constructor(parentModule: ApiModule, http: HttpClient);
static ɵfac: i0.ɵɵFactoryDeclaration<ApiModule, [{ optional: true; skipSelf: true; }, { optional: true; }]>;
static ɵmod: i0.ɵɵNgModuleDeclaration<ApiModule, never, never, never>;
static ɵinj: i0.ɵɵInjectorDeclaration<ApiModule>;
}

View File

@ -1,30 +0,0 @@
import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core';
import { Configuration } from './configuration';
import { HttpClient } from '@angular/common/http';
@NgModule({
imports: [],
declarations: [],
exports: [],
providers: []
})
export class ApiModule {
public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders<ApiModule> {
return {
ngModule: ApiModule,
providers: [ { provide: Configuration, useFactory: configurationFactory } ]
};
}
constructor( @Optional() @SkipSelf() parentModule: ApiModule,
@Optional() http: HttpClient) {
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');
}
}
}

59
api/actuators.service.d.ts vendored Normal file
View File

@ -0,0 +1,59 @@
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Actuator } from '../model/actuator';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export declare class ActuatorsService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: Configuration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* Actuators
* @param prototypeId
* @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.
*/
actuators(prototypeId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Array<Actuator>>;
actuators(prototypeId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Array<Actuator>>>;
actuators(prototypeId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Array<Actuator>>>;
/**
* Update Actuators
* @param actuator
* @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.
*/
updateActuators(actuator: Array<Actuator>, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Actuator>;
updateActuators(actuator: Array<Actuator>, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Actuator>>;
updateActuators(actuator: Array<Actuator>, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Actuator>>;
static ɵfac: i0.ɵɵFactoryDeclaration<ActuatorsService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<ActuatorsService>;
}

View File

@ -1,234 +0,0 @@
/**
* 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 */
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 { Actuator } from '../model/actuator';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
@Injectable({
providedIn: 'root'
})
export class ActuatorsService {
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
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
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).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
* @param prototypeId
* @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 actuators(prototypeId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<Actuator>>;
public actuators(prototypeId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<Actuator>>>;
public actuators(prototypeId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<Actuator>>>;
public actuators(prototypeId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (prototypeId === null || prototypeId === undefined) {
throw new Error('Required parameter prototypeId was null or undefined when calling actuators.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/actuators/${this.configuration.encodeParam({name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`;
return this.httpClient.request<Array<Actuator>>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Update Actuators
* @param actuator
* @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 updateActuators(actuator: Array<Actuator>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Actuator>;
public updateActuators(actuator: Array<Actuator>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Actuator>>;
public updateActuators(actuator: Array<Actuator>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Actuator>>;
public updateActuators(actuator: Array<Actuator>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (actuator === null || actuator === undefined) {
throw new Error('Required parameter actuator was null or undefined when calling updateActuators.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
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 = `/actuators`;
return this.httpClient.request<Actuator>('put', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: actuator,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
}

View File

@ -8,4 +8,4 @@ export * from './prototypes.service';
import { PrototypesService } from './prototypes.service';
export * from './sensors.service';
import { SensorsService } from './sensors.service';
export const APIS = [ActuatorsService, DefaultService, MeasurementsService, PrototypesService, SensorsService];
export declare const APIS: (typeof ActuatorsService | typeof DefaultService | typeof MeasurementsService | typeof PrototypesService | typeof SensorsService)[];

135
api/default.service.d.ts vendored Normal file
View File

@ -0,0 +1,135 @@
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Picture } from '../model/picture';
import { Token } from '../model/token';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export declare class DefaultService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: Configuration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm;
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* Create User Access Token
* @param username
* @param password
* @param grantType
* @param scope
* @param clientId
* @param clientSecret
* @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.
*/
createUserAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Token>;
createUserAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Token>>;
createUserAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Token>>;
/**
* Login For Access Token
* @param username
* @param password
* @param grantType
* @param scope
* @param clientId
* @param clientSecret
* @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.
*/
loginForAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Token>;
loginForAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Token>>;
loginForAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Token>>;
/**
* Picture
* @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.
*/
picture(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Picture>;
picture(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Picture>>;
picture(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Picture>>;
/**
* Read Items
* @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.
*/
readItems(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
readItems(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
readItems(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
/**
* User Log Out
* @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.
*/
userLogOut(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<any>;
userLogOut(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<any>>;
userLogOut(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<any>>;
static ɵfac: i0.ɵɵFactoryDeclaration<DefaultService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<DefaultService>;
}

View File

@ -1,519 +0,0 @@
/**
* 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 */
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 { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { Picture } from '../model/picture';
// @ts-ignore
import { Token } from '../model/token';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
@Injectable({
providedIn: 'root'
})
export class DefaultService {
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
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
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
// @ts-ignore
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).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;
}
/**
* Create User Access Token
* @param username
* @param password
* @param grantType
* @param scope
* @param clientId
* @param clientSecret
* @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 createUserAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Token>;
public createUserAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Token>>;
public createUserAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Token>>;
public createUserAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes: string[] = [
'application/x-www-form-urlencoded'
];
const canConsumeForm = this.canConsumeForm(consumes);
let localVarFormParams: { append(param: string, value: any): any; };
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', <any>grantType) as any || localVarFormParams;
}
if (username !== undefined) {
localVarFormParams = localVarFormParams.append('username', <any>username) as any || localVarFormParams;
}
if (password !== undefined) {
localVarFormParams = localVarFormParams.append('password', <any>password) as any || localVarFormParams;
}
if (scope !== undefined) {
localVarFormParams = localVarFormParams.append('scope', <any>scope) as any || localVarFormParams;
}
if (clientId !== undefined) {
localVarFormParams = localVarFormParams.append('client_id', <any>clientId) as any || localVarFormParams;
}
if (clientSecret !== undefined) {
localVarFormParams = localVarFormParams.append('client_secret', <any>clientSecret) as any || localVarFormParams;
}
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 = `/users/new/`;
return this.httpClient.request<Token>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Login For Access Token
* @param username
* @param password
* @param grantType
* @param scope
* @param clientId
* @param clientSecret
* @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 loginForAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Token>;
public loginForAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Token>>;
public loginForAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Token>>;
public loginForAccessToken(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes: string[] = [
'application/x-www-form-urlencoded'
];
const canConsumeForm = this.canConsumeForm(consumes);
let localVarFormParams: { append(param: string, value: any): any; };
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', <any>grantType) as any || localVarFormParams;
}
if (username !== undefined) {
localVarFormParams = localVarFormParams.append('username', <any>username) as any || localVarFormParams;
}
if (password !== undefined) {
localVarFormParams = localVarFormParams.append('password', <any>password) as any || localVarFormParams;
}
if (scope !== undefined) {
localVarFormParams = localVarFormParams.append('scope', <any>scope) as any || localVarFormParams;
}
if (clientId !== undefined) {
localVarFormParams = localVarFormParams.append('client_id', <any>clientId) as any || localVarFormParams;
}
if (clientSecret !== undefined) {
localVarFormParams = localVarFormParams.append('client_secret', <any>clientSecret) as any || localVarFormParams;
}
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 = `/token`;
return this.httpClient.request<Token>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Picture
* @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 picture(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Picture>;
public picture(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Picture>>;
public picture(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Picture>>;
public picture(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/picture`;
return this.httpClient.request<Picture>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Read Items
* @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 readItems(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;
public readItems(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public readItems(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public readItems(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required
localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/users/items/`;
return this.httpClient.request<any>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* User Log Out
* @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 userLogOut(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any>;
public userLogOut(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
public userLogOut(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
public userLogOut(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required
localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/users/logout/`;
return this.httpClient.request<any>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
}

63
api/measurements.service.d.ts vendored Normal file
View File

@ -0,0 +1,63 @@
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Measurement } from '../model/measurement';
import { SensorType } from '../model/sensorType';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export declare class MeasurementsService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: Configuration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* Measurements
* @param prototypeId
* @param sensorType
* @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.
*/
measurements(prototypeId: number, sensorType: SensorType, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Array<Measurement>>;
measurements(prototypeId: number, sensorType: SensorType, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Array<Measurement>>>;
measurements(prototypeId: number, sensorType: SensorType, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Array<Measurement>>>;
/**
* Post Measurement
* @param prototypeId
* @param sensorType
* @param value
* @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.
*/
postMeasurement(prototypeId: number, sensorType: SensorType, value: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Measurement>;
postMeasurement(prototypeId: number, sensorType: SensorType, value: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Measurement>>;
postMeasurement(prototypeId: number, sensorType: SensorType, value: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Measurement>>;
static ɵfac: i0.ɵɵFactoryDeclaration<MeasurementsService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<MeasurementsService>;
}

View File

@ -1,252 +0,0 @@
/**
* 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 */
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 { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { Measurement } from '../model/measurement';
// @ts-ignore
import { SensorType } from '../model/sensorType';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
@Injectable({
providedIn: 'root'
})
export class MeasurementsService {
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
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
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).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
* @param prototypeId
* @param sensorType
* @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 measurements(prototypeId: number, sensorType: SensorType, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<Measurement>>;
public measurements(prototypeId: number, sensorType: SensorType, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<Measurement>>>;
public measurements(prototypeId: number, sensorType: SensorType, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<Measurement>>>;
public measurements(prototypeId: number, sensorType: SensorType, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/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<Array<Measurement>>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Post Measurement
* @param prototypeId
* @param sensorType
* @param value
* @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 postMeasurement(prototypeId: number, sensorType: SensorType, value: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Measurement>;
public postMeasurement(prototypeId: number, sensorType: SensorType, value: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Measurement>>;
public postMeasurement(prototypeId: number, sensorType: SensorType, value: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Measurement>>;
public postMeasurement(prototypeId: number, sensorType: SensorType, value: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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,
<any>value, 'value');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required
localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/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<Measurement>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
}

79
api/prototypes.service.d.ts vendored Normal file
View File

@ -0,0 +1,79 @@
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Prototype } from '../model/prototype';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export declare class PrototypesService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: Configuration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* Post Prototype
* @param prototype
* @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.
*/
postPrototype(prototype: Prototype, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Prototype>;
postPrototype(prototype: Prototype, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Prototype>>;
postPrototype(prototype: Prototype, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Prototype>>;
/**
* Prototype
* @param prototypeId
* @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.
*/
prototype(prototypeId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Prototype>;
prototype(prototypeId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Prototype>>;
prototype(prototypeId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Prototype>>;
/**
* Prototypes
* @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.
*/
prototypes(observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Array<Prototype>>;
prototypes(observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Array<Prototype>>>;
prototypes(observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Array<Prototype>>>;
static ɵfac: i0.ɵɵFactoryDeclaration<PrototypesService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<PrototypesService>;
}

View File

@ -1,301 +0,0 @@
/**
* 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 */
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 { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { Prototype } from '../model/prototype';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
@Injectable({
providedIn: 'root'
})
export class PrototypesService {
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
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
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).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;
}
/**
* Post Prototype
* @param prototype
* @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 postPrototype(prototype: Prototype, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Prototype>;
public postPrototype(prototype: Prototype, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Prototype>>;
public postPrototype(prototype: Prototype, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Prototype>>;
public postPrototype(prototype: Prototype, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (prototype === null || prototype === undefined) {
throw new Error('Required parameter prototype was null or undefined when calling postPrototype.');
}
let localVarHeaders = this.defaultHeaders;
let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required
localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (localVarCredential) {
localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
}
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
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 = `/prototypes`;
return this.httpClient.request<Prototype>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: prototype,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Prototype
* @param prototypeId
* @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 prototype(prototypeId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Prototype>;
public prototype(prototypeId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Prototype>>;
public prototype(prototypeId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Prototype>>;
public prototype(prototypeId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (prototypeId === null || prototypeId === undefined) {
throw new Error('Required parameter prototypeId was null or undefined when calling prototype.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/prototypes/${this.configuration.encodeParam({name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`;
return this.httpClient.request<Prototype>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Prototypes
* @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 prototypes(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<Prototype>>;
public prototypes(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<Prototype>>>;
public prototypes(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<Prototype>>>;
public prototypes(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/prototypes`;
return this.httpClient.request<Array<Prototype>>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
}

104
api/sensors.service.d.ts vendored Normal file
View File

@ -0,0 +1,104 @@
import { HttpClient, HttpHeaders, HttpResponse, HttpEvent, HttpParameterCodec, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { Sensor } from '../model/sensor';
import { SensorType } from '../model/sensorType';
import { Configuration } from '../configuration';
import * as i0 from "@angular/core";
export declare class SensorsService {
protected httpClient: HttpClient;
protected basePath: string;
defaultHeaders: HttpHeaders;
configuration: Configuration;
encoder: HttpParameterCodec;
constructor(httpClient: HttpClient, basePath: string | string[], configuration: Configuration);
private addToHttpParams;
private addToHttpParamsRecursive;
/**
* Post Sensor
* @param prototypeId
* @param sensorType
* @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.
*/
postSensor(prototypeId: number, sensorType: SensorType, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Sensor>;
postSensor(prototypeId: number, sensorType: SensorType, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Sensor>>;
postSensor(prototypeId: number, sensorType: SensorType, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Sensor>>;
/**
* Sensor
* @param prototypeId
* @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.
*/
sensor(prototypeId: number, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Array<Sensor>>;
sensor(prototypeId: number, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Array<Sensor>>>;
sensor(prototypeId: number, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Array<Sensor>>>;
/**
* Sensors
* @param prototypeId
* @param sensorType
* @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.
*/
sensors(prototypeId?: number, sensorType?: string, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Array<Sensor>>;
sensors(prototypeId?: number, sensorType?: string, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Array<Sensor>>>;
sensors(prototypeId?: number, sensorType?: string, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Array<Sensor>>>;
/**
* Update Sensors
* @param sensor
* @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.
*/
updateSensors(sensor: Array<Sensor>, observe?: 'body', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<Sensor>;
updateSensors(sensor: Array<Sensor>, observe?: 'response', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpResponse<Sensor>>;
updateSensors(sensor: Array<Sensor>, observe?: 'events', reportProgress?: boolean, options?: {
httpHeaderAccept?: 'application/json';
context?: HttpContext;
transferCache?: boolean;
}): Observable<HttpEvent<Sensor>>;
static ɵfac: i0.ɵɵFactoryDeclaration<SensorsService, [null, { optional: true; }, { optional: true; }]>;
static ɵprov: i0.ɵɵInjectableDeclaration<SensorsService>;
}

View File

@ -1,384 +0,0 @@
/**
* 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 */
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 { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { Sensor } from '../model/sensor';
// @ts-ignore
import { SensorType } from '../model/sensorType';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration';
@Injectable({
providedIn: 'root'
})
export class SensorsService {
protected basePath = 'http://localhost';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
public encoder: HttpParameterCodec;
constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) {
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
private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams {
if (typeof value === "object" && value instanceof Date === false) {
httpParams = this.addToHttpParamsRecursive(httpParams, value);
} else {
httpParams = this.addToHttpParamsRecursive(httpParams, value, key);
}
return httpParams;
}
private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams {
if (value == null) {
return httpParams;
}
if (typeof value === "object") {
if (Array.isArray(value)) {
(value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key));
} else if (value instanceof Date) {
if (key != null) {
httpParams = httpParams.append(key, (value as Date).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;
}
/**
* Post Sensor
* @param prototypeId
* @param sensorType
* @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 postSensor(prototypeId: number, sensorType: SensorType, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Sensor>;
public postSensor(prototypeId: number, sensorType: SensorType, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Sensor>>;
public postSensor(prototypeId: number, sensorType: SensorType, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Sensor>>;
public postSensor(prototypeId: number, sensorType: SensorType, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
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,
<any>sensorType, 'sensor_type');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/sensors/${this.configuration.encodeParam({name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`;
return this.httpClient.request<Sensor>('post', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Sensor
* @param prototypeId
* @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 sensor(prototypeId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<Sensor>>;
public sensor(prototypeId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<Sensor>>>;
public sensor(prototypeId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<Sensor>>>;
public sensor(prototypeId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (prototypeId === null || prototypeId === undefined) {
throw new Error('Required parameter prototypeId was null or undefined when calling sensor.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/sensors/${this.configuration.encodeParam({name: "prototypeId", value: prototypeId, in: "path", style: "simple", explode: false, dataType: "number", dataFormat: undefined})}`;
return this.httpClient.request<Array<Sensor>>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Sensors
* @param prototypeId
* @param sensorType
* @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 sensors(prototypeId?: number, sensorType?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Array<Sensor>>;
public sensors(prototypeId?: number, sensorType?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Array<Sensor>>>;
public sensors(prototypeId?: number, sensorType?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Array<Sensor>>>;
public sensors(prototypeId?: number, sensorType?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (prototypeId !== undefined && prototypeId !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>prototypeId, 'prototype_id');
}
if (sensorType !== undefined && sensorType !== null) {
localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>sensorType, 'sensor_type');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = 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 = `/sensors`;
return this.httpClient.request<Array<Sensor>>('get', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
/**
* Update Sensors
* @param sensor
* @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 updateSensors(sensor: Array<Sensor>, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<Sensor>;
public updateSensors(sensor: Array<Sensor>, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<Sensor>>;
public updateSensors(sensor: Array<Sensor>, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<Sensor>>;
public updateSensors(sensor: Array<Sensor>, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
if (sensor === null || sensor === undefined) {
throw new Error('Required parameter sensor was null or undefined when calling updateSensors.');
}
let localVarHeaders = this.defaultHeaders;
let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header
const httpHeaderAccepts: string[] = [
'application/json'
];
localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
}
if (localVarHttpHeaderAcceptSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
}
let localVarTransferCache: boolean | undefined = options && options.transferCache;
if (localVarTransferCache === undefined) {
localVarTransferCache = true;
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
}
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 = `/sensors`;
return this.httpClient.request<Sensor>('put', `${this.configuration.basePath}${localVarPath}`,
{
context: localVarHttpContext,
body: sensor,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials,
headers: localVarHeaders,
observe: observe,
transferCache: localVarTransferCache,
reportProgress: reportProgress
}
);
}
}

View File

@ -1 +0,0 @@
java -jar ~/Downloads/openapi-generator-cli-7.3.0-20231222.090957-1.jar generate -g typescript-angular -i http://127.0.0.1:8000/openapi.json -o . -p npmRepository=https://git.aquapoly.ca/kylebouchard/Aquadash-backend-client -p ngVersion=17.1.0 -p npmName=aquadash-backend

104
configuration.d.ts vendored Normal file
View File

@ -0,0 +1,104 @@
import { HttpParameterCodec } from '@angular/common/http';
import { Param } from './param';
export interface ConfigurationParameters {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: {
[key: string]: string;
};
username?: string;
password?: string;
/**
* @deprecated Since 5.0. Use credentials instead
*/
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
/**
* Takes care of encoding query- and form-parameters.
*/
encoder?: HttpParameterCodec;
/**
* Override the default method for encoding path parameters in various
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
* <p>
* See {@link README.md} for more details
* </p>
*/
encodeParam?: (param: Param) => string;
/**
* 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?: {
[key: string]: string | (() => string | undefined);
};
}
export declare class Configuration {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: {
[key: string]: string;
};
username?: string;
password?: string;
/**
* @deprecated Since 5.0. Use credentials instead
*/
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
/**
* Takes care of encoding query- and form-parameters.
*/
encoder?: HttpParameterCodec;
/**
* Encoding of various path parameter
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
* <p>
* See {@link README.md} for more details
* </p>
*/
encodeParam: (param: Param) => string;
/**
* 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: {
[key: string]: string | (() => string | undefined);
};
constructor(configurationParameters?: ConfigurationParameters);
/**
* 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 <code>undefined</code> if no selection could be made.
*/
selectHeaderContentType(contentTypes: string[]): string | undefined;
/**
* 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 <code>undefined</code> if no selection could be made.
*/
selectHeaderAccept(accepts: string[]): string | undefined;
/**
* 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: string): boolean;
lookupCredential(key: string): string | undefined;
private defaultEncodeParam;
}

View File

@ -1,175 +0,0 @@
import { HttpParameterCodec } from '@angular/common/http';
import { Param } from './param';
export interface ConfigurationParameters {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
/**
* @deprecated Since 5.0. Use credentials instead
*/
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
/**
* Takes care of encoding query- and form-parameters.
*/
encoder?: HttpParameterCodec;
/**
* Override the default method for encoding path parameters in various
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
* <p>
* See {@link README.md} for more details
* </p>
*/
encodeParam?: (param: Param) => string;
/**
* 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?: {[ key: string ]: string | (() => string | undefined)};
}
export class Configuration {
/**
* @deprecated Since 5.0. Use credentials instead
*/
apiKeys?: {[ key: string ]: string};
username?: string;
password?: string;
/**
* @deprecated Since 5.0. Use credentials instead
*/
accessToken?: string | (() => string);
basePath?: string;
withCredentials?: boolean;
/**
* Takes care of encoding query- and form-parameters.
*/
encoder?: HttpParameterCodec;
/**
* Encoding of various path parameter
* <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.0.md#style-values">styles</a>.
* <p>
* See {@link README.md} for more details
* </p>
*/
encodeParam: (param: Param) => string;
/**
* 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: {[ key: string ]: string | (() => string | undefined)};
constructor(configurationParameters: 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 <code>undefined</code> if no selection could be made.
*/
public selectHeaderContentType (contentTypes: string[]): string | undefined {
if (contentTypes.length === 0) {
return undefined;
}
const type = contentTypes.find((x: string) => 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 <code>undefined</code> if no selection could be made.
*/
public selectHeaderAccept(accepts: string[]): string | undefined {
if (accepts.length === 0) {
return undefined;
}
const type = accepts.find((x: string) => 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.
*/
public isJsonMime(mime: string): boolean {
const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
}
public lookupCredential(key: string): string | undefined {
const value = this.credentials[key];
return typeof value === 'function'
? value()
: value;
}
private defaultEncodeParam(param: Param): string {
// 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 as Date).toISOString()
: param.value;
return encodeURIComponent(String(value));
}
}

11
encoder.d.ts vendored Normal file
View File

@ -0,0 +1,11 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export declare class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string;
encodeValue(v: string): string;
decodeKey(k: string): string;
decodeValue(v: string): string;
}

View File

@ -1,20 +0,0 @@
import { HttpParameterCodec } from '@angular/common/http';
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec implements HttpParameterCodec {
encodeKey(k: string): string {
return encodeURIComponent(k);
}
encodeValue(v: string): string {
return encodeURIComponent(v);
}
decodeKey(k: string): string {
return decodeURIComponent(k);
}
decodeValue(v: string): string {
return decodeURIComponent(v);
}
}

40
esm2022/api.module.mjs Normal file
View File

@ -0,0 +1,40 @@
import { NgModule, SkipSelf, Optional } from '@angular/core';
import { Configuration } from './configuration';
import * as i0 from "@angular/core";
import * as i1 from "@angular/common/http";
export 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
}] }] });
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLm1vZHVsZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2FwaS5tb2R1bGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBdUIsUUFBUSxFQUFFLFFBQVEsRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUNsRixPQUFPLEVBQUUsYUFBYSxFQUFFLE1BQU0saUJBQWlCLENBQUM7OztBQVVoRCxNQUFNLE9BQU8sU0FBUztJQUNYLE1BQU0sQ0FBQyxPQUFPLENBQUMsb0JBQXlDO1FBQzNELE9BQU87WUFDSCxRQUFRLEVBQUUsU0FBUztZQUNuQixTQUFTLEVBQUUsQ0FBRSxFQUFFLE9BQU8sRUFBRSxhQUFhLEVBQUUsVUFBVSxFQUFFLG9CQUFvQixFQUFFLENBQUU7U0FDOUUsQ0FBQztJQUNOLENBQUM7SUFFRCxZQUFxQyxZQUF1QixFQUNuQyxJQUFnQjtRQUNyQyxJQUFJLFlBQVksRUFBRTtZQUNkLE1BQU0sSUFBSSxLQUFLLENBQUMsa0VBQWtFLENBQUMsQ0FBQztTQUN2RjtRQUNELElBQUksQ0FBQyxJQUFJLEVBQUU7WUFDUCxNQUFNLElBQUksS0FBSyxDQUFDLCtEQUErRDtnQkFDL0UsMERBQTBELENBQUMsQ0FBQztTQUMvRDtJQUNMLENBQUM7dUdBakJRLFNBQVM7d0dBQVQsU0FBUzt3R0FBVCxTQUFTOzsyRkFBVCxTQUFTO2tCQU5yQixRQUFRO21CQUFDO29CQUNSLE9BQU8sRUFBTyxFQUFFO29CQUNoQixZQUFZLEVBQUUsRUFBRTtvQkFDaEIsT0FBTyxFQUFPLEVBQUU7b0JBQ2hCLFNBQVMsRUFBRSxFQUFFO2lCQUNkOzswQkFTaUIsUUFBUTs7MEJBQUksUUFBUTs7MEJBQ3BCLFFBQVEiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBOZ01vZHVsZSwgTW9kdWxlV2l0aFByb3ZpZGVycywgU2tpcFNlbGYsIE9wdGlvbmFsIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5pbXBvcnQgeyBDb25maWd1cmF0aW9uIH0gZnJvbSAnLi9jb25maWd1cmF0aW9uJztcbmltcG9ydCB7IEh0dHBDbGllbnQgfSBmcm9tICdAYW5ndWxhci9jb21tb24vaHR0cCc7XG5cblxuQE5nTW9kdWxlKHtcbiAgaW1wb3J0czogICAgICBbXSxcbiAgZGVjbGFyYXRpb25zOiBbXSxcbiAgZXhwb3J0czogICAgICBbXSxcbiAgcHJvdmlkZXJzOiBbXVxufSlcbmV4cG9ydCBjbGFzcyBBcGlNb2R1bGUge1xuICAgIHB1YmxpYyBzdGF0aWMgZm9yUm9vdChjb25maWd1cmF0aW9uRmFjdG9yeTogKCkgPT4gQ29uZmlndXJhdGlvbik6IE1vZHVsZVdpdGhQcm92aWRlcnM8QXBpTW9kdWxlPiB7XG4gICAgICAgIHJldHVybiB7XG4gICAgICAgICAgICBuZ01vZHVsZTogQXBpTW9kdWxlLFxuICAgICAgICAgICAgcHJvdmlkZXJzOiBbIHsgcHJvdmlkZTogQ29uZmlndXJhdGlvbiwgdXNlRmFjdG9yeTogY29uZmlndXJhdGlvbkZhY3RvcnkgfSBdXG4gICAgICAgIH07XG4gICAgfVxuXG4gICAgY29uc3RydWN0b3IoIEBPcHRpb25hbCgpIEBTa2lwU2VsZigpIHBhcmVudE1vZHVsZTogQXBpTW9kdWxlLFxuICAgICAgICAgICAgICAgICBAT3B0aW9uYWwoKSBodHRwOiBIdHRwQ2xpZW50KSB7XG4gICAgICAgIGlmIChwYXJlbnRNb2R1bGUpIHtcbiAgICAgICAgICAgIHRocm93IG5ldyBFcnJvcignQXBpTW9kdWxlIGlzIGFscmVhZHkgbG9hZGVkLiBJbXBvcnQgaW4geW91ciBiYXNlIEFwcE1vZHVsZSBvbmx5LicpO1xuICAgICAgICB9XG4gICAgICAgIGlmICghaHR0cCkge1xuICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKCdZb3UgbmVlZCB0byBpbXBvcnQgdGhlIEh0dHBDbGllbnRNb2R1bGUgaW4geW91ciBBcHBNb2R1bGUhIFxcbicgK1xuICAgICAgICAgICAgJ1NlZSBhbHNvIGh0dHBzOi8vZ2l0aHViLmNvbS9hbmd1bGFyL2FuZ3VsYXIvaXNzdWVzLzIwNTc1Jyk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iXX0=

File diff suppressed because one or more lines are too long

12
esm2022/api/api.mjs Normal file
View File

@ -0,0 +1,12 @@
export * from './actuators.service';
import { ActuatorsService } from './actuators.service';
export * from './default.service';
import { DefaultService } from './default.service';
export * from './measurements.service';
import { MeasurementsService } from './measurements.service';
export * from './prototypes.service';
import { PrototypesService } from './prototypes.service';
export * from './sensors.service';
import { SensorsService } from './sensors.service';
export const APIS = [ActuatorsService, DefaultService, MeasurementsService, PrototypesService, SensorsService];
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXBpLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vYXBpL2FwaS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLE9BQU8sRUFBRSxnQkFBZ0IsRUFBRSxNQUFNLHFCQUFxQixDQUFDO0FBQ3ZELGNBQWMsbUJBQW1CLENBQUM7QUFDbEMsT0FBTyxFQUFFLGNBQWMsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ25ELGNBQWMsd0JBQXdCLENBQUM7QUFDdkMsT0FBTyxFQUFFLG1CQUFtQixFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFDN0QsY0FBYyxzQkFBc0IsQ0FBQztBQUNyQyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN6RCxjQUFjLG1CQUFtQixDQUFDO0FBQ2xDLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQztBQUNuRCxNQUFNLENBQUMsTUFBTSxJQUFJLEdBQUcsQ0FBQyxnQkFBZ0IsRUFBRSxjQUFjLEVBQUUsbUJBQW1CLEVBQUUsaUJBQWlCLEVBQUUsY0FBYyxDQUFDLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FjdHVhdG9ycy5zZXJ2aWNlJztcbmltcG9ydCB7IEFjdHVhdG9yc1NlcnZpY2UgfSBmcm9tICcuL2FjdHVhdG9ycy5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vZGVmYXVsdC5zZXJ2aWNlJztcbmltcG9ydCB7IERlZmF1bHRTZXJ2aWNlIH0gZnJvbSAnLi9kZWZhdWx0LnNlcnZpY2UnO1xuZXhwb3J0ICogZnJvbSAnLi9tZWFzdXJlbWVudHMuc2VydmljZSc7XG5pbXBvcnQgeyBNZWFzdXJlbWVudHNTZXJ2aWNlIH0gZnJvbSAnLi9tZWFzdXJlbWVudHMuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL3Byb3RvdHlwZXMuc2VydmljZSc7XG5pbXBvcnQgeyBQcm90b3R5cGVzU2VydmljZSB9IGZyb20gJy4vcHJvdG90eXBlcy5zZXJ2aWNlJztcbmV4cG9ydCAqIGZyb20gJy4vc2Vuc29ycy5zZXJ2aWNlJztcbmltcG9ydCB7IFNlbnNvcnNTZXJ2aWNlIH0gZnJvbSAnLi9zZW5zb3JzLnNlcnZpY2UnO1xuZXhwb3J0IGNvbnN0IEFQSVMgPSBbQWN0dWF0b3JzU2VydmljZSwgRGVmYXVsdFNlcnZpY2UsIE1lYXN1cmVtZW50c1NlcnZpY2UsIFByb3RvdHlwZXNTZXJ2aWNlLCBTZW5zb3JzU2VydmljZV07XG4iXX0=

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,5 @@
/**
* Generated bundle index. Do not edit.
*/
export * from './index';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXF1YWRhc2gtYmFja2VuZC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2FxdWFkYXNoLWJhY2tlbmQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7O0dBRUc7QUFFSCxjQUFjLFNBQVMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogR2VuZXJhdGVkIGJ1bmRsZSBpbmRleC4gRG8gbm90IGVkaXQuXG4gKi9cblxuZXhwb3J0ICogZnJvbSAnLi9pbmRleCc7XG4iXX0=

129
esm2022/configuration.mjs Normal file

File diff suppressed because one or more lines are too long

19
esm2022/encoder.mjs Normal file
View File

@ -0,0 +1,19 @@
/**
* Custom HttpParameterCodec
* Workaround for https://github.com/angular/angular/issues/18261
*/
export class CustomHttpParameterCodec {
encodeKey(k) {
return encodeURIComponent(k);
}
encodeValue(v) {
return encodeURIComponent(v);
}
decodeKey(k) {
return decodeURIComponent(k);
}
decodeValue(v) {
return decodeURIComponent(v);
}
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZW5jb2Rlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL2VuY29kZXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRUE7OztHQUdHO0FBQ0gsTUFBTSxPQUFPLHdCQUF3QjtJQUNqQyxTQUFTLENBQUMsQ0FBUztRQUNmLE9BQU8sa0JBQWtCLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDakMsQ0FBQztJQUNELFdBQVcsQ0FBQyxDQUFTO1FBQ2pCLE9BQU8sa0JBQWtCLENBQUMsQ0FBQyxDQUFDLENBQUM7SUFDakMsQ0FBQztJQUNELFNBQVMsQ0FBQyxDQUFTO1FBQ2YsT0FBTyxrQkFBa0IsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUNqQyxDQUFDO0lBQ0QsV0FBVyxDQUFDLENBQVM7UUFDakIsT0FBTyxrQkFBa0IsQ0FBQyxDQUFDLENBQUMsQ0FBQztJQUNqQyxDQUFDO0NBQ0oiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBIdHRwUGFyYW1ldGVyQ29kZWMgfSBmcm9tICdAYW5ndWxhci9jb21tb24vaHR0cCc7XG5cbi8qKlxuICogQ3VzdG9tIEh0dHBQYXJhbWV0ZXJDb2RlY1xuICogV29ya2Fyb3VuZCBmb3IgaHR0cHM6Ly9naXRodWIuY29tL2FuZ3VsYXIvYW5ndWxhci9pc3N1ZXMvMTgyNjFcbiAqL1xuZXhwb3J0IGNsYXNzIEN1c3RvbUh0dHBQYXJhbWV0ZXJDb2RlYyBpbXBsZW1lbnRzIEh0dHBQYXJhbWV0ZXJDb2RlYyB7XG4gICAgZW5jb2RlS2V5KGs6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQoayk7XG4gICAgfVxuICAgIGVuY29kZVZhbHVlKHY6IHN0cmluZyk6IHN0cmluZyB7XG4gICAgICAgIHJldHVybiBlbmNvZGVVUklDb21wb25lbnQodik7XG4gICAgfVxuICAgIGRlY29kZUtleShrOiBzdHJpbmcpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KGspO1xuICAgIH1cbiAgICBkZWNvZGVWYWx1ZSh2OiBzdHJpbmcpOiBzdHJpbmcge1xuICAgICAgICByZXR1cm4gZGVjb2RlVVJJQ29tcG9uZW50KHYpO1xuICAgIH1cbn1cbiJdfQ==

7
esm2022/index.mjs Normal file
View File

@ -0,0 +1,7 @@
export * from './api/api';
export * from './model/models';
export * from './variables';
export * from './configuration';
export * from './api.module';
export * from './param';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLFdBQVcsQ0FBQztBQUMxQixjQUFjLGdCQUFnQixDQUFDO0FBQy9CLGNBQWMsYUFBYSxDQUFDO0FBQzVCLGNBQWMsaUJBQWlCLENBQUM7QUFDaEMsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2FwaS9hcGknO1xuZXhwb3J0ICogZnJvbSAnLi9tb2RlbC9tb2RlbHMnO1xuZXhwb3J0ICogZnJvbSAnLi92YXJpYWJsZXMnO1xuZXhwb3J0ICogZnJvbSAnLi9jb25maWd1cmF0aW9uJztcbmV4cG9ydCAqIGZyb20gJy4vYXBpLm1vZHVsZSc7XG5leHBvcnQgKiBmcm9tICcuL3BhcmFtJztcbiJdfQ==

View File

@ -0,0 +1,13 @@
/**
* 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.
*/
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWN0dWF0b3IuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9tb2RlbC9hY3R1YXRvci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7OztHQVVHIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBGYXN0QVBJXG4gKiBObyBkZXNjcmlwdGlvbiBwcm92aWRlZCAoZ2VuZXJhdGVkIGJ5IE9wZW5hcGkgR2VuZXJhdG9yIGh0dHBzOi8vZ2l0aHViLmNvbS9vcGVuYXBpdG9vbHMvb3BlbmFwaS1nZW5lcmF0b3IpXG4gKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIE9wZW5BUEkgZG9jdW1lbnQ6IDAuMS4wXG4gKiBcbiAqXG4gKiBOT1RFOiBUaGlzIGNsYXNzIGlzIGF1dG8gZ2VuZXJhdGVkIGJ5IE9wZW5BUEkgR2VuZXJhdG9yIChodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2gpLlxuICogaHR0cHM6Ly9vcGVuYXBpLWdlbmVyYXRvci50ZWNoXG4gKiBEbyBub3QgZWRpdCB0aGUgY2xhc3MgbWFudWFsbHkuXG4gKi9cblxuXG5leHBvcnQgaW50ZXJmYWNlIEFjdHVhdG9yIHsgXG4gICAgYWN0dWF0b3JfbmFtZTogc3RyaW5nO1xuICAgIHByb3RvdHlwZV9pZDogbnVtYmVyO1xuICAgIGxvdzogbnVtYmVyO1xuICAgIGhpZ2g6IG51bWJlcjtcbiAgICBhY3R1YXRvcl9pZDogbnVtYmVyO1xuICAgIGVuYWJsZWQ6IGJvb2xlYW47XG59XG5cbiJdfQ==

View File

@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaFRUUFZhbGlkYXRpb25FcnJvci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL21vZGVsL2hUVFBWYWxpZGF0aW9uRXJyb3IudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRmFzdEFQSVxuICogTm8gZGVzY3JpcHRpb24gcHJvdmlkZWQgKGdlbmVyYXRlZCBieSBPcGVuYXBpIEdlbmVyYXRvciBodHRwczovL2dpdGh1Yi5jb20vb3BlbmFwaXRvb2xzL29wZW5hcGktZ2VuZXJhdG9yKVxuICpcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBPcGVuQVBJIGRvY3VtZW50OiAwLjEuMFxuICogXG4gKlxuICogTk9URTogVGhpcyBjbGFzcyBpcyBhdXRvIGdlbmVyYXRlZCBieSBPcGVuQVBJIEdlbmVyYXRvciAoaHR0cHM6Ly9vcGVuYXBpLWdlbmVyYXRvci50ZWNoKS5cbiAqIGh0dHBzOi8vb3BlbmFwaS1nZW5lcmF0b3IudGVjaFxuICogRG8gbm90IGVkaXQgdGhlIGNsYXNzIG1hbnVhbGx5LlxuICovXG5pbXBvcnQgeyBWYWxpZGF0aW9uRXJyb3IgfSBmcm9tICcuL3ZhbGlkYXRpb25FcnJvcic7XG5cblxuZXhwb3J0IGludGVyZmFjZSBIVFRQVmFsaWRhdGlvbkVycm9yIHsgXG4gICAgZGV0YWlsPzogQXJyYXk8VmFsaWRhdGlvbkVycm9yPjtcbn1cblxuIl19

View File

@ -0,0 +1,13 @@
/**
* 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.
*/
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWVhc3VyZW1lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9tb2RlbC9tZWFzdXJlbWVudC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7OztHQVVHIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBGYXN0QVBJXG4gKiBObyBkZXNjcmlwdGlvbiBwcm92aWRlZCAoZ2VuZXJhdGVkIGJ5IE9wZW5hcGkgR2VuZXJhdG9yIGh0dHBzOi8vZ2l0aHViLmNvbS9vcGVuYXBpdG9vbHMvb3BlbmFwaS1nZW5lcmF0b3IpXG4gKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIE9wZW5BUEkgZG9jdW1lbnQ6IDAuMS4wXG4gKiBcbiAqXG4gKiBOT1RFOiBUaGlzIGNsYXNzIGlzIGF1dG8gZ2VuZXJhdGVkIGJ5IE9wZW5BUEkgR2VuZXJhdG9yIChodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2gpLlxuICogaHR0cHM6Ly9vcGVuYXBpLWdlbmVyYXRvci50ZWNoXG4gKiBEbyBub3QgZWRpdCB0aGUgY2xhc3MgbWFudWFsbHkuXG4gKi9cblxuXG5leHBvcnQgaW50ZXJmYWNlIE1lYXN1cmVtZW50IHsgXG4gICAgdmFsdWU6IG51bWJlcjtcbiAgICBzZW5zb3JfaWQ6IG51bWJlcjtcbiAgICBtZWFzdXJlbWVudF9pZDogbnVtYmVyO1xuICAgIHRpbWVzdGFtcDogc3RyaW5nO1xufVxuXG4iXX0=

11
esm2022/model/models.mjs Normal file
View File

@ -0,0 +1,11 @@
export * from './actuator';
export * from './hTTPValidationError';
export * from './measurement';
export * from './picture';
export * from './prototype';
export * from './sensor';
export * from './sensorType';
export * from './token';
export * from './validationError';
export * from './validationErrorLocInner';
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kZWxzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbW9kZWwvbW9kZWxzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLGNBQWMsWUFBWSxDQUFDO0FBQzNCLGNBQWMsdUJBQXVCLENBQUM7QUFDdEMsY0FBYyxlQUFlLENBQUM7QUFDOUIsY0FBYyxXQUFXLENBQUM7QUFDMUIsY0FBYyxhQUFhLENBQUM7QUFDNUIsY0FBYyxVQUFVLENBQUM7QUFDekIsY0FBYyxjQUFjLENBQUM7QUFDN0IsY0FBYyxTQUFTLENBQUM7QUFDeEIsY0FBYyxtQkFBbUIsQ0FBQztBQUNsQyxjQUFjLDJCQUEyQixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9hY3R1YXRvcic7XG5leHBvcnQgKiBmcm9tICcuL2hUVFBWYWxpZGF0aW9uRXJyb3InO1xuZXhwb3J0ICogZnJvbSAnLi9tZWFzdXJlbWVudCc7XG5leHBvcnQgKiBmcm9tICcuL3BpY3R1cmUnO1xuZXhwb3J0ICogZnJvbSAnLi9wcm90b3R5cGUnO1xuZXhwb3J0ICogZnJvbSAnLi9zZW5zb3InO1xuZXhwb3J0ICogZnJvbSAnLi9zZW5zb3JUeXBlJztcbmV4cG9ydCAqIGZyb20gJy4vdG9rZW4nO1xuZXhwb3J0ICogZnJvbSAnLi92YWxpZGF0aW9uRXJyb3InO1xuZXhwb3J0ICogZnJvbSAnLi92YWxpZGF0aW9uRXJyb3JMb2NJbm5lcic7XG4iXX0=

13
esm2022/model/picture.mjs Normal file
View File

@ -0,0 +1,13 @@
/**
* 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.
*/
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGljdHVyZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL21vZGVsL3BpY3R1cmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7R0FVRyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRmFzdEFQSVxuICogTm8gZGVzY3JpcHRpb24gcHJvdmlkZWQgKGdlbmVyYXRlZCBieSBPcGVuYXBpIEdlbmVyYXRvciBodHRwczovL2dpdGh1Yi5jb20vb3BlbmFwaXRvb2xzL29wZW5hcGktZ2VuZXJhdG9yKVxuICpcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBPcGVuQVBJIGRvY3VtZW50OiAwLjEuMFxuICogXG4gKlxuICogTk9URTogVGhpcyBjbGFzcyBpcyBhdXRvIGdlbmVyYXRlZCBieSBPcGVuQVBJIEdlbmVyYXRvciAoaHR0cHM6Ly9vcGVuYXBpLWdlbmVyYXRvci50ZWNoKS5cbiAqIGh0dHBzOi8vb3BlbmFwaS1nZW5lcmF0b3IudGVjaFxuICogRG8gbm90IGVkaXQgdGhlIGNsYXNzIG1hbnVhbGx5LlxuICovXG5cblxuZXhwb3J0IGludGVyZmFjZSBQaWN0dXJlIHsgXG4gICAgZGF0YTogc3RyaW5nO1xufVxuXG4iXX0=

View File

@ -0,0 +1,13 @@
/**
* 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.
*/
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvdG90eXBlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbW9kZWwvcHJvdG90eXBlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7Ozs7Ozs7O0dBVUciLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEZhc3RBUElcbiAqIE5vIGRlc2NyaXB0aW9uIHByb3ZpZGVkIChnZW5lcmF0ZWQgYnkgT3BlbmFwaSBHZW5lcmF0b3IgaHR0cHM6Ly9naXRodWIuY29tL29wZW5hcGl0b29scy9vcGVuYXBpLWdlbmVyYXRvcilcbiAqXG4gKiBUaGUgdmVyc2lvbiBvZiB0aGUgT3BlbkFQSSBkb2N1bWVudDogMC4xLjBcbiAqIFxuICpcbiAqIE5PVEU6IFRoaXMgY2xhc3MgaXMgYXV0byBnZW5lcmF0ZWQgYnkgT3BlbkFQSSBHZW5lcmF0b3IgKGh0dHBzOi8vb3BlbmFwaS1nZW5lcmF0b3IudGVjaCkuXG4gKiBodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2hcbiAqIERvIG5vdCBlZGl0IHRoZSBjbGFzcyBtYW51YWxseS5cbiAqL1xuXG5cbmV4cG9ydCBpbnRlcmZhY2UgUHJvdG90eXBlIHsgXG4gICAgcHJvdG90eXBlX2lkOiBudW1iZXI7XG4gICAgcHJvdG90eXBlX25hbWU6IHN0cmluZztcbn1cblxuIl19

2
esm2022/model/sensor.mjs Normal file
View File

@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vuc29yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbW9kZWwvc2Vuc29yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEZhc3RBUElcbiAqIE5vIGRlc2NyaXB0aW9uIHByb3ZpZGVkIChnZW5lcmF0ZWQgYnkgT3BlbmFwaSBHZW5lcmF0b3IgaHR0cHM6Ly9naXRodWIuY29tL29wZW5hcGl0b29scy9vcGVuYXBpLWdlbmVyYXRvcilcbiAqXG4gKiBUaGUgdmVyc2lvbiBvZiB0aGUgT3BlbkFQSSBkb2N1bWVudDogMC4xLjBcbiAqIFxuICpcbiAqIE5PVEU6IFRoaXMgY2xhc3MgaXMgYXV0byBnZW5lcmF0ZWQgYnkgT3BlbkFQSSBHZW5lcmF0b3IgKGh0dHBzOi8vb3BlbmFwaS1nZW5lcmF0b3IudGVjaCkuXG4gKiBodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2hcbiAqIERvIG5vdCBlZGl0IHRoZSBjbGFzcyBtYW51YWxseS5cbiAqL1xuaW1wb3J0IHsgU2Vuc29yVHlwZSB9IGZyb20gJy4vc2Vuc29yVHlwZSc7XG5cblxuZXhwb3J0IGludGVyZmFjZSBTZW5zb3IgeyBcbiAgICBzZW5zb3JfdHlwZTogU2Vuc29yVHlwZTtcbiAgICBwcm90b3R5cGVfaWQ6IG51bWJlcjtcbiAgICBzZW5zb3JfaWQ6IG51bWJlcjtcbiAgICB0aHJlc2hvbGRfY3JpdGljYWxseV9sb3c6IG51bWJlcjtcbiAgICB0aHJlc2hvbGRfbG93OiBudW1iZXI7XG4gICAgdGhyZXNob2xkX2hpZ2g6IG51bWJlcjtcbiAgICB0aHJlc2hvbGRfY3JpdGljYWxseV9oaWdoOiBudW1iZXI7XG59XG5leHBvcnQgbmFtZXNwYWNlIFNlbnNvciB7XG59XG5cblxuIl19

View File

@ -0,0 +1,21 @@
/**
* 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.
*/
export const SensorType = {
Temperature: 'temperature',
Humidity: 'humidity',
Ec: 'ec',
Ph: 'ph',
WaterLevel: 'water_level',
BooleanWaterLevel: 'boolean_water_level',
Oxygen: 'oxygen'
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2Vuc29yVHlwZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL21vZGVsL3NlbnNvclR5cGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7Ozs7Ozs7Ozs7R0FVRztBQVFILE1BQU0sQ0FBQyxNQUFNLFVBQVUsR0FBRztJQUN0QixXQUFXLEVBQUUsYUFBMkI7SUFDeEMsUUFBUSxFQUFFLFVBQXdCO0lBQ2xDLEVBQUUsRUFBRSxJQUFrQjtJQUN0QixFQUFFLEVBQUUsSUFBa0I7SUFDdEIsVUFBVSxFQUFFLGFBQTJCO0lBQ3ZDLGlCQUFpQixFQUFFLHFCQUFtQztJQUN0RCxNQUFNLEVBQUUsUUFBc0I7Q0FDakMsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbIi8qKlxuICogRmFzdEFQSVxuICogTm8gZGVzY3JpcHRpb24gcHJvdmlkZWQgKGdlbmVyYXRlZCBieSBPcGVuYXBpIEdlbmVyYXRvciBodHRwczovL2dpdGh1Yi5jb20vb3BlbmFwaXRvb2xzL29wZW5hcGktZ2VuZXJhdG9yKVxuICpcbiAqIFRoZSB2ZXJzaW9uIG9mIHRoZSBPcGVuQVBJIGRvY3VtZW50OiAwLjEuMFxuICogXG4gKlxuICogTk9URTogVGhpcyBjbGFzcyBpcyBhdXRvIGdlbmVyYXRlZCBieSBPcGVuQVBJIEdlbmVyYXRvciAoaHR0cHM6Ly9vcGVuYXBpLWdlbmVyYXRvci50ZWNoKS5cbiAqIGh0dHBzOi8vb3BlbmFwaS1nZW5lcmF0b3IudGVjaFxuICogRG8gbm90IGVkaXQgdGhlIGNsYXNzIG1hbnVhbGx5LlxuICovXG5cblxuLyoqXG4gKiBBbiBlbnVtZXJhdGlvbi5cbiAqL1xuZXhwb3J0IHR5cGUgU2Vuc29yVHlwZSA9ICd0ZW1wZXJhdHVyZScgfCAnaHVtaWRpdHknIHwgJ2VjJyB8ICdwaCcgfCAnd2F0ZXJfbGV2ZWwnIHwgJ2Jvb2xlYW5fd2F0ZXJfbGV2ZWwnIHwgJ294eWdlbic7XG5cbmV4cG9ydCBjb25zdCBTZW5zb3JUeXBlID0ge1xuICAgIFRlbXBlcmF0dXJlOiAndGVtcGVyYXR1cmUnIGFzIFNlbnNvclR5cGUsXG4gICAgSHVtaWRpdHk6ICdodW1pZGl0eScgYXMgU2Vuc29yVHlwZSxcbiAgICBFYzogJ2VjJyBhcyBTZW5zb3JUeXBlLFxuICAgIFBoOiAncGgnIGFzIFNlbnNvclR5cGUsXG4gICAgV2F0ZXJMZXZlbDogJ3dhdGVyX2xldmVsJyBhcyBTZW5zb3JUeXBlLFxuICAgIEJvb2xlYW5XYXRlckxldmVsOiAnYm9vbGVhbl93YXRlcl9sZXZlbCcgYXMgU2Vuc29yVHlwZSxcbiAgICBPeHlnZW46ICdveHlnZW4nIGFzIFNlbnNvclR5cGVcbn07XG5cbiJdfQ==

13
esm2022/model/token.mjs Normal file
View File

@ -0,0 +1,13 @@
/**
* 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.
*/
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidG9rZW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9tb2RlbC90b2tlbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7OztHQVVHIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBGYXN0QVBJXG4gKiBObyBkZXNjcmlwdGlvbiBwcm92aWRlZCAoZ2VuZXJhdGVkIGJ5IE9wZW5hcGkgR2VuZXJhdG9yIGh0dHBzOi8vZ2l0aHViLmNvbS9vcGVuYXBpdG9vbHMvb3BlbmFwaS1nZW5lcmF0b3IpXG4gKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIE9wZW5BUEkgZG9jdW1lbnQ6IDAuMS4wXG4gKiBcbiAqXG4gKiBOT1RFOiBUaGlzIGNsYXNzIGlzIGF1dG8gZ2VuZXJhdGVkIGJ5IE9wZW5BUEkgR2VuZXJhdG9yIChodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2gpLlxuICogaHR0cHM6Ly9vcGVuYXBpLWdlbmVyYXRvci50ZWNoXG4gKiBEbyBub3QgZWRpdCB0aGUgY2xhc3MgbWFudWFsbHkuXG4gKi9cblxuXG5leHBvcnQgaW50ZXJmYWNlIFRva2VuIHsgXG4gICAgYWNjZXNzX3Rva2VuOiBzdHJpbmc7XG4gICAgdG9rZW5fdHlwZTogc3RyaW5nO1xufVxuXG4iXX0=

View File

@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGlvbkVycm9yLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vbW9kZWwvdmFsaWRhdGlvbkVycm9yLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEZhc3RBUElcbiAqIE5vIGRlc2NyaXB0aW9uIHByb3ZpZGVkIChnZW5lcmF0ZWQgYnkgT3BlbmFwaSBHZW5lcmF0b3IgaHR0cHM6Ly9naXRodWIuY29tL29wZW5hcGl0b29scy9vcGVuYXBpLWdlbmVyYXRvcilcbiAqXG4gKiBUaGUgdmVyc2lvbiBvZiB0aGUgT3BlbkFQSSBkb2N1bWVudDogMC4xLjBcbiAqIFxuICpcbiAqIE5PVEU6IFRoaXMgY2xhc3MgaXMgYXV0byBnZW5lcmF0ZWQgYnkgT3BlbkFQSSBHZW5lcmF0b3IgKGh0dHBzOi8vb3BlbmFwaS1nZW5lcmF0b3IudGVjaCkuXG4gKiBodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2hcbiAqIERvIG5vdCBlZGl0IHRoZSBjbGFzcyBtYW51YWxseS5cbiAqL1xuaW1wb3J0IHsgVmFsaWRhdGlvbkVycm9yTG9jSW5uZXIgfSBmcm9tICcuL3ZhbGlkYXRpb25FcnJvckxvY0lubmVyJztcblxuXG5leHBvcnQgaW50ZXJmYWNlIFZhbGlkYXRpb25FcnJvciB7IFxuICAgIGxvYzogQXJyYXk8VmFsaWRhdGlvbkVycm9yTG9jSW5uZXI+O1xuICAgIG1zZzogc3RyaW5nO1xuICAgIHR5cGU6IHN0cmluZztcbn1cblxuIl19

View File

@ -0,0 +1,13 @@
/**
* 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.
*/
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFsaWRhdGlvbkVycm9yTG9jSW5uZXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9tb2RlbC92YWxpZGF0aW9uRXJyb3JMb2NJbm5lci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7Ozs7Ozs7OztHQVVHIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBGYXN0QVBJXG4gKiBObyBkZXNjcmlwdGlvbiBwcm92aWRlZCAoZ2VuZXJhdGVkIGJ5IE9wZW5hcGkgR2VuZXJhdG9yIGh0dHBzOi8vZ2l0aHViLmNvbS9vcGVuYXBpdG9vbHMvb3BlbmFwaS1nZW5lcmF0b3IpXG4gKlxuICogVGhlIHZlcnNpb24gb2YgdGhlIE9wZW5BUEkgZG9jdW1lbnQ6IDAuMS4wXG4gKiBcbiAqXG4gKiBOT1RFOiBUaGlzIGNsYXNzIGlzIGF1dG8gZ2VuZXJhdGVkIGJ5IE9wZW5BUEkgR2VuZXJhdG9yIChodHRwczovL29wZW5hcGktZ2VuZXJhdG9yLnRlY2gpLlxuICogaHR0cHM6Ly9vcGVuYXBpLWdlbmVyYXRvci50ZWNoXG4gKiBEbyBub3QgZWRpdCB0aGUgY2xhc3MgbWFudWFsbHkuXG4gKi9cblxuXG5leHBvcnQgaW50ZXJmYWNlIFZhbGlkYXRpb25FcnJvckxvY0lubmVyIHsgXG59XG5cbiJdfQ==

2
esm2022/param.mjs Normal file
View File

@ -0,0 +1,2 @@
export {};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyYW0uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9wYXJhbS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBTdGFuZGFyZCBwYXJhbWV0ZXIgc3R5bGVzIGRlZmluZWQgYnkgT3BlbkFQSSBzcGVjXG4gKi9cbmV4cG9ydCB0eXBlIFN0YW5kYXJkUGFyYW1TdHlsZSA9XG4gIHwgJ21hdHJpeCdcbiAgfCAnbGFiZWwnXG4gIHwgJ2Zvcm0nXG4gIHwgJ3NpbXBsZSdcbiAgfCAnc3BhY2VEZWxpbWl0ZWQnXG4gIHwgJ3BpcGVEZWxpbWl0ZWQnXG4gIHwgJ2RlZXBPYmplY3QnXG4gIDtcblxuLyoqXG4gKiBUaGUgT3BlbkFQSSBzdGFuZGFyZCB7QGxpbmsgU3RhbmRhcmRQYXJhbVN0eWxlfXMgbWF5IGJlIGV4dGVuZGVkIGJ5IGN1c3RvbSBzdHlsZXMgYnkgdGhlIHVzZXIuXG4gKi9cbmV4cG9ydCB0eXBlIFBhcmFtU3R5bGUgPSBTdGFuZGFyZFBhcmFtU3R5bGUgfCBzdHJpbmc7XG5cbi8qKlxuICogU3RhbmRhcmQgcGFyYW1ldGVyIGxvY2F0aW9ucyBkZWZpbmVkIGJ5IE9wZW5BUEkgc3BlY1xuICovXG5leHBvcnQgdHlwZSBQYXJhbUxvY2F0aW9uID0gJ3F1ZXJ5JyB8ICdoZWFkZXInIHwgJ3BhdGgnIHwgJ2Nvb2tpZSc7XG5cbi8qKlxuICogU3RhbmRhcmQgdHlwZXMgYXMgZGVmaW5lZCBpbiA8YSBocmVmPVwiaHR0cHM6Ly9zd2FnZ2VyLmlvL3NwZWNpZmljYXRpb24vI2RhdGEtdHlwZXNcIj5PcGVuQVBJIFNwZWNpZmljYXRpb246IERhdGEgVHlwZXM8L2E+XG4gKi9cbmV4cG9ydCB0eXBlIFN0YW5kYXJkRGF0YVR5cGUgPVxuICB8IFwiaW50ZWdlclwiXG4gIHwgXCJudW1iZXJcIlxuICB8IFwiYm9vbGVhblwiXG4gIHwgXCJzdHJpbmdcIlxuICB8IFwib2JqZWN0XCJcbiAgfCBcImFycmF5XCJcbiAgO1xuXG4vKipcbiAqIFN0YW5kYXJkIHtAbGluayBEYXRhVHlwZX1zIHBsdXMgeW91ciBvd24gdHlwZXMvY2xhc3Nlcy5cbiAqL1xuZXhwb3J0IHR5cGUgRGF0YVR5cGUgPSBTdGFuZGFyZERhdGFUeXBlIHwgc3RyaW5nO1xuXG4vKipcbiAqIFN0YW5kYXJkIGZvcm1hdHMgYXMgZGVmaW5lZCBpbiA8YSBocmVmPVwiaHR0cHM6Ly9zd2FnZ2VyLmlvL3NwZWNpZmljYXRpb24vI2RhdGEtdHlwZXNcIj5PcGVuQVBJIFNwZWNpZmljYXRpb246IERhdGEgVHlwZXM8L2E+XG4gKi9cbmV4cG9ydCB0eXBlIFN0YW5kYXJkRGF0YUZvcm1hdCA9XG4gIHwgXCJpbnQzMlwiXG4gIHwgXCJpbnQ2NFwiXG4gIHwgXCJmbG9hdFwiXG4gIHwgXCJkb3VibGVcIlxuICB8IFwiYnl0ZVwiXG4gIHwgXCJiaW5hcnlcIlxuICB8IFwiZGF0ZVwiXG4gIHwgXCJkYXRlLXRpbWVcIlxuICB8IFwicGFzc3dvcmRcIlxuICA7XG5cbmV4cG9ydCB0eXBlIERhdGFGb3JtYXQgPSBTdGFuZGFyZERhdGFGb3JtYXQgfCBzdHJpbmc7XG5cbi8qKlxuICogVGhlIHBhcmFtZXRlciB0byBlbmNvZGUuXG4gKi9cbmV4cG9ydCBpbnRlcmZhY2UgUGFyYW0ge1xuICBuYW1lOiBzdHJpbmc7XG4gIHZhbHVlOiB1bmtub3duO1xuICBpbjogUGFyYW1Mb2NhdGlvbjtcbiAgc3R5bGU6IFBhcmFtU3R5bGUsXG4gIGV4cGxvZGU6IGJvb2xlYW47XG4gIGRhdGFUeXBlOiBEYXRhVHlwZTtcbiAgZGF0YUZvcm1hdDogRGF0YUZvcm1hdCB8IHVuZGVmaW5lZDtcbn1cbiJdfQ==

9
esm2022/variables.mjs Normal file
View File

@ -0,0 +1,9 @@
import { InjectionToken } from '@angular/core';
export const BASE_PATH = new InjectionToken('basePath');
export const COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
};
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmFyaWFibGVzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vdmFyaWFibGVzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFFL0MsTUFBTSxDQUFDLE1BQU0sU0FBUyxHQUFHLElBQUksY0FBYyxDQUFTLFVBQVUsQ0FBQyxDQUFDO0FBQ2hFLE1BQU0sQ0FBQyxNQUFNLGtCQUFrQixHQUFHO0lBQzlCLEtBQUssRUFBRSxHQUFHO0lBQ1YsS0FBSyxFQUFFLEtBQUs7SUFDWixLQUFLLEVBQUUsR0FBRztJQUNWLE9BQU8sRUFBRSxHQUFHO0NBQ2YsQ0FBQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IEluamVjdGlvblRva2VuIH0gZnJvbSAnQGFuZ3VsYXIvY29yZSc7XG5cbmV4cG9ydCBjb25zdCBCQVNFX1BBVEggPSBuZXcgSW5qZWN0aW9uVG9rZW48c3RyaW5nPignYmFzZVBhdGgnKTtcbmV4cG9ydCBjb25zdCBDT0xMRUNUSU9OX0ZPUk1BVFMgPSB7XG4gICAgJ2Nzdic6ICcsJyxcbiAgICAndHN2JzogJyAgICcsXG4gICAgJ3Nzdic6ICcgJyxcbiAgICAncGlwZXMnOiAnfCdcbn1cbiJdfQ==

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -1,57 +0,0 @@
#!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
#
# Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1
git_repo_id=$2
release_note=$3
git_host=$4
if [ "$git_host" = "" ]; then
git_host="github.com"
echo "[INFO] No command line input provided. Set \$git_host to $git_host"
fi
if [ "$git_user_id" = "" ]; then
git_user_id="GIT_USER_ID"
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
fi
if [ "$git_repo_id" = "" ]; then
git_repo_id="GIT_REPO_ID"
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
fi
if [ "$release_note" = "" ]; then
release_note="Minor update"
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
fi
# Initialize the local directory as a Git repository
git init
# Adds the files in the local repository and stages them for commit.
git add .
# Commits the tracked changes and prepares them to be pushed to a remote repository.
git commit -m "$release_note"
# Sets the new remote
git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else
git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi
fi
git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https'

View File

View File

@ -9,8 +9,6 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Actuator {
actuator_name: string;
prototype_id: number;
@ -19,4 +17,3 @@ export interface Actuator {
actuator_id: number;
enabled: boolean;
}

View File

@ -10,9 +10,6 @@
* Do not edit the class manually.
*/
import { ValidationError } from './validationError';
export interface HTTPValidationError {
detail?: Array<ValidationError>;
}

View File

@ -9,12 +9,9 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Measurement {
value: number;
sensor_id: number;
measurement_id: number;
timestamp: string;
}

View File

@ -9,9 +9,6 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Picture {
data: string;
}

View File

@ -9,10 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Prototype {
prototype_id: number;
prototype_name: string;
}

View File

@ -10,8 +10,6 @@
* Do not edit the class manually.
*/
import { SensorType } from './sensorType';
export interface Sensor {
sensor_type: SensorType;
prototype_id: number;
@ -21,7 +19,5 @@ export interface Sensor {
threshold_high: number;
threshold_critically_high: number;
}
export namespace Sensor {
export declare namespace Sensor {
}

View File

@ -9,20 +9,16 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
/**
* An enumeration.
*/
export type SensorType = 'temperature' | 'humidity' | 'ec' | 'ph' | 'water_level' | 'boolean_water_level' | 'oxygen';
export const SensorType = {
Temperature: 'temperature' as SensorType,
Humidity: 'humidity' as SensorType,
Ec: 'ec' as SensorType,
Ph: 'ph' as SensorType,
WaterLevel: 'water_level' as SensorType,
BooleanWaterLevel: 'boolean_water_level' as SensorType,
Oxygen: 'oxygen' as SensorType
export declare const SensorType: {
Temperature: SensorType;
Humidity: SensorType;
Ec: SensorType;
Ph: SensorType;
WaterLevel: SensorType;
BooleanWaterLevel: SensorType;
Oxygen: SensorType;
};

View File

@ -9,10 +9,7 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface Token {
access_token: string;
token_type: string;
}

View File

@ -10,11 +10,8 @@
* Do not edit the class manually.
*/
import { ValidationErrorLocInner } from './validationErrorLocInner';
export interface ValidationError {
loc: Array<ValidationErrorLocInner>;
msg: string;
type: string;
}

View File

@ -9,8 +9,5 @@
* https://openapi-generator.tech
* Do not edit the class manually.
*/
export interface ValidationErrorLocInner {
}

View File

@ -1,6 +0,0 @@
{
"$schema": "./node_modules/ng-packagr/ng-package.schema.json",
"lib": {
"entryFile": "index.ts"
}
}

View File

@ -1,7 +0,0 @@
{
"$schema": "./node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "7.3.0"
}
}

View File

@ -12,26 +12,28 @@
"openapi-generator"
],
"license": "Unlicense",
"scripts": {
"build": "ng-packagr -p ng-package.json"
},
"peerDependencies": {
"@angular/core": "^17.1.0",
"rxjs": "^7.4.0"
},
"devDependencies": {
"@angular/common": "^17.1.0",
"@angular/compiler": "^17.1.0",
"@angular/compiler-cli": "^17.1.0",
"@angular/core": "^17.1.0",
"@angular/platform-browser": "^17.1.0",
"ng-packagr": "^17.0.3",
"reflect-metadata": "^0.1.3",
"rxjs": "^7.4.0",
"typescript": ">=4.9.3 <5.3.0",
"zone.js": "^0.14.0"
},
"publishConfig": {
"registry": "https://git.aquapoly.ca/kylebouchard/Aquadash-backend-client"
},
"module": "fesm2022/aquadash-backend.mjs",
"typings": "index.d.ts",
"exports": {
"./package.json": {
"default": "./package.json"
},
".": {
"types": "./index.d.ts",
"esm2022": "./esm2022/aquadash-backend.mjs",
"esm": "./esm2022/aquadash-backend.mjs",
"default": "./fesm2022/aquadash-backend.mjs"
}
},
"sideEffects": false,
"dependencies": {
"tslib": "^2.3.0"
}
}

View File

@ -1,60 +1,28 @@
/**
* Standard parameter styles defined by OpenAPI spec
*/
export type StandardParamStyle =
| 'matrix'
| 'label'
| 'form'
| 'simple'
| 'spaceDelimited'
| 'pipeDelimited'
| 'deepObject'
;
export type StandardParamStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
/**
* The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user.
*/
export type ParamStyle = StandardParamStyle | string;
/**
* Standard parameter locations defined by OpenAPI spec
*/
export type ParamLocation = 'query' | 'header' | 'path' | 'cookie';
/**
* Standard types as defined in <a href="https://swagger.io/specification/#data-types">OpenAPI Specification: Data Types</a>
*/
export type StandardDataType =
| "integer"
| "number"
| "boolean"
| "string"
| "object"
| "array"
;
export type StandardDataType = "integer" | "number" | "boolean" | "string" | "object" | "array";
/**
* Standard {@link DataType}s plus your own types/classes.
*/
export type DataType = StandardDataType | string;
/**
* Standard formats as defined in <a href="https://swagger.io/specification/#data-types">OpenAPI Specification: Data Types</a>
*/
export type StandardDataFormat =
| "int32"
| "int64"
| "float"
| "double"
| "byte"
| "binary"
| "date"
| "date-time"
| "password"
;
export type StandardDataFormat = "int32" | "int64" | "float" | "double" | "byte" | "binary" | "date" | "date-time" | "password";
export type DataFormat = StandardDataFormat | string;
/**
* The parameter to encode.
*/
@ -62,7 +30,7 @@ export interface Param {
name: string;
value: unknown;
in: ParamLocation;
style: ParamStyle,
style: ParamStyle;
explode: boolean;
dataType: DataType;
dataFormat: DataFormat | undefined;

View File

@ -1,28 +0,0 @@
{
"compilerOptions": {
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"noImplicitAny": false,
"suppressImplicitAnyIndexErrors": true,
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"removeComments": true,
"sourceMap": true,
"outDir": "./dist",
"noLib": false,
"declaration": true,
"lib": [ "es6", "dom" ],
"typeRoots": [
"node_modules/@types"
]
},
"exclude": [
"node_modules",
"dist"
],
"filesGlob": [
"./model/*.ts",
"./api/*.ts"
]
}

8
variables.d.ts vendored Normal file
View File

@ -0,0 +1,8 @@
import { InjectionToken } from '@angular/core';
export declare const BASE_PATH: InjectionToken<string>;
export declare const COLLECTION_FORMATS: {
csv: string;
tsv: string;
ssv: string;
pipes: string;
};

View File

@ -1,9 +0,0 @@
import { InjectionToken } from '@angular/core';
export const BASE_PATH = new InjectionToken<string>('basePath');
export const COLLECTION_FORMATS = {
'csv': ',',
'tsv': ' ',
'ssv': ' ',
'pipes': '|'
}