diff --git a/apps/red-ui/src/app/app.module.ts b/apps/red-ui/src/app/app.module.ts index 4cf536232..bbbd42661 100644 --- a/apps/red-ui/src/app/app.module.ts +++ b/apps/red-ui/src/app/app.module.ts @@ -176,12 +176,7 @@ export function HttpLoaderFactory(httpClient: HttpClient) { component: FilePreviewScreenComponent, canActivate: [CompositeRouteGuard], data: { - routeGuards: [ - AuthGuard, - RedRoleGuard, - ProjectMemberGuard, - AppStateGuard - ] + routeGuards: [AuthGuard, RedRoleGuard, AppStateGuard] } } ] diff --git a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.html b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.html index 0cd9c7b60..e3d4a2039 100644 --- a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.html +++ b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.html @@ -1,7 +1,7 @@
{{ (typeValue?.type)[0] }} diff --git a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss index e34c2741a..11ce96820 100644 --- a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss +++ b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.scss @@ -12,29 +12,14 @@ text-align: center; text-transform: uppercase; color: $white; + position: relative; } .request { - width: 0; - height: 0; - border: 9px solid transparent; - position: relative; - top: -9px; - background-color: transparent !important; - - &:after { - content: ''; - position: absolute; - left: -9px; - top: 9px; - width: 0; - height: 0; - border: 9px solid transparent; - } + transform: rotate(45deg); span { - transform: translateY(9px); - z-index: 2; + transform: rotate(-45deg); } } diff --git a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.ts b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.ts index 6eff84630..38de3b1b7 100644 --- a/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.ts +++ b/apps/red-ui/src/app/components/annotation-icon/annotation-icon.component.ts @@ -6,24 +6,15 @@ import { TypeValue } from '@redaction/red-ui-http'; templateUrl: './annotation-icon.component.html', styleUrls: ['./annotation-icon.component.scss'] }) -export class AnnotationIconComponent implements OnInit { +export class AnnotationIconComponent { @Input() typeValue: TypeValue; - - label: string; + @Input() color: string; constructor() {} - ngOnInit(): void { - if (this.typeValue?.type === 'suggestion') { - const styleSheet = document.styleSheets[0]; - styleSheet.insertRule( - `.request:after { border-top-color: ${this.typeValue.hexColor} !important; }`, - styleSheet.cssRules.length - ); - styleSheet.insertRule( - `.request { border-bottom-color: ${this.typeValue.hexColor} !important; }`, - styleSheet.cssRules.length - ); - } + get isSuggestionRequest() { + return ( + this.typeValue?.type === 'suggestion' || this.typeValue?.type === 'suggestion-remove' + ); } } diff --git a/apps/red-ui/src/app/dialogs/dialog.service.ts b/apps/red-ui/src/app/dialogs/dialog.service.ts index 182759fda..f07b6e792 100644 --- a/apps/red-ui/src/app/dialogs/dialog.service.ts +++ b/apps/red-ui/src/app/dialogs/dialog.service.ts @@ -232,11 +232,13 @@ export class DialogService { ref.afterClosed().subscribe((result) => { if (result) { - this._manualAnnotationService.removeAnnotation(annotation).subscribe(() => { - if (callback) { - callback(); - } - }); + this._manualAnnotationService + .removeOrSuggestRemoveAnnotation(annotation) + .subscribe(() => { + if (callback) { + callback(); + } + }); } }); diff --git a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html index f27c78cf4..c622f2a65 100644 --- a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html +++ b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.html @@ -10,19 +10,36 @@ -
+
-
+
-
- +
+
+
diff --git a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts index bcb6dde60..58328cfd7 100644 --- a/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts +++ b/apps/red-ui/src/app/screens/file/file-preview-screen/file-preview-screen.component.ts @@ -62,9 +62,7 @@ export class FilePreviewScreenComponent implements OnInit { public viewReady = false; public filters: FilterModel[]; - private _activeMenuAnnotation: AnnotationWrapper; loadingMessage: string; - canPerformAnnotationActions: boolean; constructor( @@ -150,19 +148,20 @@ export class FilePreviewScreenComponent implements OnInit { AnnotationWrapper.fromManualRedaction( mr, this.fileData.manualRedactions, - this.appStateService.dictionaryData + this.appStateService.dictionaryData, + this.user ) ); const redactionLogAnnotations = this.fileData.redactionLog.redactionLogEntry.map((rde) => - AnnotationWrapper.fromRedactionLog(rde, this.fileData.manualRedactions) + AnnotationWrapper.fromRedactionLog(rde, this.fileData.manualRedactions, this.user) ); - this.annotations.splice(0, this.annotations.length); + //this.annotations.splice(0, this.annotations.length); + this.annotations = []; this.annotations.push(...manualRedactionAnnotations); this.annotations.push(...redactionLogAnnotations); this.filters = this._annotationProcessingService.getAnnotationFilter(this.annotations); this.filtersChanged(this.filters); - this._changeDetectorRef.detectChanges(); } public openFileDetailsDialog($event: MouseEvent) { @@ -196,7 +195,6 @@ export class FilePreviewScreenComponent implements OnInit { public assignReviewer() { this._fileActionService.assignProjectReviewer(null, () => { - console.log(this.appStateService.canPerformAnnotationActionsOnCurrentFile()); this.canPerformAnnotationActions = this.appStateService.canPerformAnnotationActionsOnCurrentFile(); }); } @@ -279,45 +277,6 @@ export class FilePreviewScreenComponent implements OnInit { } } - public acceptSuggestion($event: MouseEvent, annotation: AnnotationWrapper) { - this.ngZone.run(() => { - this._dialogRef = this._dialogService.openAcceptSuggestionModal( - $event, - annotation, - () => { - this._cleanupAndRedrawManualAnnotations(); - } - ); - }); - } - - public rejectSuggestion($event: MouseEvent, annotation: AnnotationWrapper) { - this.ngZone.run(() => { - this._dialogRef = this._dialogService.openRejectSuggestionModal( - $event, - annotation, - () => { - this._cleanupAndRedrawManualAnnotations(); - } - ); - }); - } - - suggestRemoveAnnotation($event: MouseEvent, annotation: AnnotationWrapper) { - this.ngZone.run(() => { - this._dialogRef = this._dialogService.openRemoveAnnotationModal( - $event, - annotation, - () => { - annotation.superType = this.appStateService.isActiveProjectOwnerAndManager - ? 'ignore' - : 'suggestion-remove'; - this._cleanupAndRedrawManualAnnotations(); - } - ); - }); - } - public downloadFile(type: FileType | string) { this._fileDownloadService.loadFile(type, this.fileId).subscribe((data) => { saveAs(data, this.appStateService.activeFile.filename); @@ -485,7 +444,9 @@ export class FilePreviewScreenComponent implements OnInit { viewerReady($event: WebViewerInstance) { this.instance = $event; this.viewReady = true; - this._reanalyseTooltip.show(); + if (this._reanalyseTooltip) { + this._reanalyseTooltip.show(); + } this._cleanupAndRedrawManualAnnotations(); } @@ -494,7 +455,7 @@ export class FilePreviewScreenComponent implements OnInit { this.annotations, filters ); - this._changeDetectorRef.detectChanges(); + this._changeDetectorRef.markForCheck(); } preventArrowDefault($event: KeyboardEvent) { @@ -507,8 +468,6 @@ export class FilePreviewScreenComponent implements OnInit { this._fileDownloadService .loadActiveFileManualAnnotations() .subscribe((manualRedactions) => { - this.fileData.manualRedactions = manualRedactions; - const annotationsToRemove = []; this.fileData.entriesToAdd.forEach((manuallyAddedEntry) => { const annotation = this.activeViewer.annotManager.getAnnotationById( @@ -519,6 +478,8 @@ export class FilePreviewScreenComponent implements OnInit { } }); this.activeViewer.annotManager.deleteAnnotations(annotationsToRemove, false, true); + + this.fileData.manualRedactions = manualRedactions; this._annotationDrawService.drawAnnotations( this.instance, this.fileData.entriesToAdd @@ -558,4 +519,8 @@ export class FilePreviewScreenComponent implements OnInit { $event.stopPropagation(); this._fileActionService.undoApproveOrUnderApproval().subscribe(() => {}); } + + annotationsChangedByReviewAction() { + this._cleanupAndRedrawManualAnnotations(); + } } diff --git a/apps/red-ui/src/app/screens/file/model/annotation.wrapper.ts b/apps/red-ui/src/app/screens/file/model/annotation.wrapper.ts index aebf22a9a..26d7d6ef7 100644 --- a/apps/red-ui/src/app/screens/file/model/annotation.wrapper.ts +++ b/apps/red-ui/src/app/screens/file/model/annotation.wrapper.ts @@ -4,13 +4,15 @@ import { ManualRedactions, Point, RedactionLogEntry, - TypeValue + TypeValue, + User } from '@redaction/red-ui-http'; +import { UserWrapper } from '../../../user/user.service'; export const SuperTypeSorter = { redaction: 1, - request: 2, - 'request-remove': 3, + suggestion: 2, + 'suggestion-remove': 3, hint: 4, ignore: 5 }; @@ -26,11 +28,13 @@ export class AnnotationWrapper { content: string; manual: boolean; userId: string; + canUndo: boolean; pageNumber; static fromRedactionLog( redactionLogEntry: RedactionLogEntry, - manualRedactions: ManualRedactions + manualRedactions: ManualRedactions, + user: UserWrapper ) { const comments: { [key: string]: Array } = manualRedactions.comments; const annotationWrapper = new AnnotationWrapper(); @@ -41,7 +45,6 @@ export class AnnotationWrapper { ? 'hint' : 'ignore'; - AnnotationWrapper._handleRemoveSuperType(annotationWrapper, manualRedactions); annotationWrapper.dictionary = redactionLogEntry.type; annotationWrapper.firstTopLeftPoint = redactionLogEntry.positions[0]?.topLeft; annotationWrapper.pageNumber = redactionLogEntry.positions[0]?.page; @@ -50,6 +53,8 @@ export class AnnotationWrapper { annotationWrapper.superType === 'redaction' || annotationWrapper.superType === 'ignore' ? AnnotationWrapper.createAnnotationContentForRedactionLogEntry(redactionLogEntry) : null; + + AnnotationWrapper._handleRemoveSuperType(annotationWrapper, manualRedactions, user); annotationWrapper.comments = comments[redactionLogEntry.id] ? comments[redactionLogEntry.id] : []; @@ -59,7 +64,8 @@ export class AnnotationWrapper { static fromManualRedaction( manualRedactionEntry: ManualRedactionEntry, manualRedactions: ManualRedactions, - dictionaryData: { [p: string]: TypeValue } + dictionaryData: { [p: string]: TypeValue }, + user: UserWrapper ) { const comments: { [key: string]: Array } = manualRedactions.comments; const annotationWrapper = new AnnotationWrapper(); @@ -69,7 +75,7 @@ export class AnnotationWrapper { dictionaryData ); - AnnotationWrapper._handleRemoveSuperType(annotationWrapper, manualRedactions); + AnnotationWrapper._handleRemoveSuperType(annotationWrapper, manualRedactions, user); annotationWrapper.dictionary = manualRedactionEntry.type; annotationWrapper.firstTopLeftPoint = manualRedactionEntry.positions[0]?.topLeft; annotationWrapper.pageNumber = manualRedactionEntry.positions[0]?.page; @@ -81,12 +87,16 @@ export class AnnotationWrapper { ? comments[manualRedactionEntry.id] : []; annotationWrapper.userId = manualRedactionEntry.user; + annotationWrapper.canUndo = + !manualRedactionEntry.processedDate && manualRedactionEntry.user === user.id; + return annotationWrapper; } private static _handleRemoveSuperType( annotationWrapper: AnnotationWrapper, - manualRedactions: ManualRedactions + manualRedactions: ManualRedactions, + user: UserWrapper ) { const toRemove = manualRedactions.idsToRemove.find( (trm) => trm.id === annotationWrapper.id @@ -100,6 +110,11 @@ export class AnnotationWrapper { ? 'ignore' : annotationWrapper.superType : annotationWrapper.superType; + + if (toRemove) { + annotationWrapper.canUndo = !toRemove.processedDate && toRemove.user === user.id; + console.log(annotationWrapper.canUndo, toRemove.user, user.id); + } } static getManualRedactionSuperType( diff --git a/apps/red-ui/src/app/screens/file/model/file-data.model.ts b/apps/red-ui/src/app/screens/file/model/file-data.model.ts index c46c6b456..28cea8793 100644 --- a/apps/red-ui/src/app/screens/file/model/file-data.model.ts +++ b/apps/red-ui/src/app/screens/file/model/file-data.model.ts @@ -17,12 +17,15 @@ export class FileDataModel { ) {} get entriesToAdd(): ManualRedactionEntry[] { - return this.manualRedactions.entriesToAdd.filter( - (e) => - e.status !== 'DECLINED' && - !this.redactionLog.redactionLogEntry.find((r) => r.id === e.id) && + return this.manualRedactions.entriesToAdd.filter((e) => { + const notDeclined = e.status !== 'DECLINED'; + const notAlreadyDrawn = !this.redactionLog.redactionLogEntry.find((r) => r.id === e.id); + const alreadyProcessed = + !!e.processedDate && new Date(e.processedDate).getTime() < - new Date(this.fileStatus.lastProcessed).getTime() - ); + new Date(this.fileStatus.lastProcessed).getTime(); + + return notDeclined && notAlreadyDrawn && !alreadyProcessed; + }); } } diff --git a/apps/red-ui/src/app/screens/file/service/annotation-processing.service.ts b/apps/red-ui/src/app/screens/file/service/annotation-processing.service.ts index 6d09ab39f..2799479f1 100644 --- a/apps/red-ui/src/app/screens/file/service/annotation-processing.service.ts +++ b/apps/red-ui/src/app/screens/file/service/annotation-processing.service.ts @@ -68,7 +68,9 @@ export class AnnotationProcessingService { for (const filter of flatFilters) { if ( filter.checked && - (filter.key === annotation.dictionary || + ((filter.key === annotation.dictionary && + (annotation.superType === 'hint' || + annotation.superType === 'redaction')) || filter.key === annotation.superType) ) { found = true; diff --git a/apps/red-ui/src/app/screens/file/service/filter-group.service.ts b/apps/red-ui/src/app/screens/file/service/filter-group.service.ts deleted file mode 100644 index e69de29bb..000000000 diff --git a/apps/red-ui/src/app/screens/file/service/manual-annotation.service.ts b/apps/red-ui/src/app/screens/file/service/manual-annotation.service.ts index 2554915ee..5deeed715 100644 --- a/apps/red-ui/src/app/screens/file/service/manual-annotation.service.ts +++ b/apps/red-ui/src/app/screens/file/service/manual-annotation.service.ts @@ -58,10 +58,11 @@ export class ManualAnnotationService { // this wraps // /manualRedaction/approve - public approveRequest(annotationId: string) { + public approveRequest(annotationId: string, addToDictionary: boolean = false) { // for only here - approve the request return this._manualRedactionControllerService .approveRequest( + { addOrRemoveFromDictionary: addToDictionary }, this._appStateService.activeProjectId, this._appStateService.activeFile.fileId, annotationId @@ -78,6 +79,26 @@ export class ManualAnnotationService { ); } + undoRequest(annotationWrapper: AnnotationWrapper) { + return this._manualRedactionControllerService + .undo( + this._appStateService.activeProjectId, + this._appStateService.activeFileId, + annotationWrapper.id + ) + .pipe( + tap( + () => this._notify('manual-annotation.undo-request.success'), + () => { + this._notify( + 'manual-annotation.undo-request.error', + NotificationType.ERROR + ); + } + ) + ); + } + // this wraps // /manualRedaction/decline/remove // /manualRedaction/undo @@ -124,7 +145,10 @@ export class ManualAnnotationService { // this wraps // /manualRedaction/redaction/remove/ // /manualRedaction/request/remove/ - removeAnnotation(annotationWrapper: AnnotationWrapper, removeFromDictionary: boolean = false) { + removeOrSuggestRemoveAnnotation( + annotationWrapper: AnnotationWrapper, + removeFromDictionary: boolean = false + ) { if (this._appStateService.isActiveProjectOwnerAndManager) { return this._manualRedactionControllerService .removeRedaction( 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 6da4094d8..9762fc6a2 100644 --- a/apps/red-ui/src/app/state/app-state.service.ts +++ b/apps/red-ui/src/app/state/app-state.service.ts @@ -14,7 +14,7 @@ import { NotificationService, NotificationType } from '../notification/notificat import { TranslateService } from '@ngx-translate/core'; import { Router } from '@angular/router'; import { UserService, UserWrapper } from '../user/user.service'; -import { forkJoin, interval, of } from 'rxjs'; +import { forkJoin, interval, of, timer } from 'rxjs'; import { tap } from 'rxjs/operators'; import { download } from '../utils/file-download-utils'; import { humanize } from '../utils/functions'; @@ -128,7 +128,7 @@ export class AppStateService { activeFile: null }; - interval(5000) + timer(5000, 5000) .pipe( tap(() => { this.reloadActiveProjectFiles(); @@ -136,7 +136,7 @@ export class AppStateService { ) .subscribe(); - interval(5000) + timer(5000, 5000) .pipe( tap(() => { this.updateDictionaryVersion(); @@ -144,7 +144,7 @@ export class AppStateService { ) .subscribe(); - interval(30000) + timer(5000, 30000) .pipe( tap(() => { this.loadAllProjects(); @@ -597,7 +597,7 @@ export class AppStateService { (fileStatus.status === 'UNASSIGNED' || fileStatus.status === 'UNDER_REVIEW' || fileStatus.status === 'UNDER_APPROVAL') && - fileStatus.dictionaryVersion !== this.dictionaryVersion + (fileStatus.dictionaryVersion !== this.dictionaryVersion || fileStatus.hasRequests) ); } diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 221819121..83d243b14 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -257,6 +257,7 @@ "label": "Workload", "accept-suggestion": { "add-to-dict": "Approve and add to dictionary", + "remove-from-dict": "Approve and remove from dictionary", "only-here": "Approve only here" } } @@ -316,8 +317,8 @@ "super-type": { "redaction": "Redaction", "hint": "Hint", - "request": "Redaction Request", - "request-remove": "Remove Redaction Request", + "suggestion": "Suggestion", + "suggestion-remove": "Suggestion to Remove", "ignore": "Ignored redaction" } }, 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 2de0ef5aa..7fa583b15 100644 --- a/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts +++ b/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts @@ -17,6 +17,7 @@ import { Observable } from 'rxjs'; import { AddCommentRequest } from '../model/addCommentRequest'; import { AddRedactionRequest } from '../model/addRedactionRequest'; +import { ApproveRequest } from '../model/approveRequest'; import { CommentResponse } from '../model/commentResponse'; import { ManualAddResponse } from '../model/manualAddResponse'; import { ManualRedactions } from '../model/manualRedactions'; @@ -27,9 +28,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, @@ -45,6 +46,20 @@ export class ManualRedactionControllerService { } } + /** + * @param consumes string[] mime-types + * @return true: consumes contains 'multipart/form-data', false: otherwise + */ + private canConsumeForm(consumes: string[]): boolean { + const form = 'multipart/form-data'; + for (const consume of consumes) { + if (form === consume) { + return true; + } + } + return false; + } + /** * Adds a comment to a redaction/redaction request * None @@ -63,7 +78,6 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public addComment( body: AddCommentRequest, projectId: string, @@ -72,7 +86,6 @@ export class ManualRedactionControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; - public addComment( body: AddCommentRequest, projectId: string, @@ -81,7 +94,6 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public addComment( body: AddCommentRequest, projectId: string, @@ -174,7 +186,6 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public addRedaction( body: AddRedactionRequest, projectId: string, @@ -182,7 +193,6 @@ export class ManualRedactionControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; - public addRedaction( body: AddRedactionRequest, projectId: string, @@ -190,7 +200,6 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public addRedaction( body: AddRedactionRequest, projectId: string, @@ -263,6 +272,7 @@ export class ManualRedactionControllerService { /** * Approves a redaction request/ remove redaction request * None + * @param body approveRequest * @param projectId projectId * @param fileId fileId * @param annotationId annotationId @@ -270,36 +280,43 @@ export class ManualRedactionControllerService { * @param reportProgress flag to report request and response progress. */ public approveRequest( + body: ApproveRequest, projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean ): Observable; - public approveRequest( + body: ApproveRequest, projectId: string, fileId: string, annotationId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public approveRequest( + body: ApproveRequest, projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean ): Observable>; - public approveRequest( + body: ApproveRequest, projectId: string, fileId: string, annotationId: 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 approveRequest.' + ); + } + if (projectId === null || projectId === undefined) { throw new Error( 'Required parameter projectId was null or undefined when calling approveRequest.' @@ -339,7 +356,13 @@ export class ManualRedactionControllerService { } // to determine the Content-Type header - const consumes: string[] = []; + const consumes: string[] = ['application/json']; + const httpContentTypeSelected: + | string + | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + headers = headers.set('Content-Type', httpContentTypeSelected); + } return this.httpClient.request( 'post', @@ -347,6 +370,7 @@ export class ManualRedactionControllerService { String(projectId) )}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, { + body: body, withCredentials: this.configuration.withCredentials, headers: headers, observe: observe, @@ -371,7 +395,6 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public declineRequest( projectId: string, fileId: string, @@ -379,7 +402,6 @@ export class ManualRedactionControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; - public declineRequest( projectId: string, fileId: string, @@ -387,7 +409,6 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public declineRequest( projectId: string, fileId: string, @@ -464,21 +485,18 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public getManualRedaction( projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean ): Observable>; - public getManualRedaction( projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean ): Observable>; - public getManualRedaction( projectId: string, fileId: string, @@ -533,7 +551,6 @@ export class ManualRedactionControllerService { } ); } - /** * Removes a redaction * None @@ -550,7 +567,6 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public removeRedaction( body: RemoveRedactionRequest, projectId: string, @@ -558,7 +574,6 @@ export class ManualRedactionControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; - public removeRedaction( body: RemoveRedactionRequest, projectId: string, @@ -566,7 +581,6 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public removeRedaction( body: RemoveRedactionRequest, projectId: string, @@ -652,7 +666,6 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public requestAddRedaction( body: AddRedactionRequest, projectId: string, @@ -660,7 +673,6 @@ export class ManualRedactionControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; - public requestAddRedaction( body: AddRedactionRequest, projectId: string, @@ -668,7 +680,6 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public requestAddRedaction( body: AddRedactionRequest, projectId: string, @@ -754,7 +765,6 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public requestRemoveRedaction( body: RemoveRedactionRequest, projectId: string, @@ -762,7 +772,6 @@ export class ManualRedactionControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; - public requestRemoveRedaction( body: RemoveRedactionRequest, projectId: string, @@ -770,7 +779,6 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public requestRemoveRedaction( body: RemoveRedactionRequest, projectId: string, @@ -856,7 +864,6 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public undo( projectId: string, fileId: string, @@ -864,7 +871,6 @@ export class ManualRedactionControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; - public undo( projectId: string, fileId: string, @@ -872,7 +878,6 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public undo( projectId: string, fileId: string, @@ -951,7 +956,6 @@ export class ManualRedactionControllerService { observe?: 'body', reportProgress?: boolean ): Observable; - public undoComment( projectId: string, fileId: string, @@ -960,7 +964,6 @@ export class ManualRedactionControllerService { observe?: 'response', reportProgress?: boolean ): Observable>; - public undoComment( projectId: string, fileId: string, @@ -969,7 +972,6 @@ export class ManualRedactionControllerService { observe?: 'events', reportProgress?: boolean ): Observable>; - public undoComment( projectId: string, fileId: string, @@ -1040,18 +1042,4 @@ export class ManualRedactionControllerService { } ); } - - /** - * @param consumes string[] mime-types - * @return true: consumes contains 'multipart/form-data', false: otherwise - */ - private canConsumeForm(consumes: string[]): boolean { - const form = 'multipart/form-data'; - for (const consume of consumes) { - if (form === consume) { - return true; - } - } - return false; - } } diff --git a/libs/red-ui-http/src/lib/model/approveRequest.ts b/libs/red-ui-http/src/lib/model/approveRequest.ts new file mode 100644 index 000000000..fc4f7ff49 --- /dev/null +++ b/libs/red-ui-http/src/lib/model/approveRequest.ts @@ -0,0 +1,15 @@ +/** + * API Documentation for Redaction Gateway + * Description for redaction + * + * OpenAPI spec version: 1.0 + * + * + * NOTE: This class is auto generated by the swagger code generator program. + * https://github.com/swagger-api/swagger-codegen.git + * Do not edit the class manually. + */ + +export interface ApproveRequest { + addOrRemoveFromDictionary?: boolean; +} diff --git a/libs/red-ui-http/src/lib/model/models.ts b/libs/red-ui-http/src/lib/model/models.ts index 2ad30aa10..4347ac83f 100644 --- a/libs/red-ui-http/src/lib/model/models.ts +++ b/libs/red-ui-http/src/lib/model/models.ts @@ -34,3 +34,4 @@ export * from './userResponse'; export * from './versionsResponse'; export * from './viewedPages'; export * from './viewedPagesRequest'; +export * from './approveRequest';