From cef6bcc4d1a825e2d90553c10535ad8cbb231e6b Mon Sep 17 00:00:00 2001 From: Stefan Nedelcu Date: Tue, 5 Jul 2022 15:26:39 +0300 Subject: [PATCH 1/5] Add Endpoint for job status --- .../Common/Interfaces/IJobService.cs | 1 + .../JobStatuses/Queries/GetJobStatusQuery.cs | 31 +++++++++++++++++++ .../Services/NomadJobService.cs | 18 +++++++++++ src/Web/Api/JobStatusController.cs | 9 ++++++ .../channel/overview/overview.component.ts | 12 ++++++- 5 files changed, 70 insertions(+), 1 deletion(-) create mode 100644 src/Application/JobStatuses/Queries/GetJobStatusQuery.cs diff --git a/src/Application/Common/Interfaces/IJobService.cs b/src/Application/Common/Interfaces/IJobService.cs index 2e15b5777..f53750a92 100644 --- a/src/Application/Common/Interfaces/IJobService.cs +++ b/src/Application/Common/Interfaces/IJobService.cs @@ -8,4 +8,5 @@ public interface IJobService public void DeleteJob(string jobName); public string[] GetJobLogs(string jobName); public IEnumerable? GetJobs(); + public Job? GetJob(string jobName); } diff --git a/src/Application/JobStatuses/Queries/GetJobStatusQuery.cs b/src/Application/JobStatuses/Queries/GetJobStatusQuery.cs new file mode 100644 index 000000000..5bb53b093 --- /dev/null +++ b/src/Application/JobStatuses/Queries/GetJobStatusQuery.cs @@ -0,0 +1,31 @@ +using Hippo.Application.Common.Interfaces; +using Hippo.Application.Jobs; +using MediatR; + +namespace Hippo.Application.Channels.Queries; + +public class GetJobStatusQuery : IRequest +{ + public Guid ChannelId { get; set; } +} + +public class GetJobStatusQueryHandler : IRequestHandler +{ + private readonly IJobService _jobService; + + public GetJobStatusQueryHandler(IJobService jobService) + { + _jobService = jobService; + } + + public async Task Handle(GetJobStatusQuery request, CancellationToken cancellationToken) + { + var job = _jobService.GetJob(request.ChannelId.ToString()); + + return new ChannelJobStatusItem + { + ChannelId = request.ChannelId, + Status = job?.Status ?? JobStatus.Dead, + }; + } +} diff --git a/src/Infrastructure/Services/NomadJobService.cs b/src/Infrastructure/Services/NomadJobService.cs index 28410845e..6bbf6c3e6 100644 --- a/src/Infrastructure/Services/NomadJobService.cs +++ b/src/Infrastructure/Services/NomadJobService.cs @@ -216,6 +216,24 @@ private Fermyon.Nomad.Model.Task GenerateJobTask(NomadJob nomadJob) } } + public Application.Jobs.Job? GetJob(string jobName) + { + try + { + var job = _jobsClient.GetJob(jobName); + + return new NomadJob(_configuration, + Guid.Parse(job.ID), + string.Empty, + string.Empty, + Enum.Parse(FormatNomadJobStatus(job.Status))); + } + catch + { + return null; + } + } + private string FormatNomadJobStatus(string status) { return char.ToUpper(status[0]) + status[1..]; diff --git a/src/Web/Api/JobStatusController.cs b/src/Web/Api/JobStatusController.cs index 9cf42b876..a89788c57 100644 --- a/src/Web/Api/JobStatusController.cs +++ b/src/Web/Api/JobStatusController.cs @@ -20,4 +20,13 @@ public async Task>> Index( PageSize = pageSize, }); } + + [HttpGet("{channelId}")] + public async Task> GetJobStatus(Guid channelId) + { + return await Mediator.Send(new GetJobStatusQuery + { + ChannelId = channelId, + }); + } } diff --git a/src/Web/ClientApp/src/app/components/channel/overview/overview.component.ts b/src/Web/ClientApp/src/app/components/channel/overview/overview.component.ts index f41f20614..f35fd3bbc 100644 --- a/src/Web/ClientApp/src/app/components/channel/overview/overview.component.ts +++ b/src/Web/ClientApp/src/app/components/channel/overview/overview.component.ts @@ -1,4 +1,9 @@ -import { ChannelItem, ChannelService, RevisionItem } from 'src/app/core/api/v1'; +import { + ChannelItem, + ChannelService, + JobStatus, + RevisionItem, +} from 'src/app/core/api/v1'; import { Component, Input, OnChanges } from '@angular/core'; import { faCheckCircle, @@ -27,6 +32,11 @@ export class OverviewComponent implements OnChanges { loading = false; timeAgo: any; + jobStatus = JobStatus; + + interval: any = null; + timeInterval = 5000; + constructor( private readonly channelService: ChannelService, private router: Router From 43b3c7fa3985fb967f6a9d5492368b0369baa68c Mon Sep 17 00:00:00 2001 From: Stefan Nedelcu Date: Tue, 5 Jul 2022 15:43:42 +0300 Subject: [PATCH 2/5] Override linter formating in auto-generated files --- .../src/app/core/api/v1/api.module.ts | 39 +- .../app/core/api/v1/api/account.service.ts | 233 ++---- .../ClientApp/src/app/core/api/v1/api/api.ts | 11 +- .../src/app/core/api/v1/api/app.service.ts | 488 +++--------- .../core/api/v1/api/certificate.service.ts | 488 +++--------- .../app/core/api/v1/api/channel.service.ts | 718 ++++-------------- .../api/v1/api/environmentVariable.service.ts | 422 +++------- .../app/core/api/v1/api/jobStatus.service.ts | 237 +++--- .../app/core/api/v1/api/revision.service.ts | 360 +++------ .../app/core/api/v1/api/storage.service.ts | 196 ++--- .../src/app/core/api/v1/configuration.ts | 32 +- .../ClientApp/src/app/core/api/v1/index.ts | 2 +- .../core/api/v1/model/appChannelListItem.ts | 6 +- .../src/app/core/api/v1/model/appItem.ts | 6 +- .../src/app/core/api/v1/model/appItemPage.ts | 6 +- .../app/core/api/v1/model/appSummaryDto.ts | 6 +- .../app/core/api/v1/model/certificateItem.ts | 6 +- .../core/api/v1/model/certificateItemPage.ts | 6 +- .../src/app/core/api/v1/model/channelItem.ts | 6 +- .../app/core/api/v1/model/channelItemPage.ts | 6 +- .../core/api/v1/model/channelJobStatusItem.ts | 6 +- .../api/v1/model/channelJobStatusItemPage.ts | 6 +- .../model/channelRevisionSelectionStrategy.ts | 11 +- .../channelRevisionSelectionStrategyField.ts | 6 +- .../core/api/v1/model/createAccountCommand.ts | 6 +- .../app/core/api/v1/model/createAppCommand.ts | 6 +- .../api/v1/model/createCertificateCommand.ts | 6 +- .../core/api/v1/model/createChannelCommand.ts | 6 +- .../model/createEnvironmentVariableCommand.ts | 6 +- .../core/api/v1/model/createTokenCommand.ts | 6 +- .../api/v1/model/environmentVariableDto.ts | 6 +- .../api/v1/model/environmentVariablesVm.ts | 6 +- .../app/core/api/v1/model/getChannelLogsVm.ts | 6 +- .../core/api/v1/model/guidNullableField.ts | 6 +- .../src/app/core/api/v1/model/jobStatus.ts | 4 +- .../core/api/v1/model/patchChannelCommand.ts | 6 +- .../api/v1/model/registerRevisionCommand.ts | 6 +- .../core/api/v1/model/revisionComponentDto.ts | 6 +- .../src/app/core/api/v1/model/revisionItem.ts | 6 +- .../app/core/api/v1/model/revisionItemPage.ts | 6 +- .../src/app/core/api/v1/model/stringField.ts | 6 +- .../src/app/core/api/v1/model/stringPage.ts | 6 +- .../src/app/core/api/v1/model/tokenInfo.ts | 6 +- .../app/core/api/v1/model/updateAppCommand.ts | 6 +- .../api/v1/model/updateCertificateCommand.ts | 6 +- .../core/api/v1/model/updateChannelCommand.ts | 7 +- .../model/updateEnvironmentVariableCommand.ts | 6 +- .../v1/model/updateEnvironmentVariableDto.ts | 6 +- .../updateEnvironmentVariableDtoListField.ts | 6 +- .../src/app/core/api/v1/variables.ts | 10 +- 50 files changed, 1007 insertions(+), 2455 deletions(-) diff --git a/src/Web/ClientApp/src/app/core/api/v1/api.module.ts b/src/Web/ClientApp/src/app/core/api/v1/api.module.ts index 9102a54bc..7e136f84a 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api.module.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api.module.ts @@ -1,9 +1,4 @@ -import { - ModuleWithProviders, - NgModule, - Optional, - SkipSelf -} from '@angular/core'; +import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; @@ -17,37 +12,27 @@ import { RevisionService } from './api/revision.service'; import { StorageService } from './api/storage.service'; @NgModule({ - imports: [], - declarations: [], - exports: [], - providers: [] + imports: [], + declarations: [], + exports: [], + providers: [] }) export class ApiModule { - public static forRoot( - configurationFactory: () => Configuration - ): ModuleWithProviders { + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { return { ngModule: ApiModule, - providers: [ - { provide: Configuration, useFactory: configurationFactory } - ] + providers: [ { provide: Configuration, useFactory: configurationFactory } ] }; } - constructor( - @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: HttpClient - ) { + constructor( @Optional() @SkipSelf() parentModule: ApiModule, + @Optional() http: HttpClient) { if (parentModule) { - throw new Error( - 'ApiModule is already loaded. Import in your base AppModule only.' - ); + 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' - ); + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575'); } } } diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/account.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/account.service.ts index ad6f9201e..924cd7814 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/account.service.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/account.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,18 +11,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpContext, - HttpEvent, - HttpHeaders, - HttpParameterCodec, - HttpParams, - HttpResponse -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +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 { CreateAccountCommand } from '../model/createAccountCommand'; @@ -32,23 +26,22 @@ import { CreateTokenCommand } from '../model/createTokenCommand'; import { TokenInfo } from '../model/tokenInfo'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class AccountService { + 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, - @Optional() configuration: Configuration - ) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -58,16 +51,12 @@ export class AccountService { } this.configuration.basePath = basePath; } - this.encoder = - this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - private addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string - ): HttpParams { - if (typeof value === 'object' && value instanceof Date === false) { + + 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); @@ -75,25 +64,14 @@ export class AccountService { return httpParams; } - private addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string - ): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } - if (typeof value === 'object') { + if (typeof value === "object") { if (Array.isArray(value)) { - (value as any[]).forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive( - httpParams, - elem, - key - )) - ); + (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().substr(0, 10)); @@ -101,78 +79,37 @@ export class AccountService { 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 - )) - ); + 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'); + throw Error("key may not be null if value is not object or array"); } return httpParams; } /** - * @param createTokenCommand + * @param createTokenCommand * @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 apiAccountCreatetokenPost( - createTokenCommand?: CreateTokenCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiAccountCreatetokenPost( - createTokenCommand?: CreateTokenCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiAccountCreatetokenPost( - createTokenCommand?: CreateTokenCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiAccountCreatetokenPost( - createTokenCommand?: CreateTokenCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiAccountCreatetokenPost(createTokenCommand?: CreateTokenCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiAccountCreatetokenPost(createTokenCommand?: CreateTokenCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiAccountCreatetokenPost(createTokenCommand?: CreateTokenCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiAccountCreatetokenPost(createTokenCommand?: CreateTokenCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -180,22 +117,18 @@ export class AccountService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -203,30 +136,23 @@ export class AccountService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.post( - `${this.configuration.basePath}/api/account/createtoken`, + return this.httpClient.post(`${this.configuration.basePath}/api/account/createtoken`, createTokenCommand, { context: localVarHttpContext, @@ -240,60 +166,25 @@ export class AccountService { } /** - * @param createAccountCommand + * @param createAccountCommand * @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 apiAccountPost( - createAccountCommand?: CreateAccountCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiAccountPost( - createAccountCommand?: CreateAccountCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiAccountPost( - createAccountCommand?: CreateAccountCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiAccountPost( - createAccountCommand?: CreateAccountCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiAccountPost(createAccountCommand?: CreateAccountCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiAccountPost(createAccountCommand?: CreateAccountCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiAccountPost(createAccountCommand?: CreateAccountCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiAccountPost(createAccountCommand?: CreateAccountCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -301,22 +192,18 @@ export class AccountService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -324,30 +211,23 @@ export class AccountService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.post( - `${this.configuration.basePath}/api/account`, + return this.httpClient.post(`${this.configuration.basePath}/api/account`, createAccountCommand, { context: localVarHttpContext, @@ -359,4 +239,5 @@ export class AccountService { } ); } + } diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/api.ts b/src/Web/ClientApp/src/app/core/api/v1/api/api.ts index ba427f314..2f858ffee 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/api.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/api.ts @@ -14,13 +14,4 @@ export * from './revision.service'; import { RevisionService } from './revision.service'; export * from './storage.service'; import { StorageService } from './storage.service'; -export const APIS = [ - AccountService, - AppService, - CertificateService, - ChannelService, - EnvironmentVariableService, - JobStatusService, - RevisionService, - StorageService -]; +export const APIS = [AccountService, AppService, CertificateService, ChannelService, EnvironmentVariableService, JobStatusService, RevisionService, StorageService]; diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/app.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/app.service.ts index 2b50c66f1..8d09dffa8 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/app.service.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/app.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,18 +11,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpContext, - HttpEvent, - HttpHeaders, - HttpParameterCodec, - HttpParams, - HttpResponse -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +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 { AppItemPage } from '../model/appItemPage'; @@ -32,23 +26,22 @@ import { CreateAppCommand } from '../model/createAppCommand'; import { UpdateAppCommand } from '../model/updateAppCommand'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class AppService { + 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, - @Optional() configuration: Configuration - ) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -58,16 +51,12 @@ export class AppService { } this.configuration.basePath = basePath; } - this.encoder = - this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - private addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string - ): HttpParams { - if (typeof value === 'object' && value instanceof Date === false) { + + 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); @@ -75,46 +64,28 @@ export class AppService { return httpParams; } - private addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string - ): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } - if (typeof value === 'object') { + if (typeof value === "object") { if (Array.isArray(value)) { - (value as any[]).forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive( - httpParams, - elem, - key - )) - ); + (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().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); - 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 - )) - ); + 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'); + throw Error("key may not be null if value is not object or array"); } return httpParams; } @@ -123,74 +94,49 @@ export class AppService { * @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 apiAppExportGet( - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiAppExportGet( - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiAppExportGet( - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiAppExportGet( - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiAppExportGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiAppExportGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiAppExportGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiAppExportGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/app/export`, + return this.httpClient.get(`${this.configuration.basePath}/api/app/export`, { context: localVarHttpContext, responseType: responseType_, @@ -203,101 +149,39 @@ export class AppService { } /** - * @param searchText - * @param pageIndex - * @param pageSize - * @param sortBy - * @param isSortedAscending + * @param searchText + * @param pageIndex + * @param pageSize + * @param sortBy + * @param isSortedAscending * @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 apiAppGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiAppGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiAppGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiAppGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + public apiAppGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiAppGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiAppGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiAppGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (searchText !== undefined && searchText !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchText, - 'searchText' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchText, 'searchText'); } if (pageIndex !== undefined && pageIndex !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageIndex, - 'pageIndex' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageIndex, 'pageIndex'); } if (pageSize !== undefined && pageSize !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); } if (sortBy !== undefined && sortBy !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sortBy' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sortBy'); } if (isSortedAscending !== undefined && isSortedAscending !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - isSortedAscending, - 'IsSortedAscending' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + isSortedAscending, 'IsSortedAscending'); } let localVarHeaders = this.defaultHeaders; @@ -306,14 +190,10 @@ export class AppService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -321,37 +201,30 @@ export class AppService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/app`, + return this.httpClient.get(`${this.configuration.basePath}/api/app`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -365,38 +238,16 @@ export class AppService { } /** - * @param id + * @param id * @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 apiAppIdDelete( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiAppIdDelete( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiAppIdDelete( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiAppIdDelete( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiAppIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiAppIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiAppIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiAppIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiAppIdDelete.' - ); + throw new Error('Required parameter id was null or undefined when calling apiAppIdDelete.'); } let localVarHeaders = this.defaultHeaders; @@ -405,50 +256,38 @@ export class AppService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.delete( - `${this.configuration.basePath}/api/app/${encodeURIComponent( - String(id) - )}`, + return this.httpClient.delete(`${this.configuration.basePath}/api/app/${encodeURIComponent(String(id))}`, { context: localVarHttpContext, responseType: responseType_, @@ -461,43 +300,17 @@ export class AppService { } /** - * @param id - * @param updateAppCommand + * @param id + * @param updateAppCommand * @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 apiAppIdPut( - id: string, - updateAppCommand?: UpdateAppCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiAppIdPut( - id: string, - updateAppCommand?: UpdateAppCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiAppIdPut( - id: string, - updateAppCommand?: UpdateAppCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiAppIdPut( - id: string, - updateAppCommand?: UpdateAppCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiAppIdPut(id: string, updateAppCommand?: UpdateAppCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiAppIdPut(id: string, updateAppCommand?: UpdateAppCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiAppIdPut(id: string, updateAppCommand?: UpdateAppCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiAppIdPut(id: string, updateAppCommand?: UpdateAppCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiAppIdPut.' - ); + throw new Error('Required parameter id was null or undefined when calling apiAppIdPut.'); } let localVarHeaders = this.defaultHeaders; @@ -506,33 +319,26 @@ export class AppService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -540,32 +346,23 @@ export class AppService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.put( - `${this.configuration.basePath}/api/app/${encodeURIComponent( - String(id) - )}`, + return this.httpClient.put(`${this.configuration.basePath}/api/app/${encodeURIComponent(String(id))}`, updateAppCommand, { context: localVarHttpContext, @@ -579,60 +376,25 @@ export class AppService { } /** - * @param createAppCommand + * @param createAppCommand * @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 apiAppPost( - createAppCommand?: CreateAppCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiAppPost( - createAppCommand?: CreateAppCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiAppPost( - createAppCommand?: CreateAppCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiAppPost( - createAppCommand?: CreateAppCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiAppPost(createAppCommand?: CreateAppCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiAppPost(createAppCommand?: CreateAppCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiAppPost(createAppCommand?: CreateAppCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiAppPost(createAppCommand?: CreateAppCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -640,22 +402,18 @@ export class AppService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -663,30 +421,23 @@ export class AppService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.post( - `${this.configuration.basePath}/api/app`, + return this.httpClient.post(`${this.configuration.basePath}/api/app`, createAppCommand, { context: localVarHttpContext, @@ -698,4 +449,5 @@ export class AppService { } ); } + } diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/certificate.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/certificate.service.ts index ec5ba6c08..0dbc3b4dc 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/certificate.service.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/certificate.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,18 +11,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpContext, - HttpEvent, - HttpHeaders, - HttpParameterCodec, - HttpParams, - HttpResponse -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +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 { CertificateItemPage } from '../model/certificateItemPage'; @@ -32,23 +26,22 @@ import { CreateCertificateCommand } from '../model/createCertificateCommand'; import { UpdateCertificateCommand } from '../model/updateCertificateCommand'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class CertificateService { + 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, - @Optional() configuration: Configuration - ) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -58,16 +51,12 @@ export class CertificateService { } this.configuration.basePath = basePath; } - this.encoder = - this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - private addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string - ): HttpParams { - if (typeof value === 'object' && value instanceof Date === false) { + + 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); @@ -75,46 +64,28 @@ export class CertificateService { return httpParams; } - private addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string - ): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } - if (typeof value === 'object') { + if (typeof value === "object") { if (Array.isArray(value)) { - (value as any[]).forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive( - httpParams, - elem, - key - )) - ); + (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().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); - 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 - )) - ); + 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'); + throw Error("key may not be null if value is not object or array"); } return httpParams; } @@ -123,74 +94,49 @@ export class CertificateService { * @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 apiCertificateExportGet( - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiCertificateExportGet( - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiCertificateExportGet( - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiCertificateExportGet( - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiCertificateExportGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiCertificateExportGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiCertificateExportGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiCertificateExportGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/certificate/export`, + return this.httpClient.get(`${this.configuration.basePath}/api/certificate/export`, { context: localVarHttpContext, responseType: responseType_, @@ -203,101 +149,39 @@ export class CertificateService { } /** - * @param searchText - * @param pageIndex - * @param pageSize - * @param sortBy - * @param isSortedAscending + * @param searchText + * @param pageIndex + * @param pageSize + * @param sortBy + * @param isSortedAscending * @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 apiCertificateGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiCertificateGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiCertificateGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiCertificateGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + public apiCertificateGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiCertificateGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiCertificateGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiCertificateGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (searchText !== undefined && searchText !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchText, - 'searchText' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchText, 'searchText'); } if (pageIndex !== undefined && pageIndex !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageIndex, - 'pageIndex' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageIndex, 'pageIndex'); } if (pageSize !== undefined && pageSize !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); } if (sortBy !== undefined && sortBy !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sortBy' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sortBy'); } if (isSortedAscending !== undefined && isSortedAscending !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - isSortedAscending, - 'IsSortedAscending' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + isSortedAscending, 'IsSortedAscending'); } let localVarHeaders = this.defaultHeaders; @@ -306,14 +190,10 @@ export class CertificateService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -321,37 +201,30 @@ export class CertificateService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/certificate`, + return this.httpClient.get(`${this.configuration.basePath}/api/certificate`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -365,38 +238,16 @@ export class CertificateService { } /** - * @param id + * @param id * @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 apiCertificateIdDelete( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiCertificateIdDelete( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiCertificateIdDelete( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiCertificateIdDelete( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiCertificateIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiCertificateIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiCertificateIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiCertificateIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiCertificateIdDelete.' - ); + throw new Error('Required parameter id was null or undefined when calling apiCertificateIdDelete.'); } let localVarHeaders = this.defaultHeaders; @@ -405,50 +256,38 @@ export class CertificateService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.delete( - `${ - this.configuration.basePath - }/api/certificate/${encodeURIComponent(String(id))}`, + return this.httpClient.delete(`${this.configuration.basePath}/api/certificate/${encodeURIComponent(String(id))}`, { context: localVarHttpContext, responseType: responseType_, @@ -461,43 +300,17 @@ export class CertificateService { } /** - * @param id - * @param updateCertificateCommand + * @param id + * @param updateCertificateCommand * @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 apiCertificateIdPut( - id: string, - updateCertificateCommand?: UpdateCertificateCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiCertificateIdPut( - id: string, - updateCertificateCommand?: UpdateCertificateCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiCertificateIdPut( - id: string, - updateCertificateCommand?: UpdateCertificateCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiCertificateIdPut( - id: string, - updateCertificateCommand?: UpdateCertificateCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiCertificateIdPut(id: string, updateCertificateCommand?: UpdateCertificateCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiCertificateIdPut(id: string, updateCertificateCommand?: UpdateCertificateCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiCertificateIdPut(id: string, updateCertificateCommand?: UpdateCertificateCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiCertificateIdPut(id: string, updateCertificateCommand?: UpdateCertificateCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiCertificateIdPut.' - ); + throw new Error('Required parameter id was null or undefined when calling apiCertificateIdPut.'); } let localVarHeaders = this.defaultHeaders; @@ -506,33 +319,26 @@ export class CertificateService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -540,32 +346,23 @@ export class CertificateService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.put( - `${ - this.configuration.basePath - }/api/certificate/${encodeURIComponent(String(id))}`, + return this.httpClient.put(`${this.configuration.basePath}/api/certificate/${encodeURIComponent(String(id))}`, updateCertificateCommand, { context: localVarHttpContext, @@ -579,60 +376,25 @@ export class CertificateService { } /** - * @param createCertificateCommand + * @param createCertificateCommand * @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 apiCertificatePost( - createCertificateCommand?: CreateCertificateCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiCertificatePost( - createCertificateCommand?: CreateCertificateCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiCertificatePost( - createCertificateCommand?: CreateCertificateCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiCertificatePost( - createCertificateCommand?: CreateCertificateCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiCertificatePost(createCertificateCommand?: CreateCertificateCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiCertificatePost(createCertificateCommand?: CreateCertificateCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiCertificatePost(createCertificateCommand?: CreateCertificateCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiCertificatePost(createCertificateCommand?: CreateCertificateCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -640,22 +402,18 @@ export class CertificateService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -663,30 +421,23 @@ export class CertificateService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.post( - `${this.configuration.basePath}/api/certificate`, + return this.httpClient.post(`${this.configuration.basePath}/api/certificate`, createCertificateCommand, { context: localVarHttpContext, @@ -698,4 +449,5 @@ export class CertificateService { } ); } + } diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/channel.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/channel.service.ts index 45ff94962..410b3270f 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/channel.service.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/channel.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,18 +11,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpContext, - HttpEvent, - HttpHeaders, - HttpParameterCodec, - HttpParams, - HttpResponse -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +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 { ChannelItem } from '../model/channelItem'; @@ -38,23 +32,22 @@ import { PatchChannelCommand } from '../model/patchChannelCommand'; import { UpdateChannelCommand } from '../model/updateChannelCommand'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class ChannelService { + 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, - @Optional() configuration: Configuration - ) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -64,16 +57,12 @@ export class ChannelService { } this.configuration.basePath = basePath; } - this.encoder = - this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - private addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string - ): HttpParams { - if (typeof value === 'object' && value instanceof Date === false) { + + 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); @@ -81,46 +70,28 @@ export class ChannelService { return httpParams; } - private addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string - ): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } - if (typeof value === 'object') { + if (typeof value === "object") { if (Array.isArray(value)) { - (value as any[]).forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive( - httpParams, - elem, - key - )) - ); + (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().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); - 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 - )) - ); + 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'); + throw Error("key may not be null if value is not object or array"); } return httpParams; } @@ -129,74 +100,49 @@ export class ChannelService { * @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 apiChannelExportGet( - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiChannelExportGet( - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiChannelExportGet( - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiChannelExportGet( - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiChannelExportGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiChannelExportGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiChannelExportGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiChannelExportGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/channel/export`, + return this.httpClient.get(`${this.configuration.basePath}/api/channel/export`, { context: localVarHttpContext, responseType: responseType_, @@ -209,101 +155,39 @@ export class ChannelService { } /** - * @param searchText - * @param pageIndex - * @param pageSize - * @param sortBy - * @param isSortedAscending + * @param searchText + * @param pageIndex + * @param pageSize + * @param sortBy + * @param isSortedAscending * @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 apiChannelGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiChannelGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiChannelGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiChannelGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - sortBy?: string, - isSortedAscending?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + public apiChannelGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiChannelGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiChannelGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiChannelGet(searchText?: string, pageIndex?: number, pageSize?: number, sortBy?: string, isSortedAscending?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (searchText !== undefined && searchText !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchText, - 'searchText' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchText, 'searchText'); } if (pageIndex !== undefined && pageIndex !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageIndex, - 'pageIndex' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageIndex, 'pageIndex'); } if (pageSize !== undefined && pageSize !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); } if (sortBy !== undefined && sortBy !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - sortBy, - 'sortBy' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + sortBy, 'sortBy'); } if (isSortedAscending !== undefined && isSortedAscending !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - isSortedAscending, - 'IsSortedAscending' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + isSortedAscending, 'IsSortedAscending'); } let localVarHeaders = this.defaultHeaders; @@ -312,14 +196,10 @@ export class ChannelService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -327,37 +207,30 @@ export class ChannelService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/channel`, + return this.httpClient.get(`${this.configuration.basePath}/api/channel`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -371,38 +244,16 @@ export class ChannelService { } /** - * @param id + * @param id * @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 apiChannelIdDelete( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiChannelIdDelete( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiChannelIdDelete( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiChannelIdDelete( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiChannelIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiChannelIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiChannelIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiChannelIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiChannelIdDelete.' - ); + throw new Error('Required parameter id was null or undefined when calling apiChannelIdDelete.'); } let localVarHeaders = this.defaultHeaders; @@ -411,50 +262,38 @@ export class ChannelService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.delete( - `${this.configuration.basePath}/api/channel/${encodeURIComponent( - String(id) - )}`, + return this.httpClient.delete(`${this.configuration.basePath}/api/channel/${encodeURIComponent(String(id))}`, { context: localVarHttpContext, responseType: responseType_, @@ -467,50 +306,16 @@ export class ChannelService { } /** - * @param id + * @param id * @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 apiChannelIdGet( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiChannelIdGet( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiChannelIdGet( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiChannelIdGet( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiChannelIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiChannelIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiChannelIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiChannelIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiChannelIdGet.' - ); + throw new Error('Required parameter id was null or undefined when calling apiChannelIdGet.'); } let localVarHeaders = this.defaultHeaders; @@ -519,14 +324,10 @@ export class ChannelService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -534,39 +335,30 @@ export class ChannelService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/channel/${encodeURIComponent( - String(id) - )}`, + return this.httpClient.get(`${this.configuration.basePath}/api/channel/${encodeURIComponent(String(id))}`, { context: localVarHttpContext, responseType: responseType_, @@ -579,43 +371,17 @@ export class ChannelService { } /** - * @param id - * @param patchChannelCommand + * @param id + * @param patchChannelCommand * @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 apiChannelIdPatch( - id: string, - patchChannelCommand?: PatchChannelCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiChannelIdPatch( - id: string, - patchChannelCommand?: PatchChannelCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiChannelIdPatch( - id: string, - patchChannelCommand?: PatchChannelCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiChannelIdPatch( - id: string, - patchChannelCommand?: PatchChannelCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiChannelIdPatch(id: string, patchChannelCommand?: PatchChannelCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiChannelIdPatch(id: string, patchChannelCommand?: PatchChannelCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiChannelIdPatch(id: string, patchChannelCommand?: PatchChannelCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiChannelIdPatch(id: string, patchChannelCommand?: PatchChannelCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiChannelIdPatch.' - ); + throw new Error('Required parameter id was null or undefined when calling apiChannelIdPatch.'); } let localVarHeaders = this.defaultHeaders; @@ -624,33 +390,26 @@ export class ChannelService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -658,32 +417,23 @@ export class ChannelService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.patch( - `${this.configuration.basePath}/api/channel/${encodeURIComponent( - String(id) - )}`, + return this.httpClient.patch(`${this.configuration.basePath}/api/channel/${encodeURIComponent(String(id))}`, patchChannelCommand, { context: localVarHttpContext, @@ -697,43 +447,17 @@ export class ChannelService { } /** - * @param id - * @param updateChannelCommand + * @param id + * @param updateChannelCommand * @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 apiChannelIdPut( - id: string, - updateChannelCommand?: UpdateChannelCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiChannelIdPut( - id: string, - updateChannelCommand?: UpdateChannelCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiChannelIdPut( - id: string, - updateChannelCommand?: UpdateChannelCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiChannelIdPut( - id: string, - updateChannelCommand?: UpdateChannelCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiChannelIdPut(id: string, updateChannelCommand?: UpdateChannelCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiChannelIdPut(id: string, updateChannelCommand?: UpdateChannelCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiChannelIdPut(id: string, updateChannelCommand?: UpdateChannelCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiChannelIdPut(id: string, updateChannelCommand?: UpdateChannelCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiChannelIdPut.' - ); + throw new Error('Required parameter id was null or undefined when calling apiChannelIdPut.'); } let localVarHeaders = this.defaultHeaders; @@ -742,33 +466,26 @@ export class ChannelService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -776,32 +493,23 @@ export class ChannelService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.put( - `${this.configuration.basePath}/api/channel/${encodeURIComponent( - String(id) - )}`, + return this.httpClient.put(`${this.configuration.basePath}/api/channel/${encodeURIComponent(String(id))}`, updateChannelCommand, { context: localVarHttpContext, @@ -815,50 +523,16 @@ export class ChannelService { } /** - * @param id + * @param id * @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 apiChannelLogsIdGet( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiChannelLogsIdGet( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiChannelLogsIdGet( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiChannelLogsIdGet( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiChannelLogsIdGet(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiChannelLogsIdGet(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiChannelLogsIdGet(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiChannelLogsIdGet(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiChannelLogsIdGet.' - ); + throw new Error('Required parameter id was null or undefined when calling apiChannelLogsIdGet.'); } let localVarHeaders = this.defaultHeaders; @@ -867,14 +541,10 @@ export class ChannelService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -882,39 +552,30 @@ export class ChannelService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${ - this.configuration.basePath - }/api/channel/logs/${encodeURIComponent(String(id))}`, + return this.httpClient.get(`${this.configuration.basePath}/api/channel/logs/${encodeURIComponent(String(id))}`, { context: localVarHttpContext, responseType: responseType_, @@ -927,60 +588,25 @@ export class ChannelService { } /** - * @param createChannelCommand + * @param createChannelCommand * @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 apiChannelPost( - createChannelCommand?: CreateChannelCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiChannelPost( - createChannelCommand?: CreateChannelCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiChannelPost( - createChannelCommand?: CreateChannelCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiChannelPost( - createChannelCommand?: CreateChannelCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiChannelPost(createChannelCommand?: CreateChannelCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiChannelPost(createChannelCommand?: CreateChannelCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiChannelPost(createChannelCommand?: CreateChannelCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiChannelPost(createChannelCommand?: CreateChannelCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -988,22 +614,18 @@ export class ChannelService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -1011,30 +633,23 @@ export class ChannelService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.post( - `${this.configuration.basePath}/api/channel`, + return this.httpClient.post(`${this.configuration.basePath}/api/channel`, createChannelCommand, { context: localVarHttpContext, @@ -1046,4 +661,5 @@ export class ChannelService { } ); } + } diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/environmentVariable.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/environmentVariable.service.ts index 2b5961ca6..3ab8ea3fd 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/environmentVariable.service.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/environmentVariable.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,18 +11,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpContext, - HttpEvent, - HttpHeaders, - HttpParameterCodec, - HttpParams, - HttpResponse -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +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 { CreateEnvironmentVariableCommand } from '../model/createEnvironmentVariableCommand'; @@ -32,23 +26,22 @@ import { EnvironmentVariablesVm } from '../model/environmentVariablesVm'; import { UpdateEnvironmentVariableCommand } from '../model/updateEnvironmentVariableCommand'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class EnvironmentVariableService { + 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, - @Optional() configuration: Configuration - ) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -58,16 +51,12 @@ export class EnvironmentVariableService { } this.configuration.basePath = basePath; } - this.encoder = - this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - private addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string - ): HttpParams { - if (typeof value === 'object' && value instanceof Date === false) { + + 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); @@ -75,45 +64,28 @@ export class EnvironmentVariableService { return httpParams; } - private addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string - ): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } - if (typeof value === 'object') { + if (typeof value === "object") { if (Array.isArray(value)) { - (value as any[]).forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive( - httpParams, - elem, - key - )) - ); + (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().substr(0, 10)); } else { - throw Error('key may not be null if value is Date'); + 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 - )) - ); + 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'); + throw Error("key may not be null if value is not object or array"); } return httpParams; } @@ -122,74 +94,49 @@ export class EnvironmentVariableService { * @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 apiEnvironmentvariableExportGet( - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiEnvironmentvariableExportGet( - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiEnvironmentvariableExportGet( - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiEnvironmentvariableExportGet( - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiEnvironmentvariableExportGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiEnvironmentvariableExportGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiEnvironmentvariableExportGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiEnvironmentvariableExportGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/environmentvariable/export`, + return this.httpClient.get(`${this.configuration.basePath}/api/environmentvariable/export`, { context: localVarHttpContext, responseType: responseType_, @@ -205,52 +152,21 @@ export class EnvironmentVariableService { * @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 apiEnvironmentvariableGet( - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiEnvironmentvariableGet( - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiEnvironmentvariableGet( - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiEnvironmentvariableGet( - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiEnvironmentvariableGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiEnvironmentvariableGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiEnvironmentvariableGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiEnvironmentvariableGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -258,37 +174,30 @@ export class EnvironmentVariableService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/environmentvariable`, + return this.httpClient.get(`${this.configuration.basePath}/api/environmentvariable`, { context: localVarHttpContext, responseType: responseType_, @@ -301,38 +210,16 @@ export class EnvironmentVariableService { } /** - * @param id + * @param id * @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 apiEnvironmentvariableIdDelete( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiEnvironmentvariableIdDelete( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiEnvironmentvariableIdDelete( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiEnvironmentvariableIdDelete( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiEnvironmentvariableIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiEnvironmentvariableIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiEnvironmentvariableIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiEnvironmentvariableIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiEnvironmentvariableIdDelete.' - ); + throw new Error('Required parameter id was null or undefined when calling apiEnvironmentvariableIdDelete.'); } let localVarHeaders = this.defaultHeaders; @@ -341,50 +228,38 @@ export class EnvironmentVariableService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.delete( - `${ - this.configuration.basePath - }/api/environmentvariable/${encodeURIComponent(String(id))}`, + return this.httpClient.delete(`${this.configuration.basePath}/api/environmentvariable/${encodeURIComponent(String(id))}`, { context: localVarHttpContext, responseType: responseType_, @@ -397,43 +272,17 @@ export class EnvironmentVariableService { } /** - * @param id - * @param updateEnvironmentVariableCommand + * @param id + * @param updateEnvironmentVariableCommand * @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 apiEnvironmentvariableIdPut( - id: string, - updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiEnvironmentvariableIdPut( - id: string, - updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiEnvironmentvariableIdPut( - id: string, - updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiEnvironmentvariableIdPut( - id: string, - updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiEnvironmentvariableIdPut(id: string, updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiEnvironmentvariableIdPut(id: string, updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiEnvironmentvariableIdPut(id: string, updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiEnvironmentvariableIdPut(id: string, updateEnvironmentVariableCommand?: UpdateEnvironmentVariableCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiEnvironmentvariableIdPut.' - ); + throw new Error('Required parameter id was null or undefined when calling apiEnvironmentvariableIdPut.'); } let localVarHeaders = this.defaultHeaders; @@ -442,33 +291,26 @@ export class EnvironmentVariableService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -476,32 +318,23 @@ export class EnvironmentVariableService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.put( - `${ - this.configuration.basePath - }/api/environmentvariable/${encodeURIComponent(String(id))}`, + return this.httpClient.put(`${this.configuration.basePath}/api/environmentvariable/${encodeURIComponent(String(id))}`, updateEnvironmentVariableCommand, { context: localVarHttpContext, @@ -515,60 +348,25 @@ export class EnvironmentVariableService { } /** - * @param createEnvironmentVariableCommand + * @param createEnvironmentVariableCommand * @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 apiEnvironmentvariablePost( - createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiEnvironmentvariablePost( - createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiEnvironmentvariablePost( - createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiEnvironmentvariablePost( - createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { + public apiEnvironmentvariablePost(createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiEnvironmentvariablePost(createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiEnvironmentvariablePost(createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiEnvironmentvariablePost(createEnvironmentVariableCommand?: CreateEnvironmentVariableCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -576,22 +374,18 @@ export class EnvironmentVariableService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -599,30 +393,23 @@ export class EnvironmentVariableService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.post( - `${this.configuration.basePath}/api/environmentvariable`, + return this.httpClient.post(`${this.configuration.basePath}/api/environmentvariable`, createEnvironmentVariableCommand, { context: localVarHttpContext, @@ -634,4 +421,5 @@ export class EnvironmentVariableService { } ); } + } diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/jobStatus.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/jobStatus.service.ts index 487bb2500..aa99ed4e7 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/jobStatus.service.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/jobStatus.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,40 +11,35 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpContext, - HttpEvent, - HttpHeaders, - HttpParameterCodec, - HttpParams, - HttpResponse -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +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 { ChannelJobStatusItem } from '../model/channelJobStatusItem'; // @ts-ignore import { ChannelJobStatusItemPage } from '../model/channelJobStatusItemPage'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class JobStatusService { + 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, - @Optional() configuration: Configuration - ) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -54,16 +49,12 @@ export class JobStatusService { } this.configuration.basePath = basePath; } - this.encoder = - this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - private addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string - ): HttpParams { - if (typeof value === 'object' && value instanceof Date === false) { + + 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); @@ -71,110 +62,116 @@ export class JobStatusService { return httpParams; } - private addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string - ): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } - if (typeof value === 'object') { + if (typeof value === "object") { if (Array.isArray(value)) { - (value as any[]).forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive( - httpParams, - elem, - key - )) - ); + (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().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); - 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 - )) - ); + 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'); + throw Error("key may not be null if value is not object or array"); } return httpParams; } /** - * @param pageIndex - * @param pageSize + * @param channelId + * @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 apiJobstatusChannelIdGet(channelId: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiJobstatusChannelIdGet(channelId: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiJobstatusChannelIdGet(channelId: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiJobstatusChannelIdGet(channelId: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + if (channelId === null || channelId === undefined) { + throw new Error('Required parameter channelId was null or undefined when calling apiJobstatusChannelIdGet.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarCredential: string | undefined; + // authentication (Bearer) required + localVarCredential = this.configuration.lookupCredential('Bearer'); + if (localVarCredential) { + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); + } + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'text/plain', + 'application/json', + 'text/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 responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + return this.httpClient.get(`${this.configuration.basePath}/api/jobstatus/${encodeURIComponent(String(channelId))}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * @param pageIndex + * @param pageSize * @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 apiJobstatusGet( - pageIndex?: number, - pageSize?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiJobstatusGet( - pageIndex?: number, - pageSize?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiJobstatusGet( - pageIndex?: number, - pageSize?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiJobstatusGet( - pageIndex?: number, - pageSize?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + public apiJobstatusGet(pageIndex?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiJobstatusGet(pageIndex?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiJobstatusGet(pageIndex?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiJobstatusGet(pageIndex?: number, pageSize?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (pageIndex !== undefined && pageIndex !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageIndex, - 'pageIndex' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageIndex, 'pageIndex'); } if (pageSize !== undefined && pageSize !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); } let localVarHeaders = this.defaultHeaders; @@ -183,14 +180,10 @@ export class JobStatusService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -198,37 +191,30 @@ export class JobStatusService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/jobstatus`, + return this.httpClient.get(`${this.configuration.basePath}/api/jobstatus`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -240,4 +226,5 @@ export class JobStatusService { } ); } + } diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/revision.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/revision.service.ts index 94747102d..ed787c14f 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/revision.service.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/revision.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,18 +11,12 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpContext, - HttpEvent, - HttpHeaders, - HttpParameterCodec, - HttpParams, - HttpResponse -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +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 { RegisterRevisionCommand } from '../model/registerRevisionCommand'; @@ -30,23 +24,22 @@ import { RegisterRevisionCommand } from '../model/registerRevisionCommand'; import { RevisionItemPage } from '../model/revisionItemPage'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class RevisionService { + 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, - @Optional() configuration: Configuration - ) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -56,16 +49,12 @@ export class RevisionService { } this.configuration.basePath = basePath; } - this.encoder = - this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - private addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string - ): HttpParams { - if (typeof value === 'object' && value instanceof Date === false) { + + 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); @@ -73,46 +62,28 @@ export class RevisionService { return httpParams; } - private addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string - ): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } - if (typeof value === 'object') { + if (typeof value === "object") { if (Array.isArray(value)) { - (value as any[]).forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive( - httpParams, - elem, - key - )) - ); + (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().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); - 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 - )) - ); + 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'); + throw Error("key may not be null if value is not object or array"); } return httpParams; } @@ -121,74 +92,49 @@ export class RevisionService { * @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 apiRevisionExportGet( - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiRevisionExportGet( - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiRevisionExportGet( - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiRevisionExportGet( - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiRevisionExportGet(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiRevisionExportGet(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiRevisionExportGet(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiRevisionExportGet(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/revision/export`, + return this.httpClient.get(`${this.configuration.basePath}/api/revision/export`, { context: localVarHttpContext, responseType: responseType_, @@ -201,65 +147,24 @@ export class RevisionService { } /** - * @param pageIndex - * @param pageSize + * @param pageIndex + * @param pageSize * @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 apiRevisionGet( - pageIndex?: number, - pageSize?: number, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiRevisionGet( - pageIndex?: number, - pageSize?: number, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiRevisionGet( - pageIndex?: number, - pageSize?: number, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiRevisionGet( - pageIndex?: number, - pageSize?: number, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + public apiRevisionGet(pageIndex?: number, pageSize?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiRevisionGet(pageIndex?: number, pageSize?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiRevisionGet(pageIndex?: number, pageSize?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiRevisionGet(pageIndex?: number, pageSize?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (pageIndex !== undefined && pageIndex !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageIndex, - 'pageIndex' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageIndex, 'pageIndex'); } if (pageSize !== undefined && pageSize !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); } let localVarHeaders = this.defaultHeaders; @@ -268,14 +173,10 @@ export class RevisionService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -283,37 +184,30 @@ export class RevisionService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/revision`, + return this.httpClient.get(`${this.configuration.basePath}/api/revision`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -327,38 +221,16 @@ export class RevisionService { } /** - * @param id + * @param id * @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 apiRevisionIdDelete( - id: string, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiRevisionIdDelete( - id: string, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiRevisionIdDelete( - id: string, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiRevisionIdDelete( - id: string, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiRevisionIdDelete(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiRevisionIdDelete(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiRevisionIdDelete(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiRevisionIdDelete(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { if (id === null || id === undefined) { - throw new Error( - 'Required parameter id was null or undefined when calling apiRevisionIdDelete.' - ); + throw new Error('Required parameter id was null or undefined when calling apiRevisionIdDelete.'); } let localVarHeaders = this.defaultHeaders; @@ -367,50 +239,38 @@ export class RevisionService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.delete( - `${this.configuration.basePath}/api/revision/${encodeURIComponent( - String(id) - )}`, + return this.httpClient.delete(`${this.configuration.basePath}/api/revision/${encodeURIComponent(String(id))}`, { context: localVarHttpContext, responseType: responseType_, @@ -423,67 +283,41 @@ export class RevisionService { } /** - * @param registerRevisionCommand + * @param registerRevisionCommand * @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 apiRevisionPost( - registerRevisionCommand?: RegisterRevisionCommand, - observe?: 'body', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable; - public apiRevisionPost( - registerRevisionCommand?: RegisterRevisionCommand, - observe?: 'response', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiRevisionPost( - registerRevisionCommand?: RegisterRevisionCommand, - observe?: 'events', - reportProgress?: boolean, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable>; - public apiRevisionPost( - registerRevisionCommand?: RegisterRevisionCommand, - observe: any = 'body', - reportProgress: boolean = false, - options?: { httpHeaderAccept?: undefined; context?: HttpContext } - ): Observable { + public apiRevisionPost(registerRevisionCommand?: RegisterRevisionCommand, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable; + public apiRevisionPost(registerRevisionCommand?: RegisterRevisionCommand, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiRevisionPost(registerRevisionCommand?: RegisterRevisionCommand, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable>; + public apiRevisionPost(registerRevisionCommand?: RegisterRevisionCommand, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable { + let localVarHeaders = this.defaultHeaders; let localVarCredential: string | undefined; // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header - const httpHeaderAccepts: string[] = []; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + const httpHeaderAccepts: string[] = [ + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + // to determine the Content-Type header const consumes: string[] = [ 'application/json-patch+json', @@ -491,30 +325,23 @@ export class RevisionService { 'text/json', 'application/_*+json' ]; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Content-Type', - httpContentTypeSelected - ); + 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) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.post( - `${this.configuration.basePath}/api/revision`, + return this.httpClient.post(`${this.configuration.basePath}/api/revision`, registerRevisionCommand, { context: localVarHttpContext, @@ -526,4 +353,5 @@ export class RevisionService { } ); } + } diff --git a/src/Web/ClientApp/src/app/core/api/v1/api/storage.service.ts b/src/Web/ClientApp/src/app/core/api/v1/api/storage.service.ts index 489b8292d..ca5bdb2be 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/api/storage.service.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/api/storage.service.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,40 +11,33 @@ */ /* tslint:disable:no-unused-variable member-ordering */ -import { Inject, Injectable, Optional } from '@angular/core'; -import { - HttpClient, - HttpContext, - HttpEvent, - HttpHeaders, - HttpParameterCodec, - HttpParams, - HttpResponse -} from '@angular/common/http'; -import { CustomHttpParameterCodec } from '../encoder'; -import { Observable } from 'rxjs'; +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 { StringPage } from '../model/stringPage'; // @ts-ignore -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + @Injectable({ - providedIn: 'root' + providedIn: 'root' }) export class StorageService { + 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, - @Optional() configuration: Configuration - ) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { if (configuration) { this.configuration = configuration; } @@ -54,16 +47,12 @@ export class StorageService { } this.configuration.basePath = basePath; } - this.encoder = - this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); } - private addToHttpParams( - httpParams: HttpParams, - value: any, - key?: string - ): HttpParams { - if (typeof value === 'object' && value instanceof Date === false) { + + 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); @@ -71,134 +60,61 @@ export class StorageService { return httpParams; } - private addToHttpParamsRecursive( - httpParams: HttpParams, - value?: any, - key?: string - ): HttpParams { + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { if (value == null) { return httpParams; } - if (typeof value === 'object') { + if (typeof value === "object") { if (Array.isArray(value)) { - (value as any[]).forEach( - (elem) => - (httpParams = this.addToHttpParamsRecursive( - httpParams, - elem, - key - )) - ); + (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().substr(0, 10)); } else { throw Error("key may not be null if value is Date"); - 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 - )) - ); + 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'); + throw Error("key may not be null if value is not object or array"); } return httpParams; } /** - * @param searchText - * @param pageIndex - * @param pageSize - * @param isSortedAscending + * @param searchText + * @param pageIndex + * @param pageSize + * @param isSortedAscending * @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 apiStorageGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - isSortedAscending?: boolean, - observe?: 'body', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable; - public apiStorageGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - isSortedAscending?: boolean, - observe?: 'response', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiStorageGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - isSortedAscending?: boolean, - observe?: 'events', - reportProgress?: boolean, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable>; - public apiStorageGet( - searchText?: string, - pageIndex?: number, - pageSize?: number, - isSortedAscending?: boolean, - observe: any = 'body', - reportProgress: boolean = false, - options?: { - httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json'; - context?: HttpContext; - } - ): Observable { - let localVarQueryParameters = new HttpParams({ encoder: this.encoder }); + public apiStorageGet(searchText?: string, pageIndex?: number, pageSize?: number, isSortedAscending?: boolean, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable; + public apiStorageGet(searchText?: string, pageIndex?: number, pageSize?: number, isSortedAscending?: boolean, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiStorageGet(searchText?: string, pageIndex?: number, pageSize?: number, isSortedAscending?: boolean, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable>; + public apiStorageGet(searchText?: string, pageIndex?: number, pageSize?: number, isSortedAscending?: boolean, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'text/plain' | 'application/json' | 'text/json', context?: HttpContext}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (searchText !== undefined && searchText !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - searchText, - 'searchText' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + searchText, 'searchText'); } if (pageIndex !== undefined && pageIndex !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageIndex, - 'pageIndex' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageIndex, 'pageIndex'); } if (pageSize !== undefined && pageSize !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - pageSize, - 'pageSize' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + pageSize, 'pageSize'); } if (isSortedAscending !== undefined && isSortedAscending !== null) { - localVarQueryParameters = this.addToHttpParams( - localVarQueryParameters, - isSortedAscending, - 'IsSortedAscending' - ); + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + isSortedAscending, 'IsSortedAscending'); } let localVarHeaders = this.defaultHeaders; @@ -207,14 +123,10 @@ export class StorageService { // authentication (Bearer) required localVarCredential = this.configuration.lookupCredential('Bearer'); if (localVarCredential) { - localVarHeaders = localVarHeaders.set( - 'Authorization', - localVarCredential - ); + localVarHeaders = localVarHeaders.set('Authorization', localVarCredential); } - let localVarHttpHeaderAcceptSelected: string | undefined = - options && options.httpHeaderAccept; + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (localVarHttpHeaderAcceptSelected === undefined) { // to determine the Accept header const httpHeaderAccepts: string[] = [ @@ -222,37 +134,30 @@ export class StorageService { 'application/json', 'text/json' ]; - localVarHttpHeaderAcceptSelected = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { - localVarHeaders = localVarHeaders.set( - 'Accept', - localVarHttpHeaderAcceptSelected - ); + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); } - let localVarHttpContext: HttpContext | undefined = - options && options.context; + let localVarHttpContext: HttpContext | undefined = options && options.context; if (localVarHttpContext === undefined) { localVarHttpContext = new HttpContext(); } + let responseType_: 'text' | 'json' | 'blob' = 'json'; if (localVarHttpHeaderAcceptSelected) { if (localVarHttpHeaderAcceptSelected.startsWith('text')) { responseType_ = 'text'; - } else if ( - this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected) - ) { + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { responseType_ = 'json'; } else { responseType_ = 'blob'; } } - return this.httpClient.get( - `${this.configuration.basePath}/api/storage`, + return this.httpClient.get(`${this.configuration.basePath}/api/storage`, { context: localVarHttpContext, params: localVarQueryParameters, @@ -264,4 +169,5 @@ export class StorageService { } ); } + } diff --git a/src/Web/ClientApp/src/app/core/api/v1/configuration.ts b/src/Web/ClientApp/src/app/core/api/v1/configuration.ts index a43458a45..bf06fb08f 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/configuration.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/configuration.ts @@ -4,7 +4,7 @@ export interface ConfigurationParameters { /** * @deprecated Since 5.0. Use credentials instead */ - apiKeys?: { [key: string]: string }; + apiKeys?: {[ key: string ]: string}; username?: string; password?: string; /** @@ -19,14 +19,14 @@ export interface ConfigurationParameters { * 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) }; + credentials?: {[ key: string ]: string | (() => string | undefined)}; } export class Configuration { /** * @deprecated Since 5.0. Use credentials instead */ - apiKeys?: { [key: string]: string }; + apiKeys?: {[ key: string ]: string}; username?: string; password?: string; /** @@ -41,7 +41,7 @@ export class Configuration { * 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) }; + credentials: {[ key: string ]: string | (() => string | undefined)}; constructor(configurationParameters: ConfigurationParameters = {}) { this.apiKeys = configurationParameters.apiKeys; @@ -53,7 +53,8 @@ export class Configuration { this.encoder = configurationParameters.encoder; if (configurationParameters.credentials) { this.credentials = configurationParameters.credentials; - } else { + } + else { this.credentials = {}; } @@ -63,9 +64,7 @@ export class Configuration { if (this.apiKeys === null || this.apiKeys === undefined) { return undefined; } else { - return ( - this.apiKeys['Bearer'] || this.apiKeys['Authorization'] - ); + return this.apiKeys['Bearer'] || this.apiKeys['Authorization']; } }; } @@ -78,7 +77,7 @@ export class Configuration { * @param contentTypes - the array of content types that are available for selection * @returns the selected content-type or undefined if no selection could be made. */ - public selectHeaderContentType(contentTypes: string[]): string | undefined { + public selectHeaderContentType (contentTypes: string[]): string | undefined { if (contentTypes.length === 0) { return undefined; } @@ -120,19 +119,14 @@ export class Configuration { * @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') - ); + 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; + return typeof value === 'function' + ? value() + : value; } } diff --git a/src/Web/ClientApp/src/app/core/api/v1/index.ts b/src/Web/ClientApp/src/app/core/api/v1/index.ts index 410623f1c..c312b70fa 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/index.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/index.ts @@ -2,4 +2,4 @@ export * from './api/api'; export * from './model/models'; export * from './variables'; export * from './configuration'; -export * from './api.module'; +export * from './api.module'; \ No newline at end of file diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/appChannelListItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/appChannelListItem.ts index be10253be..f6bf45eca 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/appChannelListItem.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/appChannelListItem.ts @@ -3,15 +3,17 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface AppChannelListItem { + +export interface AppChannelListItem { id: string; name: string; activeRevisionNumber?: string | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/appItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/appItem.ts index 9c4810a8a..31ad38ec3 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/appItem.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/appItem.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,10 +11,12 @@ */ import { AppChannelListItem } from './appChannelListItem'; -export interface AppItem { + +export interface AppItem { name: string; id: string; storageId: string; description?: string | null; channels: Array; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/appItemPage.ts b/src/Web/ClientApp/src/app/core/api/v1/model/appItemPage.ts index 8faba3964..e84e59032 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/appItemPage.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/appItemPage.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,10 +11,12 @@ */ import { AppItem } from './appItem'; -export interface AppItemPage { + +export interface AppItemPage { items?: Array | null; totalItems?: number; pageIndex?: number | null; pageSize?: number | null; readonly isLastPage?: boolean | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/appSummaryDto.ts b/src/Web/ClientApp/src/app/core/api/v1/model/appSummaryDto.ts index fe94228b5..0d46546e1 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/appSummaryDto.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/appSummaryDto.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,9 +11,11 @@ */ import { AppChannelListItem } from './appChannelListItem'; -export interface AppSummaryDto { + +export interface AppSummaryDto { id: string; name: string; storageId: string; channels: Array; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/certificateItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/certificateItem.ts index a0029459d..a37c0424d 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/certificateItem.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/certificateItem.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,10 +11,12 @@ */ import { ChannelItem } from './channelItem'; -export interface CertificateItem { + +export interface CertificateItem { id: string; name: string; publicKey: string; privateKey: string; channels: Array; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/certificateItemPage.ts b/src/Web/ClientApp/src/app/core/api/v1/model/certificateItemPage.ts index d58471695..ce7e35382 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/certificateItemPage.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/certificateItemPage.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,10 +11,12 @@ */ import { CertificateItem } from './certificateItem'; -export interface CertificateItemPage { + +export interface CertificateItemPage { items?: Array | null; totalItems?: number; pageIndex?: number | null; pageSize?: number | null; readonly isLastPage?: boolean | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/channelItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/channelItem.ts index 18e7c6fd3..fd995f4f4 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/channelItem.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/channelItem.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -15,7 +15,8 @@ import { CertificateItem } from './certificateItem'; import { AppSummaryDto } from './appSummaryDto'; import { EnvironmentVariableDto } from './environmentVariableDto'; -export interface ChannelItem { + +export interface ChannelItem { id: string; appId: string; name: string; @@ -28,3 +29,4 @@ export interface ChannelItem { environmentVariables: Array; appSummary?: AppSummaryDto; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/channelItemPage.ts b/src/Web/ClientApp/src/app/core/api/v1/model/channelItemPage.ts index 03e14d54a..55533dd62 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/channelItemPage.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/channelItemPage.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,10 +11,12 @@ */ import { ChannelItem } from './channelItem'; -export interface ChannelItemPage { + +export interface ChannelItemPage { items?: Array | null; totalItems?: number; pageIndex?: number | null; pageSize?: number | null; readonly isLastPage?: boolean | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/channelJobStatusItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/channelJobStatusItem.ts index d9df32b22..a3cadfe1b 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/channelJobStatusItem.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/channelJobStatusItem.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,7 +11,9 @@ */ import { JobStatus } from './jobStatus'; -export interface ChannelJobStatusItem { + +export interface ChannelJobStatusItem { channelId: string; status: JobStatus; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/channelJobStatusItemPage.ts b/src/Web/ClientApp/src/app/core/api/v1/model/channelJobStatusItemPage.ts index dd1e97ef3..c953098cc 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/channelJobStatusItemPage.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/channelJobStatusItemPage.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,10 +11,12 @@ */ import { ChannelJobStatusItem } from './channelJobStatusItem'; -export interface ChannelJobStatusItemPage { + +export interface ChannelJobStatusItemPage { items?: Array | null; totalItems?: number; pageIndex?: number | null; pageSize?: number | null; readonly isLastPage?: boolean | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/channelRevisionSelectionStrategy.ts b/src/Web/ClientApp/src/app/core/api/v1/model/channelRevisionSelectionStrategy.ts index 4f6e8a40d..bab183ff2 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/channelRevisionSelectionStrategy.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/channelRevisionSelectionStrategy.ts @@ -3,19 +3,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 type ChannelRevisionSelectionStrategy = - | 'UseRangeRule' - | 'UseSpecifiedRevision'; + +export type ChannelRevisionSelectionStrategy = 'UseRangeRule' | 'UseSpecifiedRevision'; export const ChannelRevisionSelectionStrategy = { UseRangeRule: 'UseRangeRule' as ChannelRevisionSelectionStrategy, - UseSpecifiedRevision: - 'UseSpecifiedRevision' as ChannelRevisionSelectionStrategy + UseSpecifiedRevision: 'UseSpecifiedRevision' as ChannelRevisionSelectionStrategy }; + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/channelRevisionSelectionStrategyField.ts b/src/Web/ClientApp/src/app/core/api/v1/model/channelRevisionSelectionStrategyField.ts index 330b677fc..9e7c638ed 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/channelRevisionSelectionStrategyField.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/channelRevisionSelectionStrategyField.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,6 +11,8 @@ */ import { ChannelRevisionSelectionStrategy } from './channelRevisionSelectionStrategy'; -export interface ChannelRevisionSelectionStrategyField { + +export interface ChannelRevisionSelectionStrategyField { value?: ChannelRevisionSelectionStrategy; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/createAccountCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/createAccountCommand.ts index c7f735c1d..8a8a2fdf0 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/createAccountCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/createAccountCommand.ts @@ -3,14 +3,16 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface CreateAccountCommand { + +export interface CreateAccountCommand { userName: string; password: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/createAppCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/createAppCommand.ts index e095dc580..2b8b323f1 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/createAppCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/createAppCommand.ts @@ -3,14 +3,16 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface CreateAppCommand { + +export interface CreateAppCommand { name: string; storageId: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/createCertificateCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/createCertificateCommand.ts index 9b689d11c..a431585b0 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/createCertificateCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/createCertificateCommand.ts @@ -3,15 +3,17 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface CreateCertificateCommand { + +export interface CreateCertificateCommand { name: string; publicKey: string; privateKey: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/createChannelCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/createChannelCommand.ts index 0adbdd4bc..db7a94cd4 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/createChannelCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/createChannelCommand.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,7 +11,8 @@ */ import { ChannelRevisionSelectionStrategy } from './channelRevisionSelectionStrategy'; -export interface CreateChannelCommand { + +export interface CreateChannelCommand { appId: string; name: string; domain?: string | null; @@ -20,3 +21,4 @@ export interface CreateChannelCommand { activeRevisionId?: string | null; certificateId?: string | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/createEnvironmentVariableCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/createEnvironmentVariableCommand.ts index 011ad79be..eeb727ea3 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/createEnvironmentVariableCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/createEnvironmentVariableCommand.ts @@ -3,15 +3,17 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface CreateEnvironmentVariableCommand { + +export interface CreateEnvironmentVariableCommand { key: string; value: string; channelId: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/createTokenCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/createTokenCommand.ts index a7e098682..a5a823abe 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/createTokenCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/createTokenCommand.ts @@ -3,14 +3,16 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface CreateTokenCommand { + +export interface CreateTokenCommand { userName: string; password: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariableDto.ts b/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariableDto.ts index 8a19d830b..ef040f9d5 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariableDto.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariableDto.ts @@ -3,16 +3,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface EnvironmentVariableDto { + +export interface EnvironmentVariableDto { id: string; channelId: string; key: string; value: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariablesVm.ts b/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariablesVm.ts index dec0b2404..14b329da7 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariablesVm.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/environmentVariablesVm.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,6 +11,8 @@ */ import { EnvironmentVariableDto } from './environmentVariableDto'; -export interface EnvironmentVariablesVm { + +export interface EnvironmentVariablesVm { environmentVariables: Array; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/getChannelLogsVm.ts b/src/Web/ClientApp/src/app/core/api/v1/model/getChannelLogsVm.ts index 6c0212945..e346e2c6d 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/getChannelLogsVm.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/getChannelLogsVm.ts @@ -3,13 +3,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface GetChannelLogsVm { + +export interface GetChannelLogsVm { logs: Array; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/guidNullableField.ts b/src/Web/ClientApp/src/app/core/api/v1/model/guidNullableField.ts index 055b5b945..d592f3bfb 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/guidNullableField.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/guidNullableField.ts @@ -3,13 +3,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface GuidNullableField { + +export interface GuidNullableField { value?: string | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/jobStatus.ts b/src/Web/ClientApp/src/app/core/api/v1/model/jobStatus.ts index eb561a2bc..499157fc9 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/jobStatus.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/jobStatus.ts @@ -3,13 +3,14 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 type JobStatus = 'Unknown' | 'Pending' | 'Running' | 'Dead'; export const JobStatus = { @@ -18,3 +19,4 @@ export const JobStatus = { Running: 'Running' as JobStatus, Dead: 'Dead' as JobStatus }; + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/patchChannelCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/patchChannelCommand.ts index 0d5cbe477..3c774fb57 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/patchChannelCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/patchChannelCommand.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -14,7 +14,8 @@ import { ChannelRevisionSelectionStrategyField } from './channelRevisionSelectio import { StringField } from './stringField'; import { UpdateEnvironmentVariableDtoListField } from './updateEnvironmentVariableDtoListField'; -export interface PatchChannelCommand { + +export interface PatchChannelCommand { channelId?: string; environmentVariables?: UpdateEnvironmentVariableDtoListField; name?: StringField; @@ -24,3 +25,4 @@ export interface PatchChannelCommand { activeRevisionId?: GuidNullableField; certificateId?: GuidNullableField; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/registerRevisionCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/registerRevisionCommand.ts index 77b8b8e3a..fc8141630 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/registerRevisionCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/registerRevisionCommand.ts @@ -3,14 +3,16 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface RegisterRevisionCommand { + +export interface RegisterRevisionCommand { appStorageId: string; revisionNumber: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/revisionComponentDto.ts b/src/Web/ClientApp/src/app/core/api/v1/model/revisionComponentDto.ts index 36d94ca63..99e700311 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/revisionComponentDto.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/revisionComponentDto.ts @@ -3,14 +3,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface RevisionComponentDto { + +export interface RevisionComponentDto { id: string; source: string; name: string; @@ -18,3 +19,4 @@ export interface RevisionComponentDto { channel?: string | null; type?: string | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/revisionItem.ts b/src/Web/ClientApp/src/app/core/api/v1/model/revisionItem.ts index 97c1e3544..99a9e10a5 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/revisionItem.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/revisionItem.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,10 +11,12 @@ */ import { RevisionComponentDto } from './revisionComponentDto'; -export interface RevisionItem { + +export interface RevisionItem { id: string; appId: string; revisionNumber: string; readonly components: Array; type?: string | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/revisionItemPage.ts b/src/Web/ClientApp/src/app/core/api/v1/model/revisionItemPage.ts index 40b0b381d..b0e414c1f 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/revisionItemPage.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/revisionItemPage.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,10 +11,12 @@ */ import { RevisionItem } from './revisionItem'; -export interface RevisionItemPage { + +export interface RevisionItemPage { items?: Array | null; totalItems?: number; pageIndex?: number | null; pageSize?: number | null; readonly isLastPage?: boolean | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/stringField.ts b/src/Web/ClientApp/src/app/core/api/v1/model/stringField.ts index d9187da07..47bcf8ec8 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/stringField.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/stringField.ts @@ -3,13 +3,15 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface StringField { + +export interface StringField { value?: string | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/stringPage.ts b/src/Web/ClientApp/src/app/core/api/v1/model/stringPage.ts index 9744f4a38..6cab1e970 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/stringPage.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/stringPage.ts @@ -3,17 +3,19 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface StringPage { + +export interface StringPage { items?: Array | null; totalItems?: number; pageIndex?: number | null; pageSize?: number | null; readonly isLastPage?: boolean | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/tokenInfo.ts b/src/Web/ClientApp/src/app/core/api/v1/model/tokenInfo.ts index a94c1d989..de2e56d56 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/tokenInfo.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/tokenInfo.ts @@ -3,14 +3,16 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface TokenInfo { + +export interface TokenInfo { token?: string | null; readonly expiration?: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/updateAppCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/updateAppCommand.ts index 1e0f0c1d1..a5fc05a37 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/updateAppCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/updateAppCommand.ts @@ -3,14 +3,16 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface UpdateAppCommand { + +export interface UpdateAppCommand { id: string; name: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/updateCertificateCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/updateCertificateCommand.ts index f53f2dd5f..190c5fb8a 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/updateCertificateCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/updateCertificateCommand.ts @@ -3,16 +3,18 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface UpdateCertificateCommand { + +export interface UpdateCertificateCommand { id: string; name: string; publicKey: string; privateKey: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/updateChannelCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/updateChannelCommand.ts index 44c83645e..138a01c4e 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/updateChannelCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/updateChannelCommand.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,12 +11,15 @@ */ import { ChannelRevisionSelectionStrategy } from './channelRevisionSelectionStrategy'; -export interface UpdateChannelCommand { + +export interface UpdateChannelCommand { id: string; name: string; domain: string; revisionSelectionStrategy: ChannelRevisionSelectionStrategy; rangeRule?: string | null; activeRevisionId?: string | null; + lastPublishDate?: string; certificateId?: string | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableCommand.ts b/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableCommand.ts index f26215504..edbd5626a 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableCommand.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableCommand.ts @@ -3,15 +3,17 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface UpdateEnvironmentVariableCommand { + +export interface UpdateEnvironmentVariableCommand { id: string; key: string; value: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDto.ts b/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDto.ts index f035d1dc7..8ea50fd81 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDto.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDto.ts @@ -3,15 +3,17 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 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 interface UpdateEnvironmentVariableDto { + +export interface UpdateEnvironmentVariableDto { id: string; key: string; value: string; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDtoListField.ts b/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDtoListField.ts index 202c2fb13..e8bd39900 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDtoListField.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/model/updateEnvironmentVariableDtoListField.ts @@ -3,7 +3,7 @@ * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) * * The version of the OpenAPI document: 1.0 - * + * * * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). * https://openapi-generator.tech @@ -11,6 +11,8 @@ */ import { UpdateEnvironmentVariableDto } from './updateEnvironmentVariableDto'; -export interface UpdateEnvironmentVariableDtoListField { + +export interface UpdateEnvironmentVariableDtoListField { value?: Array | null; } + diff --git a/src/Web/ClientApp/src/app/core/api/v1/variables.ts b/src/Web/ClientApp/src/app/core/api/v1/variables.ts index 0763faba7..6fe58549f 100644 --- a/src/Web/ClientApp/src/app/core/api/v1/variables.ts +++ b/src/Web/ClientApp/src/app/core/api/v1/variables.ts @@ -2,8 +2,8 @@ import { InjectionToken } from '@angular/core'; export const BASE_PATH = new InjectionToken('basePath'); export const COLLECTION_FORMATS = { - csv: ',', - tsv: ' ', - ssv: ' ', - pipes: '|' -}; + 'csv': ',', + 'tsv': ' ', + 'ssv': ' ', + 'pipes': '|' +} From 65db5524414157d634c79e713848807a68a11597 Mon Sep 17 00:00:00 2001 From: Stefan Nedelcu Date: Tue, 5 Jul 2022 19:49:40 +0300 Subject: [PATCH 3/5] Display status in frontend --- .../channel/overview/overview.component.html | 10 ++-- .../channel/overview/overview.component.ts | 46 ++++++++++++++++--- 2 files changed, 47 insertions(+), 9 deletions(-) diff --git a/src/Web/ClientApp/src/app/components/channel/overview/overview.component.html b/src/Web/ClientApp/src/app/components/channel/overview/overview.component.html index 32d972887..5b78034b3 100644 --- a/src/Web/ClientApp/src/app/components/channel/overview/overview.component.html +++ b/src/Web/ClientApp/src/app/components/channel/overview/overview.component.html @@ -2,9 +2,13 @@
- - - + + + Version {{activeRevision.revisionNumber}} was published {{publishedAt}}.
diff --git a/src/Web/ClientApp/src/app/components/channel/overview/overview.component.ts b/src/Web/ClientApp/src/app/components/channel/overview/overview.component.ts index f35fd3bbc..942736b67 100644 --- a/src/Web/ClientApp/src/app/components/channel/overview/overview.component.ts +++ b/src/Web/ClientApp/src/app/components/channel/overview/overview.component.ts @@ -2,11 +2,12 @@ import { ChannelItem, ChannelService, JobStatus, + JobStatusService, RevisionItem, } from 'src/app/core/api/v1'; -import { Component, Input, OnChanges } from '@angular/core'; +import { Component, Input, OnChanges, OnDestroy, OnInit } from '@angular/core'; import { - faCheckCircle, + faCircle, faNetworkWired, faTimesCircle, } from '@fortawesome/free-solid-svg-icons'; @@ -21,34 +22,67 @@ import en from 'javascript-time-ago/locale/en'; templateUrl: './overview.component.html', styleUrls: ['./overview.component.css'], }) -export class OverviewComponent implements OnChanges { +export class OverviewComponent implements OnChanges, OnInit, OnDestroy { @Input() channelId = ''; channel!: ChannelItem; + channelStatus!: JobStatus; activeRevision!: RevisionItem | undefined; publishedAt: string | null | undefined; - icons = { faCheckCircle, faTimesCircle, faNetworkWired }; + icons = { faCircle, faTimesCircle, faNetworkWired }; types = ComponentTypes; protocol = window.location.protocol; loading = false; timeAgo: any; - jobStatus = JobStatus; - interval: any = null; timeInterval = 5000; constructor( private readonly channelService: ChannelService, + private readonly jobStatusService: JobStatusService, private router: Router ) { TimeAgo.addDefaultLocale(en); this.timeAgo = new TimeAgo('en-US'); } + ngOnInit(): void { + this.getJobStatus(); + + this.interval = setInterval(() => { + this.getJobStatus(); + }, this.timeInterval); + } + ngOnChanges(): void { this.refreshData(); } + ngOnDestroy(): void { + clearInterval(this.interval); + } + + getJobStatus(): void { + this.jobStatusService + .apiJobstatusChannelIdGet(this.channelId) + .subscribe((res) => (this.channelStatus = res.status)); + } + + getStatusColor(status: JobStatus | undefined) { + switch (status) { + case JobStatus.Unknown: + return 'gray'; + case JobStatus.Pending: + return 'yellow'; + case JobStatus.Running: + return 'green'; + case JobStatus.Dead: + return 'red'; + default: + return 'gray'; + } + } + refreshData() { this.loading = true; this.channelService.apiChannelIdGet(this.channelId).subscribe({ From db38fbebd83df62f12ebe98d95bef49cf55ee7e3 Mon Sep 17 00:00:00 2001 From: Stefan Nedelcu Date: Tue, 5 Jul 2022 19:59:45 +0300 Subject: [PATCH 4/5] Add fake implementation of GetJob for tests --- tests/Hippo.FunctionalTests/TestBase.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Hippo.FunctionalTests/TestBase.cs b/tests/Hippo.FunctionalTests/TestBase.cs index 5d287910e..71b80103e 100644 --- a/tests/Hippo.FunctionalTests/TestBase.cs +++ b/tests/Hippo.FunctionalTests/TestBase.cs @@ -220,6 +220,11 @@ public string[] GetJobLogs(string jobName) return null; } + public Job? GetJob(string jobName) + { + return null; + } + private class NullJob : Job { public void Reload() { } From e954a435a0d0207bb5817efa773d26a00d49d12b Mon Sep 17 00:00:00 2001 From: Stefan Nedelcu Date: Wed, 6 Jul 2022 17:10:55 +0300 Subject: [PATCH 5/5] Fixed async warning --- src/Application/JobStatuses/Queries/GetJobStatusQuery.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Application/JobStatuses/Queries/GetJobStatusQuery.cs b/src/Application/JobStatuses/Queries/GetJobStatusQuery.cs index 5bb53b093..f704becfa 100644 --- a/src/Application/JobStatuses/Queries/GetJobStatusQuery.cs +++ b/src/Application/JobStatuses/Queries/GetJobStatusQuery.cs @@ -18,14 +18,14 @@ public GetJobStatusQueryHandler(IJobService jobService) _jobService = jobService; } - public async Task Handle(GetJobStatusQuery request, CancellationToken cancellationToken) + public Task Handle(GetJobStatusQuery request, CancellationToken cancellationToken) { var job = _jobService.GetJob(request.ChannelId.ToString()); - return new ChannelJobStatusItem + return Task.FromResult(new ChannelJobStatusItem { ChannelId = request.ChannelId, Status = job?.Status ?? JobStatus.Dead, - }; + }); } }