diff --git a/apps/red-ui/src/app/app.component.html b/apps/red-ui/src/app/app.component.html index 3ac47a12a..a5e69be34 100644 --- a/apps/red-ui/src/app/app.component.html +++ b/apps/red-ui/src/app/app.component.html @@ -1,4 +1,2 @@ - + diff --git a/apps/red-ui/src/app/components/auth-error/auth-error.component.html b/apps/red-ui/src/app/components/auth-error/auth-error.component.html index 04fa26b44..a2597f3bc 100644 --- a/apps/red-ui/src/app/components/auth-error/auth-error.component.html +++ b/apps/red-ui/src/app/components/auth-error/auth-error.component.html @@ -1,15 +1,8 @@
-

+

- + -

- + diff --git a/apps/red-ui/src/app/guards/composite-route.guard.ts b/apps/red-ui/src/app/guards/composite-route.guard.ts index 174b2632c..4be55b4a4 100644 --- a/apps/red-ui/src/app/guards/composite-route.guard.ts +++ b/apps/red-ui/src/app/guards/composite-route.guard.ts @@ -7,10 +7,7 @@ import { LoadingService } from '@services/loading.service'; providedIn: 'root' }) export class CompositeRouteGuard implements CanActivate { - constructor( - protected readonly _injector: Injector, - private readonly _loadingService: LoadingService - ) {} + constructor(protected readonly _injector: Injector, private readonly _loadingService: LoadingService) {} async canActivate(route: ActivatedRouteSnapshot, state: RouterStateSnapshot): Promise { this._loadingService.start(); @@ -24,10 +21,7 @@ export class CompositeRouteGuard implements CanActivate { if (canActivateResult instanceof Promise) { canActivateResult = from(canActivateResult); } - if ( - typeof canActivateResult === 'boolean' || - canActivateResult instanceof UrlTree - ) { + if (typeof canActivateResult === 'boolean' || canActivateResult instanceof UrlTree) { canActivateResult = of(canActivateResult); } diff --git a/apps/red-ui/src/app/models/file/annotation.permissions.ts b/apps/red-ui/src/app/models/file/annotation.permissions.ts index 81c805e68..2dee7abbc 100644 --- a/apps/red-ui/src/app/models/file/annotation.permissions.ts +++ b/apps/red-ui/src/app/models/file/annotation.permissions.ts @@ -31,11 +31,7 @@ export class AnnotationPermissions { ); } - static forUser( - isApprover: boolean, - user: UserWrapper, - annotations: AnnotationWrapper | AnnotationWrapper[] - ) { + static forUser(isApprover: boolean, user: UserWrapper, annotations: AnnotationWrapper | AnnotationWrapper[]) { if (!isArray(annotations)) { annotations = [annotations]; } @@ -44,38 +40,26 @@ export class AnnotationPermissions { for (const annotation of annotations) { const permissions: AnnotationPermissions = new AnnotationPermissions(); - permissions.canUndo = - (!isApprover && annotation.isSuggestion) || - (isApprover && annotation.isUndoableActionForApprover); + permissions.canUndo = (!isApprover && annotation.isSuggestion) || (isApprover && annotation.isUndoableActionForApprover); permissions.canForceRedaction = annotation.isSkipped && !permissions.canUndo; permissions.canAcceptRecommendation = annotation.isRecommendation; - permissions.canMarkAsFalsePositive = - annotation.canBeMarkedAsFalsePositive && !annotation.force; - permissions.canMarkTextOnlyAsFalsePositive = - annotation.canBeMarkedAsFalsePositiveWithTextOnly && !annotation.force; + permissions.canMarkAsFalsePositive = annotation.canBeMarkedAsFalsePositive && !annotation.force; + permissions.canMarkTextOnlyAsFalsePositive = annotation.canBeMarkedAsFalsePositiveWithTextOnly && !annotation.force; - permissions.canRemoveOrSuggestToRemoveOnlyHere = - annotation.isRedacted && !annotation.force; + permissions.canRemoveOrSuggestToRemoveOnlyHere = annotation.isRedacted && !annotation.force; permissions.canRemoveOrSuggestToRemoveFromDictionary = - annotation.isRedacted && - !annotation.isManualRedaction && - annotation.isModifyDictionary && - !annotation.force; + annotation.isRedacted && !annotation.isManualRedaction && annotation.isModifyDictionary && !annotation.force; - permissions.canAcceptSuggestion = - isApprover && (annotation.isSuggestion || annotation.isDeclinedSuggestion); + permissions.canAcceptSuggestion = isApprover && (annotation.isSuggestion || annotation.isDeclinedSuggestion); permissions.canRejectSuggestion = isApprover && (annotation.isSuggestion || - (annotation.isReadyForAnalysis && - !permissions.canUndo && - annotation.superType !== 'pending-analysis')); + (annotation.isReadyForAnalysis && !permissions.canUndo && annotation.superType !== 'pending-analysis')); - permissions.canChangeLegalBasis = - !annotation.isManualRedaction && annotation.isRedacted; + permissions.canChangeLegalBasis = !annotation.isManualRedaction && annotation.isRedacted; permissions.canRecategorizeImage = annotation.isImage; diff --git a/apps/red-ui/src/app/models/file/file-data.model.ts b/apps/red-ui/src/app/models/file/file-data.model.ts index 2484090e8..039d7292b 100644 --- a/apps/red-ui/src/app/models/file/file-data.model.ts +++ b/apps/red-ui/src/app/models/file/file-data.model.ts @@ -77,19 +77,13 @@ export class FileDataModel { const reasonAnnotationIds = []; this.redactionLog.redactionLogEntry?.forEach(redactionLogEntry => { - if ( - redactionLogEntry.manual && - (redactionLogEntry.status === 'APPROVED' || - redactionLogEntry.status === 'REQUESTED') - ) { + if (redactionLogEntry.manual && (redactionLogEntry.status === 'APPROVED' || redactionLogEntry.status === 'REQUESTED')) { // for dictionary entries -> I.E accepted recommendations or false positives, // check reason reasonAnnotationIds.push(redactionLogEntry.reason); } - const existingChangeLogEntry = this.redactionChangeLog?.redactionLogEntry?.find( - rle => rle.id === redactionLogEntry.id - ); + const existingChangeLogEntry = this.redactionChangeLog?.redactionLogEntry?.find(rle => rle.id === redactionLogEntry.id); // copy the redactionLog Entry const redactionLogEntryWrapper: RedactionLogEntryWrapper = {}; diff --git a/apps/red-ui/src/app/models/file/file-status.wrapper.ts b/apps/red-ui/src/app/models/file/file-status.wrapper.ts index 8f026e8c3..4fbb4c662 100644 --- a/apps/red-ui/src/app/models/file/file-status.wrapper.ts +++ b/apps/red-ui/src/app/models/file/file-status.wrapper.ts @@ -14,9 +14,7 @@ export class FileStatusWrapper { this.searchField = fileStatus.filename; if (fileAttributesConfig) { - const primary = fileAttributesConfig.fileAttributeConfigs?.find( - c => c.primaryAttribute - ); + const primary = fileAttributesConfig.fileAttributeConfigs?.find(c => c.primaryAttribute); if (primary && fileStatus.fileAttributes?.attributeIdToValue) { this.primaryAttribute = fileStatus.fileAttributes?.attributeIdToValue[primary.id]; this.searchField += ' ' + this.primaryAttribute; @@ -120,9 +118,7 @@ export class FileStatusWrapper { } get status() { - return this.fileStatus.status === 'REPROCESS' || this.fileStatus.status === 'FULLREPROCESS' - ? 'PROCESSING' - : this.fileStatus.status; + return this.fileStatus.status === 'REPROCESS' || this.fileStatus.status === 'FULLREPROCESS' ? 'PROCESSING' : this.fileStatus.status; } get numberOfPages() { diff --git a/apps/red-ui/src/app/models/file/manual-annotation-response.ts b/apps/red-ui/src/app/models/file/manual-annotation-response.ts index 6902baf78..c19074328 100644 --- a/apps/red-ui/src/app/models/file/manual-annotation-response.ts +++ b/apps/red-ui/src/app/models/file/manual-annotation-response.ts @@ -5,16 +5,9 @@ export class ManualAnnotationResponse { annotationId; commentId; - constructor( - public manualRedactionEntryWrapper: ManualRedactionEntryWrapper, - public manualAddResponse: ManualAddResponse - ) { - this.annotationId = manualAddResponse?.annotationId - ? manualAddResponse.annotationId - : new Date().getTime(); - this.commentId = manualAddResponse?.commentId - ? manualAddResponse.commentId - : new Date().getTime(); + constructor(public manualRedactionEntryWrapper: ManualRedactionEntryWrapper, public manualAddResponse: ManualAddResponse) { + this.annotationId = manualAddResponse?.annotationId ? manualAddResponse.annotationId : new Date().getTime(); + this.commentId = manualAddResponse?.commentId ? manualAddResponse.commentId : new Date().getTime(); } get dictionary() { diff --git a/apps/red-ui/src/app/modules/admin/components/breadcrumbs/admin-breadcrumbs.component.html b/apps/red-ui/src/app/modules/admin/components/breadcrumbs/admin-breadcrumbs.component.html index 5efc4111a..4813d9d14 100644 --- a/apps/red-ui/src/app/modules/admin/components/breadcrumbs/admin-breadcrumbs.component.html +++ b/apps/red-ui/src/app/modules/admin/components/breadcrumbs/admin-breadcrumbs.component.html @@ -10,9 +10,7 @@ {{ appStateService.activeDossierTemplate.name }} diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts b/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts index 5b4da3e15..babc8dfef 100644 --- a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts +++ b/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-chart.component.ts @@ -12,13 +12,7 @@ import { import { curveLinear } from 'd3-shape'; import { scaleBand, scaleLinear, scalePoint, scaleTime } from 'd3-scale'; -import { - BaseChartComponent, - calculateViewDimensions, - ColorHelper, - LineSeriesComponent, - ViewDimensions -} from '@swimlane/ngx-charts'; +import { BaseChartComponent, calculateViewDimensions, ColorHelper, LineSeriesComponent, ViewDimensions } from '@swimlane/ngx-charts'; @Component({ // eslint-disable-next-line @angular-eslint/component-selector @@ -277,9 +271,7 @@ export class ComboChartComponent extends BaseChartComponent { if (this.bandwidth === undefined) { this.bandwidth = width - this.barPadding; } - const offset = Math.floor( - (width + this.barPadding - (this.bandwidth + this.barPadding) * domain.length) / 2 - ); + const offset = Math.floor((width + this.barPadding - (this.bandwidth + this.barPadding) * domain.length) / 2); if (this.scaleType === 'time') { scale = scaleTime().range([0, width]).domain(domain); @@ -344,12 +336,7 @@ export class ComboChartComponent extends BaseChartComponent { domain = this.yDomain; } this.colors = new ColorHelper(this.scheme, this.schemeType, domain, this.customColors); - this.colorsLine = new ColorHelper( - this.colorSchemeLine, - this.schemeType, - domain, - this.customColors - ); + this.colorsLine = new ColorHelper(this.colorSchemeLine, this.schemeType, domain, this.customColors); } getLegendOptions() { @@ -387,9 +374,7 @@ export class ComboChartComponent extends BaseChartComponent { } onActivate(item) { - const idx = this.activeEntries.findIndex( - d => d.name === item.name && d.value === item.value && d.series === item.series - ); + const idx = this.activeEntries.findIndex(d => d.name === item.name && d.value === item.value && d.series === item.series); if (idx > -1) { return; } @@ -399,9 +384,7 @@ export class ComboChartComponent extends BaseChartComponent { } onDeactivate(item) { - const idx = this.activeEntries.findIndex( - d => d.name === item.name && d.value === item.value && d.series === item.series - ); + const idx = this.activeEntries.findIndex(d => d.name === item.name && d.value === item.value && d.series === item.series); this.activeEntries.splice(idx, 1); this.activeEntries = [...this.activeEntries]; diff --git a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts b/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts index 1108d7d7e..65ad98824 100644 --- a/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts +++ b/apps/red-ui/src/app/modules/admin/components/combo-chart/combo-series-vertical.component.ts @@ -1,11 +1,4 @@ -import { - ChangeDetectionStrategy, - Component, - EventEmitter, - Input, - OnChanges, - Output -} from '@angular/core'; +import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'; import { animate, style, transition, trigger } from '@angular/animations'; import { formatLabel } from '@swimlane/ngx-charts'; @@ -158,10 +151,7 @@ export class ComboSeriesVerticalComponent implements OnChanges { bar.gradientStops = this.colors.getLinearGradientStops(value); } else { bar.color = this.colors.getColor(bar.offset1); - bar.gradientStops = this.colors.getLinearGradientStops( - bar.offset1, - bar.offset0 - ); + bar.gradientStops = this.colors.getLinearGradientStops(bar.offset1, bar.offset0); } } @@ -189,9 +179,7 @@ export class ComboSeriesVerticalComponent implements OnChanges { isActive(entry): boolean { if (!this.activeEntries) return false; - const item = this.activeEntries.find( - d => entry.name === d.name && entry.series === d.series - ); + const item = this.activeEntries.find(d => entry.name === d.name && entry.series === d.series); return item !== undefined; } diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html index 88843ac2c..e8764f5ca 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dictionary-dialog/add-edit-dictionary-dialog.component.html @@ -58,9 +58,7 @@ @@ -46,12 +40,7 @@ {{ 'add-edit-dossier-template.form.valid-from' | translate }} - + {{ 'add-edit-dossier-template.form.valid-to' | translate }} @@ -59,11 +48,7 @@
- + @@ -73,11 +58,7 @@
- + @@ -94,8 +75,7 @@ 'report-type.label' | translate : { - length: this.dossierTemplateForm.controls['reportTypes'].value - .length + length: this.dossierTemplateForm.controls['reportTypes'].value.length } " [options]="reportTypesEnum" @@ -108,8 +88,7 @@ 'download-type.label' | translate : { - length: this.dossierTemplateForm.controls['downloadFileTypes'] - .value.length + length: this.dossierTemplateForm.controls['downloadFileTypes'].value.length } " [options]="downloadTypesEnum" @@ -120,20 +99,11 @@
-
- + diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.ts index 712d9405f..a0da03587 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-dossier-template-dialog/add-edit-dossier-template-dialog.component.ts @@ -40,19 +40,11 @@ export class AddEditDossierTemplateDialogComponent { this.dossierTemplate?.validTo ? moment(this.dossierTemplate?.validTo) : null, this._requiredIfValidator(() => this.hasValidTo) ], - downloadFileTypes: [ - this.dossierTemplate - ? this.dossierTemplate.downloadFileTypes - : ['PREVIEW', 'REDACTED'] - ], + downloadFileTypes: [this.dossierTemplate ? this.dossierTemplate.downloadFileTypes : ['PREVIEW', 'REDACTED']], reportTypes: [ this.dossierTemplate ? this.dossierTemplate.reportTypes - : [ - 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE', - 'WORD_SINGLE_FILE_APPENDIX_A2_TEMPLATE', - 'EXCEL_MULTI_FILE' - ], + : ['WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE', 'WORD_SINGLE_FILE_APPENDIX_A2_TEMPLATE', 'EXCEL_MULTI_FILE'], Validators.required ] }); @@ -77,9 +69,7 @@ export class AddEditDossierTemplateDialogComponent { } if ( this.hasValidFrom && - !moment(this.dossierTemplate.validFrom).isSame( - moment(this.dossierTemplateForm.get('validFrom').value) - ) + !moment(this.dossierTemplate.validFrom).isSame(moment(this.dossierTemplateForm.get('validFrom').value)) ) { return true; } @@ -89,9 +79,7 @@ export class AddEditDossierTemplateDialogComponent { } if ( this.hasValidTo && - !moment(this.dossierTemplate.validTo).isSame( - moment(this.dossierTemplateForm.get('validTo').value) - ) + !moment(this.dossierTemplate.validTo).isSame(moment(this.dossierTemplateForm.get('validTo').value)) ) { return true; } @@ -110,9 +98,7 @@ export class AddEditDossierTemplateDialogComponent { validFrom: this.hasValidFrom ? this.dossierTemplateForm.get('validFrom').value : null, validTo: this.hasValidTo ? this.dossierTemplateForm.get('validTo').value : null }; - await this._dossierTemplateController - .createOrUpdateDossierTemplate(dossierTemplate) - .toPromise(); + await this._dossierTemplateController.createOrUpdateDossierTemplate(dossierTemplate).toPromise(); await this._appStateService.loadAllDossierTemplates(); await this._appStateService.loadDictionaryData(); this.dialogRef.close(dossierTemplate); diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html index a5fe99f58..3062a8234 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.html @@ -1,10 +1,8 @@
{{ - (fileAttribute - ? 'add-edit-file-attribute.title.edit' - : 'add-edit-file-attribute.title.new' - ) | translate: { name: fileAttribute?.label } + (fileAttribute ? 'add-edit-file-attribute.title.edit' : 'add-edit-file-attribute.title.new') + | translate: { name: fileAttribute?.label } }}
@@ -25,9 +23,7 @@
@@ -49,31 +45,18 @@
- + {{ 'add-edit-file-attribute.form.primary' | translate }}
-
- + diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.ts index f707f6332..c24f4576f 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-file-attribute-dialog/add-edit-file-attribute-dialog.component.ts @@ -13,11 +13,7 @@ export class AddEditFileAttributeDialogComponent { fileAttributeForm: FormGroup; fileAttribute: FileAttributeConfig; dossierTemplateId: string; - readonly typeOptions = [ - FileAttributeConfig.TypeEnum.TEXT, - FileAttributeConfig.TypeEnum.NUMBER, - FileAttributeConfig.TypeEnum.DATE - ]; + readonly typeOptions = [FileAttributeConfig.TypeEnum.TEXT, FileAttributeConfig.TypeEnum.NUMBER, FileAttributeConfig.TypeEnum.DATE]; constructor( private readonly _appStateService: AppStateService, @@ -32,10 +28,7 @@ export class AddEditFileAttributeDialogComponent { this.fileAttributeForm = this._formBuilder.group({ label: [this.fileAttribute?.label, Validators.required], csvColumnHeader: [this.fileAttribute?.csvColumnHeader, Validators.required], - type: [ - this.fileAttribute?.type || FileAttributeConfig.TypeEnum.TEXT, - Validators.required - ], + type: [this.fileAttribute?.type || FileAttributeConfig.TypeEnum.TEXT, Validators.required], readonly: [this.fileAttribute ? !this.fileAttribute.editable : false], primaryAttribute: [this.fileAttribute?.primaryAttribute] }); diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.html index 17b725f7a..6cf1ed70c 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.html @@ -13,9 +13,5 @@ [user]="user" > - + diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.ts index 6d91c4d8f..e79719568 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/add-edit-user-dialog.component.ts @@ -10,10 +10,7 @@ import { User } from '@redaction/red-ui-http'; export class AddEditUserDialogComponent { resettingPassword = false; - constructor( - public dialogRef: MatDialogRef, - @Inject(MAT_DIALOG_DATA) public user: User - ) {} + constructor(public dialogRef: MatDialogRef, @Inject(MAT_DIALOG_DATA) public user: User) {} toggleResetPassword() { this.resettingPassword = !this.resettingPassword; diff --git a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html index fee0ff69f..18392a3fd 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/add-edit-user-dialog/reset-password/reset-password.component.html @@ -1,8 +1,4 @@ -
+
@@ -17,10 +13,6 @@ {{ 'reset-password-dialog.actions.save' | translate }} -
+
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.html index 49371a4c8..4ace83050 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-file-attribute-dialog/confirm-delete-file-attribute-dialog.component.html @@ -1,9 +1,6 @@
- {{ - 'confirm-delete-file-attribute.title.' + type - | translate: { name: fileAttribute?.label } - }} + {{ 'confirm-delete-file-attribute.title.' + type | translate: { name: fileAttribute?.label } }}
@@ -30,15 +27,7 @@ -
+
- +
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.html index c2e0d3bd0..108baa141 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/confirm-delete-users-dialog/confirm-delete-users-dialog.component.html @@ -17,10 +17,7 @@ [class.error]="!checkbox.value && showToast" color="primary" > - {{ - 'confirm-delete-users.' + checkbox.label - | translate: { dossiersCount: dossiersCount } - }} + {{ 'confirm-delete-users.' + checkbox.label | translate: { dossiersCount: dossiersCount } }}
@@ -28,15 +25,7 @@ -
+
- + diff --git a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html index 7087e823e..d0ae645aa 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.html @@ -1,8 +1,5 @@
-
+
@@ -23,10 +20,7 @@ class="input-icon" >
@@ -34,20 +28,11 @@
-
- +
diff --git a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.ts b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.ts index 274d9789f..37ce4623e 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.ts +++ b/apps/red-ui/src/app/modules/admin/dialogs/edit-color-dialog/edit-color-dialog.component.ts @@ -47,15 +47,11 @@ export class EditColorDialogComponent { }; try { - await this._dictionaryControllerService - .setColors(colors, this._dossierTemplateId) - .toPromise(); + await this._dictionaryControllerService.setColors(colors, this._dossierTemplateId).toPromise(); this._dialogRef.close(true); this._notificationService.showToastNotification( this._translateService.instant('edit-color-dialog.success', { - color: this._translateService.instant( - 'default-colors-screen.types.' + this.colorKey - ) + color: this._translateService.instant('default-colors-screen.types.' + this.colorKey) }) ); } catch (e) { diff --git a/apps/red-ui/src/app/modules/admin/dialogs/smtp-auth-dialog/smtp-auth-dialog.component.html b/apps/red-ui/src/app/modules/admin/dialogs/smtp-auth-dialog/smtp-auth-dialog.component.html index 68f9dfa0b..e0d23d62e 100644 --- a/apps/red-ui/src/app/modules/admin/dialogs/smtp-auth-dialog/smtp-auth-dialog.component.html +++ b/apps/red-ui/src/app/modules/admin/dialogs/smtp-auth-dialog/smtp-auth-dialog.component.html @@ -23,17 +23,9 @@ -
+
- + diff --git a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts index 752b959ac..ec2d30fd6 100644 --- a/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/audit/audit-screen.component.ts @@ -61,16 +61,7 @@ export class AuditScreenComponent { } private _updateDateFilters(value): boolean { - if ( - applyIntervalConstraints( - value, - this._previousFrom, - this._previousTo, - this.filterForm, - 'from', - 'to' - ) - ) { + if (applyIntervalConstraints(value, this._previousFrom, this._previousTo, this.filterForm, 'from', 'to')) { return true; } diff --git a/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.html index e59658806..1d27cbb25 100644 --- a/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/dictionary-overview/dictionary-overview-screen.component.html @@ -36,14 +36,7 @@ tooltipPosition="below" > - +
-
+
{{ dictionary.description }}
- + diff --git a/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.ts index 1832c4977..0ebbfb000 100644 --- a/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/digital-signature/digital-signature-screen.component.ts @@ -29,10 +29,7 @@ export class DigitalSignatureScreenComponent { } get hasDigitalSignatureSet() { - return ( - this.digitalSignatureExists || - !!this.digitalSignatureForm.get('base64EncodedPrivateKey').value - ); + return this.digitalSignatureExists || !!this.digitalSignatureForm.get('base64EncodedPrivateKey').value; } saveDigitalSignature() { @@ -58,17 +55,13 @@ export class DigitalSignatureScreenComponent { error => { if (error.status === 400) { this._notificationService.showToastNotification( - this._translateService.instant( - 'digital-signature-screen.action.certificate-not-valid-error' - ), + this._translateService.instant('digital-signature-screen.action.certificate-not-valid-error'), null, NotificationType.ERROR ); } else { this._notificationService.showToastNotification( - this._translateService.instant( - 'digital-signature-screen.action.save-error' - ), + this._translateService.instant('digital-signature-screen.action.save-error'), null, NotificationType.ERROR ); @@ -82,9 +75,7 @@ export class DigitalSignatureScreenComponent { () => { this.loadDigitalSignatureAndInitializeForm(); this._notificationService.showToastNotification( - this._translateService.instant( - 'digital-signature-screen.action.delete-success' - ), + this._translateService.instant('digital-signature-screen.action.delete-success'), null, NotificationType.SUCCESS ); @@ -139,9 +130,7 @@ export class DigitalSignatureScreenComponent { certificateName: [this.digitalSignature.certificateName, Validators.required], contactInfo: this.digitalSignature.contactInfo, location: this.digitalSignature.location, - keySecret: this.digitalSignatureExists - ? null - : [this.digitalSignature.password, Validators.required], + keySecret: this.digitalSignatureExists ? null : [this.digitalSignature.password, Validators.required], reason: this.digitalSignature.reason, base64EncodedPrivateKey: this.digitalSignatureExists ? null diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html index 9a1ef08de..65a6079d4 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.html @@ -8,12 +8,7 @@
- +
- {{ - 'license-info-screen.copyright-claim-text' - | translate: { currentYear: currentYear } - }} + {{ 'license-info-screen.copyright-claim-text' | translate: { currentYear: currentYear } }}
@@ -64,10 +56,7 @@ -
+
@@ -92,28 +81,18 @@
{{ currentInfo.numberOfAnalyzedPages }}
-
+
- {{ - 'license-info-screen.total-analyzed' - | translate: { date: totalInfo.startDate | date: 'longDate' } - }} + {{ 'license-info-screen.total-analyzed' | translate: { date: totalInfo.startDate | date: 'longDate' } }}
{{ totalInfo.numberOfAnalyzedPages }}
-
- {{ currentInfo.numberOfAnalyzedPages }} ({{ - analysisPercentageOfLicense | number: '1.0-2' - }}%) -
+
{{ currentInfo.numberOfAnalyzedPages }} ({{ analysisPercentageOfLicense | number: '1.0-2' }}%)
@@ -151,6 +130,4 @@
- + diff --git a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts index 7dbf54d26..1f5b2ba38 100644 --- a/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/license-information/license-information-screen.component.ts @@ -63,9 +63,7 @@ export class LicenseInformationScreenComponent implements OnInit { const unlicensedConfig = { startDate: endDate.toDate() }; - promises.push( - this._licenseReportController.licenseReport(unlicensedConfig).toPromise() - ); + promises.push(this._licenseReportController.licenseReport(unlicensedConfig).toPromise()); } Promise.all(promises).then(reports => { @@ -73,8 +71,7 @@ export class LicenseInformationScreenComponent implements OnInit { this.viewReady = true; this.analysisPercentageOfLicense = this.totalLicensedNumberOfPages > 0 - ? (this.currentInfo.numberOfAnalyzedPages / this.totalLicensedNumberOfPages) * - 100 + ? (this.currentInfo.numberOfAnalyzedPages / this.totalLicensedNumberOfPages) * 100 : 100; }); } @@ -92,9 +89,7 @@ export class LicenseInformationScreenComponent implements OnInit { pages: this.totalLicensedNumberOfPages }) ].join('%0D%0A'); - window.location.href = `mailto:${this.appConfigService.getConfig( - 'LICENSE_EMAIL' - )}?subject=${subject}&body=${body}`; + window.location.href = `mailto:${this.appConfigService.getConfig('LICENSE_EMAIL')}?subject=${subject}&body=${body}`; } private async _setMonthlyStats(startDate: moment.Moment, endDate: moment.Moment) { diff --git a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts index 1e7af3e05..8f266eebd 100644 --- a/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/rules/rules-screen.component.ts @@ -44,9 +44,7 @@ export class RulesScreenComponent extends ComponentHasChanges { private readonly _activatedRoute: ActivatedRoute ) { super(_translateService); - this._appStateService.activateDossierTemplate( - _activatedRoute.snapshot.params.dossierTemplateId - ); + this._appStateService.activateDossierTemplate(_activatedRoute.snapshot.params.dossierTemplateId); this._initialize(); } @@ -78,9 +76,7 @@ export class RulesScreenComponent extends ComponentHasChanges { @debounce() codeEditorTextChanged() { - const newDecorations = this.currentLines - .filter(entry => this._isNew(entry)) - .map(entry => this._makeDecorationFor(entry)); + const newDecorations = this.currentLines.filter(entry => this._isNew(entry)).map(entry => this._makeDecorationFor(entry)); this._decorations = this._codeEditor.deltaDecorations(this._decorations, newDecorations); } @@ -153,14 +149,12 @@ export class RulesScreenComponent extends ComponentHasChanges { } private _initialize() { - this._rulesControllerService - .downloadRules(this._appStateService.activeDossierTemplateId) - .subscribe( - rules => { - this.currentLines = this.initialLines = rules.rules.split('\n'); - this.revert(); - }, - () => (this.processing = false) - ); + this._rulesControllerService.downloadRules(this._appStateService.activeDossierTemplateId).subscribe( + rules => { + this.currentLines = this.initialLines = rules.rules.split('\n'); + this.revert(); + }, + () => (this.processing = false) + ); } } diff --git a/apps/red-ui/src/app/modules/admin/screens/smtp-config/smtp-config-screen.component.ts b/apps/red-ui/src/app/modules/admin/screens/smtp-config/smtp-config-screen.component.ts index a5d70e5b4..b36206694 100644 --- a/apps/red-ui/src/app/modules/admin/screens/smtp-config/smtp-config-screen.component.ts +++ b/apps/red-ui/src/app/modules/admin/screens/smtp-config/smtp-config-screen.component.ts @@ -79,51 +79,37 @@ export class SmtpConfigScreenComponent implements OnInit { async ngOnInit() { await this._loadData(); - this.generalSettings = await this._generalSettingsControllerService - .getGeneralConfigurations() - .toPromise(); + this.generalSettings = await this._generalSettingsControllerService.getGeneralConfigurations().toPromise(); this._initialGeneralSettings = Object.assign({}, this.generalSettings); } async save() { this.viewReady = false; - await this._smtpConfigService - .updateSMTPConfiguration(this.configForm.getRawValue()) - .toPromise(); + await this._smtpConfigService.updateSMTPConfiguration(this.configForm.getRawValue()).toPromise(); this._initialValue = this.configForm.getRawValue(); this.viewReady = true; } async saveGeneralConfig() { this.viewReady = false; - await this._generalSettingsControllerService - .updateGeneralConfigurations(this.generalSettings) - .toPromise(); + await this._generalSettingsControllerService.updateGeneralConfigurations(this.generalSettings).toPromise(); this.viewReady = true; } openAuthConfigDialog(skipDisableOnCancel?: boolean) { - this._dialogService.openDialog( - 'smtpAuthConfig', - null, - this.configForm.getRawValue(), - null, - authConfig => { - if (authConfig) { - this.configForm.patchValue(authConfig); - } else if (!skipDisableOnCancel) { - this.configForm.patchValue({ auth: false }, { emitEvent: false }); - } + this._dialogService.openDialog('smtpAuthConfig', null, this.configForm.getRawValue(), null, authConfig => { + if (authConfig) { + this.configForm.patchValue(authConfig); + } else if (!skipDisableOnCancel) { + this.configForm.patchValue({ auth: false }, { emitEvent: false }); } - ); + }); } async testConnection() { this.viewReady = false; try { - await this._smtpConfigService - .testSMTPConfiguration(this.configForm.getRawValue()) - .toPromise(); + await this._smtpConfigService.testSMTPConfiguration(this.configForm.getRawValue()).toPromise(); this._notificationService.showToastNotification( this._translateService.instant('smtp-config-screen.test.success'), undefined, @@ -142,9 +128,7 @@ export class SmtpConfigScreenComponent implements OnInit { private async _loadData() { try { - this._initialValue = await this._smtpConfigService - .getCurrentSMTPConfiguration() - .toPromise(); + this._initialValue = await this._smtpConfigService.getCurrentSMTPConfiguration().toPromise(); this.configForm.patchValue(this._initialValue, { emitEvent: false }); } catch (e) { } finally { diff --git a/apps/red-ui/src/app/modules/app-config/app-config.service.ts b/apps/red-ui/src/app/modules/app-config/app-config.service.ts index b5520c68d..a0c8c8036 100644 --- a/apps/red-ui/src/app/modules/app-config/app-config.service.ts +++ b/apps/red-ui/src/app/modules/app-config/app-config.service.ts @@ -50,24 +50,14 @@ export class AppConfigService { } loadAppConfig(): Observable { - this._cacheApiService - .getCachedValue(AppConfigKey.FRONTEND_APP_VERSION) - .then(async lastVersion => { - console.log( - '[REDACTION] Last app version: ', - lastVersion, - ' current version ', - this.version - ); - if (lastVersion !== this.version) { - console.log('[REDACTION] Version-missmatch - wiping caches!'); - await wipeCaches(); - } - await this._cacheApiService.cacheValue( - AppConfigKey.FRONTEND_APP_VERSION, - this.version - ); - }); + this._cacheApiService.getCachedValue(AppConfigKey.FRONTEND_APP_VERSION).then(async lastVersion => { + console.log('[REDACTION] Last app version: ', lastVersion, ' current version ', this.version); + if (lastVersion !== this.version) { + console.log('[REDACTION] Version-missmatch - wiping caches!'); + await wipeCaches(); + } + await this._cacheApiService.cacheValue(AppConfigKey.FRONTEND_APP_VERSION, this.version); + }); return this._httpClient.get('/assets/config/config.json').pipe( tap(config => { diff --git a/apps/red-ui/src/app/modules/auth/auth.module.ts b/apps/red-ui/src/app/modules/auth/auth.module.ts index 33336be2a..eead711f4 100644 --- a/apps/red-ui/src/app/modules/auth/auth.module.ts +++ b/apps/red-ui/src/app/modules/auth/auth.module.ts @@ -7,11 +7,7 @@ import { KeycloakAngularModule, KeycloakOptions, KeycloakService } from 'keycloa import { AppConfigKey, AppConfigService } from '@app-config/app-config.service'; import { BASE_HREF } from '../../tokens'; -export function keycloakInitializer( - keycloak: KeycloakService, - appConfigService: AppConfigService, - baseUrl -) { +export function keycloakInitializer(keycloak: KeycloakService, appConfigService: AppConfigService, baseUrl) { return () => appConfigService .loadAppConfig() @@ -30,15 +26,12 @@ export function keycloakInitializer( initOptions: { checkLoginIframe: false, onLoad: 'check-sso', - silentCheckSsoRedirectUri: - window.location.origin + baseUrl + '/assets/oauth/silent-refresh.html', + silentCheckSsoRedirectUri: window.location.origin + baseUrl + '/assets/oauth/silent-refresh.html', flow: 'standard' }, enableBearerInterceptor: true }; - return keycloak - .init(options) - .then(() => configureAutomaticRedirectToLoginScreen(keycloak)); + return keycloak.init(options).then(() => configureAutomaticRedirectToLoginScreen(keycloak)); }); } diff --git a/apps/red-ui/src/app/modules/auth/red-role.guard.ts b/apps/red-ui/src/app/modules/auth/red-role.guard.ts index 5c9c0d5d5..477957c94 100644 --- a/apps/red-ui/src/app/modules/auth/red-role.guard.ts +++ b/apps/red-ui/src/app/modules/auth/red-role.guard.ts @@ -27,10 +27,7 @@ export class RedRoleGuard implements CanActivate { if ( this._userService.user.isUserAdmin && !this._userService.user.isAdmin && - !( - state.url.startsWith('/main/admin/users') || - state.url.startsWith('/main/my-profile') - ) + !(state.url.startsWith('/main/admin/users') || state.url.startsWith('/main/my-profile')) ) { this._router.navigate(['/main/admin/users']); obs.next(false); diff --git a/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.html b/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.html index 0a0f8fc96..4b2b05229 100644 --- a/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/bulk-actions/dossier-overview-bulk-actions.component.html @@ -42,10 +42,7 @@ >
- + { - this.annotation.comments.push({ - text: value, - id: commentResponse.commentId, - user: this._userService.userId - }); + this._manualAnnotationService.addComment(value, this.annotation.id).subscribe(commentResponse => { + this.annotation.comments.push({ + text: value, + id: commentResponse.commentId, + user: this._userService.userId }); + }); this.commentForm.reset(); } } @@ -54,14 +52,12 @@ export class CommentsComponent { } deleteComment(comment: Comment): void { - this._manualAnnotationService - .deleteComment(comment.id, this.annotation.id) - .subscribe(() => { - this.annotation.comments.splice(this.annotation.comments.indexOf(comment), 1); - if (!this.annotation.comments.length) { - this._hidden = true; - } - }); + this._manualAnnotationService.deleteComment(comment.id, this.annotation.id).subscribe(() => { + this.annotation.comments.splice(this.annotation.comments.indexOf(comment), 1); + if (!this.annotation.comments.length) { + this._hidden = true; + } + }); } isCommentOwner(comment: Comment): boolean { diff --git a/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.html b/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.html index b45eaf546..0558d76b6 100644 --- a/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.html @@ -26,30 +26,20 @@
- {{ - 'file-preview.tabs.document-info.details.dossier' - | translate: { dossierName: dossier.name } - }} + {{ 'file-preview.tabs.document-info.details.dossier' | translate: { dossierName: dossier.name } }}
- {{ - 'file-preview.tabs.document-info.details.pages' - | translate: { pages: file.numberOfPages } - }} + {{ 'file-preview.tabs.document-info.details.pages' | translate: { pages: file.numberOfPages } }}
- {{ - 'file-preview.tabs.document-info.details.created-on' - | translate: { date: file.added | date: 'mediumDate' } - }} + {{ 'file-preview.tabs.document-info.details.created-on' | translate: { date: file.added | date: 'mediumDate' } }}
{{ - 'file-preview.tabs.document-info.details.due' - | translate: { date: dossier.dossier.dueDate | date: 'mediumDate' } + 'file-preview.tabs.document-info.details.due' | translate: { date: dossier.dossier.dueDate | date: 'mediumDate' } }}
diff --git a/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.ts b/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.ts index 754972a6e..72cd05668 100644 --- a/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/document-info/document-info.component.ts @@ -14,10 +14,7 @@ export class DocumentInfoComponent { fileAttributesConfig: FileAttributesConfig; - constructor( - private readonly _appStateService: AppStateService, - private readonly _dialogService: DossiersDialogService - ) { + constructor(private readonly _appStateService: AppStateService, private readonly _dialogService: DossiersDialogService) { this.fileAttributesConfig = this._appStateService.activeFileAttributesConfig; } diff --git a/apps/red-ui/src/app/modules/dossier/components/dossier-listing-actions/dossier-listing-actions.component.html b/apps/red-ui/src/app/modules/dossier/components/dossier-listing-actions/dossier-listing-actions.component.html index ae58a0ab7..382643c84 100644 --- a/apps/red-ui/src/app/modules/dossier/components/dossier-listing-actions/dossier-listing-actions.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/dossier-listing-actions/dossier-listing-actions.component.html @@ -16,9 +16,5 @@ type="dark-bg" > - +
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 dc7c5b5db..0f339b53a 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 @@ -1,9 +1,6 @@
- +
@@ -94,11 +91,7 @@ *ngIf="permissionsService.isReadyForApproval(fileStatus)" [disabled]="!permissionsService.canApprove(fileStatus)" [tooltipPosition]="tooltipPosition" - [tooltip]=" - permissionsService.canApprove(fileStatus) - ? 'dossier-overview.approve' - : 'dossier-overview.approve-disabled' - " + [tooltip]="permissionsService.canApprove(fileStatus) ? 'dossier-overview.approve' : 'dossier-overview.approve-disabled'" [type]="buttonType" icon="red:approved" > diff --git a/apps/red-ui/src/app/modules/dossier/components/needs-work-badge/needs-work-badge.component.html b/apps/red-ui/src/app/modules/dossier/components/needs-work-badge/needs-work-badge.component.html index 0a14004fe..dbf5b95fa 100644 --- a/apps/red-ui/src/app/modules/dossier/components/needs-work-badge/needs-work-badge.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/needs-work-badge/needs-work-badge.component.html @@ -1,34 +1,14 @@
- - + + - - + + this.needsWorkInput).hasAnnotationComments - ); + return this.needsWorkInput instanceof FileStatusWrapper && (this.needsWorkInput).hasAnnotationComments; } reanalysisRequired() { diff --git a/apps/red-ui/src/app/modules/dossier/components/page-indicator/page-indicator.component.ts b/apps/red-ui/src/app/modules/dossier/components/page-indicator/page-indicator.component.ts index ef232df41..2570b45fb 100644 --- a/apps/red-ui/src/app/modules/dossier/components/page-indicator/page-indicator.component.ts +++ b/apps/red-ui/src/app/modules/dossier/components/page-indicator/page-indicator.component.ts @@ -1,13 +1,4 @@ -import { - Component, - EventEmitter, - Input, - OnChanges, - OnDestroy, - OnInit, - Output, - SimpleChanges -} from '@angular/core'; +import { Component, EventEmitter, Input, OnChanges, OnDestroy, OnInit, Output, SimpleChanges } from '@angular/core'; import { ViewedPages, ViewedPagesControllerService } from '@redaction/red-ui-http'; import { AppStateService } from '@state/app-state.service'; import { PermissionsService } from '@services/permissions.service'; @@ -104,11 +95,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy { private _markPageRead() { this._viewedPagesControllerService - .addPage( - { page: this.number }, - this._appStateService.activeDossierId, - this._appStateService.activeFileId - ) + .addPage({ page: this.number }, this._appStateService.activeDossierId, this._appStateService.activeFileId) .subscribe(() => { this.viewedPages?.pages?.push(this.number); }); @@ -116,11 +103,7 @@ export class PageIndicatorComponent implements OnChanges, OnInit, OnDestroy { private _markPageUnread() { this._viewedPagesControllerService - .removePage( - this._appStateService.activeDossierId, - this._appStateService.activeFileId, - this.number - ) + .removePage(this._appStateService.activeDossierId, this._appStateService.activeFileId, this.number) .subscribe(() => { this.viewedPages?.pages?.splice(this.viewedPages?.pages?.indexOf(this.number), 1); }); diff --git a/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.html b/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.html index bcfbe8777..e20a2f31b 100644 --- a/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.html +++ b/apps/red-ui/src/app/modules/dossier/components/pdf-viewer/pdf-viewer.component.html @@ -2,12 +2,7 @@
- +
-
- + diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts b/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts index b6ff867e3..393998aaa 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts +++ b/apps/red-ui/src/app/modules/dossier/dialogs/document-info-dialog/document-info-dialog.component.ts @@ -1,10 +1,6 @@ import { Component, Inject, OnInit } from '@angular/core'; import { FormBuilder, FormGroup } from '@angular/forms'; -import { - FileAttributeConfig, - FileAttributesControllerService, - FileStatus -} from '@redaction/red-ui-http'; +import { FileAttributeConfig, FileAttributesControllerService, FileStatus } from '@redaction/red-ui-http'; import { AppStateService } from '@state/app-state.service'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { DossierWrapper } from '@state/model/dossier.wrapper'; @@ -34,9 +30,7 @@ export class DocumentInfoDialogComponent implements OnInit { async ngOnInit() { this.attributes = ( - await this._fileAttributesService - .getFileAttributesConfiguration(this._dossier.dossierTemplateId) - .toPromise() + await this._fileAttributesService.getFileAttributesConfiguration(this._dossier.dossierTemplateId).toPromise() ).fileAttributeConfigs.filter(attr => attr.editable); const formConfig = this.attributes.reduce( (acc, attr) => ({ @@ -53,9 +47,7 @@ export class DocumentInfoDialogComponent implements OnInit { ...this.file.fileAttributes?.attributeIdToValue, ...this.documentInfoForm.getRawValue() }; - await this._fileAttributesService - .setFileAttributes({ attributeIdToValue }, this.file.dossierId, this.file.fileId) - .toPromise(); + await this._fileAttributesService.setFileAttributes({ attributeIdToValue }, this.file.dossierId, this.file.fileId).toPromise(); this.file.fileAttributes = { attributeIdToValue }; this.dialogRef.close(true); } diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/dossier-dictionary-dialog/dossier-dictionary-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/dossier-dictionary-dialog/dossier-dictionary-dialog.component.html index c98e77be4..445d8cd9e 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/dossier-dictionary-dialog/dossier-dictionary-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/dossier-dictionary-dialog/dossier-dictionary-dialog.component.html @@ -12,26 +12,13 @@
- -
+
- + diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/team-members/edit-dossier-team-members.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/team-members/edit-dossier-team-members.component.html index 530efedca..6fe380e42 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/team-members/edit-dossier-team-members.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/edit-dossier-dialog/team-members/edit-dossier-team-members.component.html @@ -1,4 +1 @@ - + diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/force-redaction-dialog/force-redaction-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/force-redaction-dialog/force-redaction-dialog.component.html index feadb7245..845be9a24 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/force-redaction-dialog/force-redaction-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/force-redaction-dialog/force-redaction-dialog.component.html @@ -1,25 +1,16 @@
-
+
- + {{ option.label }} @@ -27,22 +18,12 @@
- +
- +
@@ -53,9 +34,5 @@
- +
diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html index b62deb489..57c5ef08f 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/manual-redaction-dialog/manual-annotation-dialog.component.html @@ -19,9 +19,7 @@
@@ -38,28 +36,15 @@
- +
- +
-
+
@@ -85,9 +70,5 @@
- + diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html index a256d59de..fbcddfdd3 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/recategorize-image-dialog/recategorize-image-dialog.component.html @@ -18,36 +18,17 @@
- +
- -
+
- + diff --git a/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html b/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html index 9b9f80f93..aabddd419 100644 --- a/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html +++ b/apps/red-ui/src/app/modules/dossier/dialogs/remove-annotations-dialog/remove-annotations-dialog.component.html @@ -49,9 +49,5 @@
- + diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts index 477033369..b00cf0589 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-actions.service.ts @@ -21,44 +21,25 @@ export class AnnotationActionsService { private readonly _dialogService: DossiersDialogService ) {} - acceptSuggestion( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + acceptSuggestion($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { $event?.stopPropagation(); annotations.forEach(annotation => { this._processObsAndEmit( - this._manualAnnotationService.approveRequest( - annotation.id, - annotation.isModifyDictionary - ), + this._manualAnnotationService.approveRequest(annotation.id, annotation.isModifyDictionary), annotation, annotationsChanged ); }); } - rejectSuggestion( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + rejectSuggestion($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { $event?.stopPropagation(); annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.declineOrRemoveRequest(annotation), - annotation, - annotationsChanged - ); + this._processObsAndEmit(this._manualAnnotationService.declineOrRemoveRequest(annotation), annotation, annotationsChanged); }); } - forceRedaction( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + forceRedaction($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { $event?.stopPropagation(); this._dialogService.openForceRedactionDialog($event, request => { annotations.forEach(annotation => { @@ -74,28 +55,16 @@ export class AnnotationActionsService { }); } - changeLegalBasis( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { - this._dialogService.openChangeLegalBasisDialog( - $event, - annotations, - (data: { comment: string; legalBasis: string }) => { - annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.changeLegalBasis( - annotation.annotationId, - data.legalBasis, - data.comment - ), - annotation, - annotationsChanged - ); - }); - } - ); + changeLegalBasis($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { + this._dialogService.openChangeLegalBasisDialog($event, annotations, (data: { comment: string; legalBasis: string }) => { + annotations.forEach(annotation => { + this._processObsAndEmit( + this._manualAnnotationService.changeLegalBasis(annotation.annotationId, data.legalBasis, data.comment), + annotation, + annotationsChanged + ); + }); + }); } suggestRemoveAnnotation( @@ -104,97 +73,55 @@ export class AnnotationActionsService { removeFromDictionary: boolean, annotationsChanged: EventEmitter ) { - this._dialogService.openRemoveFromDictionaryDialog( - $event, - annotations, - removeFromDictionary, - () => { - annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.removeOrSuggestRemoveAnnotation( - annotation, - removeFromDictionary - ), - annotation, - annotationsChanged - ); - }); - } - ); + this._dialogService.openRemoveFromDictionaryDialog($event, annotations, removeFromDictionary, () => { + annotations.forEach(annotation => { + this._processObsAndEmit( + this._manualAnnotationService.removeOrSuggestRemoveAnnotation(annotation, removeFromDictionary), + annotation, + annotationsChanged + ); + }); + }); } - markAsFalsePositive( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + markAsFalsePositive($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { annotations.forEach(annotation => { const permissions = AnnotationPermissions.forUser( this._permissionsService.isApprover(), this._permissionsService.currentUser, annotation ); - const value = permissions.canMarkTextOnlyAsFalsePositive - ? annotation.value - : this._getFalsePositiveText(annotation); + const value = permissions.canMarkTextOnlyAsFalsePositive ? annotation.value : this._getFalsePositiveText(annotation); this._markAsFalsePositive($event, annotation, value, annotationsChanged); }); } - recategorizeImage( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { - this._dialogService.openRecategorizeImageDialog( - $event, - annotations, - (data: { type: string; comment: string }) => { - annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.recategorizeImage( - annotation.annotationId, - data.type, - data.comment - ), - annotation, - annotationsChanged - ); - }); - } - ); - } - - undoDirectAction( - $event: MouseEvent, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { - $event?.stopPropagation(); - - annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.undoRequest(annotation), - annotation, - annotationsChanged - ); + recategorizeImage($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { + this._dialogService.openRecategorizeImageDialog($event, annotations, (data: { type: string; comment: string }) => { + annotations.forEach(annotation => { + this._processObsAndEmit( + this._manualAnnotationService.recategorizeImage(annotation.annotationId, data.type, data.comment), + annotation, + annotationsChanged + ); + }); }); } - convertRecommendationToAnnotation( - $event: any, - annotations: AnnotationWrapper[], - annotationsChanged: EventEmitter - ) { + undoDirectAction($event: MouseEvent, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { $event?.stopPropagation(); annotations.forEach(annotation => { - this._processObsAndEmit( - this._manualAnnotationService.addRecommendation(annotation), - annotation, - annotationsChanged - ); + this._processObsAndEmit(this._manualAnnotationService.undoRequest(annotation), annotation, annotationsChanged); + }); + } + + convertRecommendationToAnnotation($event: any, annotations: AnnotationWrapper[], annotationsChanged: EventEmitter) { + $event?.stopPropagation(); + + annotations.forEach(annotation => { + this._processObsAndEmit(this._manualAnnotationService.addRecommendation(annotation), annotation, annotationsChanged); }); } @@ -206,15 +133,10 @@ export class AnnotationActionsService { const annotationPermissions = annotations.map(a => ({ annotation: a, - permissions: AnnotationPermissions.forUser( - this._permissionsService.isApprover(), - this._permissionsService.currentUser, - a - ) + permissions: AnnotationPermissions.forUser(this._permissionsService.isApprover(), this._permissionsService.currentUser, a) })); - const canRecategorizeImage = - annotations.length === 1 && annotationPermissions[0].permissions.canRecategorizeImage; + const canRecategorizeImage = annotations.length === 1 && annotationPermissions[0].permissions.canRecategorizeImage; if (canRecategorizeImage) { availableActions.push({ type: 'actionButton', @@ -236,9 +158,7 @@ export class AnnotationActionsService { availableActions.push({ type: 'actionButton', img: this._convertPath('/assets/icons/general/remove-from-dict.svg'), - title: this._translateService.instant( - 'annotation-actions.remove-annotation.remove-from-dict' - ), + title: this._translateService.instant('annotation-actions.remove-annotation.remove-from-dict'), onClick: () => { this._ngZone.run(() => { this.suggestRemoveAnnotation(null, annotations, true, annotationsChanged); @@ -247,33 +167,21 @@ export class AnnotationActionsService { }); } - const canAcceptRecommendation = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canAcceptRecommendation, - true - ); + const canAcceptRecommendation = annotationPermissions.reduce((acc, next) => acc && next.permissions.canAcceptRecommendation, true); if (canAcceptRecommendation) { availableActions.push({ type: 'actionButton', img: this._convertPath('/assets/icons/general/check.svg'), - title: this._translateService.instant( - 'annotation-actions.accept-recommendation.label' - ), + title: this._translateService.instant('annotation-actions.accept-recommendation.label'), onClick: () => { this._ngZone.run(() => { - this.convertRecommendationToAnnotation( - null, - annotations, - annotationsChanged - ); + this.convertRecommendationToAnnotation(null, annotations, annotationsChanged); }); } }); } - const canAcceptSuggestion = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canAcceptSuggestion, - true - ); + const canAcceptSuggestion = annotationPermissions.reduce((acc, next) => acc && next.permissions.canAcceptSuggestion, true); if (canAcceptSuggestion) { availableActions.push({ type: 'actionButton', @@ -287,10 +195,7 @@ export class AnnotationActionsService { }); } - const canUndo = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canUndo, - true - ); + const canUndo = annotationPermissions.reduce((acc, next) => acc && next.permissions.canUndo, true); if (canUndo) { availableActions.push({ type: 'actionButton', @@ -305,19 +210,14 @@ export class AnnotationActionsService { } const canMarkAsFalsePositive = annotationPermissions.reduce( - (acc, next) => - acc && - (next.permissions.canMarkAsFalsePositive || - next.permissions.canMarkTextOnlyAsFalsePositive), + (acc, next) => acc && (next.permissions.canMarkAsFalsePositive || next.permissions.canMarkTextOnlyAsFalsePositive), true ); if (canMarkAsFalsePositive) { availableActions.push({ type: 'actionButton', img: this._convertPath('/assets/icons/general/thumb-down.svg'), - title: this._translateService.instant( - 'annotation-actions.remove-annotation.false-positive' - ), + title: this._translateService.instant('annotation-actions.remove-annotation.false-positive'), onClick: () => { this._ngZone.run(() => { this.markAsFalsePositive(null, annotations, annotationsChanged); @@ -326,10 +226,7 @@ export class AnnotationActionsService { }); } - const canForceRedaction = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canForceRedaction, - true - ); + const canForceRedaction = annotationPermissions.reduce((acc, next) => acc && next.permissions.canForceRedaction, true); if (canForceRedaction) { availableActions.push({ type: 'actionButton', @@ -343,10 +240,7 @@ export class AnnotationActionsService { }); } - const canRejectSuggestion = annotationPermissions.reduce( - (acc, next) => acc && next.permissions.canRejectSuggestion, - true - ); + const canRejectSuggestion = annotationPermissions.reduce((acc, next) => acc && next.permissions.canRejectSuggestion, true); if (canRejectSuggestion) { availableActions.push({ type: 'actionButton', @@ -368,9 +262,7 @@ export class AnnotationActionsService { availableActions.push({ type: 'actionButton', img: this._convertPath('/assets/icons/general/trash.svg'), - title: this._translateService.instant( - 'annotation-actions.remove-annotation.only-here' - ), + title: this._translateService.instant('annotation-actions.remove-annotation.only-here'), onClick: () => { this._ngZone.run(() => { this.suggestRemoveAnnotation(null, annotations, false, annotationsChanged); @@ -382,11 +274,7 @@ export class AnnotationActionsService { return availableActions; } - private _processObsAndEmit( - obs: Observable, - annotation: AnnotationWrapper, - annotationsChanged: EventEmitter - ) { + private _processObsAndEmit(obs: Observable, annotation: AnnotationWrapper, annotationsChanged: EventEmitter) { obs.subscribe( () => { annotationsChanged.emit(annotation); @@ -426,11 +314,7 @@ export class AnnotationActionsService { falsePositiveRequest.addToDictionary = true; falsePositiveRequest.comment = { text: 'False Positive' }; - this._processObsAndEmit( - this._manualAnnotationService.addAnnotation(falsePositiveRequest), - annotation, - annotationsChanged - ); + this._processObsAndEmit(this._manualAnnotationService.addAnnotation(falsePositiveRequest), annotation, annotationsChanged); } private _convertPath(path: string): string { diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts index 68a4dca74..41b9d9b9c 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-draw.service.ts @@ -1,11 +1,6 @@ import { Injectable } from '@angular/core'; import { Annotations, WebViewerInstance } from '@pdftron/webviewer'; -import { - Rectangle, - RedactionLogControllerService, - SectionGrid, - SectionRectangle -} from '@redaction/red-ui-http'; +import { Rectangle, RedactionLogControllerService, SectionGrid, SectionRectangle } from '@redaction/red-ui-http'; import { hexToRgb } from '@utils/functions'; import { AppStateService } from '@state/app-state.service'; import { AnnotationWrapper } from '@models/file/annotation.wrapper'; @@ -27,9 +22,7 @@ export class AnnotationDrawService { ) { const annotations = []; annotationWrappers.forEach(annotation => { - annotations.push( - this.computeAnnotation(activeViewer, annotation, hideSkipped, compareMode) - ); + annotations.push(this.computeAnnotation(activeViewer, annotation, hideSkipped, compareMode)); }); const annotationManager = activeViewer.annotManager; @@ -38,10 +31,7 @@ export class AnnotationDrawService { if (this._userPreferenceService.areDevFeaturesEnabled) { this._redactionLogControllerService - .getSectionGrid( - this._appStateService.activeDossierId, - this._appStateService.activeFileId - ) + .getSectionGrid(this._appStateService.activeDossierId, this._appStateService.activeFileId) .subscribe(sectionGrid => { this.drawSections(activeViewer, sectionGrid); }); @@ -53,9 +43,7 @@ export class AnnotationDrawService { for (const page of Object.keys(sectionGrid.rectanglesPerPage)) { const sectionRectangles: SectionRectangle[] = sectionGrid.rectanglesPerPage[page]; sectionRectangles.forEach(sectionRectangle => { - sections.push( - this.computeSection(activeViewer, parseInt(page, 10), sectionRectangle) - ); + sections.push(this.computeSection(activeViewer, parseInt(page, 10), sectionRectangle)); // sectionRectangle.tableCells?.forEach(cell =>{ // sections.push(this.computeSection(activeViewer, parseInt(page, 10), cell)); // }) @@ -66,11 +54,7 @@ export class AnnotationDrawService { annotationManager.drawAnnotationsFromList(sections); } - computeSection( - activeViewer: WebViewerInstance, - pageNumber: number, - sectionRectangle: SectionRectangle - ) { + computeSection(activeViewer: WebViewerInstance, pageNumber: number, sectionRectangle: SectionRectangle) { const rectangleAnnot = new activeViewer.Annotations.RectangleAnnotation(); const pageHeight = activeViewer.docViewer.getPageHeight(pageNumber); const rectangle = { @@ -97,44 +81,25 @@ export class AnnotationDrawService { hideSkipped: boolean = false, compareMode: boolean = false ) { - const pageNumber = compareMode - ? annotationWrapper.pageNumber * 2 - 1 - : annotationWrapper.pageNumber; + const pageNumber = compareMode ? annotationWrapper.pageNumber * 2 - 1 : annotationWrapper.pageNumber; const highlight = new activeViewer.Annotations.TextHighlightAnnotation(); highlight.PageNumber = pageNumber; - highlight.StrokeColor = this.getColor( - activeViewer, - annotationWrapper.superType, - annotationWrapper.dictionary - ); + highlight.StrokeColor = this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.dictionary); highlight.setContents(annotationWrapper.content); - highlight.Quads = this._rectanglesToQuads( - annotationWrapper.positions, - activeViewer, - pageNumber - ); + highlight.Quads = this._rectanglesToQuads(annotationWrapper.positions, activeViewer, pageNumber); highlight.Id = annotationWrapper.id; highlight.ReadOnly = true; // change log entries are drawn lighter highlight.Opacity = annotationWrapper.isChangeLogRemoved ? 0.2 : 1; - highlight.Hidden = - annotationWrapper.isChangeLogRemoved || - (hideSkipped && annotationWrapper.isSkipped) || - annotationWrapper.isOCR; + highlight.Hidden = annotationWrapper.isChangeLogRemoved || (hideSkipped && annotationWrapper.isSkipped) || annotationWrapper.isOCR; highlight.setCustomData('redacto-manager', true); highlight.setCustomData('redaction', annotationWrapper.isRedacted); highlight.setCustomData('skipped', annotationWrapper.isSkipped); highlight.setCustomData('changeLog', annotationWrapper.isChangeLogEntry); highlight.setCustomData('changeLogRemoved', annotationWrapper.isChangeLogRemoved); - highlight.setCustomData( - 'redactionColor', - this.getColor(activeViewer, 'redaction', 'redaction') - ); - highlight.setCustomData( - 'annotationColor', - this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.dictionary) - ); + highlight.setCustomData('redactionColor', this.getColor(activeViewer, 'redaction', 'redaction')); + highlight.setCustomData('annotationColor', this.getColor(activeViewer, annotationWrapper.superType, annotationWrapper.dictionary)); return highlight; } @@ -174,20 +139,12 @@ export class AnnotationDrawService { return new activeViewer.CoreControls.Math.Quad(x1, y1, x2, y2, x3, y3, x4, y4); } - private _rectanglesToQuads( - positions: Rectangle[], - activeViewer: WebViewerInstance, - pageNumber: number - ): any[] { + private _rectanglesToQuads(positions: Rectangle[], activeViewer: WebViewerInstance, pageNumber: number): any[] { const pageHeight = activeViewer.docViewer.getPageHeight(pageNumber); return positions.map(p => this._rectangleToQuad(p, activeViewer, pageHeight)); } - private _rectangleToQuad( - rectangle: Rectangle, - activeViewer: WebViewerInstance, - pageHeight: number - ): any { + private _rectangleToQuad(rectangle: Rectangle, activeViewer: WebViewerInstance, pageHeight: number): any { const x1 = rectangle.topLeft.x; const y1 = pageHeight - (rectangle.topLeft.y + rectangle.height); diff --git a/apps/red-ui/src/app/modules/dossier/services/annotation-processing.service.ts b/apps/red-ui/src/app/modules/dossier/services/annotation-processing.service.ts index d189d56fc..1cd4e3e57 100644 --- a/apps/red-ui/src/app/modules/dossier/services/annotation-processing.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/annotation-processing.service.ts @@ -24,8 +24,7 @@ export class AnnotationProcessingService { checked: false, topLevelFilter: true, filters: [], - checker: (annotation: AnnotationWrapper) => - annotation?.legalBasisChangeValue?.length > 0 + checker: (annotation: AnnotationWrapper) => annotation?.legalBasisChangeValue?.length > 0 } ]; } @@ -35,10 +34,7 @@ export class AnnotationProcessingService { const filters: FilterModel[] = []; annotations?.forEach(a => { - const topLevelFilter = - a.superType !== 'hint' && - a.superType !== 'redaction' && - a.superType !== 'recommendation'; + const topLevelFilter = a.superType !== 'hint' && a.superType !== 'redaction' && a.superType !== 'recommendation'; const key = topLevelFilter ? a.superType : a.superType + a.dictionary; const filter = filterMap.get(key); if (filter) { @@ -96,9 +92,7 @@ export class AnnotationProcessingService { if ( !this._matchesAll( secondaryFlatFilters, - f => - (!!f.checker && f.checker(annotation)) || - this._checkByFilterKey(f, annotation) + f => (!!f.checker && f.checker(annotation)) || this._checkByFilterKey(f, annotation) ) ) { continue; @@ -127,11 +121,7 @@ export class AnnotationProcessingService { return obj; } - private _createParentFilter( - key: string, - filterMap: Map, - filters: FilterModel[] - ) { + private _createParentFilter(key: string, filterMap: Map, filters: FilterModel[]) { const filter: FilterModel = { key: key, topLevelFilter: true, @@ -155,10 +145,7 @@ export class AnnotationProcessingService { return filterBy ? flatFilters.filter(f => filterBy(f)) : flatFilters; } - private _matchesOne = ( - filters: FilterModel[], - condition: (filter: FilterModel) => boolean - ): boolean => { + private _matchesOne = (filters: FilterModel[], condition: (filter: FilterModel) => boolean): boolean => { if (filters.length === 0) return true; for (const filter of filters) { @@ -168,10 +155,7 @@ export class AnnotationProcessingService { return false; }; - private _matchesAll = ( - filters: FilterModel[], - condition: (filter: FilterModel) => boolean - ): boolean => { + private _matchesAll = (filters: FilterModel[], condition: (filter: FilterModel) => boolean): boolean => { if (filters.length === 0) return true; for (const filter of filters) { @@ -183,13 +167,9 @@ export class AnnotationProcessingService { private _checkByFilterKey = (filter: FilterModel, annotation: AnnotationWrapper) => { const superType = annotation.superType; - const isNotTopLevelFilter = - superType === 'hint' || superType === 'redaction' || superType === 'recommendation'; + const isNotTopLevelFilter = superType === 'hint' || superType === 'redaction' || superType === 'recommendation'; - return ( - filter.key === superType || - (filter.key === annotation.dictionary && isNotTopLevelFilter) - ); + return filter.key === superType || (filter.key === annotation.dictionary && isNotTopLevelFilter); }; private _sortAnnotations(annotations: AnnotationWrapper[]): AnnotationWrapper[] { 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 3c6634fae..80f06622c 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 @@ -47,11 +47,7 @@ export class FileActionService { } } - assignDossierApprover( - file?: FileStatusWrapper, - callback?: Function, - ignoreDialogChanges = false - ) { + assignDossierApprover(file?: FileStatusWrapper, callback?: Function, ignoreDialogChanges = false) { this._dialogService.openAssignFileToUserDialog( file ? [file] : [this._appStateService.activeFile], 'approver', @@ -65,11 +61,7 @@ export class FileActionService { ); } - assignDossierReviewer( - file?: FileStatusWrapper, - callback?: Function, - ignoreDialogChanges = false - ) { + assignDossierReviewer(file?: FileStatusWrapper, callback?: Function, ignoreDialogChanges = false) { this._dialogService.openAssignFileToUserDialog( file ? [file] : [this._appStateService.activeFile], 'reviewer', @@ -88,10 +80,7 @@ export class FileActionService { fileStatus = [fileStatus]; } - const atLeastOneFileHasReviewer = fileStatus.reduce( - (acc, fs) => acc || !!fs.currentReviewer, - false - ); + const atLeastOneFileHasReviewer = fileStatus.reduce((acc, fs) => acc || !!fs.currentReviewer, false); if (atLeastOneFileHasReviewer) { this._dialogService.openAssignFileToMeDialog(async () => { await this._assignReviewerToCurrentUser(fileStatus, callback); @@ -148,22 +137,15 @@ export class FileActionService { } private _openAssignReviewerDialog(file?: FileStatusWrapper, callback?: Function) { - this._dialogService.openAssignFileToUserDialog( - file ? [file] : [this._appStateService.activeFile], - 'reviewer', - async () => { - await this._appStateService.reloadActiveDossierFiles(); - if (callback) { - callback(); - } + this._dialogService.openAssignFileToUserDialog(file ? [file] : [this._appStateService.activeFile], 'reviewer', async () => { + await this._appStateService.reloadActiveDossierFiles(); + if (callback) { + callback(); } - ); + }); } - private async _assignReviewerToCurrentUser( - fileStatus: FileStatusWrapper | FileStatusWrapper[], - callback?: Function - ) { + private async _assignReviewerToCurrentUser(fileStatus: FileStatusWrapper | FileStatusWrapper[], callback?: Function) { if (!isArray(fileStatus)) { fileStatus = [fileStatus]; } diff --git a/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts b/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts index 990fd71c5..055e3670d 100644 --- a/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/manual-annotation.service.ts @@ -77,12 +77,7 @@ export class ManualAnnotationService { return obs.pipe( tap( () => this._notify(this._getMessage(mode)), - error => - this._notify( - this._getMessage(mode, modifyDictionary, true), - NotificationType.ERROR, - error - ) + error => this._notify(this._getMessage(mode, modifyDictionary, true), NotificationType.ERROR, error) ) ); } @@ -124,9 +119,7 @@ export class ManualAnnotationService { // /manualRedaction/redaction/legalBasisChange // /manualRedaction/request/legalBasis changeLegalBasis(annotationId: string, legalBasis: string, comment?: string) { - const mode: Mode = this._permissionsService.isApprover() - ? 'change-legal-basis' - : 'request-change-legal-basis'; + const mode: Mode = this._permissionsService.isApprover() ? 'change-legal-basis' : 'request-change-legal-basis'; return this._makeRequest(mode, { annotationId, legalBasis, comment }); } @@ -134,9 +127,7 @@ export class ManualAnnotationService { // /manualRedaction/redaction/recategorize // /manualRedaction/request/recategorize recategorizeImage(annotationId: string, type: string, comment: string) { - const mode: Mode = this._permissionsService.isApprover() - ? 'recategorize-image' - : 'request-image-recategorization'; + const mode: Mode = this._permissionsService.isApprover() ? 'recategorize-image' : 'request-image-recategorization'; return this._makeRequest(mode, { annotationId, type, comment }); } @@ -145,21 +136,14 @@ export class ManualAnnotationService { // /manualRedaction/request/add addAnnotation(manualRedactionEntry: AddRedactionRequest) { const mode: Mode = this._permissionsService.isApprover() ? 'add' : 'suggest'; - return this._makeRequest( - mode, - manualRedactionEntry, - null, - manualRedactionEntry.addToDictionary - ); + return this._makeRequest(mode, manualRedactionEntry, null, manualRedactionEntry.addToDictionary); } // this wraps // /manualRedaction/redaction/force // /manualRedaction/request/force forceRedaction(request: ForceRedactionRequest) { - const mode: Mode = this._permissionsService.isApprover() - ? 'force-redaction' - : 'request-force-redaction'; + const mode: Mode = this._permissionsService.isApprover() ? 'force-redaction' : 'request-force-redaction'; return this._makeRequest(mode, request); } @@ -167,21 +151,11 @@ export class ManualAnnotationService { // /manualRedaction/approve approveRequest(annotationId: string, addToDictionary: boolean = false) { // for only here - approve the request - return this._makeRequest( - 'approve', - { addOrRemoveFromDictionary: addToDictionary }, - annotationId, - addToDictionary - ); + return this._makeRequest('approve', { addOrRemoveFromDictionary: addToDictionary }, annotationId, addToDictionary); } undoRequest(annotationWrapper: AnnotationWrapper) { - return this._makeRequest( - 'undo', - annotationWrapper.id, - null, - annotationWrapper.isModifyDictionary - ); + return this._makeRequest('undo', annotationWrapper.id, null, annotationWrapper.isModifyDictionary); } // this wraps @@ -189,21 +163,13 @@ export class ManualAnnotationService { // /manualRedaction/undo declineOrRemoveRequest(annotationWrapper: AnnotationWrapper) { const mode: Mode = this._permissionsService.isApprover() ? 'decline' : 'undo'; - return this._makeRequest( - mode, - annotationWrapper.id, - null, - annotationWrapper.isModifyDictionary - ); + return this._makeRequest(mode, annotationWrapper.id, null, annotationWrapper.isModifyDictionary); } // this wraps // /manualRedaction/redaction/remove/ // /manualRedaction/request/remove/ - removeOrSuggestRemoveAnnotation( - annotationWrapper: AnnotationWrapper, - removeFromDictionary: boolean = false - ) { + removeOrSuggestRemoveAnnotation(annotationWrapper: AnnotationWrapper, removeFromDictionary: boolean = false) { let mode: Mode, body: any, removeDict = false; @@ -258,15 +224,10 @@ export class ManualAnnotationService { } private _notify(key: string, type: NotificationType = NotificationType.SUCCESS, data?: any) { - this._notificationService.showToastNotification( - this._translateService.instant(key, data), - null, - type, - { - positionClass: 'toast-file-preview', - actions: [] - } - ); + this._notificationService.showToastNotification(this._translateService.instant(key, data), null, type, { + positionClass: 'toast-file-preview', + actions: [] + }); } private _getMessage(mode: Mode, modifyDictionary?: boolean, error: boolean = false) { diff --git a/apps/red-ui/src/app/modules/dossier/services/pdf-viewer-data.service.ts b/apps/red-ui/src/app/modules/dossier/services/pdf-viewer-data.service.ts index 64a9e00d5..d3f1bf249 100644 --- a/apps/red-ui/src/app/modules/dossier/services/pdf-viewer-data.service.ts +++ b/apps/red-ui/src/app/modules/dossier/services/pdf-viewer-data.service.ts @@ -37,9 +37,7 @@ export class PdfViewerDataService { this._man.getManualRedaction(dossierId, fileId).subscribe(); const file$ = this.downloadOriginalFile(this._appStateService.activeFile); - const reactionLog$ = this._redactionLogControllerService - .getRedactionLogPreview(dossierId, fileId) - .pipe(catchError(() => of({}))); + const reactionLog$ = this._redactionLogControllerService.getRedactionLogPreview(dossierId, fileId).pipe(catchError(() => of({}))); const redactionChangeLog$ = this._redactionLogControllerService .getRedactionChangeLog(dossierId, fileId) .pipe(catchError(() => of({}))); @@ -53,10 +51,7 @@ export class PdfViewerDataService { getViewedPagesForActiveFile() { if (this._permissionsService.canMarkPagesAsViewed()) { return this._viewedPagesControllerService - .getViewedPages( - this._appStateService.activeDossierId, - this._appStateService.activeFileId - ) + .getViewedPages(this._appStateService.activeDossierId, this._appStateService.activeFileId) .pipe(catchError(() => of({ pages: [] }))); } return of({ pages: [] }); diff --git a/apps/red-ui/src/app/modules/dossier/utils/compare-mode.utils.ts b/apps/red-ui/src/app/modules/dossier/utils/compare-mode.utils.ts index 24b130efb..f17133c9e 100644 --- a/apps/red-ui/src/app/modules/dossier/utils/compare-mode.utils.ts +++ b/apps/red-ui/src/app/modules/dossier/utils/compare-mode.utils.ts @@ -3,13 +3,7 @@ import { stampPDFPage } from '../../../utils/page-stamper'; const processPage = async (pageNumber, document1, document2, mergedDocument, PDFNet) => { const document1PageCount = await document1.getPageCount(); if (document1PageCount >= pageNumber) { - await mergedDocument.insertPages( - pageNumber * 2, - document1, - pageNumber, - pageNumber, - PDFNet.PDFDoc.InsertFlag.e_none - ); + await mergedDocument.insertPages(pageNumber * 2, document1, pageNumber, pageNumber, PDFNet.PDFDoc.InsertFlag.e_none); } else { const pageToCopy = await document2.getPage(pageNumber); const blankPage = await mergedDocument.pageCreate(await pageToCopy.getCropBox()); @@ -49,9 +43,7 @@ export const loadCompareDocumentWrapper = async ( await processPage(idx, compareDocument, currentDocument, mergedDocument, PDFNet); } - const buffer = await mergedDocument.saveMemoryBuffer( - PDFNet.SDFDoc.SaveOptions.e_linearized - ); + const buffer = await mergedDocument.saveMemoryBuffer(PDFNet.SDFDoc.SaveOptions.e_linearized); const mergedDocumentBuffer = new Blob([buffer], { type: 'application/pdf' diff --git a/apps/red-ui/src/app/modules/icons/icons.module.ts b/apps/red-ui/src/app/modules/icons/icons.module.ts index a8dace459..0b96e9b51 100644 --- a/apps/red-ui/src/app/modules/icons/icons.module.ts +++ b/apps/red-ui/src/app/modules/icons/icons.module.ts @@ -9,10 +9,7 @@ import { DomSanitizer } from '@angular/platform-browser'; exports: [MatIconModule] }) export class IconsModule { - constructor( - private readonly _iconRegistry: MatIconRegistry, - private readonly _sanitizer: DomSanitizer - ) { + constructor(private readonly _iconRegistry: MatIconRegistry, private readonly _sanitizer: DomSanitizer) { const icons = [ 'add', 'analyse', diff --git a/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.html b/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.html index ebd73b821..59576c117 100644 --- a/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.html +++ b/apps/red-ui/src/app/modules/shared/components/assign-user-dropdown/assign-user-dropdown.component.html @@ -27,10 +27,5 @@ - + diff --git a/apps/red-ui/src/app/modules/shared/components/buttons/circle-button/circle-button.component.html b/apps/red-ui/src/app/modules/shared/components/buttons/circle-button/circle-button.component.html index 95bf94fb5..f16c8ed14 100644 --- a/apps/red-ui/src/app/modules/shared/components/buttons/circle-button/circle-button.component.html +++ b/apps/red-ui/src/app/modules/shared/components/buttons/circle-button/circle-button.component.html @@ -1,8 +1,4 @@ -
+
diff --git a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.html b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.html index 39f6e5eda..6f8249aac 100644 --- a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.html +++ b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.html @@ -1,9 +1,4 @@ -
+
diff --git a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts index 5c8f4e60a..1371ac55e 100644 --- a/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/checkbox/round-checkbox.component.ts @@ -1,12 +1,4 @@ -import { - Component, - ElementRef, - HostBinding, - Input, - OnChanges, - OnInit, - ViewChild -} from '@angular/core'; +import { Component, ElementRef, HostBinding, Input, OnChanges, OnInit, ViewChild } from '@angular/core'; @Component({ selector: 'redaction-round-checkbox', diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html index 7b97cafac..22eb999b5 100644 --- a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html +++ b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.html @@ -1,5 +1 @@ - + diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts index 2bffab9f9..3fc06e497 100644 --- a/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/dictionary-annotation-icon/dictionary-annotation-icon.component.ts @@ -19,14 +19,8 @@ export class DictionaryAnnotationIconComponent implements OnChanges { ngOnChanges(): void { if (this.dictionaryKey) { - const typeValue: TypeValueWrapper = this._appStateService.getDictionaryTypeValue( - this.dictionaryKey, - this.dossierTemplateId - ); - this.color = this._appStateService.getDictionaryColor( - this.dictionaryKey, - this.dossierTemplateId - ); + const typeValue: TypeValueWrapper = this._appStateService.getDictionaryTypeValue(this.dictionaryKey, this.dossierTemplateId); + this.color = this._appStateService.getDictionaryColor(this.dictionaryKey, this.dossierTemplateId); this.type = typeValue.hint ? 'circle' : 'square'; this.label = this.dictionaryKey[0].toUpperCase(); } diff --git a/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts b/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts index 73a37074e..a6d438dcf 100644 --- a/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/dictionary-manager/dictionary-manager.component.ts @@ -80,8 +80,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { .subscribe(entries => { this.diffEditorText = entries; this.showDiffEditor = true; - if (this.showDiffEditor) - this._diffEditor?.getOriginalEditor().setValue(this.diffEditorText); + if (this.showDiffEditor) this._diffEditor?.getOriginalEditor().setValue(this.diffEditorText); }); } @@ -136,9 +135,7 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { @debounce() codeEditorTextChanged() { - const newDecorations = this.currentEntries - .filter(entry => this._isNew(entry)) - .map(entry => this._getDecoration(entry)); + const newDecorations = this.currentEntries.filter(entry => this._isNew(entry)).map(entry => this._getDecoration(entry)); this._decorations = this._codeEditor.deltaDecorations(this._decorations, newDecorations); } @@ -162,13 +159,11 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { } private _applySearchDecorations() { - this._searchDecorations = - this._codeEditor?.deltaDecorations(this._searchDecorations, []) || []; + this._searchDecorations = this._codeEditor?.deltaDecorations(this._searchDecorations, []) || []; const decorations = this.findMatches.map(match => this._getSearchDecoration(match)); - this._searchDecorations = - this._codeEditor?.deltaDecorations(this._searchDecorations, decorations) || []; + this._searchDecorations = this._codeEditor?.deltaDecorations(this._searchDecorations, decorations) || []; } private _getMatches(text: string): FindMatch[] { @@ -199,15 +194,8 @@ export class DictionaryManagerComponent implements OnChanges, OnInit { this._codeEditor.revealLineInCenter(range.startLineNumber, SMOOTH_SCROLL); } - private _onDossierChanged({ - dossierId, - dossierTemplateId - }: DossierWrapper): Observable { - const dictionary$ = this._dictionaryControllerService.getDictionaryForType( - dossierTemplateId, - 'dossier_redaction', - dossierId - ); + private _onDossierChanged({ dossierId, dossierTemplateId }: DossierWrapper): Observable { + const dictionary$ = this._dictionaryControllerService.getDictionaryForType(dossierTemplateId, 'dossier_redaction', dossierId); return dictionary$.pipe(map(data => this._toString(data.entries))); } diff --git a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts index 7cca79894..296f0219d 100644 --- a/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/filters/popup-filter/popup-filter.component.ts @@ -1,12 +1,4 @@ -import { - ChangeDetectorRef, - Component, - EventEmitter, - Input, - OnChanges, - Output, - TemplateRef -} from '@angular/core'; +import { ChangeDetectorRef, Component, EventEmitter, Input, OnChanges, Output, TemplateRef } from '@angular/core'; import { FilterModel } from './model/filter.model'; import { handleCheckedValue } from './utils/filter-utils'; import { MAT_CHECKBOX_DEFAULT_OPTIONS } from '@angular/material/checkbox'; @@ -42,10 +34,7 @@ export class PopupFilterComponent implements OnChanges { atLeastOneFilterIsExpandable = false; atLeastOneSecondaryFilterIsExpandable = false; - constructor( - private readonly _changeDetectorRef: ChangeDetectorRef, - private readonly _translateService: TranslateService - ) {} + constructor(private readonly _changeDetectorRef: ChangeDetectorRef, private readonly _translateService: TranslateService) {} get hasActiveFilters(): boolean { return !!this._allFilters.find(f => f.checked || f.indeterminate); @@ -57,9 +46,7 @@ export class PopupFilterComponent implements OnChanges { ngOnChanges(): void { this.atLeastOneFilterIsExpandable = !!this.primaryFilters?.find(f => this.isExpandable(f)); - this.atLeastOneSecondaryFilterIsExpandable = !!this.secondaryFilters?.find(f => - this.isExpandable(f) - ); + this.atLeastOneSecondaryFilterIsExpandable = !!this.secondaryFilters?.find(f => this.isExpandable(f)); } filterCheckboxClicked($event: any, filter: FilterModel, parent?: FilterModel) { diff --git a/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts b/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts index c2401b8a8..c7157206e 100644 --- a/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/initials-avatar/initials-avatar.component.ts @@ -1,11 +1,4 @@ -import { - ChangeDetectionStrategy, - ChangeDetectorRef, - Component, - Input, - OnChanges, - OnDestroy -} from '@angular/core'; +import { ChangeDetectionStrategy, ChangeDetectorRef, Component, Input, OnChanges, OnDestroy } from '@angular/core'; import { UserService } from '@services/user.service'; import { User } from '@redaction/red-ui-http'; import { TranslateService } from '@ngx-translate/core'; diff --git a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.html b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.html index 61fb9d393..b8646c687 100644 --- a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.html +++ b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.html @@ -1,9 +1,4 @@ -
+
|
| -
+
diff --git a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts index b6ce6b86d..951c66126 100644 --- a/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/pagination/pagination.component.ts @@ -50,11 +50,7 @@ export class PaginationComponent { if (Math.max(1, this.currentPage - 1) > 1) { this.displayedPages.push('...'); } - for ( - let page = Math.max(1, this.currentPage - 1); - page <= Math.min(this.currentPage + 1, this.totalPages - 1); - ++page - ) { + for (let page = Math.max(1, this.currentPage - 1); page <= Math.min(this.currentPage + 1, this.totalPages - 1); ++page) { this.displayedPages.push(page); } if (Math.min(this.currentPage + 1, this.totalPages - 1) !== this.totalPages - 1) { diff --git a/apps/red-ui/src/app/modules/shared/components/select/select.component.html b/apps/red-ui/src/app/modules/shared/components/select/select.component.html index 64daca14b..0e8028605 100644 --- a/apps/red-ui/src/app/modules/shared/components/select/select.component.html +++ b/apps/red-ui/src/app/modules/shared/components/select/select.component.html @@ -1,26 +1,13 @@
{{ label }}
-
-
+
+
- + {{ translatePrefix + option | translate }} diff --git a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.html b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.html index 577055adb..31ec0b241 100644 --- a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.html +++ b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.html @@ -23,10 +23,7 @@ -
+
{{ displayedDataTotal }}
{{ subtitle | translate }}
@@ -45,10 +42,7 @@ length: val.value, color: val.color, label: getLabel(val), - cssClass: - val.color === 'PROCESSING' || val.color === 'OCR_PROCESSING' - ? 'loading' - : '' + cssClass: val.color === 'PROCESSING' || val.color === 'OCR_PROCESSING' ? 'loading' : '' } ]" [small]="true" diff --git a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts index a21012acd..24a90e150 100644 --- a/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts +++ b/apps/red-ui/src/app/modules/shared/components/simple-doughnut-chart/simple-doughnut-chart.component.ts @@ -86,9 +86,7 @@ export class SimpleDoughnutChartComponent implements OnChanges { } getLabel(config: DoughnutChartConfig): string { - return this.totalType === 'sum' - ? `${config.value} ${config.label}` - : `${config.label} (${config.value} ${this.counterText})`; + return this.totalType === 'sum' ? `${config.value} ${config.label}` : `${config.label} (${config.value} ${this.counterText})`; } selectValue(key: string) { diff --git a/apps/red-ui/src/app/modules/shared/components/status-bar/status-bar.component.html b/apps/red-ui/src/app/modules/shared/components/status-bar/status-bar.component.html index 02583b6bd..e06bd34f9 100644 --- a/apps/red-ui/src/app/modules/shared/components/status-bar/status-bar.component.html +++ b/apps/red-ui/src/app/modules/shared/components/status-bar/status-bar.component.html @@ -1,9 +1,5 @@
-
+
-
@@ -27,9 +22,5 @@
- + diff --git a/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts b/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts index 403caff1f..764ff07f7 100644 --- a/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts +++ b/apps/red-ui/src/app/modules/shared/dialogs/confirmation-dialog/confirmation-dialog.component.ts @@ -48,8 +48,7 @@ export class ConfirmationDialogComponent { ) { this.config = _confirmationDialogInput ?? new ConfirmationDialogInput(); this.config = this.translate(this.config); - this.inputLabel = - this.translate(this._inputLabelKey) + ` '${this.config.confirmationText}'`; + this.inputLabel = this.translate(this._inputLabelKey) + ` '${this.config.confirmationText}'`; } get isDeleteAction() { @@ -78,12 +77,9 @@ export class ConfirmationDialogComponent { translate(obj: T): T { const translateKeys = ['title', 'question', 'details', 'confirmationText', 'denyText']; - if (typeof obj === 'string') - return this._translateService.instant(obj, this.config.translateParams); + if (typeof obj === 'string') return this._translateService.instant(obj, this.config.translateParams); - const stringKeys = Object.keys(obj).filter( - key => typeof key === 'string' && !!obj[key] && translateKeys.includes(key) - ); + const stringKeys = Object.keys(obj).filter(key => typeof key === 'string' && !!obj[key] && translateKeys.includes(key)); stringKeys.forEach(key => (obj[key] = this.translate(obj[key]))); return obj; diff --git a/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts b/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts index 8fb57ac82..d0c832652 100644 --- a/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts +++ b/apps/red-ui/src/app/modules/shared/directives/has-scrollbar.directive.ts @@ -10,10 +10,7 @@ export class HasScrollbarDirective implements AfterContentChecked { constructor(private readonly _elementRef: ElementRef) {} get hasScrollbar() { - return ( - this._elementRef?.nativeElement.clientHeight < - this._elementRef?.nativeElement.scrollHeight - ); + return this._elementRef?.nativeElement.clientHeight < this._elementRef?.nativeElement.scrollHeight; } ngAfterContentChecked() { diff --git a/apps/red-ui/src/app/modules/shared/directives/sync-width.directive.ts b/apps/red-ui/src/app/modules/shared/directives/sync-width.directive.ts index 0f1b5f46b..2f6affe25 100644 --- a/apps/red-ui/src/app/modules/shared/directives/sync-width.directive.ts +++ b/apps/red-ui/src/app/modules/shared/directives/sync-width.directive.ts @@ -1,11 +1,4 @@ -import { - AfterViewInit, - Directive, - ElementRef, - HostListener, - Input, - OnDestroy -} from '@angular/core'; +import { AfterViewInit, Directive, ElementRef, HostListener, Input, OnDestroy } from '@angular/core'; import { debounce } from '@utils/debounce'; @Directive({ @@ -32,9 +25,7 @@ export class SyncWidthDirective implements AfterViewInit, OnDestroy { @debounce(10) matchWidth() { const headerItems = this._elementRef.nativeElement.children; - const tableRows = this._elementRef.nativeElement.parentElement.getElementsByClassName( - this.redactionSyncWidth - ); + const tableRows = this._elementRef.nativeElement.parentElement.getElementsByClassName(this.redactionSyncWidth); if (!tableRows || !tableRows.length) { return; @@ -48,12 +39,8 @@ export class SyncWidthDirective implements AfterViewInit, OnDestroy { for (let idx = 0; idx < length - hasExtraColumns - 1; ++idx) { if (headerItems[idx]) { - headerItems[idx].style.width = `${ - tableRow.children[idx].getBoundingClientRect().width - }px`; - headerItems[idx].style.minWidth = `${ - tableRow.children[idx].getBoundingClientRect().width - }px`; + headerItems[idx].style.width = `${tableRow.children[idx].getBoundingClientRect().width}px`; + headerItems[idx].style.minWidth = `${tableRow.children[idx].getBoundingClientRect().width}px`; } } diff --git a/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts b/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts index 4de9e5b87..fe9f71c85 100644 --- a/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts +++ b/apps/red-ui/src/app/modules/shared/pipes/date.pipe.ts @@ -10,20 +10,12 @@ const MINUTES_IN_AN_HOUR = 60; name: 'date' }) export class DatePipe extends BaseDatePipe implements PipeTransform { - constructor( - @Inject(LOCALE_ID) private readonly _locale: string, - private readonly _translateService: TranslateService - ) { + constructor(@Inject(LOCALE_ID) private readonly _locale: string, private readonly _translateService: TranslateService) { super(_locale); } transform(value: null | undefined, format?: string, timezone?: string, locale?: string): null; - transform( - value: Date | string | number | null | undefined, - format?: string, - timezone?: string, - locale?: string - ): string | null; + transform(value: Date | string | number | null | undefined, format?: string, timezone?: string, locale?: string): string | null; transform(value: any, format?: string, timezone?: string, locale?: string): string { if (format === 'timeFromNow') return this._getTimeFromNow(value); return super.transform(value, format, timezone, locale); @@ -39,8 +31,7 @@ export class DatePipe extends BaseDatePipe implements PipeTransform { const minutesFromNow = date.diff(now, 'minutes'); const minutesLeft = minutesFromNow - HOURS_IN_A_DAY * MINUTES_IN_AN_HOUR * daysLeft; - if (daysLeft === 0 && hoursLeft === 0 && minutesLeft > 0) - return this._translate('time.less-than-an-hour'); + if (daysLeft === 0 && hoursLeft === 0 && minutesLeft > 0) return this._translate('time.less-than-an-hour'); const hoursSuffix = this._translate(`time.hour${hoursLeft === 1 ? '' : 's'}`); const hoursDisplay = `${hoursLeft} ${hoursSuffix}`; diff --git a/apps/red-ui/src/app/modules/shared/services/dialog.service.ts b/apps/red-ui/src/app/modules/shared/services/dialog.service.ts index d821b264c..1714cc862 100644 --- a/apps/red-ui/src/app/modules/shared/services/dialog.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/dialog.service.ts @@ -26,13 +26,7 @@ export abstract class DialogService { protected constructor(protected readonly _dialog: MatDialog) {} - openDialog( - type: T, - $event: MouseEvent, - data: any, - cb?: Function, - finallyCb?: Function - ): MatDialogRef { + openDialog(type: T, $event: MouseEvent, data: any, cb?: Function, finallyCb?: Function): MatDialogRef { const config = this._config[type]; $event?.stopPropagation(); diff --git a/apps/red-ui/src/app/modules/shared/services/filter.service.ts b/apps/red-ui/src/app/modules/shared/services/filter.service.ts index 172f17ef4..50d87d3ca 100644 --- a/apps/red-ui/src/app/modules/shared/services/filter.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/filter.service.ts @@ -1,9 +1,6 @@ import { ChangeDetectorRef, Injectable } from '@angular/core'; import { FilterModel } from '@shared/components/filters/popup-filter/model/filter.model'; -import { - getFilteredEntities, - processFilters -} from '@shared/components/filters/popup-filter/utils/filter-utils'; +import { getFilteredEntities, processFilters } from '@shared/components/filters/popup-filter/utils/filter-utils'; import { FilterWrapper } from '@shared/components/filters/popup-filter/model/filter-wrapper.model'; import { ScreenStateService } from '@shared/services/screen-state.service'; import { SearchService } from '@shared/services/search.service'; @@ -98,8 +95,7 @@ export class FilterService { } private _toFlatFilters(entities: FilterWrapper[]): FilterModel[] { - const flatChildren = (filters: FilterModel[]) => - (filters ?? []).reduce((acc, f) => [...acc, ...(f?.filters ?? [])], []); + const flatChildren = (filters: FilterModel[]) => (filters ?? []).reduce((acc, f) => [...acc, ...(f?.filters ?? [])], []); return entities.reduce((acc, f) => [...acc, ...f.values, ...flatChildren(f.values)], []); } diff --git a/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts b/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts index 6c6c0d86d..d52457f7a 100644 --- a/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/screen-state.service.ts @@ -55,10 +55,7 @@ export class ScreenStateService { } get areAllEntitiesSelected(): boolean { - return ( - this.displayedEntities.length !== 0 && - this.selectedEntitiesIds.length === this.displayedEntities.length - ); + return this.displayedEntities.length !== 0 && this.selectedEntitiesIds.length === this.displayedEntities.length; } get areSomeEntitiesSelected$(): Observable { @@ -76,9 +73,7 @@ export class ScreenStateService { return this.setSelectedEntitiesIds([...this.selectedEntitiesIds, currentEntityId]); } - this.setSelectedEntitiesIds( - this.selectedEntitiesIds.filter((el, idx) => idx !== currentEntityIdx) - ); + this.setSelectedEntitiesIds(this.selectedEntitiesIds.filter((el, idx) => idx !== currentEntityIdx)); } toggleSelectAll(): void { diff --git a/apps/red-ui/src/app/modules/shared/services/search.service.ts b/apps/red-ui/src/app/modules/shared/services/search.service.ts index 49279535a..3098c3be3 100644 --- a/apps/red-ui/src/app/modules/shared/services/search.service.ts +++ b/apps/red-ui/src/app/modules/shared/services/search.service.ts @@ -12,10 +12,7 @@ export class SearchService { query: [''] }); - constructor( - private readonly _screenStateService: ScreenStateService, - private readonly _formBuilder: FormBuilder - ) { + constructor(private readonly _screenStateService: ScreenStateService, private readonly _formBuilder: FormBuilder) { this.searchForm.valueChanges.subscribe(() => this.executeSearch()); } @@ -26,17 +23,14 @@ export class SearchService { } executeSearchImmediately(): void { - const displayed = - this._screenStateService.filteredEntities || this._screenStateService.entities; + const displayed = this._screenStateService.filteredEntities || this._screenStateService.entities; if (!this._searchKey) { return this._screenStateService.setDisplayedEntities(displayed); } this._screenStateService.setDisplayedEntities( - displayed.filter(entity => - this._searchField(entity).toLowerCase().includes(this._searchValue) - ) + displayed.filter(entity => this._searchField(entity).toLowerCase().includes(this._searchValue)) ); this._screenStateService.updateSelection(); } diff --git a/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts b/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts index feb65ed38..e045fab1e 100644 --- a/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts +++ b/apps/red-ui/src/app/modules/upload-download/file-upload-download.module.ts @@ -15,13 +15,7 @@ import { FileDropOverlayService } from './services/file-drop-overlay.service'; imports: [CommonModule, SharedModule, OverlayModule], declarations: [FileDropComponent, UploadStatusOverlayComponent, OverwriteFilesDialogComponent], entryComponents: [FileDropComponent, UploadStatusOverlayComponent], - providers: [ - UploadDownloadDialogService, - FileUploadService, - FileDownloadService, - StatusOverlayService, - FileDropOverlayService - ], + providers: [UploadDownloadDialogService, FileUploadService, FileDownloadService, StatusOverlayService, FileDropOverlayService], exports: [FileDropComponent, UploadStatusOverlayComponent] }) export class FileUploadDownloadModule {} diff --git a/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts b/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts index 4c38d2973..9d1742de0 100644 --- a/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts +++ b/apps/red-ui/src/app/modules/upload-download/model/download-status.wrapper.ts @@ -6,15 +6,8 @@ export class DownloadStatusWrapper { constructor(private _downloadStatus: DownloadStatus) {} get size() { - const i = - this._downloadStatus.fileSize === 0 - ? 0 - : Math.floor(Math.log(this._downloadStatus.fileSize) / Math.log(1024)); - return ( - (this._downloadStatus.fileSize / Math.pow(1024, i)).toFixed(2) + - ' ' + - ['B', 'kB', 'MB', 'GB', 'TB'][i] - ); + const i = this._downloadStatus.fileSize === 0 ? 0 : Math.floor(Math.log(this._downloadStatus.fileSize) / Math.log(1024)); + return (this._downloadStatus.fileSize / Math.pow(1024, i)).toFixed(2) + ' ' + ['B', 'kB', 'MB', 'GB', 'TB'][i]; } get creationDate() { diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts index 9b7287ad3..4abf26af6 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/file-download.service.ts @@ -34,10 +34,7 @@ export class FileDownloadService { }); } - downloadFiles( - fileStatusWrappers: FileStatusWrapper[], - dossier: DossierWrapper - ): Observable { + downloadFiles(fileStatusWrappers: FileStatusWrapper[], dossier: DossierWrapper): Observable { return this._downloadControllerService .prepareDownload({ fileIds: fileStatusWrappers.map(f => f.fileId), @@ -49,9 +46,7 @@ export class FileDownloadService { getDownloadStatus() { return this._downloadControllerService.getDownloadStatus().pipe( tap(statusResponse => { - this.downloads = statusResponse.downloadStatus.map( - d => new DownloadStatusWrapper(d) - ); + this.downloads = statusResponse.downloadStatus.map(d => new DownloadStatusWrapper(d)); this.hasPendingDownloads = !!this.downloads.find(f => !f.lastDownload && f.isReady); }) ); diff --git a/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts b/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts index 35e02614d..930bb3e96 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/file-drop-overlay.service.ts @@ -42,25 +42,15 @@ export class FileDropOverlayService { }; initFileDropHandling() { - document - .getElementsByTagName('body')[0] - .addEventListener('dragenter', this.dragListener, false); - document - .getElementsByTagName('body')[0] - .addEventListener('mouseenter', this.mouseIn, false); + document.getElementsByTagName('body')[0].addEventListener('dragenter', this.dragListener, false); + document.getElementsByTagName('body')[0].addEventListener('mouseenter', this.mouseIn, false); document.getElementsByTagName('body')[0].addEventListener('mouseout', this.mouseOut, false); } cleanupFileDropHandling() { - document - .getElementsByTagName('body')[0] - .removeEventListener('dragenter', this.dragListener, false); - document - .getElementsByTagName('body')[0] - .removeEventListener('mouseenter', this.mouseIn, false); - document - .getElementsByTagName('body')[0] - .removeEventListener('mouseout', this.mouseOut, false); + document.getElementsByTagName('body')[0].removeEventListener('dragenter', this.dragListener, false); + document.getElementsByTagName('body')[0].removeEventListener('mouseenter', this.mouseIn, false); + document.getElementsByTagName('body')[0].removeEventListener('mouseout', this.mouseOut, false); } openFileDropOverlay() { diff --git a/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts b/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts index 091c8425b..2bd7148bd 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/status-overlay.service.ts @@ -12,11 +12,7 @@ export class StatusOverlayService { } openUploadStatusOverlay() { - const component = new ComponentPortal( - UploadStatusOverlayComponent, - null, - this._createUploadInjector() - ); + const component = new ComponentPortal(UploadStatusOverlayComponent, null, this._createUploadInjector()); if (!this._uploadStatusOverlayRef.hasAttached()) { this._uploadStatusOverlayRef.attach(component); } diff --git a/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts b/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts index c797e32d0..7e29b6ece 100644 --- a/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts +++ b/apps/red-ui/src/app/modules/upload-download/services/upload-download-dialog.service.ts @@ -12,9 +12,7 @@ const dialogConfig = { export class UploadDownloadDialogService { constructor(private readonly _dialog: MatDialog) {} - openOverwriteFileDialog( - filename: string - ): Promise<{ option?: 'overwrite' | 'skip'; remember?: boolean; cancel?: boolean }> { + openOverwriteFileDialog(filename: string): Promise<{ option?: 'overwrite' | 'skip'; remember?: boolean; cancel?: boolean }> { const ref = this._dialog.open(OverwriteFilesDialogComponent, { ...dialogConfig, data: filename diff --git a/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html b/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html index 060b49cf5..a4ecde75f 100644 --- a/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html +++ b/apps/red-ui/src/app/modules/upload-download/upload-status-overlay/upload-status-overlay.component.html @@ -1,30 +1,17 @@
-
+
{{ 'upload-status.dialog.title' | translate: { len: uploadService.files.length } }}
- - + +
{{ uploadService.groupedFiles[dossierId][0].dossierName }}
-
+
-
+
this.fileRequiresReanalysis(file)).length > 0 - ); + return this.isApprover(dossier) && dossier.files.filter(file => this.fileRequiresReanalysis(file)).length > 0; } canToggleAnalysis(fileStatus: FileStatusWrapper): boolean { - return ( - this.isManager() && - ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) - ); + return this.isManager() && ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status); } canReanalyseFile(fileStatus = this._activeFile): boolean { return ( - (this.fileRequiresReanalysis(fileStatus) && - (this.isReviewerOrApprover(fileStatus) || fileStatus.isUnassigned)) || + (this.fileRequiresReanalysis(fileStatus) && (this.isReviewerOrApprover(fileStatus) || fileStatus.isUnassigned)) || (fileStatus.isError && fileStatus.isUnassigned) ); } @@ -77,21 +67,14 @@ export class PermissionsService { } canAssignToSelf(fileStatus = this._activeFile): boolean { - const precondition = - this.isDossierMember() && - !fileStatus.isProcessing && - !fileStatus.isError && - !fileStatus.isApproved; + const precondition = this.isDossierMember() && !fileStatus.isProcessing && !fileStatus.isError && !fileStatus.isApproved; const isTheOnlyReviewer = !this._appStateService.activeDossier.hasMoreThanOneReviewer; if (precondition) { if ( - (fileStatus.isUnassigned || - (fileStatus.isUnderReview && !this.isFileReviewer(fileStatus))) && - (this.isApprover() || - isTheOnlyReviewer || - (this.isDossierReviewer() && fileStatus.isUnassigned)) + (fileStatus.isUnassigned || (fileStatus.isUnderReview && !this.isFileReviewer(fileStatus))) && + (this.isApprover() || isTheOnlyReviewer || (this.isDossierReviewer() && fileStatus.isUnassigned)) ) { return true; } @@ -100,17 +83,10 @@ export class PermissionsService { } canAssignUser(fileStatus = this._activeFile): boolean { - const precondition = - !fileStatus.isProcessing && - !fileStatus.isError && - !fileStatus.isApproved && - this.isApprover(); + const precondition = !fileStatus.isProcessing && !fileStatus.isError && !fileStatus.isApproved && this.isApprover(); if (precondition) { - if ( - (fileStatus.isUnassigned || fileStatus.isUnderReview) && - this._activeDossier.hasMoreThanOneReviewer - ) { + if ((fileStatus.isUnassigned || fileStatus.isUnderReview) && this._activeDossier.hasMoreThanOneReviewer) { return true; } if (fileStatus.isUnderApproval && this._activeDossier.hasMoreThanOneApprover) { @@ -153,10 +129,7 @@ export class PermissionsService { } canPerformAnnotationActions(fileStatus = this._activeFile): boolean { - return ( - ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus?.status) && - this.isFileReviewer(fileStatus) - ); + return ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus?.status) && this.isFileReviewer(fileStatus); } canOpenFile(fileStatus = this._activeFile): boolean { @@ -172,10 +145,7 @@ export class PermissionsService { } canMarkPagesAsViewed(fileStatus = this._activeFile): boolean { - return ( - ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus?.status) && - this.isFileReviewer(fileStatus) - ); + return ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus?.status) && this.isFileReviewer(fileStatus); } canDownloadFiles(fileStatus = this._activeFile): boolean { @@ -203,9 +173,7 @@ export class PermissionsService { canOcrFile(fileStatus = this._activeFile): boolean { return ( - !fileStatus.isExcluded && - !fileStatus.ocrTime && - ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) + !fileStatus.isExcluded && !fileStatus.ocrTime && ['UNASSIGNED', 'UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) ); } @@ -218,9 +186,6 @@ export class PermissionsService { } canExcludePages(fileStatus = this._activeFile): boolean { - return ( - ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) && - (this.isFileReviewer(fileStatus) || this.isApprover()) - ); + return ['UNDER_REVIEW', 'UNDER_APPROVAL'].includes(fileStatus.status) && (this.isFileReviewer(fileStatus) || this.isApprover()); } } diff --git a/apps/red-ui/src/app/services/router-history.service.ts b/apps/red-ui/src/app/services/router-history.service.ts index 10ca5e383..5c9fbf827 100644 --- a/apps/red-ui/src/app/services/router-history.service.ts +++ b/apps/red-ui/src/app/services/router-history.service.ts @@ -9,13 +9,11 @@ export class RouterHistoryService { private _lastDossiersScreen = '/main/dossiers'; constructor(private readonly _router: Router) { - this._router.events - .pipe(filter(event => event instanceof NavigationEnd)) - .subscribe((event: NavigationEnd) => { - if (event.url.startsWith('/main/dossiers')) { - this._lastDossiersScreen = event.url; - } - }); + this._router.events.pipe(filter(event => event instanceof NavigationEnd)).subscribe((event: NavigationEnd) => { + if (event.url.startsWith('/main/dossiers')) { + this._lastDossiersScreen = event.url; + } + }); } navigateToLastDossiersScreen() { diff --git a/apps/red-ui/src/app/services/user.service.ts b/apps/red-ui/src/app/services/user.service.ts index bfc12b023..efddbf487 100644 --- a/apps/red-ui/src/app/services/user.service.ts +++ b/apps/red-ui/src/app/services/user.service.ts @@ -17,8 +17,7 @@ export class UserWrapper { name: string; constructor(private _currentUser: KeycloakProfile, public roles: string[], public id: string) { - this.name = - this.firstName && this.lastName ? `${this.firstName} ${this.lastName}` : this.username; + this.name = this.firstName && this.lastName ? `${this.firstName} ${this.lastName}` : this.username; } get username() { @@ -91,9 +90,7 @@ export class UserService { } get eligibleUsers(): User[] { - return this._allRedUsers.filter( - u => u.roles.indexOf('RED_USER') >= 0 || u.roles.indexOf('RED_MANAGER') >= 0 - ); + return this._allRedUsers.filter(u => u.roles.indexOf('RED_USER') >= 0 || u.roles.indexOf('RED_MANAGER') >= 0); } get user() { @@ -154,9 +151,7 @@ export class UserService { } getName(user?: User) { - return user?.firstName && user?.lastName - ? `${user.firstName} ${user.lastName}` - : user?.username; + return user?.firstName && user?.lastName ? `${user.firstName} ${user.lastName}` : user?.username; } isManager(user: User | UserWrapper = this.user): boolean { 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 03e251741..4956972b8 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -160,27 +160,15 @@ export class AppStateService { } private static _isFileOverviewRoute(event: Event) { - return ( - event instanceof ResolveStart && - event.url.includes('/main/dossiers/') && - event.url.includes('/file/') - ); + return event instanceof ResolveStart && event.url.includes('/main/dossiers/') && event.url.includes('/file/'); } private static _isDossierOverviewRoute(event: Event) { - return ( - event instanceof ResolveStart && - event.url.includes('/main/dossiers/') && - !event.url.includes('/file/') - ); + return event instanceof ResolveStart && event.url.includes('/main/dossiers/') && !event.url.includes('/file/'); } private static _isRandomRoute(event: Event) { - return ( - event instanceof NavigationEnd && - !event.url.includes('/main/dossiers/') && - !event.url.includes('/file/') - ); + return event instanceof NavigationEnd && !event.url.includes('/main/dossiers/') && !event.url.includes('/file/'); } async reloadActiveDossierFilesIfNecessary() { @@ -194,10 +182,7 @@ export class AppStateService { dossierTemplateId = this.activeDossier.dossierTemplateId; } if (!dossierTemplateId) { - dossierTemplateId = - this.dossierTemplates.length > 0 - ? this.dossierTemplates[0].dossierTemplateId - : undefined; + dossierTemplateId = this.dossierTemplates.length > 0 ? this.dossierTemplates[0].dossierTemplateId : undefined; } if (!dossierTemplateId) { return undefined; @@ -216,10 +201,7 @@ export class AppStateService { } if (!dossierTemplateId) { - dossierTemplateId = - this.dossierTemplates.length > 0 - ? this.dossierTemplates[0].dossierTemplateId - : undefined; + dossierTemplateId = this.dossierTemplates.length > 0 ? this.dossierTemplates[0].dossierTemplateId : undefined; } if (!dossierTemplateId) { return undefined; @@ -240,13 +222,9 @@ export class AppStateService { async loadAllDossiers(emitEvents: boolean = true) { const dossiers = await this._dossierControllerService.getDossiers().toPromise(); if (dossiers) { - const mappedDossiers = dossiers.map( - p => new DossierWrapper(p, this._getExistingFiles(p.dossierId)) - ); + const mappedDossiers = dossiers.map(p => new DossierWrapper(p, this._getExistingFiles(p.dossierId))); - const fileData = await this._statusControllerService - .getFileStatusForDossiers(mappedDossiers.map(p => p.dossierId)) - .toPromise(); + const fileData = await this._statusControllerService.getFileStatusForDossiers(mappedDossiers.map(p => p.dossierId)).toPromise(); for (const dossierId of Object.keys(fileData)) { const dossier = mappedDossiers.find(p => p.dossierId === dossierId); @@ -263,9 +241,7 @@ export class AppStateService { return null; } const oldProcessedDate = this.activeFile.lastProcessed; - const activeFile = await this._statusControllerService - .getFileStatus(this.activeDossierId, this.activeFileId) - .toPromise(); + const activeFile = await this._statusControllerService.getFileStatus(this.activeDossierId, this.activeFileId).toPromise(); const activeFileWrapper = new FileStatusWrapper( activeFile, @@ -289,9 +265,7 @@ export class AppStateService { if (!dossier) { dossier = this.activeDossier; } - const files = await this._statusControllerService - .getDossierStatus(dossier.dossierId) - .toPromise(); + const files = await this._statusControllerService.getDossierStatus(dossier.dossierId).toPromise(); return this._processFiles(dossier, files, emitEvents); } @@ -317,21 +291,18 @@ export class AppStateService { updateDossierDictionary(dossierTemplateId: string, dossierId: string) { // dossier exists, load it's dictionary - this._dictionaryControllerService - .getDictionaryForType(dossierTemplateId, 'dossier_redaction', dossierId) - .subscribe( - typeData => { - this.activeDossier.type = typeData; - }, - () => { - this.activeDossier.type = null; - } - ); + this._dictionaryControllerService.getDictionaryForType(dossierTemplateId, 'dossier_redaction', dossierId).subscribe( + typeData => { + this.activeDossier.type = typeData; + }, + () => { + this.activeDossier.type = null; + } + ); } activateFile(dossierId: string, fileId: string) { - if (this._appState.activeDossierId === dossierId && this._appState.activeFileId === fileId) - return; + if (this._appState.activeDossierId === dossierId && this._appState.activeFileId === fileId) return; this.activateDossier(dossierId); if (this.activeDossier) { this._appState.activeFileId = fileId; @@ -357,9 +328,7 @@ export class AppStateService { this._appState.activeDictionaryType = dictionaryType; if (!this.activeDictionary) { this._appState.activeDictionaryType = null; - this._router.navigate([ - '/main/admin/dossier-templates/' + this.activeDossierTemplateId - ]); + this._router.navigate(['/main/admin/dossier-templates/' + this.activeDossierTemplateId]); } } } @@ -377,9 +346,7 @@ export class AppStateService { .toPromise() .then( () => { - const index = this._appState.dossiers.findIndex( - p => p.dossier.dossierId === dossier.dossierId - ); + const index = this._appState.dossiers.findIndex(p => p.dossier.dossierId === dossier.dossierId); this._appState.dossiers.splice(index, 1); this._appState.dossiers = [...this._appState.dossiers]; }, @@ -395,12 +362,8 @@ export class AppStateService { async addOrUpdateDossier(dossier: Dossier) { try { - const updatedDossier = await this._dossierControllerService - .createOrUpdateDossier(dossier) - .toPromise(); - let foundDossier = this._appState.dossiers.find( - p => p.dossier.dossierId === updatedDossier.dossierId - ); + const updatedDossier = await this._dossierControllerService.createOrUpdateDossier(dossier).toPromise(); + let foundDossier = this._appState.dossiers.find(p => p.dossier.dossierId === updatedDossier.dossierId); if (foundDossier) { Object.assign((foundDossier.dossier = updatedDossier)); } else { @@ -412,9 +375,7 @@ export class AppStateService { } catch (error) { this._notificationService.showToastNotification( this._translateService.instant( - error.status === 409 - ? 'add-dossier-dialog.errors.dossier-already-exists' - : 'add-dossier-dialog.errors.generic' + error.status === 409 ? 'add-dossier-dialog.errors.dossier-already-exists' : 'add-dossier-dialog.errors.generic' ), null, NotificationType.ERROR @@ -429,19 +390,14 @@ export class AppStateService { } async loadAllDossierTemplates() { - const dossierTemplates = await this._dossierTemplateControllerService - .getAllDossierTemplates() - .toPromise(); - this._appState.dossierTemplates = dossierTemplates.map( - dossierTemplate => new DossierTemplateModelWrapper(dossierTemplate) - ); + const dossierTemplates = await this._dossierTemplateControllerService.getAllDossierTemplates().toPromise(); + this._appState.dossierTemplates = dossierTemplates.map(dossierTemplate => new DossierTemplateModelWrapper(dossierTemplate)); this._appState.fileAttributesConfig = {}; for (const dossierTemplate of this._appState.dossierTemplates) { - this._appState.fileAttributesConfig[dossierTemplate.dossierTemplateId] = - await this._fileAttributesService - .getFileAttributesConfiguration(dossierTemplate.dossierTemplateId) - .pipe(catchError(() => of({}))) - .toPromise(); + this._appState.fileAttributesConfig[dossierTemplate.dossierTemplateId] = await this._fileAttributesService + .getFileAttributesConfiguration(dossierTemplate.dossierTemplateId) + .pipe(catchError(() => of({}))) + .toPromise(); } } @@ -465,10 +421,7 @@ export class AppStateService { } } - getDictionaryDataForDossierTemplateObservables( - dossierTemplateId: string, - dictionaryData: { [key: string]: any } - ): Observable[] { + getDictionaryDataForDossierTemplateObservables(dossierTemplateId: string, dictionaryData: { [key: string]: any }): Observable[] { const typeObs = this._dictionaryControllerService.getAllTypes(dossierTemplateId).pipe( tap(typesResponse => { for (const type of typesResponse.types) { @@ -704,11 +657,7 @@ export class AppStateService { return found ? found.files : []; } - private _processFiles( - dossier: DossierWrapper, - files: FileStatus[], - emitEvents: boolean = true - ) { + private _processFiles(dossier: DossierWrapper, files: FileStatus[], emitEvents: boolean = true) { const oldFiles = [...dossier.files]; const fileStatusChangedEvent = []; diff --git a/apps/red-ui/src/app/state/model/dossier.wrapper.ts b/apps/red-ui/src/app/state/model/dossier.wrapper.ts index 4220c3614..e859c8dff 100644 --- a/apps/red-ui/src/app/state/model/dossier.wrapper.ts +++ b/apps/red-ui/src/app/state/model/dossier.wrapper.ts @@ -124,8 +124,7 @@ export class DossierWrapper { this.hasRequests = this.hasRequests || f.hasRequests; this.allFilesApproved = this.allFilesApproved && f.isApproved; this.totalNumberOfPages += f.numberOfPages; - this.hasPendingOrProcessing = - this.hasPendingOrProcessing || f.isPending || f.isProcessing; + this.hasPendingOrProcessing = this.hasPendingOrProcessing || f.isPending || f.isProcessing; }); this.hasNone = !this.hasRequests && !this.hasRedactions && !this.hintsOnly; } diff --git a/apps/red-ui/src/app/utils/api-path-interceptor.ts b/apps/red-ui/src/app/utils/api-path-interceptor.ts index 78ae4a1f6..61d262e22 100644 --- a/apps/red-ui/src/app/utils/api-path-interceptor.ts +++ b/apps/red-ui/src/app/utils/api-path-interceptor.ts @@ -6,10 +6,7 @@ import { BASE_HREF } from '../tokens'; @Injectable() export class ApiPathInterceptor implements HttpInterceptor { - constructor( - @Inject(BASE_HREF) private readonly _baseHref: string, - private readonly _appConfigService: AppConfigService - ) {} + constructor(@Inject(BASE_HREF) private readonly _baseHref: string, private readonly _appConfigService: AppConfigService) {} intercept(req: HttpRequest, next: HttpHandler): Observable> { if (!req.url.startsWith('/assets')) { diff --git a/apps/red-ui/src/app/utils/custom-route-reuse.strategy.ts b/apps/red-ui/src/app/utils/custom-route-reuse.strategy.ts index 4b85cdbbb..d41a1190f 100644 --- a/apps/red-ui/src/app/utils/custom-route-reuse.strategy.ts +++ b/apps/red-ui/src/app/utils/custom-route-reuse.strategy.ts @@ -59,17 +59,12 @@ export class CustomRouteReuseStrategy implements RouteReuseStrategy { } shouldReuseRoute(future: ActivatedRouteSnapshot, current: ActivatedRouteSnapshot): boolean { - return ( - future.routeConfig === current.routeConfig || - this._getKey(future) === this._getKey(current) - ); + return future.routeConfig === current.routeConfig || this._getKey(future) === this._getKey(current); } private _getKey(route: ActivatedRouteSnapshot): string { return route.pathFromRoot - .map((el: ActivatedRouteSnapshot) => - el.routeConfig ? el.routeConfig.path + JSON.stringify(el.params) : '' - ) + .map((el: ActivatedRouteSnapshot) => (el.routeConfig ? el.routeConfig.path + JSON.stringify(el.params) : '')) .filter(str => str.length > 0) .join(''); } diff --git a/apps/red-ui/src/app/utils/dialog-helper.ts b/apps/red-ui/src/app/utils/dialog-helper.ts index e8f3940c4..653b86897 100644 --- a/apps/red-ui/src/app/utils/dialog-helper.ts +++ b/apps/red-ui/src/app/utils/dialog-helper.ts @@ -59,22 +59,14 @@ export class DialogHelper { config.backdropClass = 'dark-backdrop'; config.panelClass = 'gin-file-upload-dialog-panel'; config.scrollStrategy = overlay.scrollStrategies.block(); - config.positionStrategy = overlay - .position() - .global() - .centerHorizontally() - .centerVertically(); + config.positionStrategy = overlay.position().global().centerHorizontally().centerVertically(); return config; } static generateUploadStatusConfig(overlay: Overlay): OverlayConfig { const config = new OverlayConfig(); config.hasBackdrop = false; - config.positionStrategy = overlay - .position() - .global() - .bottom(DialogHelper._MARGIN) - .right(DialogHelper._MARGIN); + config.positionStrategy = overlay.position().global().bottom(DialogHelper._MARGIN).right(DialogHelper._MARGIN); return config; } } diff --git a/apps/red-ui/src/app/utils/file-download-utils.ts b/apps/red-ui/src/app/utils/file-download-utils.ts index 8f793588c..038357ab9 100644 --- a/apps/red-ui/src/app/utils/file-download-utils.ts +++ b/apps/red-ui/src/app/utils/file-download-utils.ts @@ -5,9 +5,7 @@ export function download(event: HttpResponse, altName?: string) { const contentDisposition = event.headers.get('Content-Disposition'); let fileName; try { - fileName = contentDisposition - ? contentDisposition.split('filename=')[1].replace(/"/g, '') - : undefined; + fileName = contentDisposition ? contentDisposition.split('filename=')[1].replace(/"/g, '') : undefined; } catch (e) { console.log('[REDACTION] Failed to parse content-disposition: ', contentDisposition); } diff --git a/apps/red-ui/src/app/utils/file-drop-utils.ts b/apps/red-ui/src/app/utils/file-drop-utils.ts index 578b09fa8..ca8a871fc 100644 --- a/apps/red-ui/src/app/utils/file-drop-utils.ts +++ b/apps/red-ui/src/app/utils/file-drop-utils.ts @@ -1,11 +1,7 @@ import { FileUploadModel } from '@upload-download/model/file-upload.model'; import { DossierWrapper } from '@state/model/dossier.wrapper'; -export function handleFileDrop( - event: DragEvent, - dossier: DossierWrapper, - uploadFiles: (files: FileUploadModel[]) => void -) { +export function handleFileDrop(event: DragEvent, dossier: DossierWrapper, uploadFiles: (files: FileUploadModel[]) => void) { event.preventDefault(); event.stopPropagation(); const { dataTransfer } = event; @@ -31,10 +27,7 @@ export function handleFileDrop( } export function isCsv(file: FileUploadModel): boolean { - return ( - file.file.type?.toLowerCase() === 'text/csv' || - file.file.name.toLowerCase().endsWith('.csv') - ); + return file.file.type?.toLowerCase() === 'text/csv' || file.file.name.toLowerCase().endsWith('.csv'); } export function convertFiles(files: FileList | File[], dossier: DossierWrapper): FileUploadModel[] { diff --git a/apps/red-ui/src/app/utils/page-stamper.ts b/apps/red-ui/src/app/utils/page-stamper.ts index e2c444ae5..16611e565 100644 --- a/apps/red-ui/src/app/utils/page-stamper.ts +++ b/apps/red-ui/src/app/utils/page-stamper.ts @@ -25,9 +25,7 @@ export async function stampPDFPage( const rgbColor = hexToRgb(color); const stamper = await PdfNet.Stamper.create(3, fontSize, 0); - await stamper.setFontColor( - await PdfNet.ColorPt.init(rgbColor.r / 255, rgbColor.g / 255, rgbColor.b / 255) - ); + await stamper.setFontColor(await PdfNet.ColorPt.init(rgbColor.r / 255, rgbColor.g / 255, rgbColor.b / 255)); await stamper.setOpacity(opacity / 100); switch (orientation) { diff --git a/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts b/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts index a922c6820..82e055c3b 100644 --- a/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts +++ b/apps/red-ui/src/app/utils/sorters/redaction-filter-sorter.ts @@ -6,6 +6,5 @@ export const RedactionFilterSorter = { hint: 4, suggestion: 5, none: 6, - byKey: (a: { key: string }, b: { key: string }) => - RedactionFilterSorter[a.key] - RedactionFilterSorter[b.key] + byKey: (a: { key: string }, b: { key: string }) => RedactionFilterSorter[a.key] - RedactionFilterSorter[b.key] }; diff --git a/apps/red-ui/src/app/utils/sync-scroll.ts b/apps/red-ui/src/app/utils/sync-scroll.ts index 50e90757e..51a462699 100644 --- a/apps/red-ui/src/app/utils/sync-scroll.ts +++ b/apps/red-ui/src/app/utils/sync-scroll.ts @@ -36,12 +36,7 @@ export function syncScroll(elements: HTMLElement[]) { updateX && Math.round( otherEl['scrollLeft'] - - (scrollX = otherEl.eX = - Math.round( - xRate * - (otherEl['scrollWidth'] - - otherEl['clientWidth']) - )) + (scrollX = otherEl.eX = Math.round(xRate * (otherEl['scrollWidth'] - otherEl['clientWidth']))) ) ) { otherEl['scrollLeft'] = scrollX; @@ -51,12 +46,7 @@ export function syncScroll(elements: HTMLElement[]) { updateY && Math.round( otherEl['scrollTop'] - - (scrollY = otherEl.eY = - Math.round( - yRate * - (otherEl['scrollHeight'] - - otherEl['clientHeight']) - )) + (scrollY = otherEl.eY = Math.round(yRate * (otherEl['scrollHeight'] - otherEl['clientHeight']))) ) ) { otherEl['scrollTop'] = scrollY; diff --git a/apps/red-ui/src/app/utils/uuid-helper.ts b/apps/red-ui/src/app/utils/uuid-helper.ts index 0f925537b..3cd05d407 100644 --- a/apps/red-ui/src/app/utils/uuid-helper.ts +++ b/apps/red-ui/src/app/utils/uuid-helper.ts @@ -5,9 +5,7 @@ for (let i = 0; i < 256; i++) { } export function isUUID(uuid: string) { - return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test( - uuid - ); + return /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.test(uuid); } export function UUID() { diff --git a/apps/red-ui/src/assets/i18n/te.json b/apps/red-ui/src/assets/i18n/te.json index 706acba0d..987fe13a8 100644 --- a/apps/red-ui/src/assets/i18n/te.json +++ b/apps/red-ui/src/assets/i18n/te.json @@ -7,10 +7,6 @@ "title": "" } }, - "": { - "": "", - "title": "" - }, "actions": { "all": "", "none": "" @@ -156,6 +152,9 @@ "categories": { "": "" }, + "no-data": { + "title": "" + }, "table-col-names": { "category": "", "date": "", @@ -225,6 +224,13 @@ "dev-mode": "", "dictionary-listing": { "case-sensitive": "", + "no-data": { + "action": "", + "title": "" + }, + "no-match": { + "title": "" + }, "stats": { "charts": { "entries": "" @@ -279,6 +285,10 @@ "label": "", "placeholder": "" }, + "no-data": { + "action": "", + "title": "" + }, "password": { "label": "", "placeholder": "" @@ -293,6 +303,13 @@ "title": "" }, "dossier-attributes-listing": { + "no-data": { + "action": "", + "title": "" + }, + "no-match": { + "title": "" + }, "table-col-names": { "label": "", "type": "" @@ -314,6 +331,13 @@ }, "dossier-listing": { "add-new": "", + "no-data": { + "action": "", + "title": "" + }, + "no-match": { + "title": "" + }, "quick-filters": { "my-dossiers": "", "other": "", @@ -370,6 +394,13 @@ } } }, + "no-data": { + "action": "", + "title": "" + }, + "no-match": { + "title": "" + }, "ocr-performed": "", "quick-filters": { "assigned-to-me": "", @@ -398,6 +429,12 @@ "dossier-templates": "", "dossier-templates-listing": { "dictionaries": "", + "no-data": { + "title": "" + }, + "no-match": { + "title": "" + }, "table-col-names": { "created-by": "", "created-on": "", @@ -421,6 +458,9 @@ "label": "" }, "downloads-list": { + "no-data": { + "title": "" + }, "table-col-names": { "date": "", "name": "", @@ -488,6 +528,9 @@ "file": "", "key-column": "", "key-column-placeholder": "", + "no-data": { + "title": "" + }, "no-hovered-column": "", "no-sample-data-for": "", "quick-activation": { @@ -518,6 +561,12 @@ "total-rows": "" }, "file-attributes-listing": { + "no-data": { + "title": "" + }, + "no-match": { + "title": "" + }, "read-only": "", "table-col-names": { "csv-column": "", @@ -537,6 +586,9 @@ "delta-tooltip": "", "excluded-from-redaction": "", "last-reviewer": "", + "no-data": { + "title": "" + }, "quick-nav": { "jump-first": "", "jump-last": "" @@ -808,6 +860,12 @@ "restore": "" }, "label": "", + "no-data": { + "title": "" + }, + "no-match": { + "title": "" + }, "table-col-names": { "deleted-on": "", "name": "", @@ -828,6 +886,9 @@ } }, "user-listing": { + "no-match": { + "title": "" + }, "table-col-names": { "active": "", "email": "", diff --git a/libs/red-cache/.eslintrc.json b/libs/red-cache/.eslintrc.json index 34f0525ad..cf4ef48a5 100644 --- a/libs/red-cache/.eslintrc.json +++ b/libs/red-cache/.eslintrc.json @@ -4,10 +4,7 @@ "overrides": [ { "files": ["*.ts"], - "extends": [ - "plugin:@nrwl/nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], + "extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], "parserOptions": { "project": ["libs/red-cache/tsconfig.*?.json"] }, diff --git a/libs/red-cache/jest.config.js b/libs/red-cache/jest.config.js index 2a387101b..197cb6356 100644 --- a/libs/red-cache/jest.config.js +++ b/libs/red-cache/jest.config.js @@ -5,10 +5,7 @@ module.exports = { 'ts-jest': { stringifyContentPathRegex: '\\.(html|svg)$', astTransformers: { - before: [ - 'jest-preset-angular/build/InlineFilesTransformer', - 'jest-preset-angular/build/StripStylesTransformer' - ] + before: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer'] }, tsconfig: '/tsconfig.spec.json' } diff --git a/libs/red-cache/src/lib/caches/cache-api.service.ts b/libs/red-cache/src/lib/caches/cache-api.service.ts index f4a9b7524..1d7d4aa01 100644 --- a/libs/red-cache/src/lib/caches/cache-api.service.ts +++ b/libs/red-cache/src/lib/caches/cache-api.service.ts @@ -1,5 +1,5 @@ import { Injectable } from '@angular/core'; -import { DYNAMIC_CACHES, APP_LEVEL_CACHE } from './cache-utils'; +import { APP_LEVEL_CACHE, DYNAMIC_CACHES } from './cache-utils'; import { HttpEvent, HttpHeaders, HttpRequest, HttpResponse } from '@angular/common/http'; import { from, Observable, throwError } from 'rxjs'; import { map, mergeMap } from 'rxjs/operators'; @@ -12,17 +12,17 @@ export class CacheApiService { this.checkCachesExpiration(); } + get cachesAvailable(): boolean { + return !!window.caches; + } + cacheRequest(request: HttpRequest, httpResponse: HttpResponse): Promise { if (httpResponse.status < 300 && httpResponse.status >= 200) { const url = this._buildUrl(request); for (const dynCache of DYNAMIC_CACHES) { for (const cacheUrl of dynCache.urls) { if (url.indexOf(cacheUrl) >= 0) { - return caches - .open(dynCache.name) - .then(cache => - this._handleFetchResponse(httpResponse, dynCache, cache, url) - ); + return caches.open(dynCache.name).then(cache => this._handleFetchResponse(httpResponse, dynCache, cache, url)); } } } @@ -160,6 +160,15 @@ export class CacheApiService { return false; } + checkCachesExpiration() { + if (this.cachesAvailable) { + const now = new Date().getTime(); + for (const dynCache of DYNAMIC_CACHES) { + this._handleCacheExpiration(dynCache, now); + } + } + } + private _toHttpResponse(response: Response): Observable> { response = response.clone(); const contentType = response.headers.get('content-type'); @@ -224,15 +233,6 @@ export class CacheApiService { cache.put(url, new Response(body, cachedResponseFields)); } - checkCachesExpiration() { - if (this.cachesAvailable) { - const now = new Date().getTime(); - for (const dynCache of DYNAMIC_CACHES) { - this._handleCacheExpiration(dynCache, now); - } - } - } - private _handleCacheExpiration(dynCache, now) { caches.open(dynCache.name).then(cache => { cache.keys().then(keys => { @@ -263,10 +263,6 @@ export class CacheApiService { }); } - get cachesAvailable(): boolean { - return !!window.caches; - } - private _toHttpHeaders(headers: Headers): HttpHeaders { let httpHeaders = new HttpHeaders(); headers.forEach((value, key) => { diff --git a/libs/red-cache/src/lib/caches/http-cache-interceptor.ts b/libs/red-cache/src/lib/caches/http-cache-interceptor.ts index e6119d29d..fb3077403 100644 --- a/libs/red-cache/src/lib/caches/http-cache-interceptor.ts +++ b/libs/red-cache/src/lib/caches/http-cache-interceptor.ts @@ -1,10 +1,4 @@ -import { - HttpEvent, - HttpHandler, - HttpInterceptor, - HttpRequest, - HttpResponse -} from '@angular/common/http'; +import { HttpEvent, HttpHandler, HttpInterceptor, HttpRequest, HttpResponse } from '@angular/common/http'; import { Injectable } from '@angular/core'; import { Observable } from 'rxjs'; import { CacheApiService } from './cache-api.service'; diff --git a/libs/red-cache/src/test.ts b/libs/red-cache/src/test.ts index 882de64a8..8ff0d4a25 100644 --- a/libs/red-cache/src/test.ts +++ b/libs/red-cache/src/test.ts @@ -4,10 +4,7 @@ import 'core-js/es7/reflect'; import 'zone.js'; import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; -import { - BrowserDynamicTestingModule, - platformBrowserDynamicTesting -} from '@angular/platform-browser-dynamic/testing'; +import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; declare const require: any; diff --git a/libs/red-ui-http/.eslintrc.json b/libs/red-ui-http/.eslintrc.json index 086670f3a..4b905e040 100644 --- a/libs/red-ui-http/.eslintrc.json +++ b/libs/red-ui-http/.eslintrc.json @@ -4,10 +4,7 @@ "overrides": [ { "files": ["*.ts"], - "extends": [ - "plugin:@nrwl/nx/angular", - "plugin:@angular-eslint/template/process-inline-templates" - ], + "extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], "parserOptions": { "project": ["libs/red-ui-http/tsconfig.*?.json"] }, diff --git a/libs/red-ui-http/jest.config.js b/libs/red-ui-http/jest.config.js index f2d44522e..cc5fd00cb 100644 --- a/libs/red-ui-http/jest.config.js +++ b/libs/red-ui-http/jest.config.js @@ -5,10 +5,7 @@ module.exports = { 'ts-jest': { stringifyContentPathRegex: '\\.(html|svg)$', astTransformers: { - before: [ - 'jest-preset-angular/build/InlineFilesTransformer', - 'jest-preset-angular/build/StripStylesTransformer' - ] + before: ['jest-preset-angular/build/InlineFilesTransformer', 'jest-preset-angular/build/StripStylesTransformer'] }, tsconfig: '/tsconfig.spec.json' } diff --git a/libs/red-ui-http/src/lib/api.module.ts b/libs/red-ui-http/src/lib/api.module.ts index cb9572988..167564021 100644 --- a/libs/red-ui-http/src/lib/api.module.ts +++ b/libs/red-ui-http/src/lib/api.module.ts @@ -69,8 +69,7 @@ export class ApiModule { } if (!http) { throw new Error( - 'You need to import the HttpClientModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575' + 'You need to import the HttpClientModule in your AppModule! \n' + 'See also https://github.com/angular/angular/issues/20575' ); } } 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 ca9c7491c..187f4185d 100644 --- a/libs/red-ui-http/src/lib/api/auditController.service.ts +++ b/libs/red-ui-http/src/lib/api/auditController.service.ts @@ -48,54 +48,35 @@ export class AuditControllerService { * @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 getAuditCategories( - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getAuditCategories(observe?: 'body', reportProgress?: boolean): Observable>; - public getAuditCategories( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; + public getAuditCategories(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAuditCategories( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + public getAuditCategories(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAuditCategories( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAuditCategories(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request>( - 'get', - `${this.basePath}/audit/categories`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request>('get', `${this.basePath}/audit/categories`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -105,11 +86,7 @@ export class AuditControllerService { * @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 searchAuditLog( - body: AuditSearchRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public searchAuditLog(body: AuditSearchRequest, observe?: 'body', reportProgress?: boolean): Observable; public searchAuditLog( body: AuditSearchRequest, @@ -117,21 +94,11 @@ export class AuditControllerService { reportProgress?: boolean ): Observable>; - public searchAuditLog( - body: AuditSearchRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public searchAuditLog(body: AuditSearchRequest, observe?: 'events', reportProgress?: boolean): Observable>; - public searchAuditLog( - body: AuditSearchRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public searchAuditLog(body: AuditSearchRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling searchAuditLog.' - ); + throw new Error('Required parameter body was null or undefined when calling searchAuditLog.'); } let headers = this.defaultHeaders; @@ -139,24 +106,20 @@ export class AuditControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/libs/red-ui-http/src/lib/api/debugController.service.ts b/libs/red-ui-http/src/lib/api/debugController.service.ts index 7b129a6bf..27b384295 100644 --- a/libs/red-ui-http/src/lib/api/debugController.service.ts +++ b/libs/red-ui-http/src/lib/api/debugController.service.ts @@ -47,12 +47,7 @@ export class DebugControllerService { * @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 debugClassificationsForm( - file: Blob, - inline?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public debugClassificationsForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable; public debugClassificationsForm( file: Blob, @@ -61,23 +56,11 @@ export class DebugControllerService { reportProgress?: boolean ): Observable>; - public debugClassificationsForm( - file: Blob, - inline?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public debugClassificationsForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public debugClassificationsForm( - file: Blob, - inline?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public debugClassificationsForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling debugClassifications.' - ); + throw new Error('Required parameter file was null or undefined when calling debugClassifications.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -90,16 +73,13 @@ export class DebugControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -143,37 +123,15 @@ export class DebugControllerService { * @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 debugHtmlTablesForm( - file: Blob, - inline?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public debugHtmlTablesForm( - file: Blob, - inline?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public debugHtmlTablesForm( - file: Blob, - inline?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public debugHtmlTablesForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public debugHtmlTablesForm( - file: Blob, - inline?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public debugHtmlTablesForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling debugHtmlTables.' - ); + throw new Error('Required parameter file was null or undefined when calling debugHtmlTables.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -186,16 +144,13 @@ export class DebugControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -240,37 +195,15 @@ export class DebugControllerService { * @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 debugSectionsForm( - file: Blob, - inline?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public debugSectionsForm(file: Blob, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public debugSectionsForm( - file: Blob, - inline?: boolean, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public debugSectionsForm(file: Blob, inline?: boolean, observe?: 'response', reportProgress?: boolean): Observable>; - public debugSectionsForm( - file: Blob, - inline?: boolean, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public debugSectionsForm(file: Blob, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable>; - public debugSectionsForm( - file: Blob, - inline?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public debugSectionsForm(file: Blob, inline?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling debugSections.' - ); + throw new Error('Required parameter file was null or undefined when calling debugSections.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -283,16 +216,13 @@ export class DebugControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -369,9 +299,7 @@ export class DebugControllerService { reportProgress: boolean = false ): Observable { if (file === null || file === undefined) { - throw new Error( - 'Required parameter file was null or undefined when calling redaction.' - ); + throw new Error('Required parameter file was null or undefined when calling redaction.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -387,16 +315,13 @@ export class DebugControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 28fe72ac1..ce77d7944 100644 --- a/libs/red-ui-http/src/lib/api/dictionaryController.service.ts +++ b/libs/red-ui-http/src/lib/api/dictionaryController.service.ts @@ -100,9 +100,7 @@ export class DictionaryControllerService { } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling addEntry.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling addEntry.'); } if (type === null || type === undefined) { @@ -122,33 +120,27 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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, @@ -168,33 +160,13 @@ export class DictionaryControllerService { * @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 addType( - body: TypeValue, - dossierId?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public addType(body: TypeValue, dossierId?: string, observe?: 'body', reportProgress?: boolean): Observable; - public addType( - body: TypeValue, - dossierId?: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public addType(body: TypeValue, dossierId?: string, observe?: 'response', reportProgress?: boolean): Observable>; - public addType( - body: TypeValue, - dossierId?: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public addType(body: TypeValue, dossierId?: string, observe?: 'events', reportProgress?: boolean): Observable>; - public addType( - body: TypeValue, - dossierId?: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public addType(body: TypeValue, 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 addType.'); } @@ -209,24 +181,20 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -287,21 +255,15 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling deleteEntries.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteEntries.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteEntries.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteEntries.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling deleteEntries.' - ); + throw new Error('Required parameter type was null or undefined when calling deleteEntries.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -314,33 +276,27 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/dictionary/delete/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/delete/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, params: queryParameters, @@ -398,21 +354,15 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteEntry.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteEntry.'); } if (entry === null || entry === undefined) { - throw new Error( - 'Required parameter entry was null or undefined when calling deleteEntry.' - ); + throw new Error('Required parameter entry was null or undefined when calling deleteEntry.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling deleteEntry.' - ); + throw new Error('Required parameter type was null or undefined when calling deleteEntry.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -425,16 +375,13 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -495,15 +442,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteType.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteType.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling deleteType.' - ); + throw new Error('Required parameter type was null or undefined when calling deleteType.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -516,25 +459,20 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/dictionary/type/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -586,15 +524,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling deleteTypes.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteTypes.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteTypes.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteTypes.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -607,33 +541,27 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/dictionary/type/${encodeURIComponent( - String(dossierTemplateId) - )}/delete`, + `${this.basePath}/dictionary/type/${encodeURIComponent(String(dossierTemplateId))}/delete`, { body: body, params: queryParameters, @@ -686,15 +614,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling downloadDictionaryFile.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadDictionaryFile.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling downloadDictionaryFile.' - ); + throw new Error('Required parameter type was null or undefined when calling downloadDictionaryFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -707,25 +631,20 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/dictionary/download/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/download/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -744,12 +663,7 @@ export class DictionaryControllerService { * @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 getAllTypes( - dossierTemplateId: string, - dossierId?: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getAllTypes(dossierTemplateId: string, dossierId?: string, observe?: 'body', reportProgress?: boolean): Observable; public getAllTypes( dossierTemplateId: string, @@ -772,9 +686,7 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getAllTypes.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getAllTypes.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -787,16 +699,13 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -821,33 +730,15 @@ export class DictionaryControllerService { * @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 getColors( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getColors(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public getColors( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getColors(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public getColors( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getColors(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getColors( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getColors(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 getColors.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getColors.'); } let headers = this.defaultHeaders; @@ -855,30 +746,23 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -922,15 +806,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getDictionaryForType.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getDictionaryForType.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling getDictionaryForType.' - ); + throw new Error('Required parameter type was null or undefined when calling getDictionaryForType.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -943,25 +823,20 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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, @@ -980,12 +855,7 @@ export class DictionaryControllerService { * @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 setColors( - body: Colors, - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setColors(body: Colors, dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; public setColors( body: Colors, @@ -994,29 +864,15 @@ export class DictionaryControllerService { reportProgress?: boolean ): Observable>; - public setColors( - body: Colors, - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public setColors(body: Colors, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public setColors( - body: Colors, - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public setColors(body: Colors, 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 setColors.' - ); + throw new Error('Required parameter body was null or undefined when calling setColors.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling setColors.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling setColors.'); } let headers = this.defaultHeaders; @@ -1024,39 +880,31 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -1105,21 +953,15 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateType.' - ); + throw new Error('Required parameter body was null or undefined when calling updateType.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling updateType.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling updateType.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling updateType.' - ); + throw new Error('Required parameter type was null or undefined when calling updateType.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -1132,33 +974,27 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/dictionary/type/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, params: queryParameters, @@ -1216,15 +1052,11 @@ export class DictionaryControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling uploadDictionaryFile.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadDictionaryFile.'); } if (type === null || type === undefined) { - throw new Error( - 'Required parameter type was null or undefined when calling uploadDictionaryFile.' - ); + throw new Error('Required parameter type was null or undefined when calling uploadDictionaryFile.'); } let headers = this.defaultHeaders; @@ -1232,16 +1064,13 @@ export class DictionaryControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -1272,9 +1101,7 @@ export class DictionaryControllerService { return this.httpClient.request( 'post', - `${this.basePath}/dictionary/upload/${encodeURIComponent( - String(type) - )}/${encodeURIComponent(String(dossierTemplateId))}`, + `${this.basePath}/dictionary/upload/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`, { body: convertFormParamsToString ? formParams.toString() : formParams, 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 f46bb07d3..541ff9518 100644 --- a/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts +++ b/libs/red-ui-http/src/lib/api/digitalSignatureController.service.ts @@ -50,35 +50,23 @@ export class DigitalSignatureControllerService { */ public deleteDigitalSignature(observe?: 'body', reportProgress?: boolean): Observable; - public deleteDigitalSignature( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deleteDigitalSignature(observe?: 'response', reportProgress?: boolean): Observable>; - public deleteDigitalSignature( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deleteDigitalSignature(observe?: 'events', reportProgress?: boolean): Observable>; - public deleteDigitalSignature( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteDigitalSignature(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -97,54 +85,35 @@ 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 getDigitalSignature( - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getDigitalSignature(observe?: 'body', reportProgress?: boolean): Observable; - public getDigitalSignature( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getDigitalSignature(observe?: 'response', reportProgress?: boolean): Observable>; - public getDigitalSignature( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getDigitalSignature(observe?: 'events', reportProgress?: boolean): Observable>; - public getDigitalSignature( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDigitalSignature(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/digital-signature`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/digital-signature`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -172,15 +141,9 @@ export class DigitalSignatureControllerService { reportProgress?: boolean ): Observable>; - public saveDigitalSignature( - body: DigitalSignature, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public saveDigitalSignature(body: DigitalSignature, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling saveDigitalSignature.' - ); + throw new Error('Required parameter body was null or undefined when calling saveDigitalSignature.'); } let headers = this.defaultHeaders; @@ -188,39 +151,31 @@ export class DigitalSignatureControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/digital-signature`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/digital-signature`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -230,11 +185,7 @@ 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( - body: DigitalSignatureViewModelReq, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateDigitalSignature(body: DigitalSignatureViewModelReq, observe?: 'body', reportProgress?: boolean): Observable; public updateDigitalSignature( body: DigitalSignatureViewModelReq, @@ -254,9 +205,7 @@ export class DigitalSignatureControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling saveDigitalSignature1.' - ); + throw new Error('Required parameter body was null or undefined when calling saveDigitalSignature1.'); } let headers = this.defaultHeaders; @@ -264,24 +213,20 @@ export class DigitalSignatureControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 4ed3a9f5c..8995f46de 100644 --- a/libs/red-ui-http/src/lib/api/dossierController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierController.service.ts @@ -24,9 +24,9 @@ import { Configuration } from '../configuration'; @Injectable() export class DossierControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = ''; constructor( protected httpClient: HttpClient, @@ -42,20 +42,6 @@ export class DossierControllerService { } } - /** - * @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; - } - /** * Creates or updates a dossier. * None @@ -63,30 +49,15 @@ export class DossierControllerService { * @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 createOrUpdateDossier( - body: DossierRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public createOrUpdateDossier( - body: DossierRequest, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public createOrUpdateDossier( - body: DossierRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public createOrUpdateDossier( - body: DossierRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public createOrUpdateDossier(body: DossierRequest, observe?: 'body', reportProgress?: boolean): Observable; + + public createOrUpdateDossier(body: DossierRequest, observe?: 'response', reportProgress?: boolean): Observable>; + + public createOrUpdateDossier(body: DossierRequest, observe?: 'events', reportProgress?: boolean): Observable>; + + public createOrUpdateDossier(body: DossierRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling createOrUpdateDossier.' - ); + throw new Error('Required parameter body was null or undefined when calling createOrUpdateDossier.'); } let headers = this.defaultHeaders; @@ -94,24 +65,20 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -132,30 +99,15 @@ export class DossierControllerService { * @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 deleteDossier( - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public deleteDossier( - dossierId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public deleteDossier( - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public deleteDossier( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteDossier(dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + + public deleteDossier(dossierId: string, observe?: 'response', reportProgress?: boolean): Observable>; + + public deleteDossier(dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public deleteDossier(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 deleteDossier.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling deleteDossier.'); } let headers = this.defaultHeaders; @@ -163,30 +115,23 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -195,37 +140,25 @@ export class DossierControllerService { * @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 getDeletedDossiers( - observe?: 'body', - reportProgress?: boolean - ): Observable>; - public getDeletedDossiers( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getDeletedDossiers( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; - public getDeletedDossiers( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDeletedDossiers(observe?: 'body', reportProgress?: boolean): Observable>; + + public getDeletedDossiers(observe?: 'response', reportProgress?: boolean): Observable>>; + + public getDeletedDossiers(observe?: 'events', reportProgress?: boolean): Observable>>; + + public getDeletedDossiers(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -245,30 +178,15 @@ export class DossierControllerService { * @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 getDossier( - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public getDossier( - dossierId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public getDossier( - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public getDossier( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDossier(dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + + public getDossier(dossierId: string, observe?: 'response', reportProgress?: boolean): Observable>; + + public getDossier(dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public getDossier(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 getDossier.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getDossier.'); } let headers = this.defaultHeaders; @@ -276,30 +194,23 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/dossier/${encodeURIComponent(String(dossierId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -309,30 +220,24 @@ export class DossierControllerService { * @param reportProgress flag to report request and response progress. */ public getDossiers(observe?: 'body', reportProgress?: boolean): Observable>; - public getDossiers( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; - public getDossiers( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + + public getDossiers(observe?: 'response', reportProgress?: boolean): Observable>>; + + public getDossiers(observe?: 'events', reportProgress?: boolean): Observable>>; + public getDossiers(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -352,30 +257,15 @@ export class DossierControllerService { * @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 hardDeleteDossiers( - body: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public hardDeleteDossiers( - body: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public hardDeleteDossiers( - body: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public hardDeleteDossiers( - body: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public hardDeleteDossiers(body: Array, observe?: 'body', reportProgress?: boolean): Observable; + + public hardDeleteDossiers(body: Array, observe?: 'response', reportProgress?: boolean): Observable>; + + public hardDeleteDossiers(body: Array, observe?: 'events', reportProgress?: boolean): Observable>; + + public hardDeleteDossiers(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 hardDeleteDossiers.' - ); + throw new Error('Required parameter body was null or undefined when calling hardDeleteDossiers.'); } let headers = this.defaultHeaders; @@ -383,9 +273,7 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } @@ -396,32 +284,26 @@ export class DossierControllerService { // to determine the Accept header const httpHeaderAccepts: string[] = ['application/json']; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/deleted-dossiers/hard-delete`, - { - body: body, - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/deleted-dossiers/hard-delete`, { + body: body, + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -431,30 +313,15 @@ export class DossierControllerService { * @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 restoreDossiers( - body: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; - public restoreDossiers( - body: Array, - observe?: 'response', - reportProgress?: boolean - ): Observable>; - public restoreDossiers( - body: Array, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public restoreDossiers( - body: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public restoreDossiers(body: Array, observe?: 'body', reportProgress?: boolean): Observable; + + public restoreDossiers(body: Array, observe?: 'response', reportProgress?: boolean): Observable>; + + public restoreDossiers(body: Array, observe?: 'events', reportProgress?: boolean): Observable>; + + public restoreDossiers(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 restoreDossiers.' - ); + throw new Error('Required parameter body was null or undefined when calling restoreDossiers.'); } let headers = this.defaultHeaders; @@ -462,9 +329,7 @@ export class DossierControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.accessToken; + typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken; headers = headers.set('Authorization', 'Bearer ' + accessToken); } @@ -475,16 +340,14 @@ export class DossierControllerService { // to determine the Accept header const httpHeaderAccepts: string[] = []; - const httpHeaderAcceptSelected: string | undefined = - this.configuration.selectHeaderAccept(httpHeaderAccepts); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -498,4 +361,18 @@ export class DossierControllerService { 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 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 02d8c84c9..6276e3e9f 100644 --- a/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts +++ b/libs/red-ui-http/src/lib/api/dossierTemplateController.service.ts @@ -71,9 +71,7 @@ export class DossierTemplateControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling createOrUpdateDossierTemplate.' - ); + throw new Error('Required parameter body was null or undefined when calling createOrUpdateDossierTemplate.'); } let headers = this.defaultHeaders; @@ -81,39 +79,31 @@ export class DossierTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/dossier-template`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/dossier-template`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -123,33 +113,15 @@ 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 deleteDossierTemplate( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteDossierTemplate(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public deleteDossierTemplate( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public deleteDossierTemplate(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public deleteDossierTemplate( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public deleteDossierTemplate(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public deleteDossierTemplate( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteDossierTemplate(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 deleteDossierTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteDossierTemplate.'); } let headers = this.defaultHeaders; @@ -157,16 +129,13 @@ export class DossierTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -190,30 +159,12 @@ 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 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 { + 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.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteDossierTemplates.'); } let headers = this.defaultHeaders; @@ -221,24 +172,20 @@ export class DossierTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -258,54 +205,35 @@ 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 getAllDossierTemplates( - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getAllDossierTemplates(observe?: 'body', reportProgress?: boolean): Observable>; - public getAllDossierTemplates( - observe?: 'response', - reportProgress?: boolean - ): Observable>>; + public getAllDossierTemplates(observe?: 'response', reportProgress?: boolean): Observable>>; - public getAllDossierTemplates( - observe?: 'events', - reportProgress?: boolean - ): Observable>>; + public getAllDossierTemplates(observe?: 'events', reportProgress?: boolean): Observable>>; - public getAllDossierTemplates( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAllDossierTemplates(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request>( - 'get', - `${this.basePath}/dossier-template`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request>('get', `${this.basePath}/dossier-template`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -315,11 +243,7 @@ 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 getDossierTemplate( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getDossierTemplate(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; public getDossierTemplate( dossierTemplateId: string, @@ -333,15 +257,9 @@ export class DossierTemplateControllerService { reportProgress?: boolean ): Observable>; - public getDossierTemplate( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + 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 getDossierTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getDossierTemplate.'); } let headers = this.defaultHeaders; @@ -349,16 +267,13 @@ export class DossierTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 14ec27043..0905bfff4 100644 --- a/libs/red-ui-http/src/lib/api/downloadController.service.ts +++ b/libs/red-ui-http/src/lib/api/downloadController.service.ts @@ -52,37 +52,15 @@ export class DownloadControllerService { * @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 downloadFile( - storageId: string, - inline?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public downloadFile(storageId: string, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable; - public downloadFile( - storageId: string, - inline?: boolean, - observe?: 'response', - 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, observe?: 'events', reportProgress?: boolean): Observable>; - public downloadFile( - storageId: string, - inline?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public downloadFile(storageId: string, inline?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable { if (storageId === null || storageId === undefined) { - throw new Error( - 'Required parameter storageId was null or undefined when calling downloadFile.' - ); + throw new Error('Required parameter storageId was null or undefined when calling downloadFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -98,16 +76,13 @@ export class DownloadControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -127,54 +102,35 @@ export class DownloadControllerService { * @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 getDownloadStatus( - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getDownloadStatus(observe?: 'body', reportProgress?: boolean): Observable; - public getDownloadStatus( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getDownloadStatus(observe?: 'response', reportProgress?: boolean): Observable>; - public getDownloadStatus( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getDownloadStatus(observe?: 'events', reportProgress?: boolean): Observable>; - public getDownloadStatus( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getDownloadStatus(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/async/download/status`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/async/download/status`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -184,11 +140,7 @@ export class DownloadControllerService { * @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 prepareDownload( - body: PrepareDownloadRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public prepareDownload(body: PrepareDownloadRequest, observe?: 'body', reportProgress?: boolean): Observable; public prepareDownload( body: PrepareDownloadRequest, @@ -202,15 +154,9 @@ export class DownloadControllerService { reportProgress?: boolean ): Observable>; - public prepareDownload( - body: PrepareDownloadRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public prepareDownload(body: PrepareDownloadRequest, 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.' - ); + throw new Error('Required parameter body was null or undefined when calling prepareDownload.'); } let headers = this.defaultHeaders; @@ -218,39 +164,31 @@ export class DownloadControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/prepare`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/async/download/prepare`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -260,33 +198,15 @@ export class DownloadControllerService { * @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?: 'body', reportProgress?: boolean): Observable; - public deleteDownload( - body: RemoveDownloadRequest, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>; - public deleteDownload( - body: RemoveDownloadRequest, - observe: any = 'body', - reportProgress: boolean = false - ): 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 prepareDownload1.' - ); + throw new Error('Required parameter body was null or undefined when calling prepareDownload1.'); } let headers = this.defaultHeaders; @@ -294,24 +214,20 @@ export class DownloadControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 f7c2e2627..689b985f9 100644 --- a/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileAttributesController.service.ts @@ -78,15 +78,11 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteFileAttribute.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteFileAttribute.'); } if (fileAttributeId === null || fileAttributeId === undefined) { - throw new Error( - 'Required parameter fileAttributeId was null or undefined when calling deleteFileAttribute.' - ); + throw new Error('Required parameter fileAttributeId was null or undefined when calling deleteFileAttribute.'); } let headers = this.defaultHeaders; @@ -94,25 +90,22 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(fileAttributeId))}`, + `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent( + String(fileAttributeId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -158,15 +151,11 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling deleteFileAttributes.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteFileAttributes.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteFileAttributes.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteFileAttributes.'); } let headers = this.defaultHeaders; @@ -174,33 +163,27 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( - String(dossierTemplateId) - )}/delete`, + `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent(String(dossierTemplateId))}/delete`, { body: body, withCredentials: this.configuration.withCredentials, @@ -242,9 +225,7 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getFileAttributesConfiguration.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getFileAttributesConfiguration.'); } let headers = this.defaultHeaders; @@ -252,25 +233,20 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/fileAttributes/config/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/fileAttributes/config/${encodeURIComponent(String(dossierTemplateId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -321,21 +297,15 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setFileAttributes.' - ); + throw new Error('Required parameter body was null or undefined when calling setFileAttributes.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setFileAttributes.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setFileAttributes.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setFileAttributes.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setFileAttributes.'); } let headers = this.defaultHeaders; @@ -343,33 +313,27 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/set/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/fileAttributes/set/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -416,15 +380,11 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setFileAttributesConfig.' - ); + throw new Error('Required parameter body was null or undefined when calling setFileAttributesConfig.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling setFileAttributesConfig.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling setFileAttributesConfig.'); } let headers = this.defaultHeaders; @@ -432,33 +392,27 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'put', - `${this.basePath}/fileAttributes/config/baseConfig/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/fileAttributes/config/baseConfig/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -505,15 +459,11 @@ export class FileAttributesControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setFileAttributesConfiguration.' - ); + throw new Error('Required parameter body was null or undefined when calling setFileAttributesConfiguration.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling setFileAttributesConfiguration.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling setFileAttributesConfiguration.'); } let headers = this.defaultHeaders; @@ -521,33 +471,27 @@ export class FileAttributesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent( - String(dossierTemplateId) - )}`, + `${this.basePath}/fileAttributes/config/fileAttribute/${encodeURIComponent(String(dossierTemplateId))}`, { body: body, withCredentials: this.configuration.withCredentials, 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 e65b0b80c..19ba3aa4c 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 = ''; constructor( protected httpClient: HttpClient, @@ -39,20 +39,6 @@ export class FileManagementControllerService { } } - /** - * @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; - } - /** * Deletes a file for a given dossierId and FileId * None @@ -61,40 +47,19 @@ export class FileManagementControllerService { * @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 deleteFile( - dossierId: string, - fileId: string, - 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, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteFile(dossierId: string, fileId: string, 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, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling deleteFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling deleteFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling deleteFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling deleteFile.'); } let headers = this.defaultHeaders; @@ -102,25 +67,20 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}`, + `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -138,40 +98,24 @@ export class FileManagementControllerService { * @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 deleteFiles( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteFiles(body: Array, dossierId: string, 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, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + + public deleteFiles(body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public deleteFiles(body: Array, 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 deleteFiles.' - ); + throw new Error('Required parameter body was null or undefined when calling deleteFiles.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling deleteFiles.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling deleteFiles.'); } let headers = this.defaultHeaders; @@ -179,39 +123,31 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/delete/${encodeURIComponent(String(dossierId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -230,6 +166,7 @@ export class FileManagementControllerService { observe?: 'body', reportProgress?: boolean ): Observable; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -237,6 +174,7 @@ export class FileManagementControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -244,6 +182,7 @@ export class FileManagementControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; + public downloadAnnotatedFile( dossierId: string, fileId: string, @@ -252,15 +191,11 @@ export class FileManagementControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling downloadAnnotatedFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling downloadAnnotatedFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling downloadAnnotatedFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling downloadAnnotatedFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -273,25 +208,20 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/download/annotated/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/download/annotated/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -347,15 +277,11 @@ export class FileManagementControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling downloadOriginalFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling downloadOriginalFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling downloadOriginalFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling downloadOriginalFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -371,25 +297,20 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/download/original/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/download/original/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { responseType: 'blob', params: queryParameters, @@ -409,40 +330,24 @@ export class FileManagementControllerService { * @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 hardDeleteFile( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public hardDeleteFile(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + public hardDeleteFile( body: Array, dossierId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public hardDeleteFile( - body: Array, - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public hardDeleteFile( - body: Array, - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + + public hardDeleteFile(body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public hardDeleteFile(body: Array, 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 hardDeleteFile.' - ); + throw new Error('Required parameter body was null or undefined when calling hardDeleteFile.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling hardDeleteFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling hardDeleteFile.'); } let headers = this.defaultHeaders; @@ -450,39 +355,31 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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[] = ['*/*']; - const httpContentTypeSelected: string | undefined = - this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/delete/hard-delete/${encodeURIComponent(String(dossierId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/delete/hard-delete/${encodeURIComponent(String(dossierId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -493,40 +390,24 @@ export class FileManagementControllerService { * @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 restoreFiles( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public restoreFiles(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; + public restoreFiles( body: Array, dossierId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public restoreFiles( - body: Array, - dossierId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; - public restoreFiles( - body: Array, - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + + public restoreFiles(body: Array, dossierId: string, observe?: 'events', reportProgress?: boolean): Observable>; + + public restoreFiles(body: Array, 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 restoreFiles.' - ); + throw new Error('Required parameter body was null or undefined when calling restoreFiles.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling restoreFiles.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling restoreFiles.'); } let headers = this.defaultHeaders; @@ -534,38 +415,44 @@ export class FileManagementControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/delete/restore/${encodeURIComponent(String(dossierId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress + return this.httpClient.request('post', `${this.basePath}/delete/restore/${encodeURIComponent(String(dossierId))}`, { + body: body, + 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 false; } } diff --git a/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts b/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts index 1d5722b0b..bc1256dee 100644 --- a/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts +++ b/libs/red-ui-http/src/lib/api/generalSettingsController.service.ts @@ -46,54 +46,35 @@ export class GeneralSettingsControllerService { * @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?: 'body', reportProgress?: boolean): Observable; - public getGeneralConfigurations( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getGeneralConfigurations(observe?: 'response', reportProgress?: boolean): Observable>; - public getGeneralConfigurations( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getGeneralConfigurations(observe?: 'events', reportProgress?: boolean): Observable>; - public getGeneralConfigurations( - observe: any = 'body', - reportProgress: boolean = false - ): 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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/configuration/general`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/configuration/general`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -103,11 +84,7 @@ export class GeneralSettingsControllerService { * @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?: 'body', reportProgress?: boolean): Observable; public updateGeneralConfigurations( body: GeneralConfigurationModel, @@ -127,9 +104,7 @@ export class GeneralSettingsControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateGeneralConfigurations.' - ); + throw new Error('Required parameter body was null or undefined when calling updateGeneralConfigurations.'); } let headers = this.defaultHeaders; @@ -137,24 +112,20 @@ export class GeneralSettingsControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 a16aeabac..f570b22fa 100644 --- a/libs/red-ui-http/src/lib/api/infoController.service.ts +++ b/libs/red-ui-http/src/lib/api/infoController.service.ts @@ -48,15 +48,9 @@ export class InfoControllerService { */ public getAuthInfo(observe?: 'body', reportProgress?: boolean): Observable; - public getAuthInfo( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getAuthInfo(observe?: 'response', reportProgress?: boolean): Observable>; - public getAuthInfo( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getAuthInfo(observe?: 'events', reportProgress?: boolean): Observable>; public getAuthInfo(observe: any = 'body', reportProgress: boolean = false): Observable { let headers = this.defaultHeaders; @@ -64,16 +58,13 @@ export class InfoControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 894586ed8..d0398013c 100644 --- a/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts +++ b/libs/red-ui-http/src/lib/api/legalBasisMappingController.service.ts @@ -65,15 +65,9 @@ export class LegalBasisMappingControllerService { reportProgress?: boolean ): Observable>>; - public getLegalBasisMapping( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getLegalBasisMapping(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 getLegalBasisMapping.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getLegalBasisMapping.'); } let headers = this.defaultHeaders; @@ -81,16 +75,13 @@ export class LegalBasisMappingControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -143,15 +134,11 @@ export class LegalBasisMappingControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setLegalBasisMapping.' - ); + throw new Error('Required parameter body was null or undefined when calling setLegalBasisMapping.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling setLegalBasisMapping.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling setLegalBasisMapping.'); } let headers = this.defaultHeaders; @@ -159,38 +146,30 @@ export class LegalBasisMappingControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/legalBasis/${encodeURIComponent(String(dossierTemplateId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/legalBasis/${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/licenseReportController.service.ts b/libs/red-ui-http/src/lib/api/licenseReportController.service.ts index eadc5b1d5..1e0fa4ea6 100644 --- a/libs/red-ui-http/src/lib/api/licenseReportController.service.ts +++ b/libs/red-ui-http/src/lib/api/licenseReportController.service.ts @@ -83,9 +83,7 @@ export class LicenseReportControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling licenseReport.' - ); + throw new Error('Required parameter body was null or undefined when calling licenseReport.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -101,24 +99,20 @@ export class LicenseReportControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 04368a8ad..9bf849ccc 100644 --- a/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts +++ b/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts @@ -31,9 +31,9 @@ import { Configuration } from '../configuration'; @Injectable() export class ManualRedactionControllerService { - protected basePath = ''; public defaultHeaders = new HttpHeaders(); public configuration = new Configuration(); + protected basePath = ''; constructor( protected httpClient: HttpClient, @@ -92,27 +92,19 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling addComment.' - ); + throw new Error('Required parameter body was null or undefined when calling addComment.'); } if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling addComment.' - ); + 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.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling addComment.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling addComment.' - ); + throw new Error('Required parameter fileId was null or undefined when calling addComment.'); } let headers = this.defaultHeaders; @@ -120,33 +112,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/comment/add/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, + `${this.basePath}/manualRedaction/comment/add/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -195,21 +183,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling addRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling addRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling addRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling addRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling addRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling addRedaction.'); } let headers = this.defaultHeaders; @@ -217,33 +199,27 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/add/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -297,27 +273,19 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling approveRequest.' - ); + throw new Error('Required parameter body was null or undefined when calling approveRequest.'); } if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling approveRequest.' - ); + 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.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling approveRequest.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling approveRequest.' - ); + throw new Error('Required parameter fileId was null or undefined when calling approveRequest.'); } let headers = this.defaultHeaders; @@ -325,33 +293,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/approve/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, + `${this.basePath}/manualRedaction/approve/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -400,21 +364,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling declineRequest.' - ); + 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.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling declineRequest.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling declineRequest.' - ); + throw new Error('Required parameter fileId was null or undefined when calling declineRequest.'); } let headers = this.defaultHeaders; @@ -422,25 +380,22 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/manualRedaction/decline/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, + `${this.basePath}/manualRedaction/decline/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -488,21 +443,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling forceRedaction.' - ); + 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.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling forceRedaction.'); } let headers = this.defaultHeaders; @@ -510,33 +459,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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))}`, + `${this.basePath}/manualRedaction/redaction/force/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -555,12 +500,7 @@ export class ManualRedactionControllerService { * @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 getManualRedaction( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getManualRedaction(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getManualRedaction( dossierId: string, fileId: string, @@ -573,22 +513,13 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public getManualRedaction( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getManualRedaction(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 getManualRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getManualRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getManualRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getManualRedaction.'); } let headers = this.defaultHeaders; @@ -596,25 +527,20 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/manualRedaction/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -662,21 +588,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling legalBasisChange.' - ); + throw new Error('Required parameter body was null or undefined when calling legalBasisChange.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling legalBasisChange.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling legalBasisChange.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling legalBasisChange.' - ); + throw new Error('Required parameter fileId was null or undefined when calling legalBasisChange.'); } let headers = this.defaultHeaders; @@ -684,33 +604,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/legalBasisChange/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/legalBasisChange/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -759,21 +675,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling recategorizeImage.' - ); + 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.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling recategorizeImage.'); } let headers = this.defaultHeaders; @@ -781,33 +691,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/recategorize/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/recategorize/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -856,21 +762,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling removeRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling removeRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling removeRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling removeRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling removeRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling removeRedaction.'); } let headers = this.defaultHeaders; @@ -878,33 +778,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/remove/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -953,21 +849,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestAddRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling requestAddRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestAddRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling requestAddRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestAddRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestAddRedaction.'); } let headers = this.defaultHeaders; @@ -975,33 +865,27 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/add/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/add/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1050,21 +934,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestForceRedaction.' - ); + 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.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestForceRedaction.'); } let headers = this.defaultHeaders; @@ -1072,33 +950,27 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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))}`, + `${this.basePath}/manualRedaction/request/force/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1147,21 +1019,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestImageRecategorization.' - ); + 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.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestImageRecategorization.'); } let headers = this.defaultHeaders; @@ -1169,33 +1035,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/recategorize/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/recategorize/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1244,21 +1106,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestLegalBasisChange.' - ); + throw new Error('Required parameter body was null or undefined when calling requestLegalBasisChange.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestLegalBasisChange.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling requestLegalBasisChange.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestLegalBasisChange.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestLegalBasisChange.'); } let headers = this.defaultHeaders; @@ -1266,33 +1122,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/legalBasis/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/legalBasis/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1341,21 +1193,15 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling requestRemoveRedaction.' - ); + throw new Error('Required parameter body was null or undefined when calling requestRemoveRedaction.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling requestRemoveRedaction.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling requestRemoveRedaction.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling requestRemoveRedaction.' - ); + throw new Error('Required parameter fileId was null or undefined when calling requestRemoveRedaction.'); } let headers = this.defaultHeaders; @@ -1363,33 +1209,29 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + 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/remove/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/manualRedaction/request/remove/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -1409,13 +1251,7 @@ export class ManualRedactionControllerService { * @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, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public undo(annotationId: string, dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public undo( annotationId: string, dossierId: string, @@ -1438,15 +1274,11 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling undo.' - ); + 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.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling undo.'); } if (fileId === null || fileId === undefined) { @@ -1458,25 +1290,22 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/manualRedaction/undo/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, + `${this.basePath}/manualRedaction/undo/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -1529,27 +1358,19 @@ export class ManualRedactionControllerService { reportProgress: boolean = false ): Observable { if (annotationId === null || annotationId === undefined) { - throw new Error( - 'Required parameter annotationId was null or undefined when calling undoComment.' - ); + throw new Error('Required parameter annotationId was null or undefined when calling undoComment.'); } if (commentId === null || commentId === undefined) { - throw new Error( - 'Required parameter commentId was null or undefined when calling undoComment.' - ); + throw new Error('Required parameter commentId was null or undefined when calling undoComment.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling undoComment.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling undoComment.'); } let headers = this.defaultHeaders; @@ -1557,16 +1378,13 @@ export class ManualRedactionControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -1574,11 +1392,9 @@ export class ManualRedactionControllerService { // to determine the Content-Type header return this.httpClient.request( 'delete', - `${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent( - String(annotationId) - )}/${encodeURIComponent(String(commentId))}`, + `${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(annotationId))}/${encodeURIComponent(String(commentId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, 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 b7a8a3861..540f5dcad 100644 --- a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts +++ b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts @@ -82,21 +82,15 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling excludePages.' - ); + throw new Error('Required parameter body was null or undefined when calling excludePages.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling excludePages.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling excludePages.'); } let headers = this.defaultHeaders; @@ -104,33 +98,27 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/exclude-pages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/exclude-pages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -182,21 +170,15 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling includePages.' - ); + 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.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling includePages.'); } let headers = this.defaultHeaders; @@ -204,33 +186,27 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/include-pages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/include-pages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -248,33 +224,15 @@ export class ReanalysisControllerService { * @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?: 'body', reportProgress?: boolean): Observable; - public ocrDossier( - dossierId: string, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>; - public ocrDossier( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): 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.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling ocrDossier.'); } let headers = this.defaultHeaders; @@ -282,30 +240,23 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -316,43 +267,19 @@ export class ReanalysisControllerService { * @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 ocrFile( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public ocrFile(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; - public ocrFile( - dossierId: string, - fileId: string, - observe?: 'response', - 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, observe?: 'events', reportProgress?: boolean): Observable>; - public ocrFile( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public ocrFile(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 ocrFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling ocrFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling ocrFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling ocrFile.'); } let headers = this.defaultHeaders; @@ -360,25 +287,20 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -396,41 +318,19 @@ export class ReanalysisControllerService { * @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 ocrFiles( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public ocrFiles(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; - public ocrFiles( - body: Array, - dossierId: string, - observe?: 'response', - 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, observe?: 'events', reportProgress?: boolean): Observable>; - public ocrFiles( - body: Array, - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public ocrFiles(body: Array, 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 ocrFiles.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling ocrFiles.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling ocrFiles.'); } let headers = this.defaultHeaders; @@ -438,39 +338,31 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/ocr/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -481,12 +373,7 @@ export class ReanalysisControllerService { * @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?: 'body', reportProgress?: boolean): Observable; public reanalyzeDossier( dossierId: string, @@ -495,23 +382,11 @@ export class ReanalysisControllerService { reportProgress?: boolean ): Observable>; - public reanalyzeDossier( - dossierId: string, - force?: boolean, - observe?: 'events', - 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 { + 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.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling reanalyzeDossier.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -524,31 +399,24 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}`, { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -560,13 +428,7 @@ export class ReanalysisControllerService { * @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, - force?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public reanalyzeFile(dossierId: string, fileId: string, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable; public reanalyzeFile( dossierId: string, @@ -592,15 +454,11 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling reanalyzeFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling reanalyzeFile.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling reanalyzeFile.' - ); + throw new Error('Required parameter fileId was null or undefined when calling reanalyzeFile.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -613,25 +471,20 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/reanalyze/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -683,15 +536,11 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling reanalyzeFilesForDossier.' - ); + throw new Error('Required parameter body was null or undefined when calling reanalyzeFilesForDossier.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling reanalyzeFilesForDossier.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling reanalyzeFilesForDossier.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -704,40 +553,32 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/reanalyze/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -781,15 +622,11 @@ export class ReanalysisControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling toggleAnalysis.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling toggleAnalysis.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -802,25 +639,20 @@ export class ReanalysisControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/toggle-analysis/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/toggle-analysis/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, 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 501789180..a5bccf3ad 100644 --- a/libs/red-ui-http/src/lib/api/redactionLogController.service.ts +++ b/libs/red-ui-http/src/lib/api/redactionLogController.service.ts @@ -78,15 +78,11 @@ export class RedactionLogControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getRedactionLog.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getRedactionLog.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getRedactionLog.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getRedactionLog.'); } let headers = this.defaultHeaders; @@ -94,25 +90,20 @@ export class RedactionLogControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/redactionChnageLog/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/redactionChnageLog/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -130,12 +121,7 @@ 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( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getRedactionLog(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getRedactionLog( dossierId: string, @@ -151,22 +137,13 @@ export class RedactionLogControllerService { reportProgress?: boolean ): Observable>; - public getRedactionLog( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getRedactionLog(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 getRedactionLog1.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getRedactionLog1.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getRedactionLog1.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getRedactionLog1.'); } let headers = this.defaultHeaders; @@ -174,25 +151,20 @@ export class RedactionLogControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/redactionLog/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/redactionLog/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -201,6 +173,7 @@ export class RedactionLogControllerService { } ); } + /** * Gets the redaction log preview * None @@ -209,12 +182,7 @@ 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 getRedactionLogPreview( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getRedactionLogPreview(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getRedactionLogPreview( dossierId: string, fileId: string, @@ -234,15 +202,11 @@ export class RedactionLogControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getRedactionLogPreview.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getRedactionLogPreview.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getRedactionLogPreview.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getRedactionLogPreview.'); } let headers = this.defaultHeaders; @@ -250,25 +214,20 @@ export class RedactionLogControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/sectionGrid/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/preview`, + `${this.basePath}/sectionGrid/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}/preview`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -286,12 +245,7 @@ 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 getSectionGrid( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getSectionGrid(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getSectionGrid( dossierId: string, @@ -307,22 +261,13 @@ export class RedactionLogControllerService { reportProgress?: boolean ): Observable>; - public getSectionGrid( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getSectionGrid(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 getSectionGrid.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getSectionGrid.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getSectionGrid.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getSectionGrid.'); } let headers = this.defaultHeaders; @@ -330,25 +275,20 @@ export class RedactionLogControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/sectionGrid/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/sectionGrid/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, 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 2dbfea216..ad39fcf90 100644 --- a/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts +++ b/libs/red-ui-http/src/lib/api/reportTemplateController.service.ts @@ -49,12 +49,7 @@ export class ReportTemplateControllerService { * @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 deleteTemplate( - dossierTemplateId: string, - templateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteTemplate(dossierTemplateId: string, templateId: string, observe?: 'body', reportProgress?: boolean): Observable; public deleteTemplate( dossierTemplateId: string, @@ -77,15 +72,11 @@ export class ReportTemplateControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling deleteTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteTemplate.'); } if (templateId === null || templateId === undefined) { - throw new Error( - 'Required parameter templateId was null or undefined when calling deleteTemplate.' - ); + throw new Error('Required parameter templateId was null or undefined when calling deleteTemplate.'); } let headers = this.defaultHeaders; @@ -93,25 +84,20 @@ export class ReportTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/templateUpload/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(templateId))}`, + `${this.basePath}/templateUpload/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent(String(templateId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -157,15 +143,11 @@ export class ReportTemplateControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling downloadReportTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadReportTemplate.'); } if (templateId === null || templateId === undefined) { - throw new Error( - 'Required parameter templateId was null or undefined when calling downloadReportTemplate.' - ); + throw new Error('Required parameter templateId was null or undefined when calling downloadReportTemplate.'); } let headers = this.defaultHeaders; @@ -173,25 +155,20 @@ export class ReportTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/templateUpload/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(templateId))}`, + `${this.basePath}/templateUpload/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent(String(templateId))}`, { withCredentials: this.configuration.withCredentials, responseType: 'blob', @@ -227,15 +204,9 @@ export class ReportTemplateControllerService { reportProgress?: boolean ): Observable>>; - public getAvailableReportTemplates( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAvailableReportTemplates(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 getAvailableReportTemplates.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getAvailableReportTemplates.'); } let headers = this.defaultHeaders; @@ -243,16 +214,13 @@ export class ReportTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -305,9 +273,7 @@ export class ReportTemplateControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling uploadTemplate.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadTemplate.'); } let headers = this.defaultHeaders; @@ -315,16 +281,13 @@ export class ReportTemplateControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 6a1eea3d3..bfce50459 100644 --- a/libs/red-ui-http/src/lib/api/rulesController.service.ts +++ b/libs/red-ui-http/src/lib/api/rulesController.service.ts @@ -48,33 +48,15 @@ export class RulesControllerService { * @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 downloadRules( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public downloadRules(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public downloadRules( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public downloadRules(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public downloadRules( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public downloadRules(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public downloadRules( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public downloadRules(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 downloadRules.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadRules.'); } let headers = this.defaultHeaders; @@ -82,30 +64,23 @@ export class RulesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -115,33 +90,15 @@ export class RulesControllerService { * @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 downloadRulesFile( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public downloadRulesFile(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public downloadRulesFile( - dossierTemplateId: string, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public downloadRulesFile(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable>; - public downloadRulesFile( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public downloadRulesFile(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public downloadRulesFile( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public downloadRulesFile(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 downloadRulesFile.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadRulesFile.'); } let headers = this.defaultHeaders; @@ -149,30 +106,23 @@ export class RulesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/download`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/download`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -184,27 +134,13 @@ export class RulesControllerService { */ public uploadRules(body: Rules, observe?: 'body', reportProgress?: boolean): Observable; - public uploadRules( - body: Rules, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public uploadRules(body: Rules, observe?: 'response', reportProgress?: boolean): Observable>; - public uploadRules( - body: Rules, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public uploadRules(body: Rules, observe?: 'events', reportProgress?: boolean): Observable>; - public uploadRules( - body: Rules, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public uploadRules(body: Rules, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling uploadRules.' - ); + throw new Error('Required parameter body was null or undefined when calling uploadRules.'); } let headers = this.defaultHeaders; @@ -212,24 +148,20 @@ export class RulesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -251,12 +183,7 @@ export class RulesControllerService { * @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( - dossierTemplateId: string, - file?: Blob, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public uploadRulesFileForm(dossierTemplateId: string, file?: Blob, observe?: 'body', reportProgress?: boolean): Observable; public uploadRulesFileForm( dossierTemplateId: string, @@ -279,9 +206,7 @@ export class RulesControllerService { reportProgress: boolean = false ): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling uploadRulesFile.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadRulesFile.'); } let headers = this.defaultHeaders; @@ -289,16 +214,13 @@ export class RulesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -324,17 +246,13 @@ export class RulesControllerService { formParams = (formParams.append('file', file) as any) || formParams; } - return this.httpClient.request( - 'post', - `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/upload`, - { - body: convertFormParamsToString ? formParams.toString() : formParams, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/rules/${encodeURIComponent(String(dossierTemplateId))}/upload`, { + body: convertFormParamsToString ? formParams.toString() : formParams, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** 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 3c88f814d..b628aa76b 100644 --- a/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts +++ b/libs/red-ui-http/src/lib/api/smtpConfigurationController.service.ts @@ -48,35 +48,23 @@ export class SmtpConfigurationControllerService { */ public clearSMTPConfiguration(observe?: 'body', reportProgress?: boolean): Observable; - public clearSMTPConfiguration( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public clearSMTPConfiguration(observe?: 'response', reportProgress?: boolean): Observable>; - public clearSMTPConfiguration( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public clearSMTPConfiguration(observe?: 'events', reportProgress?: boolean): Observable>; - public clearSMTPConfiguration( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public clearSMTPConfiguration(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -95,54 +83,35 @@ export class SmtpConfigurationControllerService { * @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 getCurrentSMTPConfiguration( - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getCurrentSMTPConfiguration(observe?: 'body', reportProgress?: boolean): Observable; - public getCurrentSMTPConfiguration( - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public getCurrentSMTPConfiguration(observe?: 'response', reportProgress?: boolean): Observable>; - public getCurrentSMTPConfiguration( - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getCurrentSMTPConfiguration(observe?: 'events', reportProgress?: boolean): Observable>; - public getCurrentSMTPConfiguration( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getCurrentSMTPConfiguration(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/configuration/smtp`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/configuration/smtp`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -152,11 +121,7 @@ export class SmtpConfigurationControllerService { * @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 testSMTPConfiguration( - body: SMTPConfigurationModel, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public testSMTPConfiguration(body: SMTPConfigurationModel, observe?: 'body', reportProgress?: boolean): Observable; public testSMTPConfiguration( body: SMTPConfigurationModel, @@ -164,21 +129,11 @@ export class SmtpConfigurationControllerService { reportProgress?: boolean ): Observable>; - public testSMTPConfiguration( - body: SMTPConfigurationModel, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public testSMTPConfiguration(body: SMTPConfigurationModel, observe?: 'events', reportProgress?: boolean): Observable>; - public testSMTPConfiguration( - body: SMTPConfigurationModel, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public testSMTPConfiguration(body: SMTPConfigurationModel, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling testSMTPConfiguration.' - ); + throw new Error('Required parameter body was null or undefined when calling testSMTPConfiguration.'); } let headers = this.defaultHeaders; @@ -186,24 +141,20 @@ export class SmtpConfigurationControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -224,11 +175,7 @@ export class SmtpConfigurationControllerService { * @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 updateSMTPConfiguration( - body: SMTPConfigurationModel, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateSMTPConfiguration(body: SMTPConfigurationModel, observe?: 'body', reportProgress?: boolean): Observable; public updateSMTPConfiguration( body: SMTPConfigurationModel, @@ -236,21 +183,11 @@ export class SmtpConfigurationControllerService { reportProgress?: boolean ): Observable>; - public updateSMTPConfiguration( - body: SMTPConfigurationModel, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public updateSMTPConfiguration(body: SMTPConfigurationModel, observe?: 'events', reportProgress?: boolean): Observable>; - public updateSMTPConfiguration( - body: SMTPConfigurationModel, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public updateSMTPConfiguration(body: SMTPConfigurationModel, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateSMTPConfiguration.' - ); + throw new Error('Required parameter body was null or undefined when calling updateSMTPConfiguration.'); } let headers = this.defaultHeaders; @@ -258,24 +195,20 @@ export class SmtpConfigurationControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 d6cbfe094..43b06ba9c 100644 --- a/libs/red-ui-http/src/lib/api/statusController.service.ts +++ b/libs/red-ui-http/src/lib/api/statusController.service.ts @@ -48,33 +48,15 @@ export class StatusControllerService { * @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?: 'body', reportProgress?: boolean): Observable>; - public getDossierStatus( - dossierId: string, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>>; - public getDossierStatus( - dossierId: string, - observe: any = 'body', - reportProgress: boolean = false - ): 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.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getDossierStatus.'); } let headers = this.defaultHeaders; @@ -82,30 +64,23 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request>( - 'get', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request>('get', `${this.basePath}/status/${encodeURIComponent(String(dossierId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -116,12 +91,7 @@ export class StatusControllerService { * @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 getFileStatus( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getFileStatus(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getFileStatus( dossierId: string, @@ -137,22 +107,13 @@ export class StatusControllerService { reportProgress?: boolean ): Observable>; - public getFileStatus( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getFileStatus(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 getFileStatus.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getFileStatus.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getFileStatus.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getFileStatus.'); } let headers = this.defaultHeaders; @@ -160,25 +121,20 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}`, + `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -213,15 +169,9 @@ export class StatusControllerService { reportProgress?: boolean ): Observable }>>; - public getFileStatusForDossiers( - body: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getFileStatusForDossiers(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 getFileStatusForDossiers.' - ); + throw new Error('Required parameter body was null or undefined when calling getFileStatusForDossiers.'); } let headers = this.defaultHeaders; @@ -229,39 +179,31 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request<{ [key: string]: Array }>( - 'post', - `${this.basePath}/status`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request<{ [key: string]: Array }>('post', `${this.basePath}/status`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -305,21 +247,15 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setFileReviewer.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setFileReviewer.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setFileReviewer.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setFileReviewer.'); } if (reviewerId === null || reviewerId === undefined) { - throw new Error( - 'Required parameter reviewerId was null or undefined when calling setFileReviewer.' - ); + throw new Error('Required parameter reviewerId was null or undefined when calling setFileReviewer.'); } let headers = this.defaultHeaders; @@ -327,25 +263,22 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( - String(fileId) - )}/${encodeURIComponent(String(reviewerId))}`, + `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent( + String(reviewerId) + )}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -396,21 +329,15 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setFileReviewerForList.' - ); + throw new Error('Required parameter body was null or undefined when calling setFileReviewerForList.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setFileReviewerForList.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setFileReviewerForList.'); } if (reviewerId === null || reviewerId === undefined) { - throw new Error( - 'Required parameter reviewerId was null or undefined when calling setFileReviewerForList.' - ); + throw new Error('Required parameter reviewerId was null or undefined when calling setFileReviewerForList.'); } let headers = this.defaultHeaders; @@ -418,33 +345,27 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/${encodeURIComponent( - String(dossierId) - )}/bulk/${encodeURIComponent(String(reviewerId))}`, + `${this.basePath}/status/${encodeURIComponent(String(dossierId))}/bulk/${encodeURIComponent(String(reviewerId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -463,12 +384,7 @@ export class StatusControllerService { * @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 setStatusApproved( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setStatusApproved(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public setStatusApproved( dossierId: string, @@ -477,29 +393,15 @@ export class StatusControllerService { reportProgress?: boolean ): Observable>; - public setStatusApproved( - dossierId: string, - fileId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public setStatusApproved(dossierId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public setStatusApproved( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public setStatusApproved(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 setStatusApproved.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusApproved.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setStatusApproved.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setStatusApproved.'); } let headers = this.defaultHeaders; @@ -507,25 +409,20 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/approved/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/status/approved/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -543,12 +440,7 @@ export class StatusControllerService { * @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 setStatusApprovedForList( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setStatusApprovedForList(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; public setStatusApprovedForList( body: Array, @@ -571,15 +463,11 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setStatusApprovedForList.' - ); + throw new Error('Required parameter body was null or undefined when calling setStatusApprovedForList.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusApprovedForList.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusApprovedForList.'); } let headers = this.defaultHeaders; @@ -587,39 +475,31 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/status/approved/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/status/approved/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -663,15 +543,11 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusUnderApproval.' - ); + 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.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setStatusUnderApproval.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -684,25 +560,20 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/underapproval/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/status/underapproval/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { params: queryParameters, withCredentials: this.configuration.withCredentials, @@ -754,21 +625,15 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setStatusUnderApprovalForList.' - ); + throw new Error('Required parameter body was null or undefined when calling setStatusUnderApprovalForList.'); } if (approverId === null || approverId === undefined) { - throw new Error( - 'Required parameter approverId was null or undefined when calling setStatusUnderApprovalForList.' - ); + throw new Error('Required parameter approverId was null or undefined when calling setStatusUnderApprovalForList.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusUnderApprovalForList.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderApprovalForList.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -781,40 +646,32 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/status/underapproval/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/status/underapproval/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -825,12 +682,7 @@ export class StatusControllerService { * @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 setStatusUnderReview( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setStatusUnderReview(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public setStatusUnderReview( dossierId: string, @@ -853,15 +705,11 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusUnderReview.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderReview.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling setStatusUnderReview.' - ); + throw new Error('Required parameter fileId was null or undefined when calling setStatusUnderReview.'); } let headers = this.defaultHeaders; @@ -869,25 +717,20 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'post', - `${this.basePath}/status/underreview/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/status/underreview/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -905,12 +748,7 @@ export class StatusControllerService { * @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 setStatusUnderReviewForList( - body: Array, - dossierId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public setStatusUnderReviewForList(body: Array, dossierId: string, observe?: 'body', reportProgress?: boolean): Observable; public setStatusUnderReviewForList( body: Array, @@ -933,15 +771,11 @@ export class StatusControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling setStatusUnderReviewForList.' - ); + throw new Error('Required parameter body was null or undefined when calling setStatusUnderReviewForList.'); } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling setStatusUnderReviewForList.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling setStatusUnderReviewForList.'); } let headers = this.defaultHeaders; @@ -949,38 +783,30 @@ export class StatusControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/status/underreview/${encodeURIComponent(String(dossierId))}/bulk`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/status/underreview/${encodeURIComponent(String(dossierId))}/bulk`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } } 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 439ce3506..502792cf5 100644 --- a/libs/red-ui-http/src/lib/api/uploadController.service.ts +++ b/libs/red-ui-http/src/lib/api/uploadController.service.ts @@ -49,12 +49,7 @@ export class UploadControllerService { * @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 uploadFileForm( - dossierId: string, - file?: Blob, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public uploadFileForm(dossierId: string, file?: Blob, observe?: 'body', reportProgress?: boolean): Observable; public uploadFileForm( dossierId: string, @@ -70,16 +65,9 @@ export class UploadControllerService { reportProgress?: boolean ): Observable>; - public uploadFileForm( - dossierId: string, - file?: Blob, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public uploadFileForm(dossierId: string, file?: Blob, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling uploadFile.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling uploadFile.'); } let headers = this.defaultHeaders; @@ -87,16 +75,13 @@ export class UploadControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -122,17 +107,13 @@ export class UploadControllerService { formParams = (formParams.append('file', file) as any) || formParams; } - return this.httpClient.request( - 'post', - `${this.basePath}/upload/${encodeURIComponent(String(dossierId))}`, - { - body: convertFormParamsToString ? formParams.toString() : formParams, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/upload/${encodeURIComponent(String(dossierId))}`, { + body: convertFormParamsToString ? formParams.toString() : formParams, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** 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 90d13f363..f7be77a31 100644 --- a/libs/red-ui-http/src/lib/api/userController.service.ts +++ b/libs/red-ui-http/src/lib/api/userController.service.ts @@ -53,12 +53,7 @@ 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 addRoleToUsers( - body: Array, - userId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public addRoleToUsers(body: Array, userId: string, observe?: 'body', reportProgress?: boolean): Observable; public addRoleToUsers( body: Array, @@ -67,29 +62,15 @@ export class UserControllerService { reportProgress?: boolean ): Observable>; - public addRoleToUsers( - body: Array, - userId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public addRoleToUsers(body: Array, userId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public addRoleToUsers( - body: Array, - userId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public addRoleToUsers(body: Array, userId: 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 addRoleToUsers.' - ); + throw new Error('Required parameter body was null or undefined when calling addRoleToUsers.'); } if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling addRoleToUsers.' - ); + throw new Error('Required parameter userId was null or undefined when calling addRoleToUsers.'); } let headers = this.defaultHeaders; @@ -97,39 +78,31 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/user/${encodeURIComponent(String(userId))}/role`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/user/${encodeURIComponent(String(userId))}/role`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -139,33 +112,15 @@ 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 createUser( - body: CreateUserRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public createUser(body: CreateUserRequest, observe?: 'body', reportProgress?: boolean): Observable; - public createUser( - body: CreateUserRequest, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>; - public createUser( - body: CreateUserRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public createUser(body: CreateUserRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling createUser.' - ); + throw new Error('Required parameter body was null or undefined when calling createUser.'); } let headers = this.defaultHeaders; @@ -173,24 +128,20 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -213,27 +164,13 @@ export class UserControllerService { */ public deleteUser(userId: string, observe?: 'body', reportProgress?: boolean): Observable; - public deleteUser( - userId: string, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>; - public deleteUser( - userId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteUser(userId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling deleteUser.' - ); + throw new Error('Required parameter userId was null or undefined when calling deleteUser.'); } let headers = this.defaultHeaders; @@ -241,30 +178,23 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/user/${encodeURIComponent(String(userId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/user/${encodeURIComponent(String(userId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -274,33 +204,15 @@ 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 deleteUsers( - userId: Array, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteUsers(userId: Array, observe?: 'body', reportProgress?: boolean): Observable; - public deleteUsers( - userId: Array, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>; - public deleteUsers( - userId: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteUsers(userId: Array, observe: any = 'body', reportProgress: boolean = false): Observable { if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling deleteUser1.' - ); + throw new Error('Required parameter userId was null or undefined when calling deleteUser1.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -315,16 +227,13 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -345,29 +254,13 @@ 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 getAllUsers( - refreshCache?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getAllUsers(refreshCache?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getAllUsers( - refreshCache?: boolean, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>>; - public getAllUsers( - refreshCache?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): 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); @@ -378,16 +271,13 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -408,33 +298,15 @@ 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 getUserById( - userId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getUserById(userId: string, observe?: 'body', reportProgress?: boolean): Observable; - public getUserById( - userId: string, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>; - public getUserById( - userId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getUserById(userId: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling getUserById.' - ); + throw new Error('Required parameter userId was null or undefined when calling getUserById.'); } let headers = this.defaultHeaders; @@ -442,30 +314,23 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'get', - `${this.basePath}/user/${encodeURIComponent(String(userId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('get', `${this.basePath}/user/${encodeURIComponent(String(userId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -475,29 +340,13 @@ 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 getUsers( - refreshCache?: boolean, - observe?: 'body', - reportProgress?: boolean - ): Observable>; + public getUsers(refreshCache?: boolean, observe?: 'body', reportProgress?: boolean): Observable>; - public getUsers( - refreshCache?: boolean, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>>; - public getUsers( - refreshCache?: boolean, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getUsers(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); @@ -508,16 +357,13 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -539,12 +385,7 @@ 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 resetPassword( - body: ResetPasswordRequest, - userId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public resetPassword(body: ResetPasswordRequest, userId: string, observe?: 'body', reportProgress?: boolean): Observable; public resetPassword( body: ResetPasswordRequest, @@ -567,15 +408,11 @@ export class UserControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling resetPassword.' - ); + 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.' - ); + throw new Error('Required parameter userId was null or undefined when calling resetPassword.'); } let headers = this.defaultHeaders; @@ -583,39 +420,31 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/user/${encodeURIComponent(String(userId))}/reset-password`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/user/${encodeURIComponent(String(userId))}/reset-password`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -625,33 +454,15 @@ 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( - body: UpdateMyProfileRequest, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateMyProfile(body: UpdateMyProfileRequest, observe?: 'body', reportProgress?: boolean): Observable; - public updateMyProfile( - body: UpdateMyProfileRequest, - observe?: 'response', - reportProgress?: boolean - ): Observable>; + public updateMyProfile(body: UpdateMyProfileRequest, observe?: 'response', reportProgress?: boolean): Observable>; - public updateMyProfile( - body: UpdateMyProfileRequest, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public updateMyProfile(body: UpdateMyProfileRequest, observe?: 'events', reportProgress?: boolean): Observable>; - public updateMyProfile( - body: UpdateMyProfileRequest, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public updateMyProfile(body: UpdateMyProfileRequest, observe: any = 'body', reportProgress: boolean = false): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateProfile.' - ); + throw new Error('Required parameter body was null or undefined when calling updateProfile.'); } let headers = this.defaultHeaders; @@ -659,24 +470,20 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -698,12 +505,7 @@ 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 updateProfile( - body: UpdateProfileRequest, - userId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public updateProfile(body: UpdateProfileRequest, userId: string, observe?: 'body', reportProgress?: boolean): Observable; public updateProfile( body: UpdateProfileRequest, @@ -726,15 +528,11 @@ export class UserControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling updateProfile1.' - ); + throw new Error('Required parameter body was null or undefined when calling updateProfile1.'); } if (userId === null || userId === undefined) { - throw new Error( - 'Required parameter userId was null or undefined when calling updateProfile1.' - ); + throw new Error('Required parameter userId was null or undefined when calling updateProfile1.'); } let headers = this.defaultHeaders; @@ -742,38 +540,30 @@ export class UserControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'post', - `${this.basePath}/user/profile/${encodeURIComponent(String(userId))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('post', `${this.basePath}/user/profile/${encodeURIComponent(String(userId))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } } 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 56502f06d..3496ca8aa 100644 --- a/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts +++ b/libs/red-ui-http/src/lib/api/userPreferenceController.service.ts @@ -45,33 +45,15 @@ export class UserPreferenceControllerService { * @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 deletePreferences( - key: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deletePreferences(key: string, observe?: 'body', reportProgress?: boolean): Observable; - public deletePreferences( - key: string, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>; - public deletePreferences( - key: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deletePreferences(key: string, observe: any = 'body', reportProgress: boolean = false): Observable { if (key === null || key === undefined) { - throw new Error( - 'Required parameter key was null or undefined when calling deletePreferences.' - ); + throw new Error('Required parameter key was null or undefined when calling deletePreferences.'); } let headers = this.defaultHeaders; @@ -79,30 +61,23 @@ export class UserPreferenceControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -111,54 +86,35 @@ export class UserPreferenceControllerService { * @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 getAllUserAttributes( - observe?: 'body', - reportProgress?: boolean - ): Observable<{ [key: string]: Array }>; + public getAllUserAttributes(observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: Array }>; - public getAllUserAttributes( - observe?: 'response', - reportProgress?: boolean - ): Observable }>>; + public getAllUserAttributes(observe?: 'response', reportProgress?: boolean): Observable }>>; - public getAllUserAttributes( - observe?: 'events', - reportProgress?: boolean - ): Observable }>>; + public getAllUserAttributes(observe?: 'events', reportProgress?: boolean): Observable }>>; - public getAllUserAttributes( - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getAllUserAttributes(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; + 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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request<{ [key: string]: Array }>( - 'get', - `${this.basePath}/attributes`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request<{ [key: string]: Array }>('get', `${this.basePath}/attributes`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -169,43 +125,19 @@ export class UserPreferenceControllerService { * @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 savePreferences( - body: Array, - key: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public savePreferences(body: Array, key: string, observe?: 'body', reportProgress?: boolean): Observable; - public savePreferences( - body: Array, - key: string, - observe?: 'response', - 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, observe?: 'events', reportProgress?: boolean): Observable>; - public savePreferences( - body: Array, - key: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public savePreferences(body: Array, key: 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 savePreferences.' - ); + throw new Error('Required parameter body was null or undefined when calling savePreferences.'); } if (key === null || key === undefined) { - throw new Error( - 'Required parameter key was null or undefined when calling savePreferences.' - ); + throw new Error('Required parameter key was null or undefined when calling savePreferences.'); } let headers = this.defaultHeaders; @@ -213,38 +145,30 @@ export class UserPreferenceControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } - return this.httpClient.request( - 'put', - `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, - { - body: body, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('put', `${this.basePath}/attributes/${encodeURIComponent(String(key))}`, { + body: body, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } } 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 73d201b79..7232b1106 100644 --- a/libs/red-ui-http/src/lib/api/versionsController.service.ts +++ b/libs/red-ui-http/src/lib/api/versionsController.service.ts @@ -77,15 +77,11 @@ export class VersionsControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling getDossierDictionaryVersion.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getDossierDictionaryVersion.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getDossierDictionaryVersion.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getDossierDictionaryVersion.'); } let headers = this.defaultHeaders; @@ -93,25 +89,20 @@ export class VersionsControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/version/dossier/${encodeURIComponent( - String(dossierTemplateId) - )}/${encodeURIComponent(String(dossierId))}`, + `${this.basePath}/version/dossier/${encodeURIComponent(String(dossierTemplateId))}/${encodeURIComponent(String(dossierId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -146,15 +137,9 @@ export class VersionsControllerService { reportProgress?: boolean ): Observable>; - public getVersions( - dossierTemplateId: Array, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getVersions(dossierTemplateId: Array, observe: any = 'body', reportProgress: boolean = false): Observable { if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling getVersions.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getVersions.'); } let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); @@ -169,30 +154,23 @@ export class VersionsControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request<{ [key: string]: VersionsResponse }>( - 'get', - `${this.basePath}/version`, - { - params: queryParameters, - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request<{ [key: string]: VersionsResponse }>('get', `${this.basePath}/version`, { + params: queryParameters, + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } } 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 f5ad9b03d..dfe0202ee 100644 --- a/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts +++ b/libs/red-ui-http/src/lib/api/viewedPagesController.service.ts @@ -86,15 +86,11 @@ export class ViewedPagesControllerService { } if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling addPage.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling addPage.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling addPage.' - ); + throw new Error('Required parameter fileId was null or undefined when calling addPage.'); } let headers = this.defaultHeaders; @@ -102,33 +98,27 @@ export class ViewedPagesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } return this.httpClient.request( 'post', - `${this.basePath}/viewedPages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/viewedPages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { body: body, withCredentials: this.configuration.withCredentials, @@ -147,12 +137,7 @@ export class ViewedPagesControllerService { * @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 getViewedPages( - dossierId: string, - fileId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getViewedPages(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable; public getViewedPages( dossierId: string, @@ -168,22 +153,13 @@ export class ViewedPagesControllerService { reportProgress?: boolean ): Observable>; - public getViewedPages( - dossierId: string, - fileId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getViewedPages(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 getViewedPages.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling getViewedPages.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling getViewedPages.' - ); + throw new Error('Required parameter fileId was null or undefined when calling getViewedPages.'); } let headers = this.defaultHeaders; @@ -191,25 +167,20 @@ export class ViewedPagesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'get', - `${this.basePath}/viewedPages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}`, + `${this.basePath}/viewedPages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`, { withCredentials: this.configuration.withCredentials, headers: headers, @@ -228,13 +199,7 @@ export class ViewedPagesControllerService { * @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 removePage( - dossierId: string, - fileId: string, - page: number, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public removePage(dossierId: string, fileId: string, page: number, observe?: 'body', reportProgress?: boolean): Observable; public removePage( dossierId: string, @@ -260,21 +225,15 @@ export class ViewedPagesControllerService { reportProgress: boolean = false ): Observable { if (dossierId === null || dossierId === undefined) { - throw new Error( - 'Required parameter dossierId was null or undefined when calling removePage.' - ); + throw new Error('Required parameter dossierId was null or undefined when calling removePage.'); } if (fileId === null || fileId === undefined) { - throw new Error( - 'Required parameter fileId was null or undefined when calling removePage.' - ); + throw new Error('Required parameter fileId was null or undefined when calling removePage.'); } if (page === null || page === undefined) { - throw new Error( - 'Required parameter page was null or undefined when calling removePage.' - ); + throw new Error('Required parameter page was null or undefined when calling removePage.'); } let headers = this.defaultHeaders; @@ -282,25 +241,22 @@ export class ViewedPagesControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } return this.httpClient.request( 'delete', - `${this.basePath}/viewedPages/${encodeURIComponent( - String(dossierId) - )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(page))}`, + `${this.basePath}/viewedPages/${encodeURIComponent(String(dossierId))}/${encodeURIComponent( + String(fileId) + )}/${encodeURIComponent(String(page))}`, { withCredentials: this.configuration.withCredentials, headers: headers, 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 0e3f7536d..f5c2db566 100644 --- a/libs/red-ui-http/src/lib/api/watermarkController.service.ts +++ b/libs/red-ui-http/src/lib/api/watermarkController.service.ts @@ -48,33 +48,15 @@ export class WatermarkControllerService { * @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 deleteWatermark( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public deleteWatermark(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; - public deleteWatermark( - dossierTemplateId: string, - observe?: 'response', - 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?: 'events', reportProgress?: boolean): Observable>; - public deleteWatermark( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public deleteWatermark(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 deleteWatermark.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteWatermark.'); } let headers = this.defaultHeaders; @@ -82,30 +64,23 @@ export class WatermarkControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } - return this.httpClient.request( - 'delete', - `${this.basePath}/watermark/${encodeURIComponent(String(dossierTemplateId))}`, - { - withCredentials: this.configuration.withCredentials, - headers: headers, - observe: observe, - reportProgress: reportProgress - } - ); + return this.httpClient.request('delete', `${this.basePath}/watermark/${encodeURIComponent(String(dossierTemplateId))}`, { + withCredentials: this.configuration.withCredentials, + headers: headers, + observe: observe, + reportProgress: reportProgress + }); } /** @@ -115,11 +90,7 @@ export class WatermarkControllerService { * @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 getWatermark( - dossierTemplateId: string, - observe?: 'body', - reportProgress?: boolean - ): Observable; + public getWatermark(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable; public getWatermark( dossierTemplateId: string, @@ -127,21 +98,11 @@ export class WatermarkControllerService { reportProgress?: boolean ): Observable>; - public getWatermark( - dossierTemplateId: string, - observe?: 'events', - reportProgress?: boolean - ): Observable>; + public getWatermark(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable>; - public getWatermark( - dossierTemplateId: string, - observe: any = 'body', - reportProgress: boolean = false - ): Observable { + public getWatermark(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 getWatermark.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling getWatermark.'); } let headers = this.defaultHeaders; @@ -149,16 +110,13 @@ export class WatermarkControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -211,15 +169,11 @@ export class WatermarkControllerService { reportProgress: boolean = false ): Observable { if (body === null || body === undefined) { - throw new Error( - 'Required parameter body was null or undefined when calling saveWatermark.' - ); + throw new Error('Required parameter body was null or undefined when calling saveWatermark.'); } if (dossierTemplateId === null || dossierTemplateId === undefined) { - throw new Error( - 'Required parameter dossierTemplateId was null or undefined when calling saveWatermark.' - ); + throw new Error('Required parameter dossierTemplateId was null or undefined when calling saveWatermark.'); } let headers = this.defaultHeaders; @@ -227,24 +181,20 @@ export class WatermarkControllerService { // authentication (RED-OAUTH) required if (this.configuration.accessToken) { const accessToken = - typeof this.configuration.accessToken === 'function' - ? this.configuration.accessToken() - : this.configuration.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); + 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); + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/libs/red-ui-http/src/lib/configuration.ts b/libs/red-ui-http/src/lib/configuration.ts index d43dea327..ff7fb826b 100644 --- a/libs/red-ui-http/src/lib/configuration.ts +++ b/libs/red-ui-http/src/lib/configuration.ts @@ -73,13 +73,7 @@ export class Configuration { * @return True if the given MIME is JSON, false otherwise. */ public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp( - '^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', - 'i' - ); - return ( - mime !== null && - (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json') - ); + const jsonMime: RegExp = new RegExp('^(application/json|[^;/ \t]+/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/libs/red-ui-http/src/lib/model/dossier.ts b/libs/red-ui-http/src/lib/model/dossier.ts index 66668b2e5..494e25386 100644 --- a/libs/red-ui-http/src/lib/model/dossier.ts +++ b/libs/red-ui-http/src/lib/model/dossier.ts @@ -30,12 +30,7 @@ export interface Dossier { } export namespace Dossier { - export type DownloadFileTypesEnum = - | 'ANNOTATED' - | 'FLATTEN' - | 'ORIGINAL' - | 'PREVIEW' - | 'REDACTED'; + export type DownloadFileTypesEnum = 'ANNOTATED' | 'FLATTEN' | 'ORIGINAL' | 'PREVIEW' | 'REDACTED'; export const DownloadFileTypesEnum = { ANNOTATED: 'ANNOTATED' as DownloadFileTypesEnum, FLATTEN: 'FLATTEN' as DownloadFileTypesEnum, @@ -53,8 +48,7 @@ export namespace Dossier { EXCELMULTIFILE: 'EXCEL_MULTI_FILE' as ReportTypesEnum, EXCELSINGLEFILE: 'EXCEL_SINGLE_FILE' as ReportTypesEnum, WORDSINGLEFILE: 'WORD_SINGLE_FILE' as ReportTypesEnum, - WORDSINGLEFILEAPPENDIXA1TEMPLATE: - 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE' as ReportTypesEnum, + WORDSINGLEFILEAPPENDIXA1TEMPLATE: 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE' as ReportTypesEnum, WORDSINGLEFILEAPPENDIXA2TEMPLATE: 'WORD_SINGLE_FILE_APPENDIX_A2_TEMPLATE' as ReportTypesEnum }; export type StatusEnum = 'ACTIVE' | 'DELETED'; diff --git a/libs/red-ui-http/src/lib/model/dossierRequest.ts b/libs/red-ui-http/src/lib/model/dossierRequest.ts index 831598926..e04bfe3f9 100644 --- a/libs/red-ui-http/src/lib/model/dossierRequest.ts +++ b/libs/red-ui-http/src/lib/model/dossierRequest.ts @@ -65,12 +65,7 @@ export interface DossierRequest { } export namespace DossierRequest { - export type DownloadFileTypesEnum = - | 'ANNOTATED' - | 'FLATTEN' - | 'ORIGINAL' - | 'PREVIEW' - | 'REDACTED'; + export type DownloadFileTypesEnum = 'ANNOTATED' | 'FLATTEN' | 'ORIGINAL' | 'PREVIEW' | 'REDACTED'; export const DownloadFileTypesEnum = { ANNOTATED: 'ANNOTATED' as DownloadFileTypesEnum, FLATTEN: 'FLATTEN' as DownloadFileTypesEnum, @@ -88,8 +83,7 @@ export namespace DossierRequest { EXCELMULTIFILE: 'EXCEL_MULTI_FILE' as ReportTypesEnum, EXCELSINGLEFILE: 'EXCEL_SINGLE_FILE' as ReportTypesEnum, WORDSINGLEFILE: 'WORD_SINGLE_FILE' as ReportTypesEnum, - WORDSINGLEFILEAPPENDIXA1TEMPLATE: - 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE' as ReportTypesEnum, + WORDSINGLEFILEAPPENDIXA1TEMPLATE: 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE' as ReportTypesEnum, WORDSINGLEFILEAPPENDIXA2TEMPLATE: 'WORD_SINGLE_FILE_APPENDIX_A2_TEMPLATE' as ReportTypesEnum }; } diff --git a/libs/red-ui-http/src/lib/model/dossierTemplateModel.ts b/libs/red-ui-http/src/lib/model/dossierTemplateModel.ts index ea2ccecea..4b3fcfdfb 100644 --- a/libs/red-ui-http/src/lib/model/dossierTemplateModel.ts +++ b/libs/red-ui-http/src/lib/model/dossierTemplateModel.ts @@ -58,12 +58,7 @@ export interface DossierTemplateModel { } export namespace DossierTemplateModel { - export type DownloadFileTypesEnum = - | 'ANNOTATED' - | 'FLATTEN' - | 'ORIGINAL' - | 'PREVIEW' - | 'REDACTED'; + export type DownloadFileTypesEnum = 'ANNOTATED' | 'FLATTEN' | 'ORIGINAL' | 'PREVIEW' | 'REDACTED'; export const DownloadFileTypesEnum = { ANNOTATED: 'ANNOTATED' as DownloadFileTypesEnum, FLATTEN: 'FLATTEN' as DownloadFileTypesEnum, @@ -79,8 +74,7 @@ export namespace DossierTemplateModel { export const ReportTypesEnum = { EXCELMULTIFILE: 'EXCEL_MULTI_FILE' as ReportTypesEnum, EXCELSINGLEFILE: 'EXCEL_SINGLE_FILE' as ReportTypesEnum, - WORDSINGLEFILEAPPENDIXA1TEMPLATE: - 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE' as ReportTypesEnum, + WORDSINGLEFILEAPPENDIXA1TEMPLATE: 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE' as ReportTypesEnum, WORDSINGLEFILEAPPENDIXA2TEMPLATE: 'WORD_SINGLE_FILE_APPENDIX_A2_TEMPLATE' as ReportTypesEnum }; } diff --git a/libs/red-ui-http/src/lib/model/downloadDetails.ts b/libs/red-ui-http/src/lib/model/downloadDetails.ts index 410063eda..801cc4afc 100644 --- a/libs/red-ui-http/src/lib/model/downloadDetails.ts +++ b/libs/red-ui-http/src/lib/model/downloadDetails.ts @@ -18,12 +18,7 @@ export interface DownloadDetails { } export namespace DownloadDetails { - export type DownloadFileTypesEnum = - | 'ANNOTATED' - | 'FLATTEN' - | 'ORIGINAL' - | 'PREVIEW' - | 'REDACTED'; + export type DownloadFileTypesEnum = 'ANNOTATED' | 'FLATTEN' | 'ORIGINAL' | 'PREVIEW' | 'REDACTED'; export const DownloadFileTypesEnum = { ANNOTATED: 'ANNOTATED' as DownloadFileTypesEnum, FLATTEN: 'FLATTEN' as DownloadFileTypesEnum, @@ -41,8 +36,7 @@ export namespace DownloadDetails { EXCELMULTIFILE: 'EXCEL_MULTI_FILE' as ReportTypesEnum, EXCELSINGLEFILE: 'EXCEL_SINGLE_FILE' as ReportTypesEnum, WORDSINGLEFILE: 'WORD_SINGLE_FILE' as ReportTypesEnum, - WORDSINGLEFILEAPPENDIXA1TEMPLATE: - 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE' as ReportTypesEnum, + WORDSINGLEFILEAPPENDIXA1TEMPLATE: 'WORD_SINGLE_FILE_APPENDIX_A1_TEMPLATE' as ReportTypesEnum, WORDSINGLEFILEAPPENDIXA2TEMPLATE: 'WORD_SINGLE_FILE_APPENDIX_A2_TEMPLATE' as ReportTypesEnum }; }