From fd0ff3a190625fb4be974d5eac5ef5cd92d618ef Mon Sep 17 00:00:00 2001 From: Cathy Hu Date: Thu, 3 Sep 2020 19:50:58 +0200 Subject: [PATCH] [frontend] Update openapi generated services --- .../src/app/core/api/.openapi-generator/FILES | 1 - .../src/app/core/api/api/email.service.ts | 45 +++++++++++++++++++ .../src/app/core/api/api/hoods.service.ts | 8 ---- .../src/app/core/api/api/telegram.service.ts | 45 +++++++++++++++++++ .../src/app/core/api/api/twitter.service.ts | 45 +++++++++++++++++++ 5 files changed, 135 insertions(+), 9 deletions(-) diff --git a/kibicara-frontend/src/app/core/api/.openapi-generator/FILES b/kibicara-frontend/src/app/core/api/.openapi-generator/FILES index 72cd582..c74510e 100644 --- a/kibicara-frontend/src/app/core/api/.openapi-generator/FILES +++ b/kibicara-frontend/src/app/core/api/.openapi-generator/FILES @@ -1,5 +1,4 @@ .gitignore -.openapi-generator-ignore README.md api.module.ts api/admin.service.ts diff --git a/kibicara-frontend/src/app/core/api/api/email.service.ts b/kibicara-frontend/src/app/core/api/api/email.service.ts index f630bb7..3158224 100644 --- a/kibicara-frontend/src/app/core/api/api/email.service.ts +++ b/kibicara-frontend/src/app/core/api/api/email.service.ts @@ -374,6 +374,51 @@ export class EmailService { ); } + /** + * Email Read All Public + * @param hoodId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getEmailsPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable; + public getEmailsPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; + public getEmailsPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; + public getEmailsPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable { + if (hoodId === null || hoodId === undefined) { + throw new Error('Required parameter hoodId was null or undefined when calling getEmailsPublic.'); + } + + let headers = this.defaultHeaders; + + let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (httpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + + return this.httpClient.get(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/email/public`, + { + responseType: responseType, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + /** * Subscribers Read * @param subscriberId diff --git a/kibicara-frontend/src/app/core/api/api/hoods.service.ts b/kibicara-frontend/src/app/core/api/api/hoods.service.ts index 06fea2e..009e009 100644 --- a/kibicara-frontend/src/app/core/api/api/hoods.service.ts +++ b/kibicara-frontend/src/app/core/api/api/hoods.service.ts @@ -220,14 +220,6 @@ export class HoodsService { let headers = this.defaultHeaders; - // authentication (OAuth2PasswordBearer) required - if (this.configuration.accessToken) { - const accessToken = typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; if (httpHeaderAcceptSelected === undefined) { // to determine the Accept header diff --git a/kibicara-frontend/src/app/core/api/api/telegram.service.ts b/kibicara-frontend/src/app/core/api/api/telegram.service.ts index 530cf53..50d7e45 100644 --- a/kibicara-frontend/src/app/core/api/api/telegram.service.ts +++ b/kibicara-frontend/src/app/core/api/api/telegram.service.ts @@ -319,6 +319,51 @@ export class TelegramService { ); } + /** + * Telegram Read All Public + * @param hoodId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTelegramsPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable; + public getTelegramsPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; + public getTelegramsPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; + public getTelegramsPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable { + if (hoodId === null || hoodId === undefined) { + throw new Error('Required parameter hoodId was null or undefined when calling getTelegramsPublic.'); + } + + let headers = this.defaultHeaders; + + let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (httpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + + return this.httpClient.get(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/telegram/public`, + { + responseType: responseType, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + /** * Telegram Start * @param telegramId diff --git a/kibicara-frontend/src/app/core/api/api/twitter.service.ts b/kibicara-frontend/src/app/core/api/api/twitter.service.ts index beca215..e8c09de 100644 --- a/kibicara-frontend/src/app/core/api/api/twitter.service.ts +++ b/kibicara-frontend/src/app/core/api/api/twitter.service.ts @@ -366,6 +366,51 @@ export class TwitterService { ); } + /** + * Twitter Read All Public + * @param hoodId + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public getTwittersPublic(hoodId: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable; + public getTwittersPublic(hoodId: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; + public getTwittersPublic(hoodId: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json'}): Observable>; + public getTwittersPublic(hoodId: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json'}): Observable { + if (hoodId === null || hoodId === undefined) { + throw new Error('Required parameter hoodId was null or undefined when calling getTwittersPublic.'); + } + + let headers = this.defaultHeaders; + + let httpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (httpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + httpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + + let responseType: 'text' | 'json' = 'json'; + if(httpHeaderAcceptSelected && httpHeaderAcceptSelected.startsWith('text')) { + responseType = 'text'; + } + + return this.httpClient.get(`${this.configuration.basePath}/api/hoods/${encodeURIComponent(String(hoodId))}/twitter/public`, + { + responseType: responseType, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + /** * Twitter Start * @param twitterId