[frontend] Regenerate openAPI

This commit is contained in:
missytake 2022-03-07 20:41:01 +01:00
parent beb134972a
commit 40c37cb1ec
18 changed files with 18592 additions and 1295 deletions

File diff suppressed because it is too large Load diff

View file

@ -6,6 +6,7 @@ api/api.ts
api/badwords.service.ts api/badwords.service.ts
api/email.service.ts api/email.service.ts
api/hoods.service.ts api/hoods.service.ts
api/mastodon.service.ts
api/telegram.service.ts api/telegram.service.ts
api/test.service.ts api/test.service.ts
api/triggers.service.ts api/triggers.service.ts
@ -16,7 +17,6 @@ git_push.sh
index.ts index.ts
model/bodyAccessToken.ts model/bodyAccessToken.ts
model/bodyAdmin.ts model/bodyAdmin.ts
model/bodyAdminLoginAdminLoginPost.ts
model/bodyBadWord.ts model/bodyBadWord.ts
model/bodyHood.ts model/bodyHood.ts
model/bodyPassword.ts model/bodyPassword.ts
@ -28,6 +28,6 @@ model/kibicaraPlatformsEmailWebapiBodyEmail.ts
model/kibicaraPlatformsEmailWebapiBodyMessage.ts model/kibicaraPlatformsEmailWebapiBodyMessage.ts
model/kibicaraPlatformsTestWebapiBodyMessage.ts model/kibicaraPlatformsTestWebapiBodyMessage.ts
model/kibicaraWebapiAdminBodyEmail.ts model/kibicaraWebapiAdminBodyEmail.ts
model/validationError.ts
model/models.ts model/models.ts
model/validationError.ts
variables.ts variables.ts

View file

@ -1 +1 @@
5.0.0-beta2 5.4.0

View file

@ -75,7 +75,7 @@ export class AppModule {}
// configuring providers // configuring providers
import { ApiModule, Configuration, ConfigurationParameters } from ''; import { ApiModule, Configuration, ConfigurationParameters } from '';
export function apiConfigFactory (): Configuration => { export function apiConfigFactory (): Configuration {
const params: ConfigurationParameters = { const params: ConfigurationParameters = {
// set configuration parameters here. // set configuration parameters here.
} }

View file

@ -6,6 +6,7 @@ import { AdminService } from './api/admin.service';
import { BadwordsService } from './api/badwords.service'; import { BadwordsService } from './api/badwords.service';
import { EmailService } from './api/email.service'; import { EmailService } from './api/email.service';
import { HoodsService } from './api/hoods.service'; import { HoodsService } from './api/hoods.service';
import { MastodonService } from './api/mastodon.service';
import { TelegramService } from './api/telegram.service'; import { TelegramService } from './api/telegram.service';
import { TestService } from './api/test.service'; import { TestService } from './api/test.service';
import { TriggersService } from './api/triggers.service'; import { TriggersService } from './api/triggers.service';

View file

@ -13,16 +13,23 @@
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { BodyAccessToken } from '../model/models'; // @ts-ignore
import { BodyAdmin } from '../model/models'; import { BodyAccessToken } from '../model/bodyAccessToken';
import { BodyPassword } from '../model/models'; // @ts-ignore
import { HTTPValidationError } from '../model/models'; import { BodyAdmin } from '../model/bodyAdmin';
import { KibicaraWebapiAdminBodyEmail } from '../model/models'; // @ts-ignore
import { BodyPassword } from '../model/bodyPassword';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { KibicaraWebapiAdminBodyEmail } from '../model/kibicaraWebapiAdminBodyEmail';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration'; import { Configuration } from '../configuration';
@ -33,7 +40,7 @@ import { Configuration } from '../configurat
}) })
export class AdminService { export class AdminService {
protected basePath = 'http://localhost'; protected basePath = 'http://localhost:8000/api';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
public encoder: HttpParameterCodec; public encoder: HttpParameterCodec;
@ -108,40 +115,52 @@ export class AdminService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public confirm(registerToken: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<BodyAccessToken>; public confirm(registerToken: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<BodyAccessToken>;
public confirm(registerToken: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<BodyAccessToken>>; public confirm(registerToken: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<BodyAccessToken>>;
public confirm(registerToken: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<BodyAccessToken>>; public confirm(registerToken: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<BodyAccessToken>>;
public confirm(registerToken: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public confirm(registerToken: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (registerToken === null || registerToken === undefined) { if (registerToken === null || registerToken === undefined) {
throw new Error('Required parameter registerToken was null or undefined when calling confirm.'); throw new Error('Required parameter registerToken was null or undefined when calling confirm.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/api/admin/confirm/${encodeURIComponent(String(registerToken))}`, return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/admin/confirm/${encodeURIComponent(String(registerToken))}`,
null, null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -155,10 +174,10 @@ export class AdminService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public confirmReset(resetToken: string, bodyPassword: BodyPassword, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<BodyAccessToken>; public confirmReset(resetToken: string, bodyPassword: BodyPassword, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<BodyAccessToken>;
public confirmReset(resetToken: string, bodyPassword: BodyPassword, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<BodyAccessToken>>; public confirmReset(resetToken: string, bodyPassword: BodyPassword, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<BodyAccessToken>>;
public confirmReset(resetToken: string, bodyPassword: BodyPassword, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<BodyAccessToken>>; public confirmReset(resetToken: string, bodyPassword: BodyPassword, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<BodyAccessToken>>;
public confirmReset(resetToken: string, bodyPassword: BodyPassword, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public confirmReset(resetToken: string, bodyPassword: BodyPassword, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (resetToken === null || resetToken === undefined) { if (resetToken === null || resetToken === undefined) {
throw new Error('Required parameter resetToken was null or undefined when calling confirmReset.'); throw new Error('Required parameter resetToken was null or undefined when calling confirmReset.');
} }
@ -166,18 +185,23 @@ export class AdminService {
throw new Error('Required parameter bodyPassword was null or undefined when calling confirmReset.'); throw new Error('Required parameter bodyPassword was null or undefined when calling confirmReset.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -187,20 +211,27 @@ export class AdminService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/api/admin/reset/${encodeURIComponent(String(resetToken))}`, return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/admin/reset/${encodeURIComponent(String(resetToken))}`,
bodyPassword, bodyPassword,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -212,42 +243,55 @@ export class AdminService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteAdmin(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<any>; public deleteAdmin(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<any>;
public deleteAdmin(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpResponse<any>>; public deleteAdmin(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<HttpResponse<any>>;
public deleteAdmin(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined}): Observable<HttpEvent<any>>; public deleteAdmin(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<HttpEvent<any>>;
public deleteAdmin(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined}): Observable<any> { public deleteAdmin(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/admin/`, return this.httpClient.delete<any>(`${this.configuration.basePath}/admin/`,
null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -260,43 +304,55 @@ export class AdminService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getAdmin(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getAdmin(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getAdmin(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getAdmin(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getAdmin(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getAdmin(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getAdmin(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getAdmin(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/admin/`, return this.httpClient.get<any>(`${this.configuration.basePath}/admin/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -309,43 +365,55 @@ export class AdminService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getHoodsAdmin(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getHoodsAdmin(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getHoodsAdmin(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getHoodsAdmin(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getHoodsAdmin(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getHoodsAdmin(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getHoodsAdmin(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getHoodsAdmin(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/admin/hoods/`, return this.httpClient.get<any>(`${this.configuration.basePath}/admin/hoods/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -364,10 +432,10 @@ export class AdminService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public login(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<BodyAccessToken>; public login(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<BodyAccessToken>;
public login(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<BodyAccessToken>>; public login(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<BodyAccessToken>>;
public login(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<BodyAccessToken>>; public login(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<BodyAccessToken>>;
public login(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public login(username: string, password: string, grantType?: string, scope?: string, clientId?: string, clientSecret?: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (username === null || username === undefined) { if (username === null || username === undefined) {
throw new Error('Required parameter username was null or undefined when calling login.'); throw new Error('Required parameter username was null or undefined when calling login.');
} }
@ -375,18 +443,23 @@ export class AdminService {
throw new Error('Required parameter password was null or undefined when calling login.'); throw new Error('Required parameter password was null or undefined when calling login.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
// to determine the Content-Type header // to determine the Content-Type header
@ -396,45 +469,52 @@ export class AdminService {
const canConsumeForm = this.canConsumeForm(consumes); const canConsumeForm = this.canConsumeForm(consumes);
let formParams: { append(param: string, value: any): any; }; let localVarFormParams: { append(param: string, value: any): any; };
let useForm = false; let localVarUseForm = false;
let convertFormParamsToString = false; let localVarConvertFormParamsToString = false;
if (useForm) { if (localVarUseForm) {
formParams = new FormData(); localVarFormParams = new FormData();
} else { } else {
formParams = new HttpParams({encoder: this.encoder}); localVarFormParams = new HttpParams({encoder: this.encoder});
} }
if (grantType !== undefined) { if (grantType !== undefined) {
formParams = formParams.append('grant_type', <any>grantType) as any || formParams; localVarFormParams = localVarFormParams.append('grant_type', <any>grantType) as any || localVarFormParams;
} }
if (username !== undefined) { if (username !== undefined) {
formParams = formParams.append('username', <any>username) as any || formParams; localVarFormParams = localVarFormParams.append('username', <any>username) as any || localVarFormParams;
} }
if (password !== undefined) { if (password !== undefined) {
formParams = formParams.append('password', <any>password) as any || formParams; localVarFormParams = localVarFormParams.append('password', <any>password) as any || localVarFormParams;
} }
if (scope !== undefined) { if (scope !== undefined) {
formParams = formParams.append('scope', <any>scope) as any || formParams; localVarFormParams = localVarFormParams.append('scope', <any>scope) as any || localVarFormParams;
} }
if (clientId !== undefined) { if (clientId !== undefined) {
formParams = formParams.append('client_id', <any>clientId) as any || formParams; localVarFormParams = localVarFormParams.append('client_id', <any>clientId) as any || localVarFormParams;
} }
if (clientSecret !== undefined) { if (clientSecret !== undefined) {
formParams = formParams.append('client_secret', <any>clientSecret) as any || formParams; localVarFormParams = localVarFormParams.append('client_secret', <any>clientSecret) as any || localVarFormParams;
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/api/admin/login/`, return this.httpClient.post<BodyAccessToken>(`${this.configuration.basePath}/admin/login/`,
convertFormParamsToString ? formParams.toString() : formParams, localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -448,26 +528,31 @@ export class AdminService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public register(bodyAdmin: BodyAdmin, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<object>; public register(bodyAdmin: BodyAdmin, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<object>;
public register(bodyAdmin: BodyAdmin, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<object>>; public register(bodyAdmin: BodyAdmin, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<object>>;
public register(bodyAdmin: BodyAdmin, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<object>>; public register(bodyAdmin: BodyAdmin, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<object>>;
public register(bodyAdmin: BodyAdmin, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public register(bodyAdmin: BodyAdmin, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (bodyAdmin === null || bodyAdmin === undefined) { if (bodyAdmin === null || bodyAdmin === undefined) {
throw new Error('Required parameter bodyAdmin was null or undefined when calling register.'); throw new Error('Required parameter bodyAdmin was null or undefined when calling register.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -477,20 +562,27 @@ export class AdminService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<object>(`${this.configuration.basePath}/api/admin/register/`, return this.httpClient.post<object>(`${this.configuration.basePath}/admin/register/`,
bodyAdmin, bodyAdmin,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -504,26 +596,31 @@ export class AdminService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public reset(kibicaraWebapiAdminBodyEmail: KibicaraWebapiAdminBodyEmail, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<object>; public reset(kibicaraWebapiAdminBodyEmail: KibicaraWebapiAdminBodyEmail, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<object>;
public reset(kibicaraWebapiAdminBodyEmail: KibicaraWebapiAdminBodyEmail, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<object>>; public reset(kibicaraWebapiAdminBodyEmail: KibicaraWebapiAdminBodyEmail, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<object>>;
public reset(kibicaraWebapiAdminBodyEmail: KibicaraWebapiAdminBodyEmail, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<object>>; public reset(kibicaraWebapiAdminBodyEmail: KibicaraWebapiAdminBodyEmail, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<object>>;
public reset(kibicaraWebapiAdminBodyEmail: KibicaraWebapiAdminBodyEmail, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public reset(kibicaraWebapiAdminBodyEmail: KibicaraWebapiAdminBodyEmail, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (kibicaraWebapiAdminBodyEmail === null || kibicaraWebapiAdminBodyEmail === undefined) { if (kibicaraWebapiAdminBodyEmail === null || kibicaraWebapiAdminBodyEmail === undefined) {
throw new Error('Required parameter kibicaraWebapiAdminBodyEmail was null or undefined when calling reset.'); throw new Error('Required parameter kibicaraWebapiAdminBodyEmail was null or undefined when calling reset.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -533,20 +630,27 @@ export class AdminService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<object>(`${this.configuration.basePath}/api/admin/reset/`, return this.httpClient.post<object>(`${this.configuration.basePath}/admin/reset/`,
kibicaraWebapiAdminBodyEmail, kibicaraWebapiAdminBodyEmail,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View file

@ -6,6 +6,8 @@ export * from './email.service';
import { EmailService } from './email.service'; import { EmailService } from './email.service';
export * from './hoods.service'; export * from './hoods.service';
import { HoodsService } from './hoods.service'; import { HoodsService } from './hoods.service';
export * from './mastodon.service';
import { MastodonService } from './mastodon.service';
export * from './telegram.service'; export * from './telegram.service';
import { TelegramService } from './telegram.service'; import { TelegramService } from './telegram.service';
export * from './test.service'; export * from './test.service';
@ -14,4 +16,4 @@ export * from './triggers.service';
import { TriggersService } from './triggers.service'; import { TriggersService } from './triggers.service';
export * from './twitter.service'; export * from './twitter.service';
import { TwitterService } from './twitter.service'; import { TwitterService } from './twitter.service';
export const APIS = [AdminService, BadwordsService, EmailService, HoodsService, TelegramService, TestService, TriggersService, TwitterService]; export const APIS = [AdminService, BadwordsService, EmailService, HoodsService, MastodonService, TelegramService, TestService, TriggersService, TwitterService];

View file

@ -13,13 +13,17 @@
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { BodyBadWord } from '../model/models'; // @ts-ignore
import { HTTPValidationError } from '../model/models'; import { BodyBadWord } from '../model/bodyBadWord';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration'; import { Configuration } from '../configuration';
@ -30,7 +34,7 @@ import { Configuration } from '../configurat
}) })
export class BadwordsService { export class BadwordsService {
protected basePath = 'http://localhost'; protected basePath = 'http://localhost:8000/api';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
public encoder: HttpParameterCodec; public encoder: HttpParameterCodec;
@ -93,10 +97,10 @@ export class BadwordsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public createBadword(hoodId: number, bodyBadWord: BodyBadWord, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public createBadword(hoodId: number, bodyBadWord: BodyBadWord, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public createBadword(hoodId: number, bodyBadWord: BodyBadWord, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public createBadword(hoodId: number, bodyBadWord: BodyBadWord, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public createBadword(hoodId: number, bodyBadWord: BodyBadWord, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public createBadword(hoodId: number, bodyBadWord: BodyBadWord, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public createBadword(hoodId: number, bodyBadWord: BodyBadWord, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public createBadword(hoodId: number, bodyBadWord: BodyBadWord, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling createBadword.'); throw new Error('Required parameter hoodId was null or undefined when calling createBadword.');
} }
@ -104,25 +108,30 @@ export class BadwordsService {
throw new Error('Required parameter bodyBadWord was null or undefined when calling createBadword.'); throw new Error('Required parameter bodyBadWord was null or undefined when calling createBadword.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -132,20 +141,27 @@ export class BadwordsService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/`,
bodyBadWord, bodyBadWord,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -160,10 +176,10 @@ export class BadwordsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteBadword(badwordId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public deleteBadword(badwordId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public deleteBadword(badwordId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public deleteBadword(badwordId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public deleteBadword(badwordId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public deleteBadword(badwordId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public deleteBadword(badwordId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public deleteBadword(badwordId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (badwordId === null || badwordId === undefined) { if (badwordId === null || badwordId === undefined) {
throw new Error('Required parameter badwordId was null or undefined when calling deleteBadword.'); throw new Error('Required parameter badwordId was null or undefined when calling deleteBadword.');
} }
@ -171,38 +187,51 @@ export class BadwordsService {
throw new Error('Required parameter hoodId was null or undefined when calling deleteBadword.'); throw new Error('Required parameter hoodId was null or undefined when calling deleteBadword.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`, return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -217,10 +246,10 @@ export class BadwordsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getBadword(badwordId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getBadword(badwordId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getBadword(badwordId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getBadword(badwordId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getBadword(badwordId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getBadword(badwordId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getBadword(badwordId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getBadword(badwordId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (badwordId === null || badwordId === undefined) { if (badwordId === null || badwordId === undefined) {
throw new Error('Required parameter badwordId was null or undefined when calling getBadword.'); throw new Error('Required parameter badwordId was null or undefined when calling getBadword.');
} }
@ -228,38 +257,50 @@ export class BadwordsService {
throw new Error('Required parameter hoodId was null or undefined when calling getBadword.'); throw new Error('Required parameter hoodId was null or undefined when calling getBadword.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -273,46 +314,58 @@ export class BadwordsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getBadwords(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getBadwords(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getBadwords(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getBadwords(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getBadwords(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getBadwords(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getBadwords(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getBadwords(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling getBadwords.'); throw new Error('Required parameter hoodId was null or undefined when calling getBadwords.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -328,10 +381,10 @@ export class BadwordsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public updateBadword(badwordId: number, hoodId: number, bodyBadWord: BodyBadWord, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public updateBadword(badwordId: number, hoodId: number, bodyBadWord: BodyBadWord, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public updateBadword(badwordId: number, hoodId: number, bodyBadWord: BodyBadWord, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public updateBadword(badwordId: number, hoodId: number, bodyBadWord: BodyBadWord, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public updateBadword(badwordId: number, hoodId: number, bodyBadWord: BodyBadWord, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public updateBadword(badwordId: number, hoodId: number, bodyBadWord: BodyBadWord, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public updateBadword(badwordId: number, hoodId: number, bodyBadWord: BodyBadWord, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public updateBadword(badwordId: number, hoodId: number, bodyBadWord: BodyBadWord, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (badwordId === null || badwordId === undefined) { if (badwordId === null || badwordId === undefined) {
throw new Error('Required parameter badwordId was null or undefined when calling updateBadword.'); throw new Error('Required parameter badwordId was null or undefined when calling updateBadword.');
} }
@ -342,25 +395,30 @@ export class BadwordsService {
throw new Error('Required parameter bodyBadWord was null or undefined when calling updateBadword.'); throw new Error('Required parameter bodyBadWord was null or undefined when calling updateBadword.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -370,20 +428,27 @@ export class BadwordsService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.put<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`, return this.httpClient.put<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/badwords/${encodeURIComponent(String(badwordId))}`,
bodyBadWord, bodyBadWord,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

File diff suppressed because it is too large Load diff

View file

@ -13,13 +13,17 @@
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { BodyHood } from '../model/models'; // @ts-ignore
import { HTTPValidationError } from '../model/models'; import { BodyHood } from '../model/bodyHood';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration'; import { Configuration } from '../configuration';
@ -30,7 +34,7 @@ import { Configuration } from '../configurat
}) })
export class HoodsService { export class HoodsService {
protected basePath = 'http://localhost'; protected basePath = 'http://localhost:8000/api';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
public encoder: HttpParameterCodec; public encoder: HttpParameterCodec;
@ -92,33 +96,38 @@ export class HoodsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public createHood(bodyHood: BodyHood, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public createHood(bodyHood: BodyHood, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public createHood(bodyHood: BodyHood, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public createHood(bodyHood: BodyHood, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public createHood(bodyHood: BodyHood, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public createHood(bodyHood: BodyHood, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public createHood(bodyHood: BodyHood, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public createHood(bodyHood: BodyHood, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (bodyHood === null || bodyHood === undefined) { if (bodyHood === null || bodyHood === undefined) {
throw new Error('Required parameter bodyHood was null or undefined when calling createHood.'); throw new Error('Required parameter bodyHood was null or undefined when calling createHood.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -128,20 +137,27 @@ export class HoodsService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/`,
bodyHood, bodyHood,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -155,46 +171,59 @@ export class HoodsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteHood(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public deleteHood(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public deleteHood(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public deleteHood(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public deleteHood(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public deleteHood(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public deleteHood(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public deleteHood(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling deleteHood.'); throw new Error('Required parameter hoodId was null or undefined when calling deleteHood.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}`, return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}`,
null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -208,39 +237,51 @@ export class HoodsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getHood(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getHood(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getHood(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getHood(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getHood(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getHood(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getHood(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getHood(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling getHood.'); throw new Error('Required parameter hoodId was null or undefined when calling getHood.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -253,36 +294,48 @@ export class HoodsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getHoods(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getHoods(observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getHoods(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getHoods(observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getHoods(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getHoods(observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getHoods(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getHoods(observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -297,10 +350,10 @@ export class HoodsService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public updateHood(hoodId: number, bodyHood: BodyHood, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public updateHood(hoodId: number, bodyHood: BodyHood, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public updateHood(hoodId: number, bodyHood: BodyHood, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public updateHood(hoodId: number, bodyHood: BodyHood, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public updateHood(hoodId: number, bodyHood: BodyHood, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public updateHood(hoodId: number, bodyHood: BodyHood, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public updateHood(hoodId: number, bodyHood: BodyHood, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public updateHood(hoodId: number, bodyHood: BodyHood, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling updateHood.'); throw new Error('Required parameter hoodId was null or undefined when calling updateHood.');
} }
@ -308,25 +361,30 @@ export class HoodsService {
throw new Error('Required parameter bodyHood was null or undefined when calling updateHood.'); throw new Error('Required parameter bodyHood was null or undefined when calling updateHood.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -336,20 +394,27 @@ export class HoodsService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.put<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}`, return this.httpClient.put<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}`,
bodyHood, bodyHood,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View file

@ -13,13 +13,17 @@
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { BodyTelegram } from '../model/models'; // @ts-ignore
import { HTTPValidationError } from '../model/models'; import { BodyTelegram } from '../model/bodyTelegram';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration'; import { Configuration } from '../configuration';
@ -30,7 +34,7 @@ import { Configuration } from '../configurat
}) })
export class TelegramService { export class TelegramService {
protected basePath = 'http://localhost'; protected basePath = 'http://localhost:8000/api';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
public encoder: HttpParameterCodec; public encoder: HttpParameterCodec;
@ -92,10 +96,10 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public createTelegram(hoodId: number, bodyTelegram: BodyTelegram, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public createTelegram(hoodId: number, bodyTelegram: BodyTelegram, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public createTelegram(hoodId: number, bodyTelegram: BodyTelegram, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public createTelegram(hoodId: number, bodyTelegram: BodyTelegram, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public createTelegram(hoodId: number, bodyTelegram: BodyTelegram, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public createTelegram(hoodId: number, bodyTelegram: BodyTelegram, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public createTelegram(hoodId: number, bodyTelegram: BodyTelegram, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public createTelegram(hoodId: number, bodyTelegram: BodyTelegram, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling createTelegram.'); throw new Error('Required parameter hoodId was null or undefined when calling createTelegram.');
} }
@ -103,25 +107,30 @@ export class TelegramService {
throw new Error('Required parameter bodyTelegram was null or undefined when calling createTelegram.'); throw new Error('Required parameter bodyTelegram was null or undefined when calling createTelegram.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -131,20 +140,27 @@ export class TelegramService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/`,
bodyTelegram, bodyTelegram,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -158,10 +174,10 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public deleteTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public deleteTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public deleteTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public deleteTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public deleteTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public deleteTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public deleteTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (telegramId === null || telegramId === undefined) { if (telegramId === null || telegramId === undefined) {
throw new Error('Required parameter telegramId was null or undefined when calling deleteTelegram.'); throw new Error('Required parameter telegramId was null or undefined when calling deleteTelegram.');
} }
@ -169,38 +185,51 @@ export class TelegramService {
throw new Error('Required parameter hoodId was null or undefined when calling deleteTelegram.'); throw new Error('Required parameter hoodId was null or undefined when calling deleteTelegram.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`, return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -214,10 +243,10 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (telegramId === null || telegramId === undefined) { if (telegramId === null || telegramId === undefined) {
throw new Error('Required parameter telegramId was null or undefined when calling getTelegram.'); throw new Error('Required parameter telegramId was null or undefined when calling getTelegram.');
} }
@ -225,38 +254,50 @@ export class TelegramService {
throw new Error('Required parameter hoodId was null or undefined when calling getTelegram.'); throw new Error('Required parameter hoodId was null or undefined when calling getTelegram.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -269,46 +310,58 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getTelegrams(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getTelegrams(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getTelegrams(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getTelegrams(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getTelegrams(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getTelegrams(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getTelegrams(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getTelegrams(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling getTelegrams.'); throw new Error('Required parameter hoodId was null or undefined when calling getTelegrams.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -321,39 +374,51 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getTelegramsPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getTelegramsPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getTelegramsPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getTelegramsPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getTelegramsPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getTelegramsPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getTelegramsPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getTelegramsPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling getTelegramsPublic.'); throw new Error('Required parameter hoodId was null or undefined when calling getTelegramsPublic.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/public`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/public`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -367,10 +432,10 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public startTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public startTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public startTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public startTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public startTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public startTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public startTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public startTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (telegramId === null || telegramId === undefined) { if (telegramId === null || telegramId === undefined) {
throw new Error('Required parameter telegramId was null or undefined when calling startTelegram.'); throw new Error('Required parameter telegramId was null or undefined when calling startTelegram.');
} }
@ -378,39 +443,51 @@ export class TelegramService {
throw new Error('Required parameter hoodId was null or undefined when calling startTelegram.'); throw new Error('Required parameter hoodId was null or undefined when calling startTelegram.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/start`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/start`,
null, null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -424,10 +501,10 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public statusTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public statusTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public statusTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public statusTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public statusTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public statusTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public statusTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public statusTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (telegramId === null || telegramId === undefined) { if (telegramId === null || telegramId === undefined) {
throw new Error('Required parameter telegramId was null or undefined when calling statusTelegram.'); throw new Error('Required parameter telegramId was null or undefined when calling statusTelegram.');
} }
@ -435,38 +512,50 @@ export class TelegramService {
throw new Error('Required parameter hoodId was null or undefined when calling statusTelegram.'); throw new Error('Required parameter hoodId was null or undefined when calling statusTelegram.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/status`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/status`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -480,10 +569,10 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public stopTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public stopTelegram(telegramId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public stopTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public stopTelegram(telegramId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public stopTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public stopTelegram(telegramId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public stopTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public stopTelegram(telegramId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (telegramId === null || telegramId === undefined) { if (telegramId === null || telegramId === undefined) {
throw new Error('Required parameter telegramId was null or undefined when calling stopTelegram.'); throw new Error('Required parameter telegramId was null or undefined when calling stopTelegram.');
} }
@ -491,39 +580,51 @@ export class TelegramService {
throw new Error('Required parameter hoodId was null or undefined when calling stopTelegram.'); throw new Error('Required parameter hoodId was null or undefined when calling stopTelegram.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/stop`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}/stop`,
null, null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -538,10 +639,10 @@ export class TelegramService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public updateTelegram(telegramId: number, hoodId: number, bodyTelegram: BodyTelegram, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public updateTelegram(telegramId: number, hoodId: number, bodyTelegram: BodyTelegram, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public updateTelegram(telegramId: number, hoodId: number, bodyTelegram: BodyTelegram, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public updateTelegram(telegramId: number, hoodId: number, bodyTelegram: BodyTelegram, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public updateTelegram(telegramId: number, hoodId: number, bodyTelegram: BodyTelegram, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public updateTelegram(telegramId: number, hoodId: number, bodyTelegram: BodyTelegram, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public updateTelegram(telegramId: number, hoodId: number, bodyTelegram: BodyTelegram, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public updateTelegram(telegramId: number, hoodId: number, bodyTelegram: BodyTelegram, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (telegramId === null || telegramId === undefined) { if (telegramId === null || telegramId === undefined) {
throw new Error('Required parameter telegramId was null or undefined when calling updateTelegram.'); throw new Error('Required parameter telegramId was null or undefined when calling updateTelegram.');
} }
@ -552,25 +653,30 @@ export class TelegramService {
throw new Error('Required parameter bodyTelegram was null or undefined when calling updateTelegram.'); throw new Error('Required parameter bodyTelegram was null or undefined when calling updateTelegram.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -580,20 +686,27 @@ export class TelegramService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.put<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`, return this.httpClient.put<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/telegram/${encodeURIComponent(String(telegramId))}`,
bodyTelegram, bodyTelegram,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View file

@ -13,13 +13,17 @@
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { HTTPValidationError } from '../model/models'; // @ts-ignore
import { KibicaraPlatformsTestWebapiBodyMessage } from '../model/models'; import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { KibicaraPlatformsTestWebapiBodyMessage } from '../model/kibicaraPlatformsTestWebapiBodyMessage';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration'; import { Configuration } from '../configuration';
@ -30,7 +34,7 @@ import { Configuration } from '../configurat
}) })
export class TestService { export class TestService {
protected basePath = 'http://localhost'; protected basePath = 'http://localhost:8000/api';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
public encoder: HttpParameterCodec; public encoder: HttpParameterCodec;
@ -91,47 +95,59 @@ export class TestService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public testCreateHoodsHoodIdTestPost(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public testCreateHoodsHoodIdTestPost(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public testCreateHoodsHoodIdTestPost(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public testCreateHoodsHoodIdTestPost(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public testCreateHoodsHoodIdTestPost(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public testCreateHoodsHoodIdTestPost(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public testCreateHoodsHoodIdTestPost(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public testCreateHoodsHoodIdTestPost(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling testCreateHoodsHoodIdTestPost.'); throw new Error('Required parameter hoodId was null or undefined when calling testCreateHoodsHoodIdTestPost.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/`,
null, null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -145,10 +161,10 @@ export class TestService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public testDeleteHoodsHoodIdTestTestIdDelete(testId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public testDeleteHoodsHoodIdTestTestIdDelete(testId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public testDeleteHoodsHoodIdTestTestIdDelete(testId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public testDeleteHoodsHoodIdTestTestIdDelete(testId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public testDeleteHoodsHoodIdTestTestIdDelete(testId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public testDeleteHoodsHoodIdTestTestIdDelete(testId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public testDeleteHoodsHoodIdTestTestIdDelete(testId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public testDeleteHoodsHoodIdTestTestIdDelete(testId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (testId === null || testId === undefined) { if (testId === null || testId === undefined) {
throw new Error('Required parameter testId was null or undefined when calling testDeleteHoodsHoodIdTestTestIdDelete.'); throw new Error('Required parameter testId was null or undefined when calling testDeleteHoodsHoodIdTestTestIdDelete.');
} }
@ -156,38 +172,51 @@ export class TestService {
throw new Error('Required parameter hoodId was null or undefined when calling testDeleteHoodsHoodIdTestTestIdDelete.'); throw new Error('Required parameter hoodId was null or undefined when calling testDeleteHoodsHoodIdTestTestIdDelete.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}`, return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}`,
null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -202,10 +231,10 @@ export class TestService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public testMessageCreateHoodsHoodIdTestTestIdMessagesPost(testId: number, hoodId: number, kibicaraPlatformsTestWebapiBodyMessage: KibicaraPlatformsTestWebapiBodyMessage, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public testMessageCreateHoodsHoodIdTestTestIdMessagesPost(testId: number, hoodId: number, kibicaraPlatformsTestWebapiBodyMessage: KibicaraPlatformsTestWebapiBodyMessage, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public testMessageCreateHoodsHoodIdTestTestIdMessagesPost(testId: number, hoodId: number, kibicaraPlatformsTestWebapiBodyMessage: KibicaraPlatformsTestWebapiBodyMessage, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public testMessageCreateHoodsHoodIdTestTestIdMessagesPost(testId: number, hoodId: number, kibicaraPlatformsTestWebapiBodyMessage: KibicaraPlatformsTestWebapiBodyMessage, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public testMessageCreateHoodsHoodIdTestTestIdMessagesPost(testId: number, hoodId: number, kibicaraPlatformsTestWebapiBodyMessage: KibicaraPlatformsTestWebapiBodyMessage, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public testMessageCreateHoodsHoodIdTestTestIdMessagesPost(testId: number, hoodId: number, kibicaraPlatformsTestWebapiBodyMessage: KibicaraPlatformsTestWebapiBodyMessage, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public testMessageCreateHoodsHoodIdTestTestIdMessagesPost(testId: number, hoodId: number, kibicaraPlatformsTestWebapiBodyMessage: KibicaraPlatformsTestWebapiBodyMessage, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public testMessageCreateHoodsHoodIdTestTestIdMessagesPost(testId: number, hoodId: number, kibicaraPlatformsTestWebapiBodyMessage: KibicaraPlatformsTestWebapiBodyMessage, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (testId === null || testId === undefined) { if (testId === null || testId === undefined) {
throw new Error('Required parameter testId was null or undefined when calling testMessageCreateHoodsHoodIdTestTestIdMessagesPost.'); throw new Error('Required parameter testId was null or undefined when calling testMessageCreateHoodsHoodIdTestTestIdMessagesPost.');
} }
@ -216,25 +245,30 @@ export class TestService {
throw new Error('Required parameter kibicaraPlatformsTestWebapiBodyMessage was null or undefined when calling testMessageCreateHoodsHoodIdTestTestIdMessagesPost.'); throw new Error('Required parameter kibicaraPlatformsTestWebapiBodyMessage was null or undefined when calling testMessageCreateHoodsHoodIdTestTestIdMessagesPost.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -244,20 +278,27 @@ export class TestService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}/messages/`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}/messages/`,
kibicaraPlatformsTestWebapiBodyMessage, kibicaraPlatformsTestWebapiBodyMessage,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -271,10 +312,10 @@ export class TestService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public testMessageReadAllHoodsHoodIdTestTestIdMessagesGet(testId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public testMessageReadAllHoodsHoodIdTestTestIdMessagesGet(testId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public testMessageReadAllHoodsHoodIdTestTestIdMessagesGet(testId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public testMessageReadAllHoodsHoodIdTestTestIdMessagesGet(testId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public testMessageReadAllHoodsHoodIdTestTestIdMessagesGet(testId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public testMessageReadAllHoodsHoodIdTestTestIdMessagesGet(testId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public testMessageReadAllHoodsHoodIdTestTestIdMessagesGet(testId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public testMessageReadAllHoodsHoodIdTestTestIdMessagesGet(testId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (testId === null || testId === undefined) { if (testId === null || testId === undefined) {
throw new Error('Required parameter testId was null or undefined when calling testMessageReadAllHoodsHoodIdTestTestIdMessagesGet.'); throw new Error('Required parameter testId was null or undefined when calling testMessageReadAllHoodsHoodIdTestTestIdMessagesGet.');
} }
@ -282,38 +323,50 @@ export class TestService {
throw new Error('Required parameter hoodId was null or undefined when calling testMessageReadAllHoodsHoodIdTestTestIdMessagesGet.'); throw new Error('Required parameter hoodId was null or undefined when calling testMessageReadAllHoodsHoodIdTestTestIdMessagesGet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}/messages/`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}/messages/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -326,46 +379,58 @@ export class TestService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public testReadAllHoodsHoodIdTestGet(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public testReadAllHoodsHoodIdTestGet(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public testReadAllHoodsHoodIdTestGet(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public testReadAllHoodsHoodIdTestGet(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public testReadAllHoodsHoodIdTestGet(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public testReadAllHoodsHoodIdTestGet(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public testReadAllHoodsHoodIdTestGet(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public testReadAllHoodsHoodIdTestGet(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling testReadAllHoodsHoodIdTestGet.'); throw new Error('Required parameter hoodId was null or undefined when calling testReadAllHoodsHoodIdTestGet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -379,10 +444,10 @@ export class TestService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public testReadHoodsHoodIdTestTestIdGet(testId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public testReadHoodsHoodIdTestTestIdGet(testId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public testReadHoodsHoodIdTestTestIdGet(testId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public testReadHoodsHoodIdTestTestIdGet(testId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public testReadHoodsHoodIdTestTestIdGet(testId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public testReadHoodsHoodIdTestTestIdGet(testId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public testReadHoodsHoodIdTestTestIdGet(testId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public testReadHoodsHoodIdTestTestIdGet(testId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (testId === null || testId === undefined) { if (testId === null || testId === undefined) {
throw new Error('Required parameter testId was null or undefined when calling testReadHoodsHoodIdTestTestIdGet.'); throw new Error('Required parameter testId was null or undefined when calling testReadHoodsHoodIdTestTestIdGet.');
} }
@ -390,38 +455,50 @@ export class TestService {
throw new Error('Required parameter hoodId was null or undefined when calling testReadHoodsHoodIdTestTestIdGet.'); throw new Error('Required parameter hoodId was null or undefined when calling testReadHoodsHoodIdTestTestIdGet.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/test/${encodeURIComponent(String(testId))}`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View file

@ -13,13 +13,17 @@
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { BodyTrigger } from '../model/models'; // @ts-ignore
import { HTTPValidationError } from '../model/models'; import { BodyTrigger } from '../model/bodyTrigger';
// @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration'; import { Configuration } from '../configuration';
@ -30,7 +34,7 @@ import { Configuration } from '../configurat
}) })
export class TriggersService { export class TriggersService {
protected basePath = 'http://localhost'; protected basePath = 'http://localhost:8000/api';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
public encoder: HttpParameterCodec; public encoder: HttpParameterCodec;
@ -93,10 +97,10 @@ export class TriggersService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public createTrigger(hoodId: number, bodyTrigger: BodyTrigger, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public createTrigger(hoodId: number, bodyTrigger: BodyTrigger, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public createTrigger(hoodId: number, bodyTrigger: BodyTrigger, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public createTrigger(hoodId: number, bodyTrigger: BodyTrigger, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public createTrigger(hoodId: number, bodyTrigger: BodyTrigger, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public createTrigger(hoodId: number, bodyTrigger: BodyTrigger, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public createTrigger(hoodId: number, bodyTrigger: BodyTrigger, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public createTrigger(hoodId: number, bodyTrigger: BodyTrigger, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling createTrigger.'); throw new Error('Required parameter hoodId was null or undefined when calling createTrigger.');
} }
@ -104,25 +108,30 @@ export class TriggersService {
throw new Error('Required parameter bodyTrigger was null or undefined when calling createTrigger.'); throw new Error('Required parameter bodyTrigger was null or undefined when calling createTrigger.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -132,20 +141,27 @@ export class TriggersService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/`,
bodyTrigger, bodyTrigger,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -160,10 +176,10 @@ export class TriggersService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteTrigger(triggerId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public deleteTrigger(triggerId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public deleteTrigger(triggerId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public deleteTrigger(triggerId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public deleteTrigger(triggerId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public deleteTrigger(triggerId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public deleteTrigger(triggerId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public deleteTrigger(triggerId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (triggerId === null || triggerId === undefined) { if (triggerId === null || triggerId === undefined) {
throw new Error('Required parameter triggerId was null or undefined when calling deleteTrigger.'); throw new Error('Required parameter triggerId was null or undefined when calling deleteTrigger.');
} }
@ -171,38 +187,51 @@ export class TriggersService {
throw new Error('Required parameter hoodId was null or undefined when calling deleteTrigger.'); throw new Error('Required parameter hoodId was null or undefined when calling deleteTrigger.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`, return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -217,10 +246,10 @@ export class TriggersService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getTrigger(triggerId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getTrigger(triggerId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getTrigger(triggerId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getTrigger(triggerId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getTrigger(triggerId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getTrigger(triggerId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getTrigger(triggerId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getTrigger(triggerId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (triggerId === null || triggerId === undefined) { if (triggerId === null || triggerId === undefined) {
throw new Error('Required parameter triggerId was null or undefined when calling getTrigger.'); throw new Error('Required parameter triggerId was null or undefined when calling getTrigger.');
} }
@ -228,38 +257,50 @@ export class TriggersService {
throw new Error('Required parameter hoodId was null or undefined when calling getTrigger.'); throw new Error('Required parameter hoodId was null or undefined when calling getTrigger.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -273,46 +314,58 @@ export class TriggersService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getTriggers(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getTriggers(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getTriggers(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getTriggers(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getTriggers(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getTriggers(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getTriggers(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getTriggers(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling getTriggers.'); throw new Error('Required parameter hoodId was null or undefined when calling getTriggers.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -328,10 +381,10 @@ export class TriggersService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public updateTrigger(triggerId: number, hoodId: number, bodyTrigger: BodyTrigger, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public updateTrigger(triggerId: number, hoodId: number, bodyTrigger: BodyTrigger, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public updateTrigger(triggerId: number, hoodId: number, bodyTrigger: BodyTrigger, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public updateTrigger(triggerId: number, hoodId: number, bodyTrigger: BodyTrigger, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public updateTrigger(triggerId: number, hoodId: number, bodyTrigger: BodyTrigger, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public updateTrigger(triggerId: number, hoodId: number, bodyTrigger: BodyTrigger, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public updateTrigger(triggerId: number, hoodId: number, bodyTrigger: BodyTrigger, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public updateTrigger(triggerId: number, hoodId: number, bodyTrigger: BodyTrigger, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (triggerId === null || triggerId === undefined) { if (triggerId === null || triggerId === undefined) {
throw new Error('Required parameter triggerId was null or undefined when calling updateTrigger.'); throw new Error('Required parameter triggerId was null or undefined when calling updateTrigger.');
} }
@ -342,25 +395,30 @@ export class TriggersService {
throw new Error('Required parameter bodyTrigger was null or undefined when calling updateTrigger.'); throw new Error('Required parameter bodyTrigger was null or undefined when calling updateTrigger.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
@ -370,20 +428,27 @@ export class TriggersService {
]; ];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.put<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`, return this.httpClient.put<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/triggers/${encodeURIComponent(String(triggerId))}`,
bodyTrigger, bodyTrigger,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View file

@ -13,12 +13,15 @@
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, import { HttpClient, HttpHeaders, HttpParams,
HttpResponse, HttpEvent, HttpParameterCodec } from '@angular/common/http'; HttpResponse, HttpEvent, HttpParameterCodec, HttpContext
} from '@angular/common/http';
import { CustomHttpParameterCodec } from '../encoder'; import { CustomHttpParameterCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { HTTPValidationError } from '../model/models'; // @ts-ignore
import { HTTPValidationError } from '../model/hTTPValidationError';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { Configuration } from '../configuration'; import { Configuration } from '../configuration';
@ -29,7 +32,7 @@ import { Configuration } from '../configurat
}) })
export class TwitterService { export class TwitterService {
protected basePath = 'http://localhost'; protected basePath = 'http://localhost:8000/api';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
public encoder: HttpParameterCodec; public encoder: HttpParameterCodec;
@ -92,10 +95,10 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public callbackTwitter(oauthToken: string, oauthVerifier: string, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (oauthToken === null || oauthToken === undefined) { if (oauthToken === null || oauthToken === undefined) {
throw new Error('Required parameter oauthToken was null or undefined when calling callbackTwitter.'); throw new Error('Required parameter oauthToken was null or undefined when calling callbackTwitter.');
} }
@ -106,53 +109,65 @@ export class TwitterService {
throw new Error('Required parameter hoodId was null or undefined when calling callbackTwitter.'); throw new Error('Required parameter hoodId was null or undefined when calling callbackTwitter.');
} }
let queryParameters = new HttpParams({encoder: this.encoder}); let localVarQueryParameters = new HttpParams({encoder: this.encoder});
if (oauthToken !== undefined && oauthToken !== null) { if (oauthToken !== undefined && oauthToken !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>oauthToken, 'oauth_token'); <any>oauthToken, 'oauth_token');
} }
if (oauthVerifier !== undefined && oauthVerifier !== null) { if (oauthVerifier !== undefined && oauthVerifier !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>oauthVerifier, 'oauth_verifier'); <any>oauthVerifier, 'oauth_verifier');
} }
if (hoodId !== undefined && hoodId !== null) { if (hoodId !== undefined && hoodId !== null) {
queryParameters = this.addToHttpParams(queryParameters, localVarQueryParameters = this.addToHttpParams(localVarQueryParameters,
<any>hoodId, 'hood_id'); <any>hoodId, 'hood_id');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/twitter/callback`, return this.httpClient.get<any>(`${this.configuration.basePath}/twitter/callback`,
{ {
params: queryParameters, context: localVarHttpContext,
responseType: <any>responseType, params: localVarQueryParameters,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -166,47 +181,59 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public createTwitter(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public createTwitter(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public createTwitter(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public createTwitter(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public createTwitter(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public createTwitter(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public createTwitter(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public createTwitter(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling createTwitter.'); throw new Error('Required parameter hoodId was null or undefined when calling createTwitter.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/`,
null, null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -220,10 +247,10 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public deleteTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public deleteTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public deleteTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public deleteTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public deleteTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public deleteTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public deleteTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (twitterId === null || twitterId === undefined) { if (twitterId === null || twitterId === undefined) {
throw new Error('Required parameter twitterId was null or undefined when calling deleteTwitter.'); throw new Error('Required parameter twitterId was null or undefined when calling deleteTwitter.');
} }
@ -231,38 +258,51 @@ export class TwitterService {
throw new Error('Required parameter hoodId was null or undefined when calling deleteTwitter.'); throw new Error('Required parameter hoodId was null or undefined when calling deleteTwitter.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.delete<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`, return this.httpClient.delete<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`,
null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -276,10 +316,10 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (twitterId === null || twitterId === undefined) { if (twitterId === null || twitterId === undefined) {
throw new Error('Required parameter twitterId was null or undefined when calling getTwitter.'); throw new Error('Required parameter twitterId was null or undefined when calling getTwitter.');
} }
@ -287,38 +327,50 @@ export class TwitterService {
throw new Error('Required parameter hoodId was null or undefined when calling getTwitter.'); throw new Error('Required parameter hoodId was null or undefined when calling getTwitter.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -331,46 +383,58 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getTwitters(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getTwitters(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getTwitters(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getTwitters(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getTwitters(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getTwitters(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getTwitters(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getTwitters(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling getTwitters.'); throw new Error('Required parameter hoodId was null or undefined when calling getTwitters.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -383,39 +447,51 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getTwittersPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public getTwittersPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public getTwittersPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public getTwittersPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public getTwittersPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public getTwittersPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public getTwittersPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public getTwittersPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (hoodId === null || hoodId === undefined) { if (hoodId === null || hoodId === undefined) {
throw new Error('Required parameter hoodId was null or undefined when calling getTwittersPublic.'); throw new Error('Required parameter hoodId was null or undefined when calling getTwittersPublic.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/public`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/public`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -429,10 +505,10 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public startTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public startTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public startTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public startTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public startTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public startTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public startTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public startTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (twitterId === null || twitterId === undefined) { if (twitterId === null || twitterId === undefined) {
throw new Error('Required parameter twitterId was null or undefined when calling startTwitter.'); throw new Error('Required parameter twitterId was null or undefined when calling startTwitter.');
} }
@ -440,39 +516,51 @@ export class TwitterService {
throw new Error('Required parameter hoodId was null or undefined when calling startTwitter.'); throw new Error('Required parameter hoodId was null or undefined when calling startTwitter.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/start`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/start`,
null, null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -486,10 +574,10 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public statusTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public statusTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public statusTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public statusTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public statusTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public statusTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public statusTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public statusTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (twitterId === null || twitterId === undefined) { if (twitterId === null || twitterId === undefined) {
throw new Error('Required parameter twitterId was null or undefined when calling statusTwitter.'); throw new Error('Required parameter twitterId was null or undefined when calling statusTwitter.');
} }
@ -497,38 +585,50 @@ export class TwitterService {
throw new Error('Required parameter hoodId was null or undefined when calling statusTwitter.'); throw new Error('Required parameter hoodId was null or undefined when calling statusTwitter.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.get<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/status`, return this.httpClient.get<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/status`,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }
@ -542,10 +642,10 @@ export class TwitterService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public stopTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<any>; public stopTwitter(twitterId: number, hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any>;
public stopTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpResponse<any>>; public stopTwitter(twitterId: number, hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpResponse<any>>;
public stopTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable<HttpEvent<any>>; public stopTwitter(twitterId: number, hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<HttpEvent<any>>;
public stopTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable<any> { public stopTwitter(twitterId: number, hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable<any> {
if (twitterId === null || twitterId === undefined) { if (twitterId === null || twitterId === undefined) {
throw new Error('Required parameter twitterId was null or undefined when calling stopTwitter.'); throw new Error('Required parameter twitterId was null or undefined when calling stopTwitter.');
} }
@ -553,39 +653,51 @@ export class TwitterService {
throw new Error('Required parameter hoodId was null or undefined when calling stopTwitter.'); throw new Error('Required parameter hoodId was null or undefined when calling stopTwitter.');
} }
let headers = this.defaultHeaders; let localVarHeaders = this.defaultHeaders;
let credential: string | undefined; let localVarCredential: string | undefined;
// authentication (OAuth2PasswordBearer) required // authentication (OAuth2PasswordBearer) required
credential = this.configuration.lookupCredential('OAuth2PasswordBearer'); localVarCredential = this.configuration.lookupCredential('OAuth2PasswordBearer');
if (credential) { if (localVarCredential) {
headers = headers.set('Authorization', 'Bearer ' + credential); localVarHeaders = localVarHeaders.set('Authorization', 'Bearer ' + localVarCredential);
} }
let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept;
if (httpHeaderAcceptSelected === undefined) { if (localVarHttpHeaderAcceptSelected === undefined) {
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = [ const httpHeaderAccepts: string[] = [
'application/json' 'application/json'
]; ];
httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts);
} }
if (httpHeaderAcceptSelected !== undefined) { if (localVarHttpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
}
let localVarHttpContext: HttpContext | undefined = options && options.context;
if (localVarHttpContext === undefined) {
localVarHttpContext = new HttpContext();
} }
let responseType: 'text' | 'json' = 'json'; let responseType_: 'text' | 'json' | 'blob' = 'json';
if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { if (localVarHttpHeaderAcceptSelected) {
responseType = 'text'; if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
responseType_ = 'text';
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
responseType_ = 'json';
} else {
responseType_ = 'blob';
}
} }
return this.httpClient.post<any>(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/stop`, return this.httpClient.post<any>(`${this.configuration.basePath}/hoods/${encodeURIComponent(String(hoodId))}/twitter/${encodeURIComponent(String(twitterId))}/stop`,
null, null,
{ {
responseType: <any>responseType, context: localVarHttpContext,
responseType: <any>responseType_,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: localVarHeaders,
observe: observe, observe: observe,
reportProgress: reportProgress reportProgress: reportProgress
} }

View file

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
# #
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com" # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com"
git_user_id=$1 git_user_id=$1
git_repo_id=$2 git_repo_id=$2
@ -38,14 +38,14 @@ git add .
git commit -m "$release_note" git commit -m "$release_note"
# Sets the new remote # Sets the new remote
git_remote=`git remote` git_remote=$(git remote)
if [ "$git_remote" = "" ]; then # git remote not defined if [ "$git_remote" = "" ]; then # git remote not defined
if [ "$GIT_TOKEN" = "" ]; then if [ "$GIT_TOKEN" = "" ]; then
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
else else
git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git
fi fi
fi fi
@ -55,4 +55,3 @@ git pull origin master
# Pushes (Forces) the changes in the local repository up to the remote repository # Pushes (Forces) the changes in the local repository up to the remote repository
echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
git push origin master 2>&1 | grep -v 'To https' git push origin master 2>&1 | grep -v 'To https'

View file

@ -1,6 +1,5 @@
export * from './bodyAccessToken'; export * from './bodyAccessToken';
export * from './bodyAdmin'; export * from './bodyAdmin';
export * from './bodyAdminLoginAdminLoginPost';
export * from './bodyBadWord'; export * from './bodyBadWord';
export * from './bodyHood'; export * from './bodyHood';
export * from './bodyPassword'; export * from './bodyPassword';