diff --git a/angular.json b/angular.json index 8c9e1dc10..50dd10ebf 100644 --- a/angular.json +++ b/angular.json @@ -97,8 +97,7 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ - "apps/red-ui/tsconfig.app.json", - "apps/red-ui/tsconfig.spec.json" + "apps/red-ui/tsconfig.app.json" ], "exclude": [ "**/node_modules/**", @@ -125,8 +124,7 @@ "builder": "@angular-devkit/build-angular:tslint", "options": { "tsConfig": [ - "libs/red-ui-http/tsconfig.lib.json", - "libs/red-ui-http/tsconfig.spec.json" + "libs/red-ui-http/tsconfig.lib.json" ], "exclude": [ "**/node_modules/**", @@ -163,4 +161,4 @@ } }, "defaultProject": "red-ui" -} \ No newline at end of file +} diff --git a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts index c151e38d3..9ad30ae77 100644 --- a/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts +++ b/apps/red-ui/src/app/screens/project-listing-screen/project-listing-screen.component.ts @@ -53,7 +53,7 @@ export class ProjectListingScreenComponent implements OnInit { dialogRef.afterClosed().subscribe(result => { if (result) { - this._projectControllerService.deleteProject(project.projectId).subscribe(result => { + this._projectControllerService.deleteProject(project.projectId).subscribe(() => { this._reloadProjects(); }, () => { this._notificationService.showToastNotification(this._translateService.instant('projects.delete.delete-failed.label', project), null, NotificationType.ERROR) diff --git a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts index 180901996..71f6ba375 100644 --- a/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts +++ b/apps/red-ui/src/app/screens/project-overview-screen/project-overview-screen.component.ts @@ -23,7 +23,7 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy { @ViewChild('dropzoneComponent', {static: true}) dropZoneComponent; - dragActive: boolean = false; + dragActive = false; sortOptions: any[] = [{ value: {name: 'lastUpdated', order: 'desc'}, @@ -88,7 +88,7 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy { dialogRef.afterClosed().subscribe(result => { if (result) { - this._fileUploadControllerService.deleteFile(fileStatus.projectId, fileStatus.fileId).subscribe(result => { + this._fileUploadControllerService.deleteFile(fileStatus.projectId, fileStatus.fileId).subscribe(() => { this._getFileStatus(); }, () => { this._notificationService.showToastNotification(this._translateService.instant('project-overview.delete-file-error.label', fileStatus), null, NotificationType.ERROR); 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 388fd42b0..e5722d3ff 100644 --- a/apps/red-ui/src/app/utils/file-download-utils.ts +++ b/apps/red-ui/src/app/utils/file-download-utils.ts @@ -3,7 +3,7 @@ import {saveAs} from 'file-saver'; export function download(event: HttpResponse, altName?: string) { const contentDisposition = event.headers.get('Content-Disposition'); - let fileName = undefined; + let fileName; try { fileName = contentDisposition ? contentDisposition.split('filename=')[1].replace(/"/g, '') : undefined; } catch (e) { 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 3353c4e33..dfb7142b1 100644 --- a/libs/red-ui-http/src/lib/api/debugController.service.ts +++ b/libs/red-ui-http/src/lib/api/debugController.service.ts @@ -75,11 +75,11 @@ export class DebugControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -92,7 +92,7 @@ export class DebugControllerService { let formParams: { append(param: string, value: any): void; }; let useForm = false; - let convertFormParamsToString = false; + const convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; @@ -155,11 +155,11 @@ export class DebugControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -172,7 +172,7 @@ export class DebugControllerService { let formParams: { append(param: string, value: any): void; }; let useForm = false; - let convertFormParamsToString = false; + const convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; @@ -235,11 +235,11 @@ export class DebugControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -252,7 +252,7 @@ export class DebugControllerService { let formParams: { append(param: string, value: any): void; }; let useForm = false; - let convertFormParamsToString = false; + const convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; @@ -319,11 +319,11 @@ export class DebugControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -336,7 +336,7 @@ export class DebugControllerService { let formParams: { append(param: string, value: any): void; }; let useForm = false; - let convertFormParamsToString = false; + const convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; 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 97c786120..538c1c251 100644 --- a/libs/red-ui-http/src/lib/api/dictionaryController.service.ts +++ b/libs/red-ui-http/src/lib/api/dictionaryController.service.ts @@ -77,9 +77,9 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -88,7 +88,7 @@ export class DictionaryControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -133,9 +133,9 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -144,7 +144,7 @@ export class DictionaryControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -194,9 +194,9 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -205,7 +205,7 @@ export class DictionaryControllerService { '*/*' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -250,9 +250,9 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -299,11 +299,11 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -345,11 +345,11 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -391,11 +391,11 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -442,11 +442,11 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -493,9 +493,9 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -504,7 +504,7 @@ export class DictionaryControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -554,9 +554,9 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -565,7 +565,7 @@ export class DictionaryControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -615,9 +615,9 @@ export class DictionaryControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -630,7 +630,7 @@ export class DictionaryControllerService { let formParams: { append(param: string, value: any): void; }; let useForm = false; - let convertFormParamsToString = false; + const convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; diff --git a/libs/red-ui-http/src/lib/api/fileUploadController.service.ts b/libs/red-ui-http/src/lib/api/fileUploadController.service.ts index 9e9bdd48c..7eb8ea98e 100644 --- a/libs/red-ui-http/src/lib/api/fileUploadController.service.ts +++ b/libs/red-ui-http/src/lib/api/fileUploadController.service.ts @@ -74,9 +74,9 @@ export class FileUploadControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -130,11 +130,11 @@ export class FileUploadControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -190,11 +190,11 @@ export class FileUploadControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -250,11 +250,11 @@ export class FileUploadControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -310,11 +310,11 @@ export class FileUploadControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -323,7 +323,7 @@ export class FileUploadControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -377,11 +377,11 @@ export class FileUploadControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -435,11 +435,11 @@ export class FileUploadControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ '*/*' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -452,7 +452,7 @@ export class FileUploadControllerService { let formParams: { append(param: string, value: any): void; }; let useForm = false; - let convertFormParamsToString = false; + const convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; 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 a48385b64..a4d2263dc 100644 --- a/libs/red-ui-http/src/lib/api/licenseReportController.service.ts +++ b/libs/red-ui-http/src/lib/api/licenseReportController.service.ts @@ -81,11 +81,11 @@ export class LicenseReportControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -94,7 +94,7 @@ export class LicenseReportControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + 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 c877ce282..ebf30fa0f 100644 --- a/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts +++ b/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts @@ -73,11 +73,11 @@ export class ManualRedactionControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -134,9 +134,9 @@ export class ManualRedactionControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -145,7 +145,7 @@ export class ManualRedactionControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/libs/red-ui-http/src/lib/api/pdfMetaDataConfigurationController.service.ts b/libs/red-ui-http/src/lib/api/pdfMetaDataConfigurationController.service.ts index 6d2617355..bf3a3260c 100644 --- a/libs/red-ui-http/src/lib/api/pdfMetaDataConfigurationController.service.ts +++ b/libs/red-ui-http/src/lib/api/pdfMetaDataConfigurationController.service.ts @@ -63,11 +63,11 @@ export class PdfMetaDataConfigurationControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -114,9 +114,9 @@ export class PdfMetaDataConfigurationControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -125,7 +125,7 @@ export class PdfMetaDataConfigurationControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } diff --git a/libs/red-ui-http/src/lib/api/projectController.service.ts b/libs/red-ui-http/src/lib/api/projectController.service.ts index 730519463..f2a4d1fa7 100644 --- a/libs/red-ui-http/src/lib/api/projectController.service.ts +++ b/libs/red-ui-http/src/lib/api/projectController.service.ts @@ -69,11 +69,11 @@ export class ProjectControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -82,7 +82,7 @@ export class ProjectControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -127,9 +127,9 @@ export class ProjectControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -176,11 +176,11 @@ export class ProjectControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -222,11 +222,11 @@ export class ProjectControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -278,11 +278,11 @@ export class ProjectControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -291,7 +291,7 @@ export class ProjectControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } 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 40ac42e02..cc8912fda 100644 --- a/libs/red-ui-http/src/lib/api/reanalysisController.service.ts +++ b/libs/red-ui-http/src/lib/api/reanalysisController.service.ts @@ -72,9 +72,9 @@ export class ReanalysisControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -121,9 +121,9 @@ export class ReanalysisControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } 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 a069f924b..f6e6d85a9 100644 --- a/libs/red-ui-http/src/lib/api/redactionLogController.service.ts +++ b/libs/red-ui-http/src/lib/api/redactionLogController.service.ts @@ -68,11 +68,11 @@ export class RedactionLogControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + 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 ac6268f33..5be1b218a 100644 --- a/libs/red-ui-http/src/lib/api/rulesController.service.ts +++ b/libs/red-ui-http/src/lib/api/rulesController.service.ts @@ -64,11 +64,11 @@ export class RulesControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -110,11 +110,11 @@ export class RulesControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/octet-stream' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -161,9 +161,9 @@ export class RulesControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -172,7 +172,7 @@ export class RulesControllerService { 'application/json' ]; const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); - if (httpContentTypeSelected != undefined) { + if (httpContentTypeSelected !== undefined) { headers = headers.set('Content-Type', httpContentTypeSelected); } @@ -217,9 +217,9 @@ export class RulesControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = []; + const httpHeaderAccepts: string[] = []; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } @@ -232,7 +232,7 @@ export class RulesControllerService { let formParams: { append(param: string, value: any): void; }; let useForm = false; - let convertFormParamsToString = false; + const convertFormParamsToString = false; // use FormData to transmit files using content-type "multipart/form-data" // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; 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 a07a258fc..ca8fb3d9f 100644 --- a/libs/red-ui-http/src/lib/api/statusController.service.ts +++ b/libs/red-ui-http/src/lib/api/statusController.service.ts @@ -68,11 +68,11 @@ export class StatusControllerService { } // to determine the Accept header - let httpHeaderAccepts: string[] = [ + const httpHeaderAccepts: string[] = [ 'application/json' ]; const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); - if (httpHeaderAcceptSelected != undefined) { + if (httpHeaderAcceptSelected !== undefined) { headers = headers.set('Accept', httpHeaderAcceptSelected); } diff --git a/libs/red-ui-http/src/lib/configuration.ts b/libs/red-ui-http/src/lib/configuration.ts index 9c33c1505..bdd6eee52 100644 --- a/libs/red-ui-http/src/lib/configuration.ts +++ b/libs/red-ui-http/src/lib/configuration.ts @@ -32,11 +32,11 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderContentType(contentTypes: string[]): string | undefined { - if (contentTypes.length == 0) { + if (contentTypes.length === 0) { return undefined; } - let type = contentTypes.find(x => this.isJsonMime(x)); + const type = contentTypes.find(x => this.isJsonMime(x)); if (type === undefined) { return contentTypes[0]; } @@ -51,11 +51,11 @@ export class Configuration { * @returns the selected content-type or undefined if no selection could be made. */ public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length == 0) { + if (accepts.length === 0) { return undefined; } - let type = accepts.find(x => this.isJsonMime(x)); + const type = accepts.find(x => this.isJsonMime(x)); if (type === undefined) { return accepts[0]; } @@ -74,6 +74,6 @@ export class Configuration { */ 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'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); } } diff --git a/libs/red-ui-http/src/lib/model/inputStream.ts b/libs/red-ui-http/src/lib/model/inputStream.ts deleted file mode 100644 index 2f0192766..000000000 --- a/libs/red-ui-http/src/lib/model/inputStream.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Api Documentation - * Api Documentation - * - * OpenAPI spec version: 1.0 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -export interface InputStream { -} diff --git a/libs/red-ui-http/src/lib/model/models.ts b/libs/red-ui-http/src/lib/model/models.ts index 6b34b35f4..e7bc9b4d1 100644 --- a/libs/red-ui-http/src/lib/model/models.ts +++ b/libs/red-ui-http/src/lib/model/models.ts @@ -9,7 +9,6 @@ export * from './defaultColor'; export * from './dictionary'; export * from './fileIds'; export * from './fileStatus'; -export * from './inputStream'; export * from './licenseReport'; export * from './licenseReportRequest'; export * from './manualRedactionEntry'; @@ -29,4 +28,3 @@ export * from './typeResponse'; export * from './typeValue'; export * from './uRI'; export * from './uRL'; -export * from './uRLStreamHandler'; diff --git a/libs/red-ui-http/src/lib/model/resource.ts b/libs/red-ui-http/src/lib/model/resource.ts index 1a0990b81..b839972d6 100644 --- a/libs/red-ui-http/src/lib/model/resource.ts +++ b/libs/red-ui-http/src/lib/model/resource.ts @@ -9,7 +9,6 @@ * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import {InputStream} from './inputStream'; import {URI} from './uRI'; import {URL} from './uRL'; @@ -17,7 +16,7 @@ export interface Resource { description?: string; file?: any; filename?: string; - inputStream?: InputStream; + inputStream?: any; open?: boolean; readable?: boolean; uri?: URI; diff --git a/libs/red-ui-http/src/lib/model/uRL.ts b/libs/red-ui-http/src/lib/model/uRL.ts index 9ccff5abf..eceda3cda 100644 --- a/libs/red-ui-http/src/lib/model/uRL.ts +++ b/libs/red-ui-http/src/lib/model/uRL.ts @@ -9,13 +9,12 @@ * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ -import {URLStreamHandler} from './uRLStreamHandler'; export interface URL { authority?: string; content?: any; defaultPort?: number; - deserializedFields?: URLStreamHandler; + deserializedFields?: any; file?: string; host?: string; path?: string; diff --git a/libs/red-ui-http/src/lib/model/uRLStreamHandler.ts b/libs/red-ui-http/src/lib/model/uRLStreamHandler.ts deleted file mode 100644 index df8bd708d..000000000 --- a/libs/red-ui-http/src/lib/model/uRLStreamHandler.ts +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Api Documentation - * Api Documentation - * - * OpenAPI spec version: 1.0 - * - * - * NOTE: This class is auto generated by the swagger code generator program. - * https://github.com/swagger-api/swagger-codegen.git - * Do not edit the class manually. - */ - -export interface URLStreamHandler { -}