UI Update for download queue

This commit is contained in:
Timo 2021-02-05 14:00:24 +02:00
parent fd7b8fb777
commit bbafad9d07
22 changed files with 264 additions and 187 deletions

View File

@ -1,11 +1,9 @@
import { ChangeDetectorRef, Component, Input } from '@angular/core';
import { Component, Input } from '@angular/core';
import { PermissionsService } from '../../../common/service/permissions.service';
import { ProjectWrapper } from '../../../state/model/project.wrapper';
import { FileStatusWrapper } from '../../../screens/file/model/file-status.wrapper';
import { FileManagementControllerService } from '@redaction/red-ui-http';
import { StatusOverlayService } from '../../../upload-download/status-overlay.service';
import { FileDownloadService } from '../../../upload-download/file-download.service';
import { UserPreferenceService } from '../../../common/service/user-preference.service';
import { NotificationService } from '../../../notification/notification.service';
export type MenuState = 'OPEN' | 'CLOSED';
@ -24,10 +22,7 @@ export class FileDownloadBtnComponent {
constructor(
private readonly _permissionsService: PermissionsService,
private readonly _fileDownloadService: FileDownloadService,
private readonly _userPreferencesService: UserPreferenceService,
private readonly _changeDetectorRef: ChangeDetectorRef,
private readonly _statusOverlayService: StatusOverlayService,
private readonly _fileManagementControllerService: FileManagementControllerService
private readonly _notificationService: NotificationService
) {}
get canDownloadFiles() {
@ -41,9 +36,6 @@ export class FileDownloadBtnComponent {
downloadFiles($event: MouseEvent) {
$event.stopPropagation();
// Bulk Download
this._fileDownloadService.downloadFiles(Array.isArray(this.file) ? this.file : [this.file], this.project).subscribe((data) => {
this._statusOverlayService.openDownloadStatusOverlay();
this._changeDetectorRef.detectChanges();
});
this._fileDownloadService.downloadFiles(Array.isArray(this.file) ? this.file : [this.file], this.project).subscribe((data) => {});
}
}

View File

@ -26,7 +26,7 @@
</redaction-icon-button>
</div>
<div class="red-input-group w-300" [class.hidden]="!hasDigitalSignatureSet">
<div class="red-input-group required w-300" [class.hidden]="!hasDigitalSignatureSet">
<label translate="digital-signature-screen.certificate-name.label"></label>
<input
formControlName="certificateName"
@ -35,7 +35,7 @@
/>
</div>
<div class="red-input-group w-300" [class.hidden]="!hasDigitalSignatureSet">
<div class="red-input-group required w-300" [class.hidden]="!hasDigitalSignatureSet">
<label translate="digital-signature-screen.password.label"></label>
<input formControlName="keySecret" name="keySecret" [placeholder]="'digital-signature-screen.password.placeholder' | translate" />
</div>

View File

@ -32,7 +32,7 @@ export class DigitalSignatureScreenComponent {
const digitalSignature = {
...this.digitalSignatureForm.getRawValue()
};
//adjusted for chrome auto-complete / password manager
digitalSignature.password = digitalSignature.keySecret;
this._digitalSignatureControllerService.saveDigitalSignature(digitalSignature).subscribe(
@ -116,10 +116,10 @@ export class DigitalSignatureScreenComponent {
private _initForm() {
this.digitalSignatureForm = this._formBuilder.group({
certificateName: { value: this.digitalSignature.certificateName, disabled: true },
certificateName: [this.digitalSignature.certificateName, Validators.required],
contactInfo: this.digitalSignature.contactInfo,
location: this.digitalSignature.location,
keySecret: this.digitalSignature.password,
keySecret: [this.digitalSignature.password, Validators.required],
reason: this.digitalSignature.reason,
base64EncodedPrivateKey: [this.digitalSignature.base64EncodedPrivateKey, Validators.required]
});

View File

@ -48,7 +48,7 @@ export class BaseScreenComponent {
}
get showPendingDownloadsDot() {
return this.fileDownloadService.pendingDownloads.length > 0 && !this._statusOverlayService.isDownloadOverlayOpen;
return this.fileDownloadService.hasPendingDownloads;
}
logout() {

View File

@ -114,7 +114,7 @@
<redaction-file-actions (actionPerformed)="fileActionPerformed($event)" *ngIf="viewReady"></redaction-file-actions>
<redaction-circle-button
(action)="toggleFullScreen()"
icon="red:fullscreen"
[icon]="fullScreen ? 'red:exit-fullscreen' : 'red:fullscreen'"
tooltip="file-preview.fullscreen"
tooltipPosition="before"
></redaction-circle-button>
@ -142,6 +142,7 @@
<redaction-circle-button
[routerLink]="['/ui/projects/' + appStateService.activeProjectId]"
(action)="closeFullScreen()"
class="ml-8"
icon="red:close"
tooltip="common.close"
@ -177,14 +178,6 @@
[filterTemplate]="annotationFilterTemplate"
[filters]="annotationFilters"
></redaction-filter>
<redaction-circle-button
*ngIf="fullScreen"
(action)="toggleFullScreen()"
icon="red:exit-fullscreen"
tooltip="file-preview.exit-fullscreen"
tooltipPosition="before"
></redaction-circle-button>
</div>
</div>
<div class="right-content">

View File

@ -294,7 +294,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
if (this.fullScreen) {
this._openFullScreen();
} else {
this._closeFullScreen();
this.closeFullScreen();
}
}
@ -306,7 +306,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
if (['Escape'].includes($event.key)) {
this.fullScreen = false;
this._closeFullScreen();
this.closeFullScreen();
}
if (['f', 'F'].includes($event.key)) {
@ -602,7 +602,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy {
}
/* Close fullscreen */
private _closeFullScreen() {
closeFullScreen() {
if (document.exitFullscreen) {
document.exitFullscreen();
}

View File

@ -87,12 +87,6 @@
<div class="table-item-title heading">
{{ pw.project.projectName }}
</div>
<div class="small-label stats-subtitle">
<div>
<mat-icon svgIcon="red:template"></mat-icon>
{{ getRuleSet(pw).name }}
</div>
</div>
<div class="small-label stats-subtitle">
<div>
<mat-icon svgIcon="red:document"></mat-icon>
@ -114,6 +108,10 @@
<mat-icon svgIcon="red:lightning"></mat-icon>
{{ pw.project.dueDate | date: 'mediumDate' }}
</div>
<div>
<mat-icon svgIcon="red:template"></mat-icon>
{{ getRuleSet(pw).name }}
</div>
</div>
</div>
<div>

View File

@ -1,35 +0,0 @@
<section class="red-upload-download-overlay mat-elevation-z4" *ngIf="downloadService.pendingDownloads.length > 0">
<div (click)="collapsed = !collapsed" class="red-upload-download-header">
<div class="title">
{{ 'download-status.dialog.title' | translate: { len: downloadService.pendingDownloads.length } }}
</div>
<div *ngIf="!collapsed" class="collapse-icon">
<mat-icon svgIcon="red:arrow-down"></mat-icon>
</div>
<div *ngIf="collapsed" class="collapse-icon">
<mat-icon svgIcon="red:arrow-up"></mat-icon>
</div>
<div (click)="closeDialog()" class="close-icon">
<mat-icon svgIcon="red:close"></mat-icon>
</div>
</div>
<div [hidden]="collapsed">
<div class="upload-download-list">
<div *ngFor="let model of downloadService.pendingDownloads" class="upload-download-list-item">
<div class="upload-download-line">
<div
matTooltipPosition="above"
[matTooltip]="'download-status.dialog.tooltip' | translate: { len: model.downloadDetails.fileIds.length }"
class="upload-download-item-name"
>
{{ model.filename }}
</div>
<mat-spinner *ngIf="!hasError(model)" class="upload-download-progress" diameter="15" color="primary"></mat-spinner>
<div *ngIf="hasError(model)" class="upload-download-progress error">
<mat-icon svgIcon="red:error"></mat-icon>
</div>
</div>
</div>
</div>
</div>
</section>

View File

@ -1,3 +0,0 @@
.red-upload-download-overlay {
left: 10px;
}

View File

@ -1,42 +0,0 @@
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { OverlayRef } from '@angular/cdk/overlay';
import { FileDownloadService } from '../file-download.service';
import { DownloadStatus } from '@redaction/red-ui-http';
@Component({
selector: 'redaction-download-status-overlay',
templateUrl: './download-status-overlay.component.html',
styleUrls: ['./download-status-overlay.component.scss']
})
export class DownloadStatusOverlay implements OnInit {
collapsed = false;
downloadStatusInterval: number;
constructor(
public readonly downloadService: FileDownloadService,
private readonly _overlayRef: OverlayRef,
private readonly _changeDetectorRef: ChangeDetectorRef
) {}
ngOnInit() {
this.downloadStatusInterval = setInterval(() => {
// keep only errors
if (this.downloadService.pendingDownloads.length === 0) {
this.closeDialog();
}
}, 2500);
}
closeDialog() {
if (this.downloadStatusInterval) {
clearInterval(this.downloadStatusInterval);
this.downloadStatusInterval = null;
}
this._overlayRef.detach();
}
hasError(downloadStatus: DownloadStatus) {
return downloadStatus.status === 'FAILED';
}
}

View File

@ -1,5 +1,5 @@
import { ApplicationRef, Injectable } from '@angular/core';
import { DownloadControllerService, DownloadStatus, FileManagementControllerService } from '@redaction/red-ui-http';
import { DownloadControllerService, FileManagementControllerService } from '@redaction/red-ui-http';
import { interval, Observable } from 'rxjs';
import { AppConfigService } from '../app-config/app-config.service';
import { TranslateService } from '@ngx-translate/core';
@ -17,8 +17,8 @@ import { PermissionsService } from '../common/service/permissions.service';
})
export class FileDownloadService {
public downloads: DownloadStatusWrapper[] = [];
public pendingDownloads: DownloadStatusWrapper[] = [];
private inProgressDownloads = new Set<string>();
public hasPendingDownloads;
constructor(
private readonly _applicationRef: ApplicationRef,
@ -56,19 +56,12 @@ export class FileDownloadService {
return this._downloadControllerService.getDownloadStatus().pipe(
tap((statusResponse) => {
this.downloads = statusResponse.downloadStatus.map((d) => new DownloadStatusWrapper(d));
this.downloads.forEach((d) => {
if (!d.lastDownload && d.status === 'READY') {
this.performDownload(d);
}
});
// never downloaded or download still pending
this.pendingDownloads = this.downloads.filter((d) => !d.lastDownload || this.inProgressDownloads.has(d.storageId));
this.hasPendingDownloads = !!this.downloads.find((f) => !f.lastDownload);
})
);
}
public performDownload(status: DownloadStatusWrapper) {
this.inProgressDownloads.add(status.storageId);
status.inProgress = true;
this._downloadControllerService
.downloadFile(
@ -82,12 +75,8 @@ export class FileDownloadService {
(response) => {
download(response, status.filename);
status.inProgress = false;
setTimeout(() => {
this.inProgressDownloads.delete(status.storageId);
}, 1000);
},
() => {
this.inProgressDownloads.delete(status.storageId);
status.inProgress = false;
}
);

View File

@ -10,7 +10,6 @@ import { UploadStatusOverlay } from './upload-status-overlay/upload-status-overl
import { NgxDropzoneModule } from 'ngx-dropzone';
import { TranslateModule } from '@ngx-translate/core';
import { MatButtonModule } from '@angular/material/button';
import { DownloadStatusOverlay } from './download-status-overlay/download-status-overlay.component';
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
@NgModule({
@ -26,9 +25,9 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
OverlayModule,
MatButtonModule
],
declarations: [FileDropComponent, UploadStatusOverlay, DownloadStatusOverlay],
declarations: [FileDropComponent, UploadStatusOverlay],
providers: [],
entryComponents: [FileDropComponent, UploadStatusOverlay, DownloadStatusOverlay],
exports: [FileDropComponent, UploadStatusOverlay, DownloadStatusOverlay]
entryComponents: [FileDropComponent, UploadStatusOverlay],
exports: [FileDropComponent, UploadStatusOverlay]
})
export class FileUploadDownloadModule {}

View File

@ -2,7 +2,6 @@ import { DownloadDetails, DownloadStatus } from '@redaction/red-ui-http';
export class DownloadStatusWrapper {
inProgress: boolean;
displayName: string;
constructor(private _downloadStatus: DownloadStatus) {}

View File

@ -2,18 +2,15 @@ import { Injectable, Injector } from '@angular/core';
import { Overlay, OverlayRef } from '@angular/cdk/overlay';
import { ComponentPortal } from '@angular/cdk/portal';
import { UploadStatusOverlay } from './upload-status-overlay/upload-status-overlay.component';
import { DownloadStatusOverlay } from './download-status-overlay/download-status-overlay.component';
@Injectable({
providedIn: 'root'
})
export class StatusOverlayService {
private readonly _uploadStatusOverlayRef: OverlayRef;
private readonly _downloadStatusOverlayRef: OverlayRef;
constructor(private overlay: Overlay, private readonly _injector: Injector) {
this._uploadStatusOverlayRef = this.overlay.create();
this._downloadStatusOverlayRef = this.overlay.create();
}
private _createUploadInjector() {
@ -23,28 +20,10 @@ export class StatusOverlayService {
});
}
private _createDownloadInjector() {
return Injector.create({
providers: [{ provide: OverlayRef, useValue: this._downloadStatusOverlayRef }],
parent: this._injector
});
}
openUploadStatusOverlay() {
const component = new ComponentPortal(UploadStatusOverlay, null, this._createUploadInjector());
if (!this._uploadStatusOverlayRef.hasAttached()) {
this._uploadStatusOverlayRef.attach(component);
}
}
openDownloadStatusOverlay() {
const component = new ComponentPortal(DownloadStatusOverlay, null, this._createDownloadInjector());
if (!this._downloadStatusOverlayRef.hasAttached()) {
this._downloadStatusOverlayRef.attach(component);
}
}
get isDownloadOverlayOpen() {
return this._downloadStatusOverlayRef && this._downloadStatusOverlayRef.hasAttached();
}
}

View File

@ -16,6 +16,7 @@ import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/commo
import { Observable } from 'rxjs';
import { DigitalSignature } from '../model/digitalSignature';
import { DigitalSignatureViewModel } from '../model/digitalSignatureViewModel';
import { BASE_PATH } from '../variables';
import { Configuration } from '../configuration';
@ -92,9 +93,9 @@ 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<DigitalSignature>;
public getDigitalSignature(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<DigitalSignature>>;
public getDigitalSignature(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<DigitalSignature>>;
public getDigitalSignature(observe?: 'body', reportProgress?: boolean): Observable<DigitalSignatureViewModel>;
public getDigitalSignature(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<DigitalSignatureViewModel>>;
public getDigitalSignature(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<DigitalSignatureViewModel>>;
public getDigitalSignature(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
let headers = this.defaultHeaders;
@ -114,7 +115,7 @@ export class DigitalSignatureControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<DigitalSignature>('get', `${this.basePath}/digital-signature`, {
return this.httpClient.request<DigitalSignatureViewModel>('get', `${this.basePath}/digital-signature`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
@ -123,15 +124,15 @@ export class DigitalSignatureControllerService {
}
/**
* Save/Update the digital signature used to sign PDF&#x27;s
* Save a new digital signature used to sign PDF&#x27;s
* None
* @param body digitalSignatureModel
* @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 saveDigitalSignature(body: DigitalSignature, observe?: 'body', reportProgress?: boolean): Observable<DigitalSignature>;
public saveDigitalSignature(body: DigitalSignature, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<DigitalSignature>>;
public saveDigitalSignature(body: DigitalSignature, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<DigitalSignature>>;
public saveDigitalSignature(body: DigitalSignature, observe?: 'body', reportProgress?: boolean): Observable<DigitalSignatureViewModel>;
public saveDigitalSignature(body: DigitalSignature, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<DigitalSignatureViewModel>>;
public saveDigitalSignature(body: DigitalSignature, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<DigitalSignatureViewModel>>;
public saveDigitalSignature(body: DigitalSignature, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling saveDigitalSignature.');
@ -159,7 +160,61 @@ export class DigitalSignatureControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.request<DigitalSignature>('post', `${this.basePath}/digital-signature`, {
return this.httpClient.request<DigitalSignatureViewModel>('post', `${this.basePath}/digital-signature`, {
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/**
* Update the digital signature used to sign PDF&#x27;s
* None
* @param body digitalSignatureModel
* @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 saveDigitalSignature1(body: DigitalSignatureViewModel, observe?: 'body', reportProgress?: boolean): Observable<DigitalSignatureViewModel>;
public saveDigitalSignature1(
body: DigitalSignatureViewModel,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<DigitalSignatureViewModel>>;
public saveDigitalSignature1(
body: DigitalSignatureViewModel,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<DigitalSignatureViewModel>>;
public saveDigitalSignature1(body: DigitalSignatureViewModel, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling saveDigitalSignature1.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = ['application/json'];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.request<DigitalSignatureViewModel>('put', `${this.basePath}/digital-signature`, {
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,

View File

@ -15,6 +15,7 @@ import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/commo
import { Observable } from 'rxjs';
import { RedactionChangeLog } from '../model/redactionChangeLog';
import { RedactionLog } from '../model/redactionLog';
import { SectionGrid } from '../model/sectionGrid';
@ -23,9 +24,9 @@ import { Configuration } from '../configuration';
@Injectable()
export class RedactionLogControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders();
public configuration = new Configuration();
protected basePath = '';
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
if (basePath) {
@ -37,6 +38,75 @@ export class RedactionLogControllerService {
}
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/**
* Gets the redaction changelog for a fileId
* None
* @param projectId projectId
* @param fileId fileId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getRedactionChangeLog(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<RedactionChangeLog>;
public getRedactionChangeLog(
projectId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<RedactionChangeLog>>;
public getRedactionChangeLog(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<RedactionChangeLog>>;
public getRedactionChangeLog(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (projectId === null || projectId === undefined) {
throw new Error('Required parameter projectId 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.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<RedactionChangeLog>(
'get',
`${this.basePath}/redactionChnageLog/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Gets the redaction log for a fileId
* None
@ -50,11 +120,11 @@ export class RedactionLogControllerService {
public getRedactionLog(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<RedactionLog>>;
public getRedactionLog(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (projectId === null || projectId === undefined) {
throw new Error('Required parameter projectId was null or undefined when calling getRedactionLog.');
throw new Error('Required parameter projectId was null or undefined when calling getRedactionLog1.');
}
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 getRedactionLog1.');
}
let headers = this.defaultHeaders;
@ -136,18 +206,4 @@ export class RedactionLogControllerService {
}
);
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
}

View File

@ -11,10 +11,10 @@
*/
export interface DigitalSignature {
base64EncodedPrivateKey?: string;
certificateName?: string;
contactInfo?: string;
location?: string;
password?: string;
reason?: string;
contactInfo?: string;
password?: string;
base64EncodedPrivateKey?: string;
}

View File

@ -0,0 +1,18 @@
/**
* 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 DigitalSignatureViewModel {
certificateName?: string;
contactInfo?: string;
location?: string;
reason?: string;
}

View File

@ -49,3 +49,6 @@ export * from './downloadStatus';
export * from './downloadStatusResponse';
export * from './prepareDownloadRequest';
export * from './digitalSignature';
export * from './digitalSignatureViewModel';
export * from './redactionChangeLog';
export * from './redactionChangeLogEntry';

View File

@ -0,0 +1,20 @@
/**
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { RedactionChangeLogEntry } from './redactionChangeLogEntry';
export interface RedactionChangeLog {
dictionaryVersion?: number;
filename?: string;
redactionLogEntry?: Array<RedactionChangeLogEntry>;
ruleSetId?: string;
rulesVersion?: number;
}

View File

@ -0,0 +1,55 @@
/**
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { Comment } from './comment';
import { Rectangle } from './rectangle';
export interface RedactionChangeLogEntry {
changeType?: RedactionChangeLogEntry.ChangeTypeEnum;
color?: Array<number>;
comments?: Array<Comment>;
dictionaryEntry?: boolean;
hint?: boolean;
id?: string;
legalBasis?: string;
manual?: boolean;
manualRedactionType?: RedactionChangeLogEntry.ManualRedactionTypeEnum;
matchedRule?: number;
positions?: Array<Rectangle>;
reason?: string;
recommendation?: boolean;
redacted?: boolean;
section?: string;
sectionNumber?: number;
status?: RedactionChangeLogEntry.StatusEnum;
textAfter?: string;
textBefore?: string;
type?: string;
value?: string;
}
export namespace RedactionChangeLogEntry {
export type ChangeTypeEnum = 'ADDED' | 'REMOVED';
export const ChangeTypeEnum = {
ADDED: 'ADDED' as ChangeTypeEnum,
REMOVED: 'REMOVED' as ChangeTypeEnum
};
export type ManualRedactionTypeEnum = 'ADD' | 'REMOVE';
export const ManualRedactionTypeEnum = {
ADD: 'ADD' as ManualRedactionTypeEnum,
REMOVE: 'REMOVE' as ManualRedactionTypeEnum
};
export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED';
export const StatusEnum = {
REQUESTED: 'REQUESTED' as StatusEnum,
APPROVED: 'APPROVED' as StatusEnum,
DECLINED: 'DECLINED' as StatusEnum
};
}

View File

@ -9,10 +9,12 @@
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
import { Comment } from './comment';
import { Rectangle } from './rectangle';
export interface RedactionLogEntry {
color?: Array<number>;
comments?: Array<Comment>;
dictionaryEntry?: boolean;
hint?: boolean;
id?: string;
@ -32,7 +34,6 @@ export interface RedactionLogEntry {
type?: string;
value?: string;
}
export namespace RedactionLogEntry {
export type ManualRedactionTypeEnum = 'ADD' | 'REMOVE';
export const ManualRedactionTypeEnum = {