From 1001e2b424f6d5ef5798de2d32836269f1664fc4 Mon Sep 17 00:00:00 2001 From: Timo Date: Thu, 24 Jun 2021 11:03:54 +0300 Subject: [PATCH] api regeneration --- README.md | 2 +- .../watermark/watermark-screen.component.ts | 3 +- .../admin/services/admin-dialog.service.ts | 6 - .../file-actions/file-actions.component.html | 2 +- .../file-actions/file-actions.component.ts | 4 +- .../pdf-viewer/pdf-viewer.component.ts | 3 +- .../dossier-listing-screen.component.html | 8 +- .../dossier/services/file-action.service.ts | 5 +- .../red-ui/src/app/state/app-state.service.ts | 2 +- apps/red-ui/src/assets/config/config.json | 4 +- apps/red-ui/src/assets/styles/red-toasts.scss | 1 + libs/red-ui-http/src/lib/api.module.ts | 64 +- .../src/lib/api/auditController.service.ts | 47 +- .../lib/api/dictionaryController.service.ts | 55 +- .../api/digitalSignatureController.service.ts | 60 +- .../dossierAttributesController.service.ts | 791 +++++++++++++++++ .../src/lib/api/dossierController.service.ts | 67 +- .../api/dossierTemplateController.service.ts | 133 ++- .../src/lib/api/downloadController.service.ts | 208 ++--- .../api/fileAttributesController.service.ts | 42 +- .../api/fileManagementController.service.ts | 21 +- .../api/generalSettingsController.service.ts | 174 ++++ .../src/lib/api/infoController.service.ts | 35 +- .../legalBasisMappingController.service.ts | 35 +- .../api/licenseReportController.service.ts | 52 +- .../api/manualRedactionController.service.ts | 795 +++++++++++------- .../lib/api/reanalysisController.service.ts | 458 +++++++--- .../lib/api/redactionLogController.service.ts | 58 +- .../api/reportTemplateController.service.ts | 54 +- .../src/lib/api/rulesController.service.ts | 43 +- .../smtpConfigurationController.service.ts | 95 ++- .../src/lib/api/statusController.service.ts | 246 +++--- .../src/lib/api/uploadController.service.ts | 35 +- .../src/lib/api/userController.service.ts | 282 +++++-- .../api/userPreferenceController.service.ts | 31 +- .../src/lib/api/versionsController.service.ts | 26 +- .../lib/api/viewedPagesController.service.ts | 30 +- .../lib/api/watermarkController.service.ts | 23 +- libs/red-ui-http/src/lib/model/dossier.ts | 1 + .../src/lib/model/dossierAttributeConfig.ts | 1 + .../src/lib/model/dossierAttributeReq.ts | 16 + .../src/lib/model/dossierAttributeRes.ts | 16 + .../src/lib/model/dossierAttributesReq.ts | 16 + .../src/lib/model/dossierAttributesRes.ts | 16 + .../src/lib/model/dossierRequest.ts | 1 + .../src/lib/model/dossierTemplateModel.ts | 1 + .../src/lib/model/downloadDetails.ts | 1 + .../src/lib/model/downloadStatus.ts | 1 + .../src/lib/model/fileAttributeConfig.ts | 1 + libs/red-ui-http/src/lib/model/fileStatus.ts | 3 +- .../lib/model/generalConfigurationModel.ts | 15 + libs/red-ui-http/src/lib/model/idRemoval.ts | 1 + .../lib/model/imageRecategorizationRequest.ts | 19 + .../src/lib/model/manualForceRedaction.ts | 1 + .../lib/model/manualImageRecategorization.ts | 31 + .../src/lib/model/manualRedactionEntry.ts | 1 + .../src/lib/model/manualRedactions.ts | 2 + libs/red-ui-http/src/lib/model/models.ts | 10 + .../src/lib/model/pageExclusionRequest.ts | 16 + libs/red-ui-http/src/lib/model/pageRange.ts | 16 + .../src/lib/model/redactionChangeLogEntry.ts | 5 +- .../src/lib/model/redactionLogEntry.ts | 6 +- libs/red-ui-http/src/lib/model/reportData.ts | 3 +- .../src/lib/model/resetPasswordRequest.ts | 16 + .../src/lib/model/watermarkModelReq.ts | 1 + .../src/lib/model/watermarkModelRes.ts | 1 + package.json | 2 +- yarn.lock | 8 +- 68 files changed, 2980 insertions(+), 1248 deletions(-) create mode 100644 libs/red-ui-http/src/lib/api/dossierAttributesController.service.ts create mode 100644 libs/red-ui-http/src/lib/api/generalSettingsController.service.ts create mode 100644 libs/red-ui-http/src/lib/model/dossierAttributeReq.ts create mode 100644 libs/red-ui-http/src/lib/model/dossierAttributeRes.ts create mode 100644 libs/red-ui-http/src/lib/model/dossierAttributesReq.ts create mode 100644 libs/red-ui-http/src/lib/model/dossierAttributesRes.ts create mode 100644 libs/red-ui-http/src/lib/model/generalConfigurationModel.ts create mode 100644 libs/red-ui-http/src/lib/model/imageRecategorizationRequest.ts create mode 100644 libs/red-ui-http/src/lib/model/manualImageRecategorization.ts create mode 100644 libs/red-ui-http/src/lib/model/pageExclusionRequest.ts create mode 100644 libs/red-ui-http/src/lib/model/pageRange.ts create mode 100644 libs/red-ui-http/src/lib/model/resetPasswordRequest.ts diff --git a/README.md b/README.md index 49fa5d365..28ce2da2a 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ To re-generate http rune swagger YOu need swagger-codegen installed `brew install swagger-codegen` ``` -BASE=https://dev-06.iqser.cloud/ +BASE=https://red-staging.iqser.cloud/ URL="$BASE"redaction-gateway-v1/v2/api-docs?group=redaction-gateway-v1 rm -Rf /tmp/swagger mkdir -p /tmp/swagger diff --git a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.ts index 24f0bbaa5..c02e4e5f1 100644 --- a/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/watermark/watermark-screen.component.ts @@ -150,7 +150,8 @@ export class WatermarkScreenComponent implements OnInit { path: this._baseHref + '/assets/wv-resources', css: this._baseHref + '/assets/pdftron/stylesheet.css', fullAPI: true, - isReadOnly: true + isReadOnly: true, + backendType: 'ems' }, this._viewer.nativeElement ).then(instance => { diff --git a/apps/red-ui/src/app/modules/admin/services/admin-dialog.service.ts b/apps/red-ui/src/app/modules/admin/services/admin-dialog.service.ts index 3bf3ebd0c..29aa5ffb1 100644 --- a/apps/red-ui/src/app/modules/admin/services/admin-dialog.service.ts +++ b/apps/red-ui/src/app/modules/admin/services/admin-dialog.service.ts @@ -81,9 +81,6 @@ export class AdminDialogService { const ref = this._dialog.open(ConfirmationDialogComponent, dialogConfig); ref.afterClosed().subscribe(async result => { if (result) { - await this._dossierTemplateControllerService - .deleteDossierTemplate(dossierTemplate.dossierTemplateId) - .toPromise(); if (cb) await cb(); } }); @@ -99,9 +96,6 @@ export class AdminDialogService { const ref = this._dialog.open(ConfirmationDialogComponent, dialogConfig); ref.afterClosed().subscribe(async result => { if (result) { - await this._dossierTemplateControllerService - .deleteDossierTemplates(dossierTemplateIds) - .toPromise(); if (cb) await cb(); } }); diff --git a/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.html b/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.html index c32244e0f..bd2ab1b20 100644 --- a/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/file-actions/file-actions.component.html @@ -114,7 +114,7 @@ { + this._fileActionService.reanalyseFile(this.fileStatus).subscribe(() => { this.reloadDossiers('reanalyse'); }); } diff --git a/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.ts b/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.ts index 6c704c95e..ab0b3c1c3 100644 --- a/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.ts @@ -140,7 +140,8 @@ export class PdfViewerComponent implements OnInit, AfterViewInit, OnChanges { { licenseKey: environment.licenseKey ? atob(environment.licenseKey) : null, path: this._convertPath('/assets/wv-resources'), - css: this._convertPath('/assets/pdftron/stylesheet.css') + css: this._convertPath('/assets/pdftron/stylesheet.css'), + backendType: 'ems' }, this.viewer.nativeElement ); diff --git a/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html b/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html index a205182b5..41009922f 100644 --- a/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html +++ b/apps/red-ui/src/app/modules/dossier/screens/dossier-listing-screen/dossier-listing-screen.component.html @@ -123,8 +123,12 @@ class="table-item" >
-
- {{ dw.dossier.dossierName }} +
+ {{ dw.dossierName }}
diff --git a/apps/red-ui/src/app/modules/dossier/services/file-action.service.ts b/apps/red-ui/src/app/modules/dossier/services/file-action.service.ts index ac1c86e57..0c09f65b4 100644 --- a/apps/red-ui/src/app/modules/dossier/services/file-action.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/file-action.service.ts @@ -18,14 +18,13 @@ export class FileActionService { private readonly _appStateService: AppStateService ) {} - reanalyseFile(fileStatusWrapper?: FileStatusWrapper, priority = -1) { + reanalyseFile(fileStatusWrapper?: FileStatusWrapper) { if (!fileStatusWrapper) { fileStatusWrapper = this._appStateService.activeFile; } return this._reanalysisControllerService.reanalyzeFile( this._appStateService.activeDossier.dossier.dossierId, - fileStatusWrapper.fileId, - priority + fileStatusWrapper.fileId ); } diff --git a/apps/red-ui/src/app/state/app-state.service.ts b/apps/red-ui/src/app/state/app-state.service.ts index 05575bbf6..793c2c303 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -430,7 +430,7 @@ export class AppStateService { async loadAllDossierTemplates() { const dossierTemplates = await this._dossierTemplateControllerService - .getAllDossierTemplates1() + .getAllDossierTemplates() .toPromise(); this._appState.dossierTemplates = dossierTemplates.map( dossierTemplate => new DossierTemplateModelWrapper(dossierTemplate) diff --git a/apps/red-ui/src/assets/config/config.json b/apps/red-ui/src/assets/config/config.json index 6cfc820ed..4b001a0b1 100644 --- a/apps/red-ui/src/assets/config/config.json +++ b/apps/red-ui/src/assets/config/config.json @@ -1,6 +1,6 @@ { - "OAUTH_URL": "https://dev-06.iqser.cloud/auth/realms/redaction", - "API_URL": "https://dev-06.iqser.cloud/redaction-gateway-v1", + "OAUTH_URL": "https://red-staging.iqser.cloud/auth/realms/redaction", + "API_URL": "https://red-staging.iqser.cloud/redaction-gateway-v1", "OAUTH_CLIENT_ID": "redaction", "BACKEND_APP_VERSION": "4.4.40", "FRONTEND_APP_VERSION": "1.1", diff --git a/apps/red-ui/src/assets/styles/red-toasts.scss b/apps/red-ui/src/assets/styles/red-toasts.scss index 12276c23c..99c230e0c 100644 --- a/apps/red-ui/src/assets/styles/red-toasts.scss +++ b/apps/red-ui/src/assets/styles/red-toasts.scss @@ -96,6 +96,7 @@ $toast-width: 400px; .toast-warning { background-color: $yellow-2; + color: $grey-1; } .toast-info { diff --git a/libs/red-ui-http/src/lib/api.module.ts b/libs/red-ui-http/src/lib/api.module.ts index d2c91f7fd..cb9572988 100644 --- a/libs/red-ui-http/src/lib/api.module.ts +++ b/libs/red-ui-http/src/lib/api.module.ts @@ -2,28 +2,32 @@ import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core import { Configuration } from './configuration'; import { HttpClient } from '@angular/common/http'; -import { DebugControllerService } from './api/debugController.service'; +import { AuditControllerService } from './api/auditController.service'; import { DictionaryControllerService } from './api/dictionaryController.service'; -import { FileManagementControllerService } from './api/fileManagementController.service'; -import { LicenseReportControllerService } from './api/licenseReportController.service'; -import { ManualRedactionControllerService } from './api/manualRedactionController.service'; +import { DigitalSignatureControllerService } from './api/digitalSignatureController.service'; +import { DossierAttributesControllerService } from './api/dossierAttributesController.service'; import { DossierControllerService } from './api/dossierController.service'; -import { ReanalysisControllerService } from './api/reanalysisController.service'; -import { RedactionLogControllerService } from './api/redactionLogController.service'; -import { RulesControllerService } from './api/rulesController.service'; -import { StatusControllerService } from './api/statusController.service'; -import { UserControllerService } from './api/userController.service'; -import { VersionsControllerService } from './api/versionsController.service'; -import { ViewedPagesControllerService } from './api/viewedPagesController.service'; -import { LegalBasisMappingControllerService } from './api/legalBasisMappingController.service'; -import { WatermarkControllerService } from './api/watermarkController.service'; import { DossierTemplateControllerService } from './api/dossierTemplateController.service'; import { DownloadControllerService } from './api/downloadController.service'; -import { DigitalSignatureControllerService } from './api/digitalSignatureController.service'; -import { AuditControllerService } from './api/auditController.service'; import { FileAttributesControllerService } from './api/fileAttributesController.service'; +import { FileManagementControllerService } from './api/fileManagementController.service'; +import { GeneralSettingsControllerService } from './api/generalSettingsController.service'; +import { InfoControllerService } from './api/infoController.service'; +import { LegalBasisMappingControllerService } from './api/legalBasisMappingController.service'; +import { LicenseReportControllerService } from './api/licenseReportController.service'; +import { ManualRedactionControllerService } from './api/manualRedactionController.service'; +import { ReanalysisControllerService } from './api/reanalysisController.service'; +import { RedactionLogControllerService } from './api/redactionLogController.service'; +import { ReportTemplateControllerService } from './api/reportTemplateController.service'; +import { RulesControllerService } from './api/rulesController.service'; import { SmtpConfigurationControllerService } from './api/smtpConfigurationController.service'; +import { StatusControllerService } from './api/statusController.service'; import { UploadControllerService } from './api/uploadController.service'; +import { UserControllerService } from './api/userController.service'; +import { UserPreferenceControllerService } from './api/userPreferenceController.service'; +import { VersionsControllerService } from './api/versionsController.service'; +import { ViewedPagesControllerService } from './api/viewedPagesController.service'; +import { WatermarkControllerService } from './api/watermarkController.service'; @NgModule({ imports: [], @@ -31,27 +35,31 @@ import { UploadControllerService } from './api/uploadController.service'; exports: [], providers: [ AuditControllerService, - DebugControllerService, DictionaryControllerService, + DigitalSignatureControllerService, + DossierAttributesControllerService, + DossierControllerService, + DossierTemplateControllerService, + DownloadControllerService, + FileAttributesControllerService, FileManagementControllerService, + GeneralSettingsControllerService, + InfoControllerService, + LegalBasisMappingControllerService, LicenseReportControllerService, ManualRedactionControllerService, - DossierControllerService, ReanalysisControllerService, RedactionLogControllerService, - DossierTemplateControllerService, + ReportTemplateControllerService, RulesControllerService, - UserControllerService, + SmtpConfigurationControllerService, StatusControllerService, + UploadControllerService, + UserControllerService, + UserPreferenceControllerService, VersionsControllerService, ViewedPagesControllerService, - LegalBasisMappingControllerService, - WatermarkControllerService, - DownloadControllerService, - DigitalSignatureControllerService, - FileAttributesControllerService, - SmtpConfigurationControllerService, - UploadControllerService + WatermarkControllerService ] }) export class ApiModule { @@ -67,9 +75,7 @@ export class ApiModule { } } - public static forRoot( - configurationFactory: () => Configuration - ): ModuleWithProviders { + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { return { ngModule: ApiModule, providers: [{ provide: Configuration, useFactory: configurationFactory }] diff --git a/libs/red-ui-http/src/lib/api/auditController.service.ts b/libs/red-ui-http/src/lib/api/auditController.service.ts index 149eca2c3..6ad508c16 100644 --- a/libs/red-ui-http/src/lib/api/auditController.service.ts +++ b/libs/red-ui-http/src/lib/api/auditController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; @@ -24,9 +24,9 @@ import { Configuration } from '../configuration'; @Injectable() export class AuditControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -42,20 +42,6 @@ export class AuditControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Get a list of available categories for the audit-log * None @@ -66,14 +52,17 @@ export class AuditControllerService { observe?: 'body', reportProgress?: boolean ): Observable>; + public getAuditCategories( observe?: 'response', reportProgress?: boolean ): Observable>>; + public getAuditCategories( observe?: 'events', reportProgress?: boolean ): Observable>>; + public getAuditCategories( observe: any = 'body', reportProgress: boolean = false @@ -97,12 +86,9 @@ export class AuditControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request>( 'get', - `${this.basePath}/audit/categories`, + `${this.basePath}/redaction-gateway-v1/audit/categories`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -124,16 +110,19 @@ export class AuditControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public searchAuditLog( body: AuditSearchRequest, observe?: 'response', reportProgress?: boolean ): Observable>; + public searchAuditLog( body: AuditSearchRequest, observe?: 'events', reportProgress?: boolean ): Observable>; + public searchAuditLog( body: AuditSearchRequest, observe: any = 'body', @@ -172,12 +161,16 @@ export class AuditControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/audit/search`, { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/audit/search`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } } diff --git a/libs/red-ui-http/src/lib/api/dictionaryController.service.ts b/libs/red-ui-http/src/lib/api/dictionaryController.service.ts index 883cdeb16..c696cd9dd 100644 --- a/libs/red-ui-http/src/lib/api/dictionaryController.service.ts +++ b/libs/red-ui-http/src/lib/api/dictionaryController.service.ts @@ -146,9 +146,9 @@ export class DictionaryControllerService { return this.httpClient.request( 'post', - `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/dictionary/${encodeURIComponent( + String(type) + )}/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, params: queryParameters, @@ -231,14 +231,18 @@ export class DictionaryControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/dictionary/type`, { - body: body, - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'post', + `${this.basePath}/dictionary/type`, + { + body: body, + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -441,9 +445,11 @@ export class DictionaryControllerService { return this.httpClient.request( 'delete', - `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(entry))}`, + `${this.basePath}/dictionary/${encodeURIComponent( + String(type) + )}/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent( + String(entry) + )}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -470,6 +476,7 @@ export class DictionaryControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deleteType( dossierTemplateId: string, type: string, @@ -477,6 +484,7 @@ export class DictionaryControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteType( dossierTemplateId: string, type: string, @@ -484,6 +492,7 @@ export class DictionaryControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteType( dossierTemplateId: string, type: string, @@ -800,7 +809,9 @@ export class DictionaryControllerService { return this.httpClient.request( 'get', - `${this.basePath}/dictionary/type/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/type/${encodeURIComponent( + String(dossierTemplateId) + )}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -868,7 +879,9 @@ export class DictionaryControllerService { return this.httpClient.request( 'get', - `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/color/${encodeURIComponent( + String(dossierTemplateId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -956,9 +969,9 @@ export class DictionaryControllerService { return this.httpClient.request( 'get', - `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/dictionary/${encodeURIComponent( + String(type) + )}/${encodeURIComponent(String(dossierTemplateId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -1045,7 +1058,9 @@ export class DictionaryControllerService { return this.httpClient.request( 'post', - `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/color/${encodeURIComponent( + String(dossierTemplateId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts b/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts index f477ea93c..9cebe01c0 100644 --- a/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts +++ b/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts @@ -24,9 +24,9 @@ import { Configuration } from '../configuration'; @Injectable() export class DigitalSignatureControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -49,14 +49,17 @@ export class DigitalSignatureControllerService { * @param reportProgress flag to report request and response progress. */ public deleteDigitalSignature(observe?: 'body', reportProgress?: boolean): Observable; + public deleteDigitalSignature( observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteDigitalSignature( observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteDigitalSignature( observe: any = 'body', reportProgress: boolean = false @@ -80,12 +83,16 @@ export class DigitalSignatureControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request('delete', `${this.basePath}/digital-signature`, { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'delete', + `${this.basePath}/redaction-gateway-v1/digital-signature`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -98,14 +105,17 @@ export class DigitalSignatureControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public getDigitalSignature( observe?: 'response', reportProgress?: boolean ): Observable>; + public getDigitalSignature( observe?: 'events', reportProgress?: boolean ): Observable>; + public getDigitalSignature( observe: any = 'body', reportProgress: boolean = false @@ -131,7 +141,7 @@ export class DigitalSignatureControllerService { return this.httpClient.request( 'get', - `${this.basePath}/digital-signature`, + `${this.basePath}/redaction-gateway-v1/digital-signature`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -153,16 +163,19 @@ export class DigitalSignatureControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public saveDigitalSignature( body: DigitalSignature, observe?: 'response', reportProgress?: boolean ): Observable>; + public saveDigitalSignature( body: DigitalSignature, observe?: 'events', reportProgress?: boolean ): Observable>; + public saveDigitalSignature( body: DigitalSignature, observe: any = 'body', @@ -203,7 +216,7 @@ export class DigitalSignatureControllerService { return this.httpClient.request( 'post', - `${this.basePath}/digital-signature`, + `${this.basePath}/redaction-gateway-v1/digital-signature`, { body: body, withCredentials: this.configuration.withCredentials, @@ -221,22 +234,25 @@ export class DigitalSignatureControllerService { * @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 updateDigitalSignature( + public saveDigitalSignature1( body: DigitalSignatureViewModelReq, observe?: 'body', reportProgress?: boolean ): Observable; - public updateDigitalSignature( + + public saveDigitalSignature1( body: DigitalSignatureViewModelReq, observe?: 'response', reportProgress?: boolean ): Observable>; - public updateDigitalSignature( + + public saveDigitalSignature1( body: DigitalSignatureViewModelReq, observe?: 'events', reportProgress?: boolean ): Observable>; - public updateDigitalSignature( + + public saveDigitalSignature1( body: DigitalSignatureViewModelReq, observe: any = 'body', reportProgress: boolean = false @@ -274,12 +290,16 @@ export class DigitalSignatureControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('put', `${this.basePath}/digital-signature`, { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'put', + `${this.basePath}/redaction-gateway-v1/digital-signature`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } } diff --git a/libs/red-ui-http/src/lib/api/dossierAttributesController.service.ts b/libs/red-ui-http/src/lib/api/dossierAttributesController.service.ts new file mode 100644 index 000000000..f19b49a71 --- /dev/null +++ b/libs/red-ui-http/src/lib/api/dossierAttributesController.service.ts @@ -0,0 +1,791 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ /* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { DossierAttributeConfig } from '../model/dossierAttributeConfig'; +import { DossierAttributeReq } from '../model/dossierAttributeReq'; +import { DossierAttributesConfig } from '../model/dossierAttributesConfig'; +import { DossierAttributesReq } from '../model/dossierAttributesReq'; +import { DossierAttributesRes } from '../model/dossierAttributesRes'; + +import { BASE_PATH } from '../variables'; +import { Configuration } from '../configuration'; + +@Injectable() +export class DossierAttributesControllerService { + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (basePath) { + this.basePath = basePath; + } + if (configuration) { + this.configuration = configuration; + this.basePath = basePath || configuration.basePath || this.basePath; + } + } + + /** + * Add or update a dossier attribute in existing dossier. + * None + * @param body dossierAttribute + * @param dossierId dossierId + * @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 addOrUpdateDossierAttributes( + body: DossierAttributeReq, + dossierId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public addOrUpdateDossierAttributes( + body: DossierAttributeReq, + dossierId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public addOrUpdateDossierAttributes( + body: DossierAttributeReq, + dossierId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public addOrUpdateDossierAttributes( + body: DossierAttributeReq, + dossierId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling addOrUpdateDossierAttributes.' + ); + } + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling addOrUpdateDossierAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/dossierAttributes/update/${encodeURIComponent( + String(dossierId) + )}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Add or update a dossier attribute in base configuration. + * None + * @param body dossierAttribute + * @param dossierTemplateId dossierTemplateId + * @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 addOrUpdateDossierAttributesConfig( + body: DossierAttributeConfig, + dossierTemplateId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public addOrUpdateDossierAttributesConfig( + body: DossierAttributeConfig, + dossierTemplateId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public addOrUpdateDossierAttributesConfig( + body: DossierAttributeConfig, + dossierTemplateId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public addOrUpdateDossierAttributesConfig( + body: DossierAttributeConfig, + dossierTemplateId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling addOrUpdateDossierAttributesConfig.' + ); + } + + if (dossierTemplateId === null || dossierTemplateId === undefined) { + throw new Error( + 'Required parameter dossierTemplateId was null or undefined when calling addOrUpdateDossierAttributesConfig.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/dossierAttributes/config/${encodeURIComponent( + String(dossierTemplateId) + )}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete a specific dossier attribute. + * None + * @param dossierAttributeId dossierAttributeId + * @param dossierId dossierId + * @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 deleteDossierAttribute( + dossierAttributeId: string, + dossierId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public deleteDossierAttribute( + dossierAttributeId: string, + dossierId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public deleteDossierAttribute( + dossierAttributeId: string, + dossierId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public deleteDossierAttribute( + dossierAttributeId: string, + dossierId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (dossierAttributeId === null || dossierAttributeId === undefined) { + throw new Error( + 'Required parameter dossierAttributeId was null or undefined when calling deleteDossierAttribute.' + ); + } + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling deleteDossierAttribute.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request( + 'delete', + `${this.basePath}/redaction-gateway-v1/dossierAttributes/set/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(dossierAttributeId))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete a specific dossier attribute. + * None + * @param dossierAttributeId dossierAttributeId + * @param dossierTemplateId dossierTemplateId + * @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 deleteDossierAttributeConfig( + dossierAttributeId: string, + dossierTemplateId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public deleteDossierAttributeConfig( + dossierAttributeId: string, + dossierTemplateId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public deleteDossierAttributeConfig( + dossierAttributeId: string, + dossierTemplateId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public deleteDossierAttributeConfig( + dossierAttributeId: string, + dossierTemplateId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (dossierAttributeId === null || dossierAttributeId === undefined) { + throw new Error( + 'Required parameter dossierAttributeId was null or undefined when calling deleteDossierAttributeConfig.' + ); + } + + if (dossierTemplateId === null || dossierTemplateId === undefined) { + throw new Error( + 'Required parameter dossierTemplateId was null or undefined when calling deleteDossierAttributeConfig.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request( + 'delete', + `${this.basePath}/redaction-gateway-v1/dossierAttributes/config/${encodeURIComponent( + String(dossierTemplateId) + )}/${encodeURIComponent(String(dossierAttributeId))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Bulk delete dossier attributes. + * None + * @param body dossierAttributeIds + * @param dossierTemplateId dossierTemplateId + * @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 deleteDossierAttributesConfig( + body: Array, + dossierTemplateId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public deleteDossierAttributesConfig( + body: Array, + dossierTemplateId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public deleteDossierAttributesConfig( + body: Array, + dossierTemplateId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public deleteDossierAttributesConfig( + body: Array, + dossierTemplateId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling deleteDossierAttributesConfig.' + ); + } + + if (dossierTemplateId === null || dossierTemplateId === undefined) { + throw new Error( + 'Required parameter dossierTemplateId was null or undefined when calling deleteDossierAttributesConfig.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${ + this.basePath + }/redaction-gateway-v1/dossierAttributes/config/delete/${encodeURIComponent( + String(dossierTemplateId) + )}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get the dossier attributes. + * None + * @param dossierId dossierId + * @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 getDossierAttributes( + dossierId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public getDossierAttributes( + dossierId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public getDossierAttributes( + dossierId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public getDossierAttributes( + dossierId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling getDossierAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request( + 'get', + `${this.basePath}/redaction-gateway-v1/dossierAttributes/${encodeURIComponent( + String(dossierId) + )}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Get the dossier attributes configuration. + * None + * @param dossierTemplateId dossierTemplateId + * @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 getDossierAttributesConfig( + dossierTemplateId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public getDossierAttributesConfig( + dossierTemplateId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public getDossierAttributesConfig( + dossierTemplateId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public getDossierAttributesConfig( + dossierTemplateId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (dossierTemplateId === null || dossierTemplateId === undefined) { + throw new Error( + 'Required parameter dossierTemplateId was null or undefined when calling getDossierAttributesConfig.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request( + 'get', + `${this.basePath}/redaction-gateway-v1/dossierAttributes/config/${encodeURIComponent( + String(dossierTemplateId) + )}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set dossier attributes to an existing dossier + * None + * @param body dossierAttributes + * @param dossierId dossierId + * @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 setDossierAttributes( + body: DossierAttributesReq, + dossierId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public setDossierAttributes( + body: DossierAttributesReq, + dossierId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public setDossierAttributes( + body: DossierAttributesReq, + dossierId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public setDossierAttributes( + body: DossierAttributesReq, + dossierId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling setDossierAttributes.' + ); + } + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling setDossierAttributes.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/dossierAttributes/set/${encodeURIComponent( + String(dossierId) + )}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Set dossier attributes base configuration. + * None + * @param body dossierAttributesConfig + * @param dossierTemplateId dossierTemplateId + * @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 setDossierAttributesConfig( + body: DossierAttributesConfig, + dossierTemplateId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public setDossierAttributesConfig( + body: DossierAttributesConfig, + dossierTemplateId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public setDossierAttributesConfig( + body: DossierAttributesConfig, + dossierTemplateId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public setDossierAttributesConfig( + body: DossierAttributesConfig, + dossierTemplateId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling setDossierAttributesConfig.' + ); + } + + if (dossierTemplateId === null || dossierTemplateId === undefined) { + throw new Error( + 'Required parameter dossierTemplateId was null or undefined when calling setDossierAttributesConfig.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'put', + `${this.basePath}/redaction-gateway-v1/dossierAttributes/config/${encodeURIComponent( + String(dossierTemplateId) + )}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } +} diff --git a/libs/red-ui-http/src/lib/api/dossierController.service.ts b/libs/red-ui-http/src/lib/api/dossierController.service.ts index 9fdb7f5ec..f713f99de 100644 --- a/libs/red-ui-http/src/lib/api/dossierController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; @@ -25,7 +25,7 @@ import { Configuration } from '../configuration'; export class DossierControllerService { public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); - protected basePath = ''; + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -104,13 +104,17 @@ export class DossierControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/dossier`, { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/dossier`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -168,12 +172,11 @@ export class DossierControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'delete', - `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, + `${this.basePath}/redaction-gateway-v1/dossier/${encodeURIComponent( + String(dossierId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -238,12 +241,11 @@ export class DossierControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, + `${this.basePath}/redaction-gateway-v1/dossier/${encodeURIComponent( + String(dossierId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -291,28 +293,15 @@ export class DossierControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - - return this.httpClient.request>('get', `${this.basePath}/dossier`, { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; + return this.httpClient.request>( + 'get', + `${this.basePath}/redaction-gateway-v1/dossier`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress } - } - return false; + ); } } diff --git a/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts b/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts index 1c7b66194..f66fb9d78 100644 --- a/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; @@ -24,7 +24,7 @@ import { Configuration } from '../configuration'; export class DossierTemplateControllerService { public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); - protected basePath = ''; + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -105,7 +105,7 @@ export class DossierTemplateControllerService { return this.httpClient.request( 'post', - `${this.basePath}/dossier-template`, + `${this.basePath}/redaction-gateway-v1/dossier-template`, { body: body, withCredentials: this.configuration.withCredentials, @@ -148,7 +148,76 @@ export class DossierTemplateControllerService { ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getAllDossierTemplates.' + 'Required parameter dossierTemplateId was null or undefined when calling deleteDossierTemplate.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request( + 'delete', + `${this.basePath}/redaction-gateway-v1/dossier-template/${encodeURIComponent( + String(dossierTemplateId) + )}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Delete multiple DossierTemplates by their IDs + * None + * @param body dossierTemplateIds + * @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 deleteDossierTemplates( + body: Array, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public deleteDossierTemplates( + body: Array, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public deleteDossierTemplates( + body: Array, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public deleteDossierTemplates( + body: Array, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling deleteDossierTemplates.' ); } @@ -172,12 +241,18 @@ export class DossierTemplateControllerService { } // to determine the Content-Type header - const consumes: string[] = []; + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } return this.httpClient.request( - 'delete', - `${this.basePath}/dossier-template/${encodeURIComponent(String(dossierTemplateId))}`, + 'post', + `${this.basePath}/redaction-gateway-v1/dossier-template/delete`, { + body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -261,22 +336,22 @@ export class DossierTemplateControllerService { * @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 getAllDossierTemplates1( + public getAllDossierTemplates( observe?: 'body', reportProgress?: boolean ): Observable>; - public getAllDossierTemplates1( + public getAllDossierTemplates( observe?: 'response', reportProgress?: boolean ): Observable>>; - public getAllDossierTemplates1( + public getAllDossierTemplates( observe?: 'events', reportProgress?: boolean ): Observable>>; - public getAllDossierTemplates1( + public getAllDossierTemplates( observe: any = 'body', reportProgress: boolean = false ): Observable { @@ -299,12 +374,9 @@ export class DossierTemplateControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request>( 'get', - `${this.basePath}/dossier-template`, + `${this.basePath}/redaction-gateway-v1/dossier-template`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -321,32 +393,32 @@ export class DossierTemplateControllerService { * @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 getAllDossierTemplates2( + public getDossierTemplate( dossierTemplateId: string, observe?: 'body', reportProgress?: boolean ): Observable; - public getAllDossierTemplates2( + public getDossierTemplate( dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public getAllDossierTemplates2( + public getDossierTemplate( dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; - public getAllDossierTemplates2( + public getDossierTemplate( dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getAllDossierTemplates2.' + 'Required parameter dossierTemplateId was null or undefined when calling getDossierTemplate.' ); } @@ -369,12 +441,11 @@ export class DossierTemplateControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/dossier-template/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/dossier-template/${encodeURIComponent( + String(dossierTemplateId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -383,18 +454,4 @@ export class DossierTemplateControllerService { } ); } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } } diff --git a/libs/red-ui-http/src/lib/api/downloadController.service.ts b/libs/red-ui-http/src/lib/api/downloadController.service.ts index b34826c8f..f9c761cba 100644 --- a/libs/red-ui-http/src/lib/api/downloadController.service.ts +++ b/libs/red-ui-http/src/lib/api/downloadController.service.ts @@ -8,26 +8,27 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; import { CustomHttpUrlEncodingCodec } from '../encoder'; import { Observable } from 'rxjs'; + import { DownloadResponse } from '../model/downloadResponse'; import { DownloadStatusResponse } from '../model/downloadStatusResponse'; import { PrepareDownloadRequest } from '../model/prepareDownloadRequest'; +import { RemoveDownloadRequest } from '../model/removeDownloadRequest'; import { BASE_PATH } from '../variables'; import { Configuration } from '../configuration'; -import { RemoveDownloadRequest } from '../model/removeDownloadRequest'; @Injectable() export class DownloadControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -43,20 +44,6 @@ export class DownloadControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Returns a downloadable byte stream of the requested file * Use the optional \"inline\" request parameter to select, if this report will be opened in the browser. @@ -71,18 +58,21 @@ export class DownloadControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public downloadFile( storageId: string, inline?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>; + public downloadFile( storageId: string, inline?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>; + public downloadFile( storageId: string, inline?: boolean, @@ -96,11 +86,12 @@ export class DownloadControllerService { } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); - queryParameters = queryParameters.set('storageId', storageId); - if (inline !== undefined && inline !== null) { queryParameters = queryParameters.set('inline', inline); } + if (storageId !== undefined && storageId !== null) { + queryParameters = queryParameters.set('storageId', storageId); + } let headers = this.defaultHeaders; @@ -121,16 +112,17 @@ export class DownloadControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - - return this.httpClient.request('get', `${this.basePath}/async/download`, { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'get', + `${this.basePath}/redaction-gateway-v1/async/download`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -143,14 +135,17 @@ export class DownloadControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public getDownloadStatus( observe?: 'response', reportProgress?: boolean ): Observable>; + public getDownloadStatus( observe?: 'events', reportProgress?: boolean ): Observable>; + public getDownloadStatus( observe: any = 'body', reportProgress: boolean = false @@ -174,12 +169,9 @@ export class DownloadControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/async/download/status`, + `${this.basePath}/redaction-gateway-v1/async/download/status`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -189,75 +181,6 @@ export class DownloadControllerService { ); } - /** - * Removes a previously created download status - * None - * @param body removeDownloadRequest - * @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 deleteDownload( - body: RemoveDownloadRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteDownload( - body: RemoveDownloadRequest, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteDownload( - body: RemoveDownloadRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteDownload( - body: RemoveDownloadRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling prepareDownload.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (RED-OAUTH) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - // to determine the Accept header - const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.request('post', `${this.basePath}/async/download/delete`, { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); - } - /** * Prepares a download for given fileIds and types * None @@ -270,16 +193,19 @@ export class DownloadControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public prepareDownload( body: PrepareDownloadRequest, observe?: 'response', reportProgress?: boolean ): Observable>; + public prepareDownload( body: PrepareDownloadRequest, observe?: 'events', reportProgress?: boolean ): Observable>; + public prepareDownload( body: PrepareDownloadRequest, observe: any = 'body', @@ -320,7 +246,83 @@ export class DownloadControllerService { return this.httpClient.request( 'post', - `${this.basePath}/async/download/prepare`, + `${this.basePath}/redaction-gateway-v1/async/download/prepare`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Removes a previously created download status + * None + * @param body removeDownloadRequest + * @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 prepareDownload1( + body: RemoveDownloadRequest, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public prepareDownload1( + body: RemoveDownloadRequest, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public prepareDownload1( + body: RemoveDownloadRequest, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public prepareDownload1( + body: RemoveDownloadRequest, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling prepareDownload1.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/async/download/delete`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts b/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts index 430a447b7..09f964e5d 100644 --- a/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts @@ -24,9 +24,9 @@ import { Configuration } from '../configuration'; @Injectable() export class FileAttributesControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -56,18 +56,21 @@ export class FileAttributesControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deleteFileAttribute( dossierTemplateId: string, fileAttributeId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteFileAttribute( dossierTemplateId: string, fileAttributeId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteFileAttribute( dossierTemplateId: string, fileAttributeId: string, @@ -107,7 +110,9 @@ export class FileAttributesControllerService { return this.httpClient.request( 'delete', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( + `${ + this.basePath + }/redaction-gateway-v1/fileAttributes/config/fileAttribute/${encodeURIComponent( String(dossierTemplateId) )}/${encodeURIComponent(String(fileAttributeId))}`, { @@ -133,18 +138,21 @@ export class FileAttributesControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deleteFileAttributes( body: Array, dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteFileAttributes( body: Array, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteFileAttributes( body: Array, dossierTemplateId: string, @@ -192,7 +200,9 @@ export class FileAttributesControllerService { return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( + `${ + this.basePath + }/redaction-gateway-v1/fileAttributes/config/fileAttribute/${encodeURIComponent( String(dossierTemplateId) )}/delete`, { @@ -217,16 +227,19 @@ export class FileAttributesControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public getFileAttributesConfiguration( dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public getFileAttributesConfiguration( dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public getFileAttributesConfiguration( dossierTemplateId: string, observe: any = 'body', @@ -259,7 +272,7 @@ export class FileAttributesControllerService { return this.httpClient.request( 'get', - `${this.basePath}/fileAttributes/config/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/fileAttributes/config/${encodeURIComponent( String(dossierTemplateId) )}`, { @@ -272,7 +285,7 @@ export class FileAttributesControllerService { } /** - * Set file attributes to a existing file + * Set file attributes to an existing file * None * @param body fileAttributes * @param dossierId dossierId @@ -287,6 +300,7 @@ export class FileAttributesControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public setFileAttributes( body: FileAttributes, dossierId: string, @@ -294,6 +308,7 @@ export class FileAttributesControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; + public setFileAttributes( body: FileAttributes, dossierId: string, @@ -301,6 +316,7 @@ export class FileAttributesControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; + public setFileAttributes( body: FileAttributes, dossierId: string, @@ -355,7 +371,7 @@ export class FileAttributesControllerService { return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/set/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/fileAttributes/set/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -382,18 +398,21 @@ export class FileAttributesControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public setFileAttributesConfig( body: FileAttributesConfig, dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public setFileAttributesConfig( body: FileAttributesConfig, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public setFileAttributesConfig( body: FileAttributesConfig, dossierTemplateId: string, @@ -441,7 +460,9 @@ export class FileAttributesControllerService { return this.httpClient.request( 'put', - `${this.basePath}/fileAttributes/config/baseConfig/${encodeURIComponent( + `${ + this.basePath + }/redaction-gateway-v1/fileAttributes/config/baseConfig/${encodeURIComponent( String(dossierTemplateId) )}`, { @@ -468,18 +489,21 @@ export class FileAttributesControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public setFileAttributesConfiguration( body: FileAttributeConfig, dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public setFileAttributesConfiguration( body: FileAttributeConfig, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public setFileAttributesConfiguration( body: FileAttributeConfig, dossierTemplateId: string, @@ -527,7 +551,9 @@ export class FileAttributesControllerService { return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( + `${ + this.basePath + }/redaction-gateway-v1/fileAttributes/config/fileAttribute/${encodeURIComponent( String(dossierTemplateId) )}`, { diff --git a/libs/red-ui-http/src/lib/api/fileManagementController.service.ts b/libs/red-ui-http/src/lib/api/fileManagementController.service.ts index 573beb758..f42f7ae70 100644 --- a/libs/red-ui-http/src/lib/api/fileManagementController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileManagementController.service.ts @@ -21,9 +21,9 @@ import { Configuration } from '../configuration'; @Injectable() export class FileManagementControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -53,18 +53,21 @@ export class FileManagementControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deleteFile( dossierId: string, fileId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteFile( dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteFile( dossierId: string, fileId: string, @@ -104,9 +107,9 @@ export class FileManagementControllerService { return this.httpClient.request( 'delete', - `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}`, + `${this.basePath}/redaction-gateway-v1/delete/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -130,18 +133,21 @@ export class FileManagementControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deleteFiles( body: Array, dossierId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteFiles( body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteFiles( body: Array, dossierId: string, @@ -189,7 +195,7 @@ export class FileManagementControllerService { return this.httpClient.request( 'post', - `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}`, + `${this.basePath}/redaction-gateway-v1/delete/${encodeURIComponent(String(dossierId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -216,6 +222,7 @@ export class FileManagementControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -223,6 +230,7 @@ export class FileManagementControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -230,6 +238,7 @@ export class FileManagementControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -275,7 +284,7 @@ export class FileManagementControllerService { return this.httpClient.request( 'get', - `${this.basePath}/download/annotated/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/download/annotated/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { diff --git a/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts b/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts new file mode 100644 index 000000000..1174f4d00 --- /dev/null +++ b/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts @@ -0,0 +1,174 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ /* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; + +import { Observable } from 'rxjs'; + +import { GeneralConfigurationModel } from '../model/generalConfigurationModel'; + +import { BASE_PATH } from '../variables'; +import { Configuration } from '../configuration'; + +@Injectable() +export class GeneralSettingsControllerService { + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; + + constructor( + protected httpClient: HttpClient, + @Optional() @Inject(BASE_PATH) basePath: string, + @Optional() configuration: Configuration + ) { + if (basePath) { + this.basePath = basePath; + } + if (configuration) { + this.configuration = configuration; + this.basePath = basePath || configuration.basePath || this.basePath; + } + } + + /** + * Returns the current general Configuration. + * + * @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 getGeneralConfigurations( + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public getGeneralConfigurations( + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public getGeneralConfigurations( + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public getGeneralConfigurations( + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request( + 'get', + `${this.basePath}/redaction-gateway-v1/configuration/general`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Write General Configurations to KeyCloak + * + * @param body generalConfigurationModel + * @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 updateGeneralConfigurations( + body: GeneralConfigurationModel, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public updateGeneralConfigurations( + body: GeneralConfigurationModel, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public updateGeneralConfigurations( + body: GeneralConfigurationModel, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public updateGeneralConfigurations( + body: GeneralConfigurationModel, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling updateGeneralConfigurations.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/configuration/general`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } +} diff --git a/libs/red-ui-http/src/lib/api/infoController.service.ts b/libs/red-ui-http/src/lib/api/infoController.service.ts index 03ceace03..48c994455 100644 --- a/libs/red-ui-http/src/lib/api/infoController.service.ts +++ b/libs/red-ui-http/src/lib/api/infoController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; @@ -24,7 +24,7 @@ import { Configuration } from '../configuration'; export class InfoControllerService { public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); - protected basePath = ''; + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -78,28 +78,15 @@ export class InfoControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - - return this.httpClient.request('get', `${this.basePath}/info`, { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; + return this.httpClient.request( + 'get', + `${this.basePath}/redaction-gateway-v1/info`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress } - } - return false; + ); } } diff --git a/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts b/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts index e35c93c58..b6489f5ca 100644 --- a/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts +++ b/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; @@ -22,9 +22,9 @@ import { Configuration } from '../configuration'; @Injectable() export class LegalBasisMappingControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -40,20 +40,6 @@ export class LegalBasisMappingControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Set the mapping between legal basis and redaction reason. * None @@ -66,16 +52,19 @@ export class LegalBasisMappingControllerService { observe?: 'body', reportProgress?: boolean ): Observable>; + public getLegalBasisMapping( dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>>; + public getLegalBasisMapping( dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>>; + public getLegalBasisMapping( dossierTemplateId: string, observe: any = 'body', @@ -106,12 +95,11 @@ export class LegalBasisMappingControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request>( 'get', - `${this.basePath}/legalBasis/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/legalBasis/${encodeURIComponent( + String(dossierTemplateId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -135,18 +123,21 @@ export class LegalBasisMappingControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public setLegalBasisMapping( body: Array, dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public setLegalBasisMapping( body: Array, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public setLegalBasisMapping( body: Array, dossierTemplateId: string, @@ -194,7 +185,9 @@ export class LegalBasisMappingControllerService { return this.httpClient.request( 'post', - `${this.basePath}/legalBasis/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/legalBasis/${encodeURIComponent( + String(dossierTemplateId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/libs/red-ui-http/src/lib/api/licenseReportController.service.ts b/libs/red-ui-http/src/lib/api/licenseReportController.service.ts index 440132697..4d0c30dda 100644 --- a/libs/red-ui-http/src/lib/api/licenseReportController.service.ts +++ b/libs/red-ui-http/src/lib/api/licenseReportController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; @@ -26,7 +26,7 @@ import { Configuration } from '../configuration'; export class LicenseReportControllerService { public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); - protected basePath = ''; + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -46,39 +46,39 @@ export class LicenseReportControllerService { * Creates and serves license report. * None * @param body reportRequest - * @param offset offset * @param limit limit + * @param offset offset * @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 licenseReport( body: LicenseReportRequest, - offset?: number, limit?: number, + offset?: number, observe?: 'body', reportProgress?: boolean ): Observable; public licenseReport( body: LicenseReportRequest, - offset?: number, limit?: number, + offset?: number, observe?: 'response', reportProgress?: boolean ): Observable>; public licenseReport( body: LicenseReportRequest, - offset?: number, limit?: number, + offset?: number, observe?: 'events', reportProgress?: boolean ): Observable>; public licenseReport( body: LicenseReportRequest, - offset?: number, limit?: number, + offset?: number, observe: any = 'body', reportProgress: boolean = false ): Observable { @@ -89,12 +89,12 @@ export class LicenseReportControllerService { } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); - if (offset !== undefined && offset !== null) { - queryParameters = queryParameters.set('offset', offset); - } if (limit !== undefined && limit !== null) { queryParameters = queryParameters.set('limit', limit); } + if (offset !== undefined && offset !== null) { + queryParameters = queryParameters.set('offset', offset); + } let headers = this.defaultHeaders; @@ -123,27 +123,17 @@ export class LicenseReportControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/report/license`, { - body: body, - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); - } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/report/license`, + { + body: body, + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress } - } - return false; + ); } } diff --git a/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts b/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts index d96dfbeac..e444c0a5a 100644 --- a/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts +++ b/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; @@ -19,19 +19,20 @@ import { AddCommentRequest } from '../model/addCommentRequest'; import { AddRedactionRequest } from '../model/addRedactionRequest'; import { ApproveRequest } from '../model/approveRequest'; import { CommentResponse } from '../model/commentResponse'; +import { ForceRedactionRequest } from '../model/forceRedactionRequest'; +import { ImageRecategorizationRequest } from '../model/imageRecategorizationRequest'; import { ManualAddResponse } from '../model/manualAddResponse'; import { ManualRedactions } from '../model/manualRedactions'; import { RemoveRedactionRequest } from '../model/removeRedactionRequest'; import { BASE_PATH } from '../variables'; import { Configuration } from '../configuration'; -import { ForceRedactionRequest } from '..'; @Injectable() export class ManualRedactionControllerService { public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); - protected basePath = ''; + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -51,44 +52,44 @@ export class ManualRedactionControllerService { * Adds a comment to a redaction/redaction request * None * @param body addCommentRequest + * @param annotationId annotationId * @param dossierId dossierId * @param fileId fileId - * @param annotationId annotationId * @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 addComment( body: AddCommentRequest, + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'body', reportProgress?: boolean ): Observable; public addComment( body: AddCommentRequest, + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'response', reportProgress?: boolean ): Observable>; public addComment( body: AddCommentRequest, + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'events', reportProgress?: boolean ): Observable>; public addComment( body: AddCommentRequest, + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { @@ -98,6 +99,12 @@ export class ManualRedactionControllerService { ); } + if (annotationId === null || annotationId === undefined) { + throw new Error( + 'Required parameter annotationId was null or undefined when calling addComment.' + ); + } + if (dossierId === null || dossierId === undefined) { throw new Error( 'Required parameter dossierId was null or undefined when calling addComment.' @@ -110,12 +117,6 @@ export class ManualRedactionControllerService { ); } - if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling addComment.' - ); - } - let headers = this.defaultHeaders; // authentication (RED-OAUTH) required @@ -145,7 +146,7 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/comment/add/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/manualRedaction/comment/add/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, { @@ -158,200 +159,6 @@ export class ManualRedactionControllerService { ); } - /** - * Forces a redaction - * None - * @param body forceRedactionRequest - * @param dossierId dossierId - * @param fileId fileId - * @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 forceRedaction( - body: ForceRedactionRequest, - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public forceRedaction( - body: ForceRedactionRequest, - dossierId: string, - fileId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public forceRedaction( - body: ForceRedactionRequest, - dossierId: string, - fileId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public forceRedaction( - body: ForceRedactionRequest, - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling forceRedaction.' - ); - } - - if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling forceRedaction.' - ); - } - - if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling forceRedaction.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (RED-OAUTH) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.request( - 'post', - `${this.basePath}/manualRedaction/redaction/force/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - - /** - * Adds a request to force a redaction. - * None - * @param body forceRedactionRequest - * @param dossierId dossierId - * @param fileId fileId - * @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 requestForceRedaction( - body: ForceRedactionRequest, - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public requestForceRedaction( - body: ForceRedactionRequest, - dossierId: string, - fileId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public requestForceRedaction( - body: ForceRedactionRequest, - dossierId: string, - fileId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public requestForceRedaction( - body: ForceRedactionRequest, - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestForceRedaction.' - ); - } - - if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestForceRedaction.' - ); - } - - if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestForceRedaction.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (RED-OAUTH) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = ['application/json']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected !== undefined) { - headers = headers.set('Content-Type', httpContentTypeSelected); - } - - return this.httpClient.request( - 'post', - `${this.basePath}/manualRedaction/request/force/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - /** * Adds a manual redaction * None @@ -439,7 +246,9 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent( + `${ + this.basePath + }/redaction-gateway-v1/manualRedaction/redaction/add/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -456,44 +265,44 @@ export class ManualRedactionControllerService { * Approves a redaction request/ remove redaction request * None * @param body approveRequest + * @param annotationId annotationId * @param dossierId dossierId * @param fileId fileId - * @param annotationId annotationId * @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 approveRequest( body: ApproveRequest, + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'body', reportProgress?: boolean ): Observable; public approveRequest( body: ApproveRequest, + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'response', reportProgress?: boolean ): Observable>; public approveRequest( body: ApproveRequest, + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'events', reportProgress?: boolean ): Observable>; public approveRequest( body: ApproveRequest, + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { @@ -503,6 +312,12 @@ export class ManualRedactionControllerService { ); } + if (annotationId === null || annotationId === undefined) { + throw new Error( + 'Required parameter annotationId was null or undefined when calling approveRequest.' + ); + } + if (dossierId === null || dossierId === undefined) { throw new Error( 'Required parameter dossierId was null or undefined when calling approveRequest.' @@ -515,12 +330,6 @@ export class ManualRedactionControllerService { ); } - if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling approveRequest.' - ); - } - let headers = this.defaultHeaders; // authentication (RED-OAUTH) required @@ -550,7 +359,7 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/approve/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/manualRedaction/approve/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, { @@ -566,43 +375,49 @@ export class ManualRedactionControllerService { /** * Declines a redaction request/ remove redaction request * None + * @param annotationId annotationId * @param dossierId dossierId * @param fileId fileId - * @param annotationId annotationId * @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 declineRequest( + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'body', reportProgress?: boolean ): Observable; public declineRequest( + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'response', reportProgress?: boolean ): Observable>; public declineRequest( + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'events', reportProgress?: boolean ): Observable>; public declineRequest( + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (annotationId === null || annotationId === undefined) { + throw new Error( + 'Required parameter annotationId was null or undefined when calling declineRequest.' + ); + } + if (dossierId === null || dossierId === undefined) { throw new Error( 'Required parameter dossierId was null or undefined when calling declineRequest.' @@ -615,12 +430,6 @@ export class ManualRedactionControllerService { ); } - if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling declineRequest.' - ); - } - let headers = this.defaultHeaders; // authentication (RED-OAUTH) required @@ -640,12 +449,9 @@ export class ManualRedactionControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/decline/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/manualRedaction/decline/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, { @@ -657,6 +463,108 @@ export class ManualRedactionControllerService { ); } + /** + * Forces a redaction + * None + * @param body forceRedactionRequest + * @param dossierId dossierId + * @param fileId fileId + * @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 forceRedaction( + body: ForceRedactionRequest, + dossierId: string, + fileId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public forceRedaction( + body: ForceRedactionRequest, + dossierId: string, + fileId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public forceRedaction( + body: ForceRedactionRequest, + dossierId: string, + fileId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public forceRedaction( + body: ForceRedactionRequest, + dossierId: string, + fileId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling forceRedaction.' + ); + } + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling forceRedaction.' + ); + } + + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling forceRedaction.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${ + this.basePath + }/redaction-gateway-v1/manualRedaction/redaction/force/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + /** * Returns the manual redactions * None @@ -723,12 +631,9 @@ export class ManualRedactionControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/manualRedaction/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/manualRedaction/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -740,6 +645,108 @@ export class ManualRedactionControllerService { ); } + /** + * Recategorizes an image + * None + * @param body imageRecategorizationRequest + * @param dossierId dossierId + * @param fileId fileId + * @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 recategorizeImage( + body: ImageRecategorizationRequest, + dossierId: string, + fileId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public recategorizeImage( + body: ImageRecategorizationRequest, + dossierId: string, + fileId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public recategorizeImage( + body: ImageRecategorizationRequest, + dossierId: string, + fileId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public recategorizeImage( + body: ImageRecategorizationRequest, + dossierId: string, + fileId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling recategorizeImage.' + ); + } + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling recategorizeImage.' + ); + } + + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling recategorizeImage.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${ + this.basePath + }/redaction-gateway-v1/manualRedaction/redaction/recategorize/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + /** * Removes a redaction * None @@ -827,7 +834,9 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent( + `${ + this.basePath + }/redaction-gateway-v1/manualRedaction/redaction/remove/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -927,7 +936,211 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/request/add/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/manualRedaction/request/add/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a request to force a redaction. + * None + * @param body forceRedactionRequest + * @param dossierId dossierId + * @param fileId fileId + * @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 requestForceRedaction( + body: ForceRedactionRequest, + dossierId: string, + fileId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public requestForceRedaction( + body: ForceRedactionRequest, + dossierId: string, + fileId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public requestForceRedaction( + body: ForceRedactionRequest, + dossierId: string, + fileId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public requestForceRedaction( + body: ForceRedactionRequest, + dossierId: string, + fileId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling requestForceRedaction.' + ); + } + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling requestForceRedaction.' + ); + } + + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling requestForceRedaction.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${ + this.basePath + }/redaction-gateway-v1/manualRedaction/request/force/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Adds a request to recategorize a image. + * None + * @param body imageRecategorizationRequest + * @param dossierId dossierId + * @param fileId fileId + * @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 requestImageRecategorization( + body: ImageRecategorizationRequest, + dossierId: string, + fileId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public requestImageRecategorization( + body: ImageRecategorizationRequest, + dossierId: string, + fileId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public requestImageRecategorization( + body: ImageRecategorizationRequest, + dossierId: string, + fileId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public requestImageRecategorization( + body: ImageRecategorizationRequest, + dossierId: string, + fileId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling requestImageRecategorization.' + ); + } + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling requestImageRecategorization.' + ); + } + + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling requestImageRecategorization.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${ + this.basePath + }/redaction-gateway-v1/manualRedaction/request/recategorize/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -1027,7 +1240,9 @@ export class ManualRedactionControllerService { return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/request/remove/${encodeURIComponent( + `${ + this.basePath + }/redaction-gateway-v1/manualRedaction/request/remove/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -1043,43 +1258,49 @@ export class ManualRedactionControllerService { /** * Undo a manual request or redaction * Can only be done be the user who added the request/redaction. + * @param annotationId annotationId * @param dossierId dossierId * @param fileId fileId - * @param annotationId annotationId * @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 undo( + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'body', reportProgress?: boolean ): Observable; public undo( + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'response', reportProgress?: boolean ): Observable>; public undo( + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe?: 'events', reportProgress?: boolean ): Observable>; public undo( + annotationId: string, dossierId: string, fileId: string, - annotationId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { + if (annotationId === null || annotationId === undefined) { + throw new Error( + 'Required parameter annotationId was null or undefined when calling undo.' + ); + } + if (dossierId === null || dossierId === undefined) { throw new Error( 'Required parameter dossierId was null or undefined when calling undo.' @@ -1090,12 +1311,6 @@ export class ManualRedactionControllerService { throw new Error('Required parameter fileId was null or undefined when calling undo.'); } - if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling undo.' - ); - } - let headers = this.defaultHeaders; // authentication (RED-OAUTH) required @@ -1115,12 +1330,9 @@ export class ManualRedactionControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'delete', - `${this.basePath}/manualRedaction/undo/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/manualRedaction/undo/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, { @@ -1135,60 +1347,48 @@ export class ManualRedactionControllerService { /** * Undo a comment * Can only be done be the user who added the comment. - * @param dossierId dossierId - * @param fileId fileId * @param annotationId annotationId * @param commentId commentId + * @param dossierId dossierId + * @param fileId fileId * @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 undoComment( - dossierId: string, - fileId: string, annotationId: string, commentId: string, + dossierId: string, + fileId: string, observe?: 'body', reportProgress?: boolean ): Observable; public undoComment( - dossierId: string, - fileId: string, annotationId: string, commentId: string, + dossierId: string, + fileId: string, observe?: 'response', reportProgress?: boolean ): Observable>; public undoComment( - dossierId: string, - fileId: string, annotationId: string, commentId: string, + dossierId: string, + fileId: string, observe?: 'events', reportProgress?: boolean ): Observable>; public undoComment( - dossierId: string, - fileId: string, annotationId: string, commentId: string, + dossierId: string, + fileId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling undoComment.' - ); - } - - if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling undoComment.' - ); - } - if (annotationId === null || annotationId === undefined) { throw new Error( 'Required parameter annotationId was null or undefined when calling undoComment.' @@ -1201,6 +1401,18 @@ export class ManualRedactionControllerService { ); } + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling undoComment.' + ); + } + + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling undoComment.' + ); + } + let headers = this.defaultHeaders; // authentication (RED-OAUTH) required @@ -1220,12 +1432,11 @@ export class ManualRedactionControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'delete', - `${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent( + `${ + this.basePath + }/redaction-gateway-v1/manualRedaction/comment/undo/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent( String(annotationId) @@ -1238,18 +1449,4 @@ export class ManualRedactionControllerService { } ); } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } } diff --git a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts index a67cb0780..119b491b2 100644 --- a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts +++ b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; @@ -16,14 +16,16 @@ import { CustomHttpUrlEncodingCodec } from '../encoder'; import { Observable } from 'rxjs'; +import { PageExclusionRequest } from '../model/pageExclusionRequest'; + import { BASE_PATH } from '../variables'; import { Configuration } from '../configuration'; @Injectable() export class ReanalysisControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -40,17 +42,272 @@ export class ReanalysisControllerService { } /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise + * Exclude pages from analysis for a file + * None + * @param body pageExclusionRequest + * @param dossierId dossierId + * @param fileId fileId + * @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. */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } + public excludePages( + body: PageExclusionRequest, + dossierId: string, + fileId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public excludePages( + body: PageExclusionRequest, + dossierId: string, + fileId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public excludePages( + body: PageExclusionRequest, + dossierId: string, + fileId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public excludePages( + body: PageExclusionRequest, + dossierId: string, + fileId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling excludePages.' + ); } - return false; + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling excludePages.' + ); + } + + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling excludePages.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/exclude-pages/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Include pages from analysis for a file + * None + * @param body pageInclusionRequest + * @param dossierId dossierId + * @param fileId fileId + * @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 includePages( + body: PageExclusionRequest, + dossierId: string, + fileId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public includePages( + body: PageExclusionRequest, + dossierId: string, + fileId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public includePages( + body: PageExclusionRequest, + dossierId: string, + fileId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public includePages( + body: PageExclusionRequest, + dossierId: string, + fileId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling includePages.' + ); + } + + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling includePages.' + ); + } + + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling includePages.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + // to determine the Content-Type header + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } + + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/include-pages/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + + /** + * Ocr and reanalyze a dossier + * None + * @param dossierId dossierId + * @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 ocrDossier( + dossierId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable; + + public ocrDossier( + dossierId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>; + + public ocrDossier( + dossierId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>; + + public ocrDossier( + dossierId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling ocrDossier.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = []; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/ocr/reanalyze/${encodeURIComponent( + String(dossierId) + )}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -67,18 +324,21 @@ export class ReanalysisControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public ocrFile( dossierId: string, fileId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public ocrFile( dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public ocrFile( dossierId: string, fileId: string, @@ -116,12 +376,9 @@ export class ReanalysisControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/ocr/reanalyze/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -147,18 +404,21 @@ export class ReanalysisControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public ocrFiles( body: Array, dossierId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public ocrFiles( body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public ocrFiles( body: Array, dossierId: string, @@ -204,7 +464,9 @@ export class ReanalysisControllerService { return this.httpClient.request( 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, + `${this.basePath}/redaction-gateway-v1/ocr/reanalyze/${encodeURIComponent( + String(dossierId) + )}/bulk`, { body: body, withCredentials: this.configuration.withCredentials, @@ -216,38 +478,51 @@ export class ReanalysisControllerService { } /** - * Ocr and reanalyze a dossier + * Reanalyze all files of the dossier. * None * @param dossierId dossierId + * @param force force * @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 ocrDossier( + public reanalyzeDossier( dossierId: string, + force?: boolean, observe?: 'body', reportProgress?: boolean ): Observable; - public ocrDossier( + + public reanalyzeDossier( dossierId: string, + force?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>; - public ocrDossier( + + public reanalyzeDossier( dossierId: string, + force?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>; - public ocrDossier( + + public reanalyzeDossier( dossierId: string, + force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { throw new Error( - 'Required parameter dossierId was null or undefined when calling ocrDossier.' + 'Required parameter dossierId was null or undefined when calling reanalyzeDossier.' ); } + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); + } + let headers = this.defaultHeaders; // authentication (RED-OAUTH) required @@ -267,13 +542,13 @@ export class ReanalysisControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}`, + `${this.basePath}/redaction-gateway-v1/reanalyze/${encodeURIComponent( + String(dossierId) + )}`, { + params: queryParameters, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -287,14 +562,14 @@ export class ReanalysisControllerService { * None * @param dossierId dossierId * @param fileId fileId - * @param priority priority + * @param force force * @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 reanalyzeFile( dossierId: string, fileId: string, - priority?: number, + force?: boolean, observe?: 'body', reportProgress?: boolean ): Observable; @@ -302,7 +577,7 @@ export class ReanalysisControllerService { public reanalyzeFile( dossierId: string, fileId: string, - priority?: number, + force?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>; @@ -310,7 +585,7 @@ export class ReanalysisControllerService { public reanalyzeFile( dossierId: string, fileId: string, - priority?: number, + force?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>; @@ -318,7 +593,7 @@ export class ReanalysisControllerService { public reanalyzeFile( dossierId: string, fileId: string, - priority?: number, + force?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { @@ -335,8 +610,8 @@ export class ReanalysisControllerService { } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); - if (priority !== undefined && priority !== null) { - queryParameters = queryParameters.set('priority', priority); + if (force !== undefined && force !== null) { + queryParameters = queryParameters.set('force', force); } let headers = this.defaultHeaders; @@ -358,12 +633,9 @@ export class ReanalysisControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'post', - `${this.basePath}/reanalyze/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/reanalyze/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -392,6 +664,7 @@ export class ReanalysisControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public reanalyzeFilesForDossier( body: Array, dossierId: string, @@ -399,6 +672,7 @@ export class ReanalysisControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; + public reanalyzeFilesForDossier( body: Array, dossierId: string, @@ -406,6 +680,7 @@ export class ReanalysisControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; + public reanalyzeFilesForDossier( body: Array, dossierId: string, @@ -459,7 +734,9 @@ export class ReanalysisControllerService { return this.httpClient.request( 'post', - `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, + `${this.basePath}/redaction-gateway-v1/reanalyze/${encodeURIComponent( + String(dossierId) + )}/bulk`, { body: body, params: queryParameters, @@ -471,133 +748,58 @@ export class ReanalysisControllerService { ); } - /** - * Reanalyze all files of the dossier. - * None - * @param dossierId dossierId - * @param force force - * @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 reanalyzeDossier( - dossierId: string, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public reanalyzeDossier( - dossierId: string, - force?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public reanalyzeDossier( - dossierId: string, - force?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public reanalyzeDossier( - dossierId: string, - force?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling reanalyzeDossier.' - ); - } - - let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); - if (force !== undefined && force !== null) { - queryParameters = queryParameters.set('force', force); - } - - let headers = this.defaultHeaders; - - // authentication (RED-OAUTH) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - // to determine the Accept header - const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = []; - - return this.httpClient.request( - 'post', - `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - /** * Exclude or re-include a file to analysis * None - * @param fileId fileId * @param dossierId dossierId + * @param fileId fileId * @param excluded excluded * @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 toggleAnalysis( - fileId: string, dossierId: string, + fileId: string, excluded?: boolean, observe?: 'body', reportProgress?: boolean ): Observable; + public toggleAnalysis( - fileId: string, dossierId: string, + fileId: string, excluded?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>; + public toggleAnalysis( - fileId: string, dossierId: string, + fileId: string, excluded?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>; + public toggleAnalysis( - fileId: string, dossierId: string, + fileId: string, excluded?: boolean, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling toggleAnalysis.' - ); - } - if (dossierId === null || dossierId === undefined) { throw new Error( 'Required parameter dossierId was null or undefined when calling toggleAnalysis.' ); } + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling toggleAnalysis.' + ); + } + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (excluded !== undefined && excluded !== null) { queryParameters = queryParameters.set('excluded', excluded); @@ -624,7 +826,7 @@ export class ReanalysisControllerService { return this.httpClient.request( 'post', - `${this.basePath}/toggle-analysis/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/toggle-analysis/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { diff --git a/libs/red-ui-http/src/lib/api/redactionLogController.service.ts b/libs/red-ui-http/src/lib/api/redactionLogController.service.ts index 4d2fd116a..b75c1c328 100644 --- a/libs/red-ui-http/src/lib/api/redactionLogController.service.ts +++ b/libs/red-ui-http/src/lib/api/redactionLogController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; @@ -24,9 +24,9 @@ import { Configuration } from '../configuration'; @Injectable() export class RedactionLogControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -42,20 +42,6 @@ export class RedactionLogControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Gets the redaction changelog for a fileId * None @@ -64,25 +50,28 @@ export class RedactionLogControllerService { * @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 getRedactionChangeLog( + public getRedactionLog( dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean ): Observable; - public getRedactionChangeLog( + + public getRedactionLog( dossierId: string, fileId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public getRedactionChangeLog( + + public getRedactionLog( dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean ): Observable>; - public getRedactionChangeLog( + + public getRedactionLog( dossierId: string, fileId: string, observe: any = 'body', @@ -119,12 +108,9 @@ export class RedactionLogControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/redactionChnageLog/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/redactionChnageLog/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -144,25 +130,28 @@ export class RedactionLogControllerService { * @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 getRedactionLog( + public getRedactionChangeLog( dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean ): Observable; - public getRedactionLog( + + public getRedactionChangeLog( dossierId: string, fileId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public getRedactionLog( + + public getRedactionChangeLog( dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean ): Observable>; - public getRedactionLog( + + public getRedactionChangeLog( dossierId: string, fileId: string, observe: any = 'body', @@ -199,12 +188,9 @@ export class RedactionLogControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/redactionLog/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/redactionLog/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -230,18 +216,21 @@ export class RedactionLogControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public getSectionGrid( dossierId: string, fileId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public getSectionGrid( dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public getSectionGrid( dossierId: string, fileId: string, @@ -279,12 +268,9 @@ export class RedactionLogControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/sectionGrid/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/sectionGrid/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { diff --git a/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts b/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts index 24a2fd3f0..8e2a9fb50 100644 --- a/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts +++ b/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts @@ -23,9 +23,9 @@ import { Configuration } from '../configuration'; @Injectable() export class ReportTemplateControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -41,20 +41,6 @@ export class ReportTemplateControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Delete template file for redaction-report * None @@ -69,18 +55,21 @@ export class ReportTemplateControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deleteTemplate( dossierTemplateId: string, templateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteTemplate( dossierTemplateId: string, templateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteTemplate( dossierTemplateId: string, templateId: string, @@ -120,7 +109,7 @@ export class ReportTemplateControllerService { return this.httpClient.request( 'delete', - `${this.basePath}/templateUpload/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/templateUpload/${encodeURIComponent( String(dossierTemplateId) )}/${encodeURIComponent(String(templateId))}`, { @@ -146,18 +135,21 @@ export class ReportTemplateControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public downloadReportTemplate( dossierTemplateId: string, templateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public downloadReportTemplate( dossierTemplateId: string, templateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public downloadReportTemplate( dossierTemplateId: string, templateId: string, @@ -197,7 +189,7 @@ export class ReportTemplateControllerService { return this.httpClient.request( 'get', - `${this.basePath}/templateUpload/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/templateUpload/${encodeURIComponent( String(dossierTemplateId) )}/${encodeURIComponent(String(templateId))}`, { @@ -221,16 +213,19 @@ export class ReportTemplateControllerService { observe?: 'body', reportProgress?: boolean ): Observable>; + public getAvailableReportTemplates( dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>>; + public getAvailableReportTemplates( dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>>; + public getAvailableReportTemplates( dossierTemplateId: string, observe: any = 'body', @@ -263,7 +258,9 @@ export class ReportTemplateControllerService { return this.httpClient.request>( 'get', - `${this.basePath}/templateUpload/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/templateUpload/${encodeURIComponent( + String(dossierTemplateId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -287,18 +284,21 @@ export class ReportTemplateControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public uploadTemplateForm( dossierTemplateId: string, file?: Blob, observe?: 'response', reportProgress?: boolean ): Observable>; + public uploadTemplateForm( dossierTemplateId: string, file?: Blob, observe?: 'events', reportProgress?: boolean ): Observable>; + public uploadTemplateForm( dossierTemplateId: string, file?: Blob, @@ -353,7 +353,9 @@ export class ReportTemplateControllerService { return this.httpClient.request( 'post', - `${this.basePath}/templateUpload/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/templateUpload/${encodeURIComponent( + String(dossierTemplateId) + )}`, { body: convertFormParamsToString ? formParams.toString() : formParams, withCredentials: this.configuration.withCredentials, @@ -363,4 +365,18 @@ export class ReportTemplateControllerService { } ); } + + /** + * @param consumes string[] mime-types + * @return true: consumes contains 'multipart/form-data', false: otherwise + */ + private canConsumeForm(consumes: string[]): boolean { + const form = 'multipart/form-data'; + for (const consume of consumes) { + if (form === consume) { + return true; + } + } + return false; + } } diff --git a/libs/red-ui-http/src/lib/api/rulesController.service.ts b/libs/red-ui-http/src/lib/api/rulesController.service.ts index eabc5a2ab..43574437f 100644 --- a/libs/red-ui-http/src/lib/api/rulesController.service.ts +++ b/libs/red-ui-http/src/lib/api/rulesController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; @@ -25,7 +25,7 @@ import { Configuration } from '../configuration'; export class RulesControllerService { public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); - protected basePath = ''; + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -96,12 +96,11 @@ export class RulesControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/rules/${encodeURIComponent( + String(dossierTemplateId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -166,12 +165,11 @@ export class RulesControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/download`, + `${this.basePath}/redaction-gateway-v1/rules/${encodeURIComponent( + String(dossierTemplateId) + )}/download`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -185,7 +183,6 @@ export class RulesControllerService { * Takes object containing string or rules as argument, which will be used by the redaction service. * * @param body rules - * @param dossierTemplateId dossierTemplateId * @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. */ @@ -199,7 +196,7 @@ export class RulesControllerService { public uploadRules( body: Rules, - bserve?: 'events', + observe?: 'events', reportProgress?: boolean ): Observable>; @@ -241,7 +238,7 @@ export class RulesControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/rules`, { + return this.httpClient.request('post', `${this.basePath}/redaction-gateway-v1/rules`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, @@ -253,44 +250,38 @@ export class RulesControllerService { /** * Takes object containing string or rules as argument, which will be used by the redaction service. * - * @param file * @param dossierTemplateId dossierTemplateId + * @param file * @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 uploadRulesFileForm( - file: Blob, dossierTemplateId: string, + file?: Blob, observe?: 'body', reportProgress?: boolean ): Observable; public uploadRulesFileForm( - file: Blob, dossierTemplateId: string, + file?: Blob, observe?: 'response', reportProgress?: boolean ): Observable>; public uploadRulesFileForm( - file: Blob, dossierTemplateId: string, + file?: Blob, observe?: 'events', reportProgress?: boolean ): Observable>; public uploadRulesFileForm( - file: Blob, dossierTemplateId: string, + file?: Blob, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling uploadRulesFile.' - ); - } - if (dossierTemplateId === null || dossierTemplateId === undefined) { throw new Error( 'Required parameter dossierTemplateId was null or undefined when calling uploadRulesFile.' @@ -339,7 +330,9 @@ export class RulesControllerService { return this.httpClient.request( 'post', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/upload`, + `${this.basePath}/redaction-gateway-v1/rules/${encodeURIComponent( + String(dossierTemplateId) + )}/upload`, { body: convertFormParamsToString ? formParams.toString() : formParams, withCredentials: this.configuration.withCredentials, diff --git a/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts b/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts index 7ef49271f..6356ab0c5 100644 --- a/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts +++ b/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts @@ -8,24 +8,23 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; -import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http'; -import { CustomHttpUrlEncodingCodec } from '../encoder'; +import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; import { Observable } from 'rxjs'; import { SMTPConfigurationModel } from '../model/sMTPConfigurationModel'; -import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { BASE_PATH } from '../variables'; import { Configuration } from '../configuration'; @Injectable() export class SmtpConfigurationControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -41,20 +40,6 @@ export class SmtpConfigurationControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Clear SMTP Settings to KeyCloak * @@ -62,14 +47,17 @@ export class SmtpConfigurationControllerService { * @param reportProgress flag to report request and response progress. */ public clearSMTPConfiguration(observe?: 'body', reportProgress?: boolean): Observable; + public clearSMTPConfiguration( observe?: 'response', reportProgress?: boolean ): Observable>; + public clearSMTPConfiguration( observe?: 'events', reportProgress?: boolean ): Observable>; + public clearSMTPConfiguration( observe: any = 'body', reportProgress: boolean = false @@ -93,15 +81,16 @@ export class SmtpConfigurationControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - - return this.httpClient.request('delete', `${this.basePath}/configuration/smtp`, { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'delete', + `${this.basePath}/redaction-gateway-v1/configuration/smtp`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -114,14 +103,17 @@ export class SmtpConfigurationControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public getCurrentSMTPConfiguration( observe?: 'response', reportProgress?: boolean ): Observable>; + public getCurrentSMTPConfiguration( observe?: 'events', reportProgress?: boolean ): Observable>; + public getCurrentSMTPConfiguration( observe: any = 'body', reportProgress: boolean = false @@ -145,12 +137,9 @@ export class SmtpConfigurationControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/configuration/smtp`, + `${this.basePath}/redaction-gateway-v1/configuration/smtp`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -172,16 +161,19 @@ export class SmtpConfigurationControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public testSMTPConfiguration( body: SMTPConfigurationModel, observe?: 'response', reportProgress?: boolean ): Observable>; + public testSMTPConfiguration( body: SMTPConfigurationModel, observe?: 'events', reportProgress?: boolean ): Observable>; + public testSMTPConfiguration( body: SMTPConfigurationModel, observe: any = 'body', @@ -220,13 +212,17 @@ export class SmtpConfigurationControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/configuration/smtp/test`, { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/configuration/smtp/test`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -241,16 +237,19 @@ export class SmtpConfigurationControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public updateSMTPConfiguration( body: SMTPConfigurationModel, observe?: 'response', reportProgress?: boolean ): Observable>; + public updateSMTPConfiguration( body: SMTPConfigurationModel, observe?: 'events', reportProgress?: boolean ): Observable>; + public updateSMTPConfiguration( body: SMTPConfigurationModel, observe: any = 'body', @@ -289,12 +288,16 @@ export class SmtpConfigurationControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/configuration/smtp`, { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/configuration/smtp`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } } diff --git a/libs/red-ui-http/src/lib/api/statusController.service.ts b/libs/red-ui-http/src/lib/api/statusController.service.ts index 5e2d4f1ba..69876309a 100644 --- a/libs/red-ui-http/src/lib/api/statusController.service.ts +++ b/libs/red-ui-http/src/lib/api/statusController.service.ts @@ -8,10 +8,11 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; +import { CustomHttpUrlEncodingCodec } from '../encoder'; import { Observable } from 'rxjs'; @@ -19,13 +20,12 @@ import { FileStatus } from '../model/fileStatus'; import { BASE_PATH } from '../variables'; import { Configuration } from '../configuration'; -import { CustomHttpUrlEncodingCodec } from '../encoder'; @Injectable() export class StatusControllerService { public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); - protected basePath = ''; + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -41,6 +41,73 @@ export class StatusControllerService { } } + /** + * Gets the status for all files in a dossier. + * None + * @param dossierId The id of the dossier you want the status for. + * @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 getDossierStatus( + dossierId: string, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + + public getDossierStatus( + dossierId: string, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + + public getDossierStatus( + dossierId: string, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + + public getDossierStatus( + dossierId: string, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + if (dossierId === null || dossierId === undefined) { + throw new Error( + 'Required parameter dossierId was null or undefined when calling getDossierStatus.' + ); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request>( + 'get', + `${this.basePath}/redaction-gateway-v1/status/${encodeURIComponent(String(dossierId))}`, + { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } + /** * Gets the status for a file. * None @@ -107,14 +174,11 @@ export class StatusControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}`, + `${this.basePath}/redaction-gateway-v1/status/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -189,7 +253,7 @@ export class StatusControllerService { return this.httpClient.request<{ [key: string]: Array }>( 'post', - `${this.basePath}/status`, + `${this.basePath}/redaction-gateway-v1/status`, { body: body, withCredentials: this.configuration.withCredentials, @@ -200,76 +264,6 @@ export class StatusControllerService { ); } - /** - * Gets the status for all files in a dossier. - * None - * @param dossierId The id of the dossier you want the status for. - * @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 getDossierStatus( - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable>; - - public getDossierStatus( - dossierId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - - public getDossierStatus( - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - - public getDossierStatus( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { - if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getDossierStatus.' - ); - } - - let headers = this.defaultHeaders; - - // authentication (RED-OAUTH) required - if (this.configuration.accessToken) { - const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; - headers = headers.set('Authorization', 'Bearer ' + accessToken); - } - - // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected !== undefined) { - headers = headers.set('Accept', httpHeaderAcceptSelected); - } - - // to determine the Content-Type header - const consumes: string[] = []; - - return this.httpClient.request>( - 'get', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); - } - /** * Assigns a reviewer for a file. * None @@ -347,14 +341,11 @@ export class StatusControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'post', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}/${encodeURIComponent(String(reviewerId))}`, + `${this.basePath}/redaction-gateway-v1/status/${encodeURIComponent( + String(dossierId) + )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(reviewerId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -451,7 +442,7 @@ export class StatusControllerService { return this.httpClient.request( 'post', - `${this.basePath}/status/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/status/${encodeURIComponent( String(dossierId) )}/bulk/${encodeURIComponent(String(reviewerId))}`, { @@ -530,12 +521,9 @@ export class StatusControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'post', - `${this.basePath}/status/approved/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/status/approved/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -623,7 +611,9 @@ export class StatusControllerService { return this.httpClient.request( 'post', - `${this.basePath}/status/approved/${encodeURIComponent(String(dossierId))}/bulk`, + `${this.basePath}/redaction-gateway-v1/status/approved/${encodeURIComponent( + String(dossierId) + )}/bulk`, { body: body, withCredentials: this.configuration.withCredentials, @@ -637,52 +627,55 @@ export class StatusControllerService { /** * Sets the status UNDER_APPROVAL for a file. * None - * @param fileId fileId * @param dossierId dossierId + * @param fileId fileId * @param approverId approverId * @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 setStatusUnderApproval( - fileId: string, dossierId: string, + fileId: string, approverId?: string, observe?: 'body', reportProgress?: boolean ): Observable; + public setStatusUnderApproval( - fileId: string, dossierId: string, + fileId: string, approverId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public setStatusUnderApproval( - fileId: string, dossierId: string, + fileId: string, approverId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public setStatusUnderApproval( - fileId: string, dossierId: string, + fileId: string, approverId?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setStatusUnderApproval.' - ); - } - if (dossierId === null || dossierId === undefined) { throw new Error( 'Required parameter dossierId was null or undefined when calling setStatusUnderApproval.' ); } + if (fileId === null || fileId === undefined) { + throw new Error( + 'Required parameter fileId was null or undefined when calling setStatusUnderApproval.' + ); + } + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); if (approverId !== undefined && approverId !== null) { queryParameters = queryParameters.set('approverId', approverId); @@ -707,12 +700,9 @@ export class StatusControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'post', - `${this.basePath}/status/underapproval/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/status/underapproval/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -736,29 +726,32 @@ export class StatusControllerService { */ public setStatusUnderApprovalForList( body: Array, + approverId: string, dossierId: string, - approverId?: string, observe?: 'body', reportProgress?: boolean ): Observable; + public setStatusUnderApprovalForList( body: Array, + approverId: string, dossierId: string, - approverId?: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public setStatusUnderApprovalForList( body: Array, + approverId: string, dossierId: string, - approverId?: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public setStatusUnderApprovalForList( body: Array, + approverId: string, dossierId: string, - approverId?: string, observe: any = 'body', reportProgress: boolean = false ): Observable { @@ -781,7 +774,9 @@ export class StatusControllerService { } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); - queryParameters = queryParameters.set('approverId', approverId); + if (approverId !== undefined && approverId !== null) { + queryParameters = queryParameters.set('approverId', approverId); + } let headers = this.defaultHeaders; @@ -812,7 +807,9 @@ export class StatusControllerService { return this.httpClient.request( 'post', - `${this.basePath}/status/underapproval/${encodeURIComponent(String(dossierId))}/bulk`, + `${this.basePath}/redaction-gateway-v1/status/underapproval/${encodeURIComponent( + String(dossierId) + )}/bulk`, { body: body, params: queryParameters, @@ -890,12 +887,9 @@ export class StatusControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'post', - `${this.basePath}/status/underreview/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/status/underreview/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -983,7 +977,9 @@ export class StatusControllerService { return this.httpClient.request( 'post', - `${this.basePath}/status/underreview/${encodeURIComponent(String(dossierId))}/bulk`, + `${this.basePath}/redaction-gateway-v1/status/underreview/${encodeURIComponent( + String(dossierId) + )}/bulk`, { body: body, withCredentials: this.configuration.withCredentials, @@ -993,18 +989,4 @@ export class StatusControllerService { } ); } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } } diff --git a/libs/red-ui-http/src/lib/api/uploadController.service.ts b/libs/red-ui-http/src/lib/api/uploadController.service.ts index 51a96bc64..d657d892f 100644 --- a/libs/red-ui-http/src/lib/api/uploadController.service.ts +++ b/libs/red-ui-http/src/lib/api/uploadController.service.ts @@ -23,9 +23,9 @@ import { Configuration } from '../configuration'; @Injectable() export class UploadControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -41,20 +41,6 @@ export class UploadControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Receives an uploaded file and returns its fileId. * None @@ -69,18 +55,21 @@ export class UploadControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public uploadFileForm( dossierId: string, file?: Blob, observe?: 'response', reportProgress?: boolean ): Observable>; + public uploadFileForm( dossierId: string, file?: Blob, observe?: 'events', reportProgress?: boolean ): Observable>; + public uploadFileForm( dossierId: string, file?: Blob, @@ -135,7 +124,7 @@ export class UploadControllerService { return this.httpClient.request( 'post', - `${this.basePath}/upload/${encodeURIComponent(String(dossierId))}`, + `${this.basePath}/redaction-gateway-v1/upload/${encodeURIComponent(String(dossierId))}`, { body: convertFormParamsToString ? formParams.toString() : formParams, withCredentials: this.configuration.withCredentials, @@ -145,4 +134,18 @@ export class UploadControllerService { } ); } + + /** + * @param consumes string[] mime-types + * @return true: consumes contains 'multipart/form-data', false: otherwise + */ + private canConsumeForm(consumes: string[]): boolean { + const form = 'multipart/form-data'; + for (const consume of consumes) { + if (form === consume) { + return true; + } + } + return false; + } } diff --git a/libs/red-ui-http/src/lib/api/userController.service.ts b/libs/red-ui-http/src/lib/api/userController.service.ts index 19b2e5adf..450a2d21f 100644 --- a/libs/red-ui-http/src/lib/api/userController.service.ts +++ b/libs/red-ui-http/src/lib/api/userController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http'; @@ -17,18 +17,19 @@ import { CustomHttpUrlEncodingCodec } from '../encoder'; import { Observable } from 'rxjs'; import { CreateUserRequest } from '../model/createUserRequest'; +import { ResetPasswordRequest } from '../model/resetPasswordRequest'; +import { UpdateMyProfileRequest } from '../model/updateMyProfileRequest'; import { UpdateProfileRequest } from '../model/updateProfileRequest'; import { User } from '../model/user'; import { BASE_PATH } from '../variables'; import { Configuration } from '../configuration'; -import { UpdateMyProfileRequest } from '../model/updateMyProfileRequest'; @Injectable() export class UserControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -44,20 +45,6 @@ export class UserControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Add a role to users * None @@ -72,18 +59,21 @@ export class UserControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public addRoleToUsers( body: Array, userId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public addRoleToUsers( body: Array, userId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public addRoleToUsers( body: Array, userId: string, @@ -131,7 +121,7 @@ export class UserControllerService { return this.httpClient.request( 'post', - `${this.basePath}/user/${encodeURIComponent(String(userId))}/role`, + `${this.basePath}/redaction-gateway-v1/user/${encodeURIComponent(String(userId))}/role`, { body: body, withCredentials: this.configuration.withCredentials, @@ -154,16 +144,19 @@ export class UserControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public createUser( body: CreateUserRequest, observe?: 'response', reportProgress?: boolean ): Observable>; + public createUser( body: CreateUserRequest, observe?: 'events', reportProgress?: boolean ): Observable>; + public createUser( body: CreateUserRequest, observe: any = 'body', @@ -202,7 +195,7 @@ export class UserControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/user`, { + return this.httpClient.request('post', `${this.basePath}/redaction-gateway-v1/user`, { body: body, withCredentials: this.configuration.withCredentials, headers: headers, @@ -219,16 +212,19 @@ export class UserControllerService { * @param reportProgress flag to report request and response progress. */ public deleteUser(userId: string, observe?: 'body', reportProgress?: boolean): Observable; + public deleteUser( userId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteUser( userId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteUser( userId: string, observe: any = 'body', @@ -259,12 +255,9 @@ export class UserControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'delete', - `${this.basePath}/user/${encodeURIComponent(String(userId))}`, + `${this.basePath}/redaction-gateway-v1/user/${encodeURIComponent(String(userId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -286,16 +279,19 @@ export class UserControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deleteUsers( userId: Array, observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteUsers( userId: Array, observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteUsers( userId: Array, observe: any = 'body', @@ -333,16 +329,84 @@ export class UserControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; + return this.httpClient.request( + 'delete', + `${this.basePath}/redaction-gateway-v1/user`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); + } - return this.httpClient.request('delete', `${this.basePath}/user`, { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + /** + * Gets all the users in realm with information of roles. + * None + * @param refreshCache refreshCache + * @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 getAllUsers( + refreshCache?: boolean, + observe?: 'body', + reportProgress?: boolean + ): Observable>; + + public getAllUsers( + refreshCache?: boolean, + observe?: 'response', + reportProgress?: boolean + ): Observable>>; + + public getAllUsers( + refreshCache?: boolean, + observe?: 'events', + reportProgress?: boolean + ): Observable>>; + + public getAllUsers( + refreshCache?: boolean, + observe: any = 'body', + reportProgress: boolean = false + ): Observable { + let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); + if (refreshCache !== undefined && refreshCache !== null) { + queryParameters = queryParameters.set('refreshCache', refreshCache); + } + + let headers = this.defaultHeaders; + + // authentication (RED-OAUTH) required + if (this.configuration.accessToken) { + const accessToken = + typeof this.configuration.accessToken === 'function' + ? this.configuration.accessToken() + : this.configuration.accessToken; + headers = headers.set('Authorization', 'Bearer ' + accessToken); + } + + // to determine the Accept header + const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAcceptSelected: string | undefined = + this.configuration.selectHeaderAccept(httpHeaderAccepts); + if (httpHeaderAcceptSelected !== undefined) { + headers = headers.set('Accept', httpHeaderAcceptSelected); + } + + return this.httpClient.request>( + 'get', + `${this.basePath}/redaction-gateway-v1/user`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -357,16 +421,19 @@ export class UserControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public getUserById( userId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public getUserById( userId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public getUserById( userId: string, observe: any = 'body', @@ -397,12 +464,9 @@ export class UserControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/user/${encodeURIComponent(String(userId))}`, + `${this.basePath}/redaction-gateway-v1/user/${encodeURIComponent(String(userId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -424,16 +488,19 @@ export class UserControllerService { observe?: 'body', reportProgress?: boolean ): Observable>; + public getUsers( refreshCache?: boolean, observe?: 'response', reportProgress?: boolean ): Observable>>; + public getUsers( refreshCache?: boolean, observe?: 'events', reportProgress?: boolean ): Observable>>; + public getUsers( refreshCache?: boolean, observe: any = 'body', @@ -463,48 +530,64 @@ export class UserControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - - return this.httpClient.request>('get', `${this.basePath}/user/red`, { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request>( + 'get', + `${this.basePath}/redaction-gateway-v1/user/red`, + { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** - * Gets all the users in realm with information of roles. + * Reset a user's password * None - * @param refreshCache refreshCache + * @param body resetPasswordRequest + * @param userId userId * @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 getAllUsers( - refreshCache?: boolean, + public resetPassword( + body: ResetPasswordRequest, + userId: string, observe?: 'body', reportProgress?: boolean - ): Observable>; - public getAllUsers( - refreshCache?: boolean, + ): Observable; + + public resetPassword( + body: ResetPasswordRequest, + userId: string, observe?: 'response', reportProgress?: boolean - ): Observable>>; - public getAllUsers( - refreshCache?: boolean, + ): Observable>; + + public resetPassword( + body: ResetPasswordRequest, + userId: string, observe?: 'events', reportProgress?: boolean - ): Observable>>; - public getAllUsers( - refreshCache?: boolean, + ): Observable>; + + public resetPassword( + body: ResetPasswordRequest, + userId: string, observe: any = 'body', reportProgress: boolean = false ): Observable { - let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); - if (refreshCache !== undefined && refreshCache !== null) { - queryParameters = queryParameters.set('refreshCache', refreshCache); + if (body === null || body === undefined) { + throw new Error( + 'Required parameter body was null or undefined when calling resetPassword.' + ); + } + + if (userId === null || userId === undefined) { + throw new Error( + 'Required parameter userId was null or undefined when calling resetPassword.' + ); } let headers = this.defaultHeaders; @@ -519,7 +602,7 @@ export class UserControllerService { } // to determine the Accept header - const httpHeaderAccepts: string[] = ['application/json']; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { @@ -527,15 +610,26 @@ export class UserControllerService { } // to determine the Content-Type header - const consumes: string[] = []; + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: string | undefined = + this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } - return this.httpClient.request>('get', `${this.basePath}/user`, { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/user/${encodeURIComponent( + String(userId) + )}/reset-password`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** @@ -545,22 +639,25 @@ export class UserControllerService { * @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 updateMyProfile( + public updateProfile( body: UpdateMyProfileRequest, observe?: 'body', reportProgress?: boolean ): Observable; - public updateMyProfile( + + public updateProfile( body: UpdateMyProfileRequest, observe?: 'response', reportProgress?: boolean ): Observable>; - public updateMyProfile( + + public updateProfile( body: UpdateMyProfileRequest, observe?: 'events', reportProgress?: boolean ): Observable>; - public updateMyProfile( + + public updateProfile( body: UpdateMyProfileRequest, observe: any = 'body', reportProgress: boolean = false @@ -598,42 +695,49 @@ export class UserControllerService { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request('post', `${this.basePath}/user/my-profile`, { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - }); + return this.httpClient.request( + 'post', + `${this.basePath}/redaction-gateway-v1/user/my-profile`, + { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + } + ); } /** - * Update a users profile. Invoked by admin. + * Update your own user-profile. * None * @param body updateProfileRequest * @param userId userId * @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 updateProfile( + public updateProfile1( body: UpdateProfileRequest, userId: string, observe?: 'body', reportProgress?: boolean ): Observable; - public updateProfile( + + public updateProfile1( body: UpdateProfileRequest, userId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public updateProfile( + + public updateProfile1( body: UpdateProfileRequest, userId: string, observe?: 'events', reportProgress?: boolean ): Observable>; - public updateProfile( + + public updateProfile1( body: UpdateProfileRequest, userId: string, observe: any = 'body', @@ -680,7 +784,9 @@ export class UserControllerService { return this.httpClient.request( 'post', - `${this.basePath}/user/profile/${encodeURIComponent(String(userId))}`, + `${this.basePath}/redaction-gateway-v1/user/profile/${encodeURIComponent( + String(userId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts b/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts index 2c818f3f8..e77846281 100644 --- a/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts +++ b/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts @@ -20,9 +20,9 @@ import { Configuration } from '../configuration'; @Injectable() export class UserPreferenceControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -38,20 +38,6 @@ export class UserPreferenceControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Delete User Preferences by key. * None @@ -64,16 +50,19 @@ export class UserPreferenceControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deletePreferences( key: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public deletePreferences( key: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public deletePreferences( key: string, observe: any = 'body', @@ -106,7 +95,7 @@ export class UserPreferenceControllerService { return this.httpClient.request( 'delete', - `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, + `${this.basePath}/redaction-gateway-v1/attributes/${encodeURIComponent(String(key))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -126,14 +115,17 @@ export class UserPreferenceControllerService { observe?: 'body', reportProgress?: boolean ): Observable<{ [key: string]: Array }>; + public getAllUserAttributes( observe?: 'response', reportProgress?: boolean ): Observable }>>; + public getAllUserAttributes( observe?: 'events', reportProgress?: boolean ): Observable }>>; + public getAllUserAttributes( observe: any = 'body', reportProgress: boolean = false @@ -159,7 +151,7 @@ export class UserPreferenceControllerService { return this.httpClient.request<{ [key: string]: Array }>( 'get', - `${this.basePath}/attributes`, + `${this.basePath}/redaction-gateway-v1/attributes`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -183,18 +175,21 @@ export class UserPreferenceControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public savePreferences( body: Array, key: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public savePreferences( body: Array, key: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public savePreferences( body: Array, key: string, @@ -242,7 +237,7 @@ export class UserPreferenceControllerService { return this.httpClient.request( 'put', - `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, + `${this.basePath}/redaction-gateway-v1/attributes/${encodeURIComponent(String(key))}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/libs/red-ui-http/src/lib/api/versionsController.service.ts b/libs/red-ui-http/src/lib/api/versionsController.service.ts index 82cd84800..48f7c34d9 100644 --- a/libs/red-ui-http/src/lib/api/versionsController.service.ts +++ b/libs/red-ui-http/src/lib/api/versionsController.service.ts @@ -23,9 +23,9 @@ import { Configuration } from '../configuration'; @Injectable() export class VersionsControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -41,20 +41,6 @@ export class VersionsControllerService { } } - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } - /** * Retrieves current version for dossier dictionary. * None @@ -69,18 +55,21 @@ export class VersionsControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public getDossierDictionaryVersion( dossierId: string, dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public getDossierDictionaryVersion( dossierId: string, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public getDossierDictionaryVersion( dossierId: string, dossierTemplateId: string, @@ -120,7 +109,7 @@ export class VersionsControllerService { return this.httpClient.request( 'get', - `${this.basePath}/version/dossier/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/version/dossier/${encodeURIComponent( String(dossierTemplateId) )}/${encodeURIComponent(String(dossierId))}`, { @@ -144,16 +133,19 @@ export class VersionsControllerService { observe?: 'body', reportProgress?: boolean ): Observable<{ [key: string]: VersionsResponse }>; + public getVersions( dossierTemplateId: Array, observe?: 'response', reportProgress?: boolean ): Observable>; + public getVersions( dossierTemplateId: Array, observe?: 'events', reportProgress?: boolean ): Observable>; + public getVersions( dossierTemplateId: Array, observe: any = 'body', @@ -193,7 +185,7 @@ export class VersionsControllerService { return this.httpClient.request<{ [key: string]: VersionsResponse }>( 'get', - `${this.basePath}/version`, + `${this.basePath}/redaction-gateway-v1/version`, { params: queryParameters, withCredentials: this.configuration.withCredentials, diff --git a/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts b/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts index 237077423..f1b29aff9 100644 --- a/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts +++ b/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts @@ -8,7 +8,7 @@ * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. - */ /* eslint-disable @typescript-eslint/no-unused-vars, @typescript-eslint/member-ordering */ + */ /* tslint:disable:no-unused-variable member-ordering */ import { Inject, Injectable, Optional } from '@angular/core'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; @@ -25,7 +25,7 @@ import { Configuration } from '../configuration'; export class ViewedPagesControllerService { public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); - protected basePath = ''; + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -126,7 +126,7 @@ export class ViewedPagesControllerService { return this.httpClient.request( 'post', - `${this.basePath}/viewedPages/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/viewedPages/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -205,12 +205,9 @@ export class ViewedPagesControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'get', - `${this.basePath}/viewedPages/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/viewedPages/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}`, { @@ -299,12 +296,9 @@ export class ViewedPagesControllerService { headers = headers.set('Accept', httpHeaderAcceptSelected); } - // to determine the Content-Type header - const consumes: string[] = []; - return this.httpClient.request( 'delete', - `${this.basePath}/viewedPages/${encodeURIComponent( + `${this.basePath}/redaction-gateway-v1/viewedPages/${encodeURIComponent( String(dossierId) )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(page))}`, { @@ -315,18 +309,4 @@ export class ViewedPagesControllerService { } ); } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } } diff --git a/libs/red-ui-http/src/lib/api/watermarkController.service.ts b/libs/red-ui-http/src/lib/api/watermarkController.service.ts index f2be33e20..f88037719 100644 --- a/libs/red-ui-http/src/lib/api/watermarkController.service.ts +++ b/libs/red-ui-http/src/lib/api/watermarkController.service.ts @@ -23,9 +23,9 @@ import { Configuration } from '../configuration'; @Injectable() export class WatermarkControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = '//red-staging.iqser.cloud/'; constructor( protected httpClient: HttpClient, @@ -53,16 +53,19 @@ export class WatermarkControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public deleteWatermark( dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public deleteWatermark( dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public deleteWatermark( dossierTemplateId: string, observe: any = 'body', @@ -95,7 +98,9 @@ export class WatermarkControllerService { return this.httpClient.request( 'delete', - `${this.basePath}/watermark/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/watermark/${encodeURIComponent( + String(dossierTemplateId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -117,16 +122,19 @@ export class WatermarkControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public getWatermark( dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public getWatermark( dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public getWatermark( dossierTemplateId: string, observe: any = 'body', @@ -159,7 +167,9 @@ export class WatermarkControllerService { return this.httpClient.request( 'get', - `${this.basePath}/watermark/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/watermark/${encodeURIComponent( + String(dossierTemplateId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -183,18 +193,21 @@ export class WatermarkControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public saveWatermark( body: WatermarkModelReq, dossierTemplateId: string, observe?: 'response', reportProgress?: boolean ): Observable>; + public saveWatermark( body: WatermarkModelReq, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean ): Observable>; + public saveWatermark( body: WatermarkModelReq, dossierTemplateId: string, @@ -242,7 +255,9 @@ export class WatermarkControllerService { return this.httpClient.request( 'post', - `${this.basePath}/watermark/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/redaction-gateway-v1/watermark/${encodeURIComponent( + String(dossierTemplateId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, diff --git a/libs/red-ui-http/src/lib/model/dossier.ts b/libs/red-ui-http/src/lib/model/dossier.ts index 87570231c..f950fa242 100644 --- a/libs/red-ui-http/src/lib/model/dossier.ts +++ b/libs/red-ui-http/src/lib/model/dossier.ts @@ -26,6 +26,7 @@ export interface Dossier { status?: Dossier.StatusEnum; watermarkEnabled?: boolean; } + export namespace Dossier { export type DownloadFileTypesEnum = | 'ANNOTATED' diff --git a/libs/red-ui-http/src/lib/model/dossierAttributeConfig.ts b/libs/red-ui-http/src/lib/model/dossierAttributeConfig.ts index b3f972abf..db5a38b26 100644 --- a/libs/red-ui-http/src/lib/model/dossierAttributeConfig.ts +++ b/libs/red-ui-http/src/lib/model/dossierAttributeConfig.ts @@ -17,6 +17,7 @@ export interface DossierAttributeConfig { placeholder?: string; type?: DossierAttributeConfig.TypeEnum; } + export namespace DossierAttributeConfig { export type TypeEnum = 'DATE' | 'IMAGE' | 'NUMBER' | 'TEXT'; export const TypeEnum = { diff --git a/libs/red-ui-http/src/lib/model/dossierAttributeReq.ts b/libs/red-ui-http/src/lib/model/dossierAttributeReq.ts new file mode 100644 index 000000000..aad5d3da5 --- /dev/null +++ b/libs/red-ui-http/src/lib/model/dossierAttributeReq.ts @@ -0,0 +1,16 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface DossierAttributeReq { + dossierAttributeId?: string; + value?: string; +} diff --git a/libs/red-ui-http/src/lib/model/dossierAttributeRes.ts b/libs/red-ui-http/src/lib/model/dossierAttributeRes.ts new file mode 100644 index 000000000..fa161d361 --- /dev/null +++ b/libs/red-ui-http/src/lib/model/dossierAttributeRes.ts @@ -0,0 +1,16 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface DossierAttributeRes { + dossierAttributeId?: string; + value?: string; +} diff --git a/libs/red-ui-http/src/lib/model/dossierAttributesReq.ts b/libs/red-ui-http/src/lib/model/dossierAttributesReq.ts new file mode 100644 index 000000000..b67f7556f --- /dev/null +++ b/libs/red-ui-http/src/lib/model/dossierAttributesReq.ts @@ -0,0 +1,16 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DossierAttributeReq } from './dossierAttributeReq'; + +export interface DossierAttributesReq { + dossierAttributeList?: Array; +} diff --git a/libs/red-ui-http/src/lib/model/dossierAttributesRes.ts b/libs/red-ui-http/src/lib/model/dossierAttributesRes.ts new file mode 100644 index 000000000..e2056b351 --- /dev/null +++ b/libs/red-ui-http/src/lib/model/dossierAttributesRes.ts @@ -0,0 +1,16 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { DossierAttributeRes } from './dossierAttributeRes'; + +export interface DossierAttributesRes { + dossierAttributeList?: Array; +} diff --git a/libs/red-ui-http/src/lib/model/dossierRequest.ts b/libs/red-ui-http/src/lib/model/dossierRequest.ts index 3dd24cc31..831598926 100644 --- a/libs/red-ui-http/src/lib/model/dossierRequest.ts +++ b/libs/red-ui-http/src/lib/model/dossierRequest.ts @@ -63,6 +63,7 @@ export interface DossierRequest { */ watermarkEnabled?: boolean; } + export namespace DossierRequest { export type DownloadFileTypesEnum = | 'ANNOTATED' diff --git a/libs/red-ui-http/src/lib/model/dossierTemplateModel.ts b/libs/red-ui-http/src/lib/model/dossierTemplateModel.ts index b9aab2be8..2d671b22b 100644 --- a/libs/red-ui-http/src/lib/model/dossierTemplateModel.ts +++ b/libs/red-ui-http/src/lib/model/dossierTemplateModel.ts @@ -56,6 +56,7 @@ export interface DossierTemplateModel { */ validTo?: string; } + export namespace DossierTemplateModel { export type DownloadFileTypesEnum = | 'ANNOTATED' diff --git a/libs/red-ui-http/src/lib/model/downloadDetails.ts b/libs/red-ui-http/src/lib/model/downloadDetails.ts index 6a21fd2a1..410063eda 100644 --- a/libs/red-ui-http/src/lib/model/downloadDetails.ts +++ b/libs/red-ui-http/src/lib/model/downloadDetails.ts @@ -16,6 +16,7 @@ export interface DownloadDetails { reportTemplateIds?: Array; reportTypes?: Array; } + export namespace DownloadDetails { export type DownloadFileTypesEnum = | 'ANNOTATED' diff --git a/libs/red-ui-http/src/lib/model/downloadStatus.ts b/libs/red-ui-http/src/lib/model/downloadStatus.ts index 842f46d48..fa4802390 100644 --- a/libs/red-ui-http/src/lib/model/downloadStatus.ts +++ b/libs/red-ui-http/src/lib/model/downloadStatus.ts @@ -23,6 +23,7 @@ export interface DownloadStatus { storageId?: string; userId?: string; } + export namespace DownloadStatus { export type StatusEnum = 'FAILED' | 'GENERATING' | 'QUEUED' | 'READY'; export const StatusEnum = { diff --git a/libs/red-ui-http/src/lib/model/fileAttributeConfig.ts b/libs/red-ui-http/src/lib/model/fileAttributeConfig.ts index 0d616d95a..85de9294f 100644 --- a/libs/red-ui-http/src/lib/model/fileAttributeConfig.ts +++ b/libs/red-ui-http/src/lib/model/fileAttributeConfig.ts @@ -19,6 +19,7 @@ export interface FileAttributeConfig { primaryAttribute?: boolean; type?: FileAttributeConfig.TypeEnum; } + export namespace FileAttributeConfig { export type TypeEnum = 'DATE' | 'NUMBER' | 'TEXT'; export const TypeEnum = { diff --git a/libs/red-ui-http/src/lib/model/fileStatus.ts b/libs/red-ui-http/src/lib/model/fileStatus.ts index 2076c7c7e..be3c909a6 100644 --- a/libs/red-ui-http/src/lib/model/fileStatus.ts +++ b/libs/red-ui-http/src/lib/model/fileStatus.ts @@ -137,6 +137,7 @@ export interface FileStatus { */ uploader?: string; } + export namespace FileStatus { export type StatusEnum = | 'APPROVED' @@ -155,7 +156,7 @@ export namespace FileStatus { ERROR: 'ERROR' as StatusEnum, EXCLUDED: 'EXCLUDED' as StatusEnum, FULLREPROCESS: 'FULLREPROCESS' as StatusEnum, - OCR_PROCESSING: 'OCR_PROCESSING' as StatusEnum, + OCRPROCESSING: 'OCR_PROCESSING' as StatusEnum, PROCESSING: 'PROCESSING' as StatusEnum, REPROCESS: 'REPROCESS' as StatusEnum, UNASSIGNED: 'UNASSIGNED' as StatusEnum, diff --git a/libs/red-ui-http/src/lib/model/generalConfigurationModel.ts b/libs/red-ui-http/src/lib/model/generalConfigurationModel.ts new file mode 100644 index 000000000..fdb3b9a7c --- /dev/null +++ b/libs/red-ui-http/src/lib/model/generalConfigurationModel.ts @@ -0,0 +1,15 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface GeneralConfigurationModel { + forgotPasswordFunctionEnabled?: boolean; +} diff --git a/libs/red-ui-http/src/lib/model/idRemoval.ts b/libs/red-ui-http/src/lib/model/idRemoval.ts index 217bc30c4..d6cac1213 100644 --- a/libs/red-ui-http/src/lib/model/idRemoval.ts +++ b/libs/red-ui-http/src/lib/model/idRemoval.ts @@ -18,6 +18,7 @@ export interface IdRemoval { status?: IdRemoval.StatusEnum; user?: string; } + export namespace IdRemoval { export type StatusEnum = 'APPROVED' | 'DECLINED' | 'REQUESTED'; export const StatusEnum = { diff --git a/libs/red-ui-http/src/lib/model/imageRecategorizationRequest.ts b/libs/red-ui-http/src/lib/model/imageRecategorizationRequest.ts new file mode 100644 index 000000000..64c71ca5d --- /dev/null +++ b/libs/red-ui-http/src/lib/model/imageRecategorizationRequest.ts @@ -0,0 +1,19 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface ImageRecategorizationRequest { + annotationId?: string; + comment?: string; + legalBasis?: string; + redacted?: boolean; + type?: string; +} diff --git a/libs/red-ui-http/src/lib/model/manualForceRedaction.ts b/libs/red-ui-http/src/lib/model/manualForceRedaction.ts index e5fc6cd03..f573bfc04 100644 --- a/libs/red-ui-http/src/lib/model/manualForceRedaction.ts +++ b/libs/red-ui-http/src/lib/model/manualForceRedaction.ts @@ -18,6 +18,7 @@ export interface ManualForceRedaction { status?: ManualForceRedaction.StatusEnum; user?: string; } + export namespace ManualForceRedaction { export type StatusEnum = 'APPROVED' | 'DECLINED' | 'REQUESTED'; export const StatusEnum = { diff --git a/libs/red-ui-http/src/lib/model/manualImageRecategorization.ts b/libs/red-ui-http/src/lib/model/manualImageRecategorization.ts new file mode 100644 index 000000000..e15eff08f --- /dev/null +++ b/libs/red-ui-http/src/lib/model/manualImageRecategorization.ts @@ -0,0 +1,31 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface ManualImageRecategorization { + id?: string; + legalBasis?: string; + processedDate?: string; + redacted?: boolean; + requestDate?: string; + status?: ManualImageRecategorization.StatusEnum; + type?: string; + user?: string; +} + +export namespace ManualImageRecategorization { + export type StatusEnum = 'APPROVED' | 'DECLINED' | 'REQUESTED'; + export const StatusEnum = { + APPROVED: 'APPROVED' as StatusEnum, + DECLINED: 'DECLINED' as StatusEnum, + REQUESTED: 'REQUESTED' as StatusEnum + }; +} diff --git a/libs/red-ui-http/src/lib/model/manualRedactionEntry.ts b/libs/red-ui-http/src/lib/model/manualRedactionEntry.ts index de295adb1..0018ec996 100644 --- a/libs/red-ui-http/src/lib/model/manualRedactionEntry.ts +++ b/libs/red-ui-http/src/lib/model/manualRedactionEntry.ts @@ -25,6 +25,7 @@ export interface ManualRedactionEntry { user?: string; value?: string; } + export namespace ManualRedactionEntry { export type StatusEnum = 'APPROVED' | 'DECLINED' | 'REQUESTED'; export const StatusEnum = { diff --git a/libs/red-ui-http/src/lib/model/manualRedactions.ts b/libs/red-ui-http/src/lib/model/manualRedactions.ts index b2ff2e307..b2bb862eb 100644 --- a/libs/red-ui-http/src/lib/model/manualRedactions.ts +++ b/libs/red-ui-http/src/lib/model/manualRedactions.ts @@ -12,6 +12,7 @@ import { Comment } from './comment'; import { IdRemoval } from './idRemoval'; import { ManualForceRedaction } from './manualForceRedaction'; +import { ManualImageRecategorization } from './manualImageRecategorization'; import { ManualRedactionEntry } from './manualRedactionEntry'; export interface ManualRedactions { @@ -19,4 +20,5 @@ export interface ManualRedactions { entriesToAdd?: Array; forceRedactions?: Array; idsToRemove?: Array; + imageRecategorization?: Array; } diff --git a/libs/red-ui-http/src/lib/model/models.ts b/libs/red-ui-http/src/lib/model/models.ts index 985f45b2d..50ce4cb3b 100644 --- a/libs/red-ui-http/src/lib/model/models.ts +++ b/libs/red-ui-http/src/lib/model/models.ts @@ -17,7 +17,11 @@ export * from './digitalSignatureViewModelReq'; export * from './digitalSignatureViewModelRes'; export * from './dossier'; export * from './dossierAttributeConfig'; +export * from './dossierAttributeReq'; +export * from './dossierAttributeRes'; export * from './dossierAttributesConfig'; +export * from './dossierAttributesReq'; +export * from './dossierAttributesRes'; export * from './dossierRequest'; export * from './dossierTemplateModel'; export * from './downloadDetails'; @@ -30,14 +34,19 @@ export * from './fileAttributesConfig'; export * from './fileStatus'; export * from './fileUploadResult'; export * from './forceRedactionRequest'; +export * from './generalConfigurationModel'; export * from './idRemoval'; +export * from './imageRecategorizationRequest'; export * from './legalBasisMapping'; export * from './licenseReport'; export * from './licenseReportRequest'; export * from './manualAddResponse'; export * from './manualForceRedaction'; +export * from './manualImageRecategorization'; export * from './manualRedactionEntry'; export * from './manualRedactions'; +export * from './pageExclusionRequest'; +export * from './pageRange'; export * from './point'; export * from './prepareDownloadRequest'; export * from './rectangle'; @@ -49,6 +58,7 @@ export * from './removeDownloadRequest'; export * from './removeRedactionRequest'; export * from './reportData'; export * from './reportTemplate'; +export * from './resetPasswordRequest'; export * from './rules'; export * from './sMTPConfigurationModel'; export * from './sectionGrid'; diff --git a/libs/red-ui-http/src/lib/model/pageExclusionRequest.ts b/libs/red-ui-http/src/lib/model/pageExclusionRequest.ts new file mode 100644 index 000000000..d88a12a3a --- /dev/null +++ b/libs/red-ui-http/src/lib/model/pageExclusionRequest.ts @@ -0,0 +1,16 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ +import { PageRange } from './pageRange'; + +export interface PageExclusionRequest { + pageRanges?: Array; +} diff --git a/libs/red-ui-http/src/lib/model/pageRange.ts b/libs/red-ui-http/src/lib/model/pageRange.ts new file mode 100644 index 000000000..df40cfa4b --- /dev/null +++ b/libs/red-ui-http/src/lib/model/pageRange.ts @@ -0,0 +1,16 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface PageRange { + endPage?: number; + startPage?: number; +} diff --git a/libs/red-ui-http/src/lib/model/redactionChangeLogEntry.ts b/libs/red-ui-http/src/lib/model/redactionChangeLogEntry.ts index e060960fb..b95759d34 100644 --- a/libs/red-ui-http/src/lib/model/redactionChangeLogEntry.ts +++ b/libs/red-ui-http/src/lib/model/redactionChangeLogEntry.ts @@ -18,6 +18,7 @@ export interface RedactionChangeLogEntry { comments?: Array; dictionaryEntry?: boolean; dossierDictionaryEntry?: boolean; + excluded?: boolean; hint?: boolean; id?: string; legalBasis?: string; @@ -36,16 +37,18 @@ export interface RedactionChangeLogEntry { type?: string; value?: string; } + export namespace RedactionChangeLogEntry { export type ChangeTypeEnum = 'ADDED' | 'REMOVED'; export const ChangeTypeEnum = { ADDED: 'ADDED' as ChangeTypeEnum, REMOVED: 'REMOVED' as ChangeTypeEnum }; - export type ManualRedactionTypeEnum = 'ADD' | 'FORCE_REDACT' | 'REMOVE'; + export type ManualRedactionTypeEnum = 'ADD' | 'FORCE_REDACT' | 'RECATEGORIZE' | 'REMOVE'; export const ManualRedactionTypeEnum = { ADD: 'ADD' as ManualRedactionTypeEnum, FORCEREDACT: 'FORCE_REDACT' as ManualRedactionTypeEnum, + RECATEGORIZE: 'RECATEGORIZE' as ManualRedactionTypeEnum, REMOVE: 'REMOVE' as ManualRedactionTypeEnum }; export type StatusEnum = 'APPROVED' | 'DECLINED' | 'REQUESTED'; diff --git a/libs/red-ui-http/src/lib/model/redactionLogEntry.ts b/libs/red-ui-http/src/lib/model/redactionLogEntry.ts index d69bf9077..0805776e0 100644 --- a/libs/red-ui-http/src/lib/model/redactionLogEntry.ts +++ b/libs/red-ui-http/src/lib/model/redactionLogEntry.ts @@ -18,6 +18,7 @@ export interface RedactionLogEntry { dictionaryEntry?: boolean; dossierDictionaryEntry?: boolean; endOffset?: number; + excluded?: boolean; hint?: boolean; id?: string; image?: boolean; @@ -27,6 +28,7 @@ export interface RedactionLogEntry { matchedRule?: number; positions?: Array; reason?: string; + recategorizationType?: string; recommendation?: boolean; redacted?: boolean; section?: string; @@ -38,11 +40,13 @@ export interface RedactionLogEntry { type?: string; value?: string; } + export namespace RedactionLogEntry { - export type ManualRedactionTypeEnum = 'ADD' | 'FORCE_REDACT' | 'REMOVE'; + export type ManualRedactionTypeEnum = 'ADD' | 'FORCE_REDACT' | 'RECATEGORIZE' | 'REMOVE'; export const ManualRedactionTypeEnum = { ADD: 'ADD' as ManualRedactionTypeEnum, FORCEREDACT: 'FORCE_REDACT' as ManualRedactionTypeEnum, + RECATEGORIZE: 'RECATEGORIZE' as ManualRedactionTypeEnum, REMOVE: 'REMOVE' as ManualRedactionTypeEnum }; export type StatusEnum = 'APPROVED' | 'DECLINED' | 'REQUESTED'; diff --git a/libs/red-ui-http/src/lib/model/reportData.ts b/libs/red-ui-http/src/lib/model/reportData.ts index 990c6aea7..562ac25f1 100644 --- a/libs/red-ui-http/src/lib/model/reportData.ts +++ b/libs/red-ui-http/src/lib/model/reportData.ts @@ -20,6 +20,7 @@ export interface ReportData { numberOfAnalyzedPages?: number; status?: ReportData.StatusEnum; } + export namespace ReportData { export type StatusEnum = | 'APPROVED' @@ -40,7 +41,7 @@ export namespace ReportData { ERROR: 'ERROR' as StatusEnum, EXCLUDED: 'EXCLUDED' as StatusEnum, FULLREPROCESS: 'FULLREPROCESS' as StatusEnum, - OCR_PROCESSING: 'OCR_PROCESSING' as StatusEnum, + OCRPROCESSING: 'OCR_PROCESSING' as StatusEnum, PROCESSING: 'PROCESSING' as StatusEnum, REPROCESS: 'REPROCESS' as StatusEnum, UNASSIGNED: 'UNASSIGNED' as StatusEnum, diff --git a/libs/red-ui-http/src/lib/model/resetPasswordRequest.ts b/libs/red-ui-http/src/lib/model/resetPasswordRequest.ts new file mode 100644 index 000000000..8ea0c5c97 --- /dev/null +++ b/libs/red-ui-http/src/lib/model/resetPasswordRequest.ts @@ -0,0 +1,16 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface ResetPasswordRequest { + password?: string; + temporary?: boolean; +} diff --git a/libs/red-ui-http/src/lib/model/watermarkModelReq.ts b/libs/red-ui-http/src/lib/model/watermarkModelReq.ts index 114e58b57..903b3ed1a 100644 --- a/libs/red-ui-http/src/lib/model/watermarkModelReq.ts +++ b/libs/red-ui-http/src/lib/model/watermarkModelReq.ts @@ -18,6 +18,7 @@ export interface WatermarkModelReq { orientation?: WatermarkModelReq.OrientationEnum; text?: string; } + export namespace WatermarkModelReq { export type OrientationEnum = 'DIAGONAL' | 'HORIZONTAL' | 'VERTICAL'; export const OrientationEnum = { diff --git a/libs/red-ui-http/src/lib/model/watermarkModelRes.ts b/libs/red-ui-http/src/lib/model/watermarkModelRes.ts index c40a38d61..88eb36bff 100644 --- a/libs/red-ui-http/src/lib/model/watermarkModelRes.ts +++ b/libs/red-ui-http/src/lib/model/watermarkModelRes.ts @@ -18,6 +18,7 @@ export interface WatermarkModelRes { orientation?: WatermarkModelRes.OrientationEnum; text?: string; } + export namespace WatermarkModelRes { export type OrientationEnum = 'DIAGONAL' | 'HORIZONTAL' | 'VERTICAL'; export const OrientationEnum = { diff --git a/package.json b/package.json index 832daeabf..4168211a0 100644 --- a/package.json +++ b/package.json @@ -51,7 +51,7 @@ "@ngx-translate/core": "^13.0.0", "@ngx-translate/http-loader": "^6.0.0", "@nrwl/angular": "12.3.6", - "@pdftron/webviewer": "7.3.2", + "@pdftron/webviewer": "7.3.3", "@swimlane/ngx-charts": "^17.0.1", "file-saver": "^2.0.5", "jwt-decode": "^3.1.2", diff --git a/yarn.lock b/yarn.lock index 5b5d55fa1..3b606fad7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2873,10 +2873,10 @@ yargs "15.4.1" yargs-parser "20.0.0" -"@pdftron/webviewer@7.3.2": - version "7.3.2" - resolved "https://registry.yarnpkg.com/@pdftron/webviewer/-/webviewer-7.3.2.tgz#58c24fa6318268b7962fb51bbf6486bac24c7d64" - integrity sha512-GJJ3ErKn2gZKXcjFBg46d4u0X+60daiVu04i+AoYbA7xyocCpGIhW/cg0dZmTq0c1ITfHXvn5uG42UN3BBFWiA== +"@pdftron/webviewer@7.3.3": + version "7.3.3" + resolved "https://registry.yarnpkg.com/@pdftron/webviewer/-/webviewer-7.3.3.tgz#e5ada58c4c4a4101a095507673ba2278042942ef" + integrity sha512-cTJf9pXlN9tilliO8NgKw6vn1PPXSHKLOrUS7j4f+0sz2BJDVwO2rlI4BJBQ5BT2qIru1dg2GxYUyeXOqNyi9Q== "@rollup/plugin-commonjs@^19.0.0": version "19.0.0"