regenarated http client and adapted code for manual redactions

This commit is contained in:
Timo Bejan 2020-10-19 10:36:33 +03:00
parent ee85689e54
commit d4b9484cc0
51 changed files with 1485 additions and 311 deletions

View File

@ -1,90 +1,19 @@
# Redaction
This project was generated using [Nx](https://nx.dev).
## Swagger Generated Code
To regnerate http rune swaagger
```
URL=http://ingress.redaction-timo-dev-0304.178.63.47.73.xip.io/v2/api-docs?group=redaction-gateway-v1
mkdir -p /tmp/swagger
swagger-codegen generate -i "$URL" -l typescript-angular -o /tmp/swagger
```
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-logo.png" width="450"></p>
## To Create a new Stack in rancher
🔎 **Nx is a set of Extensible Dev Tools for Monorepos.**
Goto rancher.iqser.com: Select Cluster `Development`,
go to apps, click launch and select `Redaction` from the `dev` section.
Add a new name and a new namespace.
Select `answers-development.yaml` and add it to answers `Edit as yaml`.
## Adding capabilities to your workspace
Nx supports many plugins which add capabilities for developing different types of applications and different tools.
These capabilities include generating applications, libraries, etc as well as the devtools to test, and build projects as well.
Below are our core plugins:
- [React](https://reactjs.org)
- `npm install --save-dev @nrwl/react`
- Web (no framework frontends)
- `npm install --save-dev @nrwl/web`
- [Angular](https://angular.io)
- `npm install --save-dev @nrwl/angular`
- [Nest](https://nestjs.com)
- `npm install --save-dev @nrwl/nest`
- [Express](https://expressjs.com)
- `npm install --save-dev @nrwl/express`
- [Node](https://nodejs.org)
- `npm install --save-dev @nrwl/node`
There are also many [community plugins](https://nx.dev/nx-community) you could add.
## Generate an application
Run `nx g @nrwl/react:app my-app` to generate an application.
> You can use any of the plugins above to generate applications as well.
When using Nx, you can create multiple applications and libraries in the same workspace.
## Generate a library
Run `nx g @nrwl/react:lib my-lib` to generate a library.
> You can also use any of the plugins above to generate libraries as well.
Libraries are sharable across libraries and applications. They can be imported from `@redaction/mylib`.
## Development server
Run `nx serve my-app` for a dev server. Navigate to http://localhost:4200/. The app will automatically reload if you change any of the source files.
## Code scaffolding
Run `nx g @nrwl/react:component my-component --project=my-app` to generate a new component.
## Build
Run `nx build my-app` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
## Running unit tests
Run `nx test my-app` to execute the unit tests via [Jest](https://jestjs.io).
Run `nx affected:test` to execute the unit tests affected by a change.
## Running end-to-end tests
Run `ng e2e my-app` to execute the end-to-end tests via [Cypress](https://www.cypress.io).
Run `nx affected:e2e` to execute the end-to-end tests affected by a change.
## Understand your workspace
Run `nx dep-graph` to see a diagram of the dependencies of your projects.
## Further help
Visit the [Nx Documentation](https://nx.dev) to learn more.
## ☁ Nx Cloud
### Computation Memoization in the Cloud
<p align="center"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-cloud-card.png"></p>
Nx Cloud pairs with Nx in order to enable you to build and test code more rapidly, by up to 10 times. Even teams that are new to Nx can connect to Nx Cloud and start saving time instantly.
Teams using Nx gain the advantage of building full-stack applications with their preferred framework alongside Nxs advanced code generation and project dependency graph, plus a unified experience for both frontend and backend developers.
Visit [Nx Cloud](https://nx.app/) to learn more.
For HTTPS / Cloudflare domain go to `workloads` -> `Loadbalancing` -> `select your stack`
Add cloudflare certificate and specify a hostname to use `timo-redaction-dev.iqser.cloud`

View File

@ -1,6 +1,7 @@
import {ChangeDetectorRef, Component, ElementRef, OnInit, ViewChild} from '@angular/core';
import {ActivatedRoute, Router} from '@angular/router';
import {
AddRedactionRequest,
FileUploadControllerService,
ManualRedactionControllerService,
ManualRedactionEntry,
@ -67,7 +68,7 @@ export class FilePreviewScreenComponent implements OnInit {
return Object.keys(this.filters);
}
private _manualRedactionEntry: ManualRedactionEntry;
private _manualRedactionEntry: AddRedactionRequest;
activeViewerPage: number;
@ -319,12 +320,7 @@ export class FilePreviewScreenComponent implements OnInit {
dialogRef.afterClosed().subscribe(result => {
if (result) {
this._manualRedactionControllerService.updateManualRedaction({
idsToRemove: [{
id: annotation.Id,
removeFromDictionary: false
}]
}, this.appStateService.activeProjectId, this.appStateService.activeFile.fileId).subscribe(ok => {
this._manualRedactionControllerService.undo(this.appStateService.activeProjectId, this.appStateService.activeFile.fileId, annotation.Id).subscribe(ok => {
this._notificationService.showToastNotification(this._translateService.instant('manual-redaction.remove-annotation.success.label'), null, NotificationType.SUCCESS);
}, (err) => {
this._notificationService.showToastNotification(this._translateService.instant('manual-redaction.remove-annotation.failed.label', err), null, NotificationType.ERROR);

View File

@ -9,7 +9,7 @@
<div class="file-details">
<div class="detail-row"
[innerHTML]="'manual-redaction.dialog.content.text.label' | translate:manualRedactionInput">
[innerHTML]="'manual-redaction.dialog.content.text.label' | translate:addRedactionRequest">
</div>
</div>

View File

@ -3,6 +3,7 @@ import {FormBuilder, FormGroup, Validators} from "@angular/forms";
import {AppStateService} from "../../../state/app-state.service";
import {MAT_DIALOG_DATA, MatDialogRef} from "@angular/material/dialog";
import {
AddRedactionRequest,
DictionaryControllerService,
ManualRedactionControllerService,
ManualRedactionEntry,
@ -32,7 +33,7 @@ export class ManualRedactionDialogComponent implements OnInit {
private readonly _manualRedactionControllerService: ManualRedactionControllerService,
private readonly _dictionaryControllerService: DictionaryControllerService,
public dialogRef: MatDialogRef<ManualRedactionDialogComponent>,
@Inject(MAT_DIALOG_DATA) public manualRedactionInput: ManualRedactionEntry) {
@Inject(MAT_DIALOG_DATA) public addRedactionRequest: AddRedactionRequest) {
}
async ngOnInit() {
@ -46,9 +47,9 @@ export class ManualRedactionDialogComponent implements OnInit {
saveManualRedaction() {
const mre = Object.assign({}, this.manualRedactionInput);
const mre = Object.assign({}, this.addRedactionRequest);
this._enhanceManualRedaction(mre);
this._manualRedactionControllerService.updateManualRedaction({entriesToAdd: [mre]}, this._appStateService.activeProject.project.projectId, this._appStateService.activeFile.fileId).subscribe(ok => {
this._manualRedactionControllerService.requestAddRedaction(mre, this._appStateService.activeProject.project.projectId, this._appStateService.activeFile.fileId).subscribe(ok => {
this._notificationService.showToastNotification(this._translateService.instant('manual-redaction.dialog.add-redaction.success.label'), null, NotificationType.SUCCESS);
this.dialogRef.close();
}, (err) => {
@ -57,10 +58,10 @@ export class ManualRedactionDialogComponent implements OnInit {
}
private _enhanceManualRedaction(mre: ManualRedactionEntry) {
mre.type = this.redactionForm.get('dictionary').value;
mre.addToDictionary = this.redactionForm.get('addToDictionary').value;
mre.reason = this.redactionForm.get('reason').value;
private _enhanceManualRedaction(addRedactionRequest: AddRedactionRequest) {
addRedactionRequest.type = this.redactionForm.get('dictionary').value;
addRedactionRequest.addToDictionary = this.redactionForm.get('addToDictionary').value;
addRedactionRequest.reason = this.redactionForm.get('reason').value;
}
get showDictionary() {

View File

@ -28,7 +28,7 @@ export class ProjectDetailsDialogComponent implements OnInit {
}
reanalyseProject() {
this._reanalysisControllerService.reanalyseProject(this.projectDetails.project.projectId).subscribe(() => {
this._reanalysisControllerService.reanalyzeProject(this.projectDetails.project.projectId).subscribe(() => {
this.dialogRef.close();
});
}

View File

@ -114,7 +114,7 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
reanalyseFile($event: MouseEvent, fileStatus: FileStatus) {
$event.stopPropagation();
this._reanalysisControllerService.reanalyseFile(this.appStateService.activeProject.project.projectId, fileStatus.fileId).subscribe(() => {
this._reanalysisControllerService.reanalyzeFile(this.appStateService.activeProject.project.projectId, fileStatus.fileId).subscribe(() => {
this._getFileStatus();
});
}

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -66,7 +66,7 @@ export class DebugControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -146,7 +146,7 @@ export class DebugControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -226,7 +226,7 @@ export class DebugControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -310,7 +310,7 @@ export class DebugControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -16,10 +16,11 @@ import {CustomHttpUrlEncodingCodec} from '../encoder';
import {Observable} from 'rxjs';
import {DefaultColor} from '../model/defaultColor';
import {Colors} from '../model/colors';
import {Dictionary} from '../model/dictionary';
import {TypeResponse} from '../model/typeResponse';
import {TypeValue} from '../model/typeValue';
import {UpdateTypeValue} from '../model/updateTypeValue';
import {BASE_PATH} from '../variables';
import {Configuration} from '../configuration';
@ -68,7 +69,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -124,7 +125,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -185,7 +186,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -241,7 +242,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -290,7 +291,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -336,7 +337,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -367,22 +368,22 @@ export class DictionaryControllerService {
}
/**
* Retrieves default color for redaction.
* Retrieves system colors for redaction.
* None
* @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 getDefaultColor(observe?: 'body', reportProgress?: boolean): Observable<DefaultColor>;
public getColors(observe?: 'body', reportProgress?: boolean): Observable<Colors>;
public getDefaultColor(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<DefaultColor>>;
public getColors(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Colors>>;
public getDefaultColor(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<DefaultColor>>;
public getColors(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Colors>>;
public getDefaultColor(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public getColors(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -402,7 +403,7 @@ export class DictionaryControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<DefaultColor>('get', `${this.basePath}/color`,
return this.httpClient.request<Colors>('get', `${this.basePath}/color`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -433,7 +434,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -464,27 +465,27 @@ export class DictionaryControllerService {
}
/**
* Set system default color for redaction
* Set system colors for redaction
*
* @param body defaultColor
* @param body colors
* @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 setDefaultColor(body: DefaultColor, observe?: 'body', reportProgress?: boolean): Observable<any>;
public setColors(body: Colors, observe?: 'body', reportProgress?: boolean): Observable<any>;
public setDefaultColor(body: DefaultColor, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public setColors(body: Colors, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public setDefaultColor(body: DefaultColor, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public setColors(body: Colors, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public setDefaultColor(body: DefaultColor, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public setColors(body: Colors, 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 setDefaultColor.');
throw new Error('Required parameter body was null or undefined when calling setColors.');
}
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -527,13 +528,13 @@ export class DictionaryControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public updateType(body: TypeValue, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public updateType(body: UpdateTypeValue, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public updateType(body: TypeValue, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public updateType(body: UpdateTypeValue, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public updateType(body: TypeValue, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public updateType(body: UpdateTypeValue, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public updateType(body: TypeValue, type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public updateType(body: UpdateTypeValue, type: string, 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 updateType.');
@ -545,7 +546,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -606,7 +607,7 @@ export class DictionaryControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -15,8 +15,9 @@ import {HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse} from '@ang
import {CustomHttpUrlEncodingCodec} from '../encoder';
import {Observable} from 'rxjs';
import {FileUploadResult} from '../model/fileUploadResult';
import {FileIds} from '../model/fileIds';
import {FileUploadResult} from '../model/fileUploadResult';
import {BASE_PATH} from '../variables';
import {Configuration} from '../configuration';
@ -65,7 +66,7 @@ export class FileUploadControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -121,7 +122,7 @@ export class FileUploadControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -141,9 +142,8 @@ export class FileUploadControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request('get', `${this.basePath}/download/annotated/${encodeURIComponent(String(fileId))}`,
return this.httpClient.request<any>('get', `${this.basePath}/download/annotated/${encodeURIComponent(String(fileId))}`,
{
responseType: 'blob',
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -181,7 +181,7 @@ export class FileUploadControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -201,9 +201,8 @@ export class FileUploadControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request('get', `${this.basePath}/download/original/${encodeURIComponent(String(fileId))}`,
return this.httpClient.request<any>('get', `${this.basePath}/download/original/${encodeURIComponent(String(fileId))}`,
{
responseType: 'blob',
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -241,7 +240,7 @@ export class FileUploadControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -261,9 +260,8 @@ export class FileUploadControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request('get', `${this.basePath}/download/redacted/${encodeURIComponent(String(fileId))}`,
return this.httpClient.request<any>('get', `${this.basePath}/download/redacted/${encodeURIComponent(String(fileId))}`,
{
responseType: 'blob',
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -301,7 +299,7 @@ export class FileUploadControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -327,14 +325,13 @@ export class FileUploadControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.request('post', `${this.basePath}/download/report`,
return this.httpClient.request<any>('post', `${this.basePath}/download/report`,
{
body: body,
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
responseType: 'blob',
reportProgress: reportProgress
}
);
@ -368,7 +365,7 @@ export class FileUploadControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -388,9 +385,8 @@ export class FileUploadControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request('get', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`,
return this.httpClient.request<any>('get', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`,
{
responseType: 'blob',
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -409,8 +405,11 @@ export class FileUploadControllerService {
* @param reportProgress flag to report request and response progress.
*/
public uploadFileForm(file: Blob, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<FileUploadResult>;
public uploadFileForm(file: Blob, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<FileUploadResult>>;
public uploadFileForm(file: Blob, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<FileUploadResult>>;
public uploadFileForm(file: Blob, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (file === null || file === undefined) {
@ -423,7 +422,7 @@ export class FileUploadControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -54,7 +54,7 @@ export class InfoControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -72,7 +72,7 @@ export class LicenseReportControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -15,7 +15,12 @@ import {HttpClient, HttpEvent, HttpHeaders, HttpResponse} from '@angular/common/
import {Observable} from 'rxjs';
import {AddCommentRequest} from '../model/addCommentRequest';
import {AddRedactionRequest} from '../model/addRedactionRequest';
import {CommentResponse} from '../model/commentResponse';
import {ManualAddResponse} from '../model/manualAddResponse';
import {ManualRedactions} from '../model/manualRedactions';
import {RemoveRedactionRequest} from '../model/removeRedactionRequest';
import {BASE_PATH} from '../variables';
import {Configuration} from '../configuration';
@ -38,6 +43,265 @@ export class ManualRedactionControllerService {
}
}
/**
* Adds a comment to a redaction/redaction request
* None
* @param body addCommentRequest
* @param projectId projectId
* @param fileId fileId
* @param annotationId annotationId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public addComment(body: AddCommentRequest, projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean): Observable<CommentResponse>;
public addComment(body: AddCommentRequest, projectId: string, fileId: string, annotationId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<CommentResponse>>;
public addComment(body: AddCommentRequest, projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<CommentResponse>>;
public addComment(body: AddCommentRequest, projectId: string, fileId: string, annotationId: string, 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 addComment.');
}
if (projectId === null || projectId === undefined) {
throw new Error('Required parameter projectId was null or undefined when calling addComment.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling addComment.');
}
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling addComment.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
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<CommentResponse>('post', `${this.basePath}/manualRedaction/comment/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Adds a manual redaction
* None
* @param body addRedactionRequest
* @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 addRedaction(body: AddRedactionRequest, projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ManualAddResponse>;
public addRedaction(body: AddRedactionRequest, projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ManualAddResponse>>;
public addRedaction(body: AddRedactionRequest, projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ManualAddResponse>>;
public addRedaction(body: AddRedactionRequest, projectId: string, fileId: string, 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 addRedaction.');
}
if (projectId === null || projectId === undefined) {
throw new Error('Required parameter projectId was null or undefined when calling addRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling addRedaction.');
}
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<ManualAddResponse>('post', `${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Approves a redaction request/ remove redaction request
* None
* @param projectId projectId
* @param fileId fileId
* @param annotationId annotationId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public approveRequest(projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public approveRequest(projectId: string, fileId: string, annotationId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public approveRequest(projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public approveRequest(projectId: string, fileId: string, annotationId: 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 approveRequest.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling approveRequest.');
}
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling approveRequest.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('post', `${this.basePath}/manualRedaction/approve/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Declines a redaction request/ remove redaction request
* None
* @param projectId projectId
* @param fileId fileId
* @param annotationId annotationId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public declineRequest(projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public declineRequest(projectId: string, fileId: string, annotationId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public declineRequest(projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public declineRequest(projectId: string, fileId: string, annotationId: 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 declineRequest.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling declineRequest.');
}
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling declineRequest.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('post', `${this.basePath}/manualRedaction/decline/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Returns the manual redactions
* None
@ -64,7 +328,7 @@ export class ManualRedactionControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -95,37 +359,241 @@ export class ManualRedactionControllerService {
}
/**
* Updates the manual redactions
* Removes a redaction
* None
* @param body manualRedactions
* @param body removeRedactionRequest
* @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 updateManualRedaction(body: ManualRedactions, projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public removeRedaction(body: RemoveRedactionRequest, projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ManualAddResponse>;
public updateManualRedaction(body: ManualRedactions, projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public removeRedaction(body: RemoveRedactionRequest, projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ManualAddResponse>>;
public updateManualRedaction(body: ManualRedactions, projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public removeRedaction(body: RemoveRedactionRequest, projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ManualAddResponse>>;
public updateManualRedaction(body: ManualRedactions, projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public removeRedaction(body: RemoveRedactionRequest, projectId: string, fileId: string, 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 updateManualRedaction.');
throw new Error('Required parameter body was null or undefined when calling removeRedaction.');
}
if (projectId === null || projectId === undefined) {
throw new Error('Required parameter projectId was null or undefined when calling updateManualRedaction.');
throw new Error('Required parameter projectId was null or undefined when calling removeRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling updateManualRedaction.');
throw new Error('Required parameter fileId was null or undefined when calling removeRedaction.');
}
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// 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<ManualAddResponse>('post', `${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Adds a request for a redaction.
* None
* @param body addRedactionRequest
* @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 requestAddRedaction(body: AddRedactionRequest, projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ManualAddResponse>;
public requestAddRedaction(body: AddRedactionRequest, projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ManualAddResponse>>;
public requestAddRedaction(body: AddRedactionRequest, projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ManualAddResponse>>;
public requestAddRedaction(body: AddRedactionRequest, projectId: string, fileId: string, 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 requestAddRedaction.');
}
if (projectId === null || projectId === undefined) {
throw new Error('Required parameter projectId was null or undefined when calling requestAddRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling requestAddRedaction.');
}
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<ManualAddResponse>('post', `${this.basePath}/manualRedaction/request/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Adds a request to remove a redaction.
* None
* @param body removeRedactionRequest
* @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 requestRemoveRedaction(body: RemoveRedactionRequest, projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ManualAddResponse>;
public requestRemoveRedaction(body: RemoveRedactionRequest, projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ManualAddResponse>>;
public requestRemoveRedaction(body: RemoveRedactionRequest, projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ManualAddResponse>>;
public requestRemoveRedaction(body: RemoveRedactionRequest, projectId: string, fileId: string, 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 requestRemoveRedaction.');
}
if (projectId === null || projectId === undefined) {
throw new Error('Required parameter projectId was null or undefined when calling requestRemoveRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling requestRemoveRedaction.');
}
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<ManualAddResponse>('post', `${this.basePath}/manualRedaction/request/remove/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Undo a manual request or redaction
* Can only be done be the user who added the request/redaction.
* @param projectId projectId
* @param fileId fileId
* @param annotationId annotationId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public undo(projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public undo(projectId: string, fileId: string, annotationId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public undo(projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public undo(projectId: string, fileId: string, annotationId: 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 undo.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling undo.');
}
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling undo.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -141,17 +609,74 @@ export class ManualRedactionControllerService {
}
// 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);
const consumes: string[] = [];
return this.httpClient.request<any>('delete', `${this.basePath}/manualRedaction/undo/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Undo a comment
* Can only be done be the user who added the comment.
* @param projectId projectId
* @param fileId fileId
* @param annotationId annotationId
* @param commentId commentId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public undoComment(projectId: string, fileId: string, annotationId: string, commentId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public undoComment(projectId: string, fileId: string, annotationId: string, commentId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public undoComment(projectId: string, fileId: string, annotationId: string, commentId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public undoComment(projectId: string, fileId: string, annotationId: string, commentId: 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 undoComment.');
}
return this.httpClient.request<any>('post', `${this.basePath}/manualRedaction/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling undoComment.');
}
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling undoComment.');
}
if (commentId === null || commentId === undefined) {
throw new Error('Required parameter commentId was null or undefined when calling undoComment.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('delete', `${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}/${encodeURIComponent(String(commentId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -54,7 +54,7 @@ export class PdfMetaDataConfigurationControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -105,7 +105,7 @@ export class PdfMetaDataConfigurationControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -60,7 +60,7 @@ export class ProjectControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -118,7 +118,7 @@ export class ProjectControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -167,7 +167,7 @@ export class ProjectControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -213,7 +213,7 @@ export class ProjectControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -269,7 +269,7 @@ export class ProjectControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -38,32 +38,32 @@ export class ReanalysisControllerService {
}
/**
* Reanalyse a file
* Reanalyze a file
* 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 reanalyseFile(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public reanalyzeFile(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public reanalyseFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public reanalyzeFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public reanalyseFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public reanalyzeFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public reanalyseFile(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public reanalyzeFile(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 reanalyseFile.');
throw new Error('Required parameter projectId was null or undefined when calling reanalyzeFile.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling reanalyseFile.');
throw new Error('Required parameter fileId was null or undefined when calling reanalyzeFile.');
}
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -81,7 +81,7 @@ export class ReanalysisControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('post', `${this.basePath}/reanalyse/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
return this.httpClient.request<any>('post', `${this.basePath}/reanalyze/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
@ -92,27 +92,27 @@ export class ReanalysisControllerService {
}
/**
* Reanalyse all files of the project.
* Reanalyze all files of the project.
* None
* @param projectId projectId
* @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 reanalyseProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public reanalyzeProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public reanalyseProject(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public reanalyzeProject(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public reanalyseProject(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public reanalyzeProject(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public reanalyseProject(projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public reanalyzeProject(projectId: 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 reanalyseProject.');
throw new Error('Required parameter projectId was null or undefined when calling reanalyzeProject.');
}
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -130,7 +130,7 @@ export class ReanalysisControllerService {
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('post', `${this.basePath}/reanalyse/${encodeURIComponent(String(projectId))}`,
return this.httpClient.request<any>('post', `${this.basePath}/reanalyze/${encodeURIComponent(String(projectId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -59,7 +59,7 @@ export class RedactionLogControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -55,7 +55,7 @@ export class RulesControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -101,7 +101,7 @@ export class RulesControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -152,7 +152,7 @@ export class RulesControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
@ -208,7 +208,7 @@ export class RulesControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -59,7 +59,7 @@ export class StatusControllerService {
let headers = this.defaultHeaders;
// authentication (GIN-OAUTH) required
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()

View File

@ -0,0 +1,431 @@
/**
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*//* tslint:disable:no-unused-variable member-ordering */
import {Inject, Injectable, Optional} from '@angular/core';
import {HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse} from '@angular/common/http';
import {CustomHttpUrlEncodingCodec} from '../encoder';
import {Observable} from 'rxjs';
import {UserRequest} from '../model/userRequest';
import {UserResponse} from '../model/userResponse';
import {BASE_PATH} from '../variables';
import {Configuration} from '../configuration';
@Injectable()
export class UserControllerService {
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) {
this.basePath = basePath;
}
if (configuration) {
this.configuration = configuration;
this.basePath = basePath || configuration.basePath || this.basePath;
}
}
/**
* Add admin role to users
* None
* @param body userIds
* @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 addAdminRoleToUsers(body: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<any>;
public addAdminRoleToUsers(body: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public addAdminRoleToUsers(body: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public addAdminRoleToUsers(body: Array<string>, 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 addAdminRoleToUsers.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.request<any>('post', `${this.basePath}/user/admin`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Add a role to users
* None
* @param body userIds
* @param role role
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public addRoleToUsers(body: Array<string>, role: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public addRoleToUsers(body: Array<string>, role: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public addRoleToUsers(body: Array<string>, role: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public addRoleToUsers(body: Array<string>, role: string, 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 addRoleToUsers.');
}
if (role === null || role === undefined) {
throw new Error('Required parameter role was null or undefined when calling addRoleToUsers.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'application/json'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.request<any>('post', `${this.basePath}/user/role/${encodeURIComponent(String(role))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Delete admin role from users
* None
* @param body userIds
* @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 deleteAdminRoleFromUsers(body: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteAdminRoleFromUsers(body: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteAdminRoleFromUsers(body: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteAdminRoleFromUsers(body: Array<string>, 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 deleteAdminRoleFromUsers.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'*/*'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.request<any>('delete', `${this.basePath}/user/admin`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Delete a role from users
* None
* @param body userIds
* @param role role
* @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 deleteRoleFromUsers(body: Array<string>, role: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteRoleFromUsers(body: Array<string>, role: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteRoleFromUsers(body: Array<string>, role: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteRoleFromUsers(body: Array<string>, role: string, 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 deleteRoleFromUsers.');
}
if (role === null || role === undefined) {
throw new Error('Required parameter role was null or undefined when calling deleteRoleFromUsers.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [
'*/*'
];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected);
}
return this.httpClient.request<any>('delete', `${this.basePath}/user/role/${encodeURIComponent(String(role))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Gets all the users in realm with information of roles.
* None
* @param body userRequest
* @param offset offset
* @param limit limit
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<UserResponse>;
public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<UserResponse>>;
public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<UserResponse>>;
public getAllUsers(body: UserRequest, offset?: number, limit?: number, 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 getAllUsers.');
}
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
if (offset !== undefined && offset !== null) {
queryParameters = queryParameters.set('offset', <any>offset);
}
if (limit !== undefined && limit !== null) {
queryParameters = queryParameters.set('limit', <any>limit);
}
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<UserResponse>('post', `${this.basePath}/user/all`,
{
body: body,
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Gets the users who contain redaction roles.
* None
* @param body userRequest
* @param offset offset
* @param limit limit
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
* @param reportProgress flag to report request and response progress.
*/
public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<UserResponse>;
public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<UserResponse>>;
public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<UserResponse>>;
public getUsers(body: UserRequest, offset?: number, limit?: number, 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 getUsers.');
}
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
if (offset !== undefined && offset !== null) {
queryParameters = queryParameters.set('offset', <any>offset);
}
if (limit !== undefined && limit !== null) {
queryParameters = queryParameters.set('limit', <any>limit);
}
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<UserResponse>('post', `${this.basePath}/user`,
{
body: body,
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
}

View File

@ -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 AddCommentRequest {
text?: string;
}

View File

@ -0,0 +1,22 @@
/**
* 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 {AddCommentRequest} from './addCommentRequest';
import {Rectangle} from './rectangle';
export interface AddRedactionRequest {
type?: string;
value?: string;
reason?: string;
addToDictionary?: boolean;
positions?: Array<Rectangle>;
comment?: AddCommentRequest;
}

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 Colors {
defaultColor?: string;
notRedacted?: string;
requestAdd?: string;
requestRemove?: string;
}

View File

@ -3,15 +3,16 @@
* 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 Comment {
date?: string;
text?: string;
user?: string;
}
export interface Comment {
date?: string;
id?: string;
text?: string;
user?: string;
}

View File

@ -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 CommentResponse {
commentId?: string;
}

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -18,14 +18,14 @@ export interface Dictionary {
* True if the entries in this type should be matched case insensitively, default is false.
*/
caseInsensitive?: boolean;
/**
* The value of color should be in range of [0, 1].
*/
color?: Array<number>;
/**
* The list of dictionary entries of an entry type.
*/
entries?: Array<string>;
/**
* The value of color must be a correct hex color
*/
hexColor?: string;
/**
* True if the type just for hint, not for redaction, default is false.
*/

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -10,27 +10,52 @@
* Do not edit the class manually.
*/
/**
* Object containing information on a specific file.
*/
export interface FileStatus {
/**
* Date and time when the file was added to the system.
*/
added?: string;
deleted?: string;
/**
* The ID of the file.
*/
fileId?: string;
/**
* The file's name.
*/
filename?: string;
/**
* Date and time when the file was last updated.
*/
lastUpdated?: string;
/**
* The number of times the file has been analyzed.
*/
numberOfAnalyses?: number;
/**
* The number of pages of the file.
*/
numberOfPages?: number;
/**
* The ID of the project the file belongs to.
*/
projectId?: string;
/**
* The status of the file with regard to its analysis an review processes.
*/
status?: FileStatus.StatusEnum;
}
export namespace FileStatus {
export type StatusEnum = 'PROCESSING' | 'PROCESSED' | 'ERROR' | 'UNPROCESSED' | 'REPROCESS' | 'REVIEWED' | 'DELETED';
export type StatusEnum = 'PROCESSING' | 'PROCESSED' | 'ERROR' | 'UNPROCESSED' | 'REPROCESS' | 'REVIEWED';
export const StatusEnum = {
PROCESSING: 'PROCESSING' as StatusEnum,
PROCESSED: 'PROCESSED' as StatusEnum,
ERROR: 'ERROR' as StatusEnum,
UNPROCESSED: 'UNPROCESSED' as StatusEnum,
REPROCESS: 'REPROCESS' as StatusEnum,
REVIEWED: 'REVIEWED' as StatusEnum,
DELETED: 'DELETED' as StatusEnum
REVIEWED: 'REVIEWED' as StatusEnum
};
}

View File

@ -3,17 +3,27 @@
* 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 {Comment} from './comment';
export interface IdRemoval {
approved?: boolean;
comments?: Array<Comment>;
id?: string;
removeFromDictionary?: boolean;
}
export interface IdRemoval {
comments?: Array<Comment>;
id?: string;
removeFromDictionary?: boolean;
status?: IdRemoval.StatusEnum;
user?: string;
}
export namespace IdRemoval {
export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED';
export const StatusEnum = {
REQUESTED: 'REQUESTED' as StatusEnum,
APPROVED: 'APPROVED' as StatusEnum,
DECLINED: 'DECLINED' as StatusEnum
};
}

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -11,8 +11,8 @@
*/
export interface LicenseReportRequest {
endDate?: Date;
projectIds?: Array<string>;
requestId?: string;
startDate?: Date;
endDate?: Date;
projectIds?: Array<string>;
}

View File

@ -0,0 +1,16 @@
/**
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface ManualAddResponse {
annotationId?: string;
commentId?: string;
}

View File

@ -3,21 +3,32 @@
* 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';
import {Comment} from './comment';
import {Rectangle} from './rectangle';
export interface ManualRedactionEntry {
addToDictionary?: boolean;
approved?: boolean;
comments?: Array<Comment>;
positions?: Array<Rectangle>;
reason?: string;
type?: string;
value?: string;
}
export interface ManualRedactionEntry {
addToDictionary?: boolean;
comments?: Array<Comment>;
id?: string;
positions?: Array<Rectangle>;
reason?: string;
status?: ManualRedactionEntry.StatusEnum;
type?: string;
user?: string;
value?: string;
}
export namespace ManualRedactionEntry {
export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED';
export const StatusEnum = {
REQUESTED: 'REQUESTED' as StatusEnum,
APPROVED: 'APPROVED' as StatusEnum,
DECLINED: 'DECLINED' as StatusEnum
};
}

View File

@ -3,16 +3,16 @@
* 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 { IdRemoval } from './idRemoval';
import { ManualRedactionEntry } from './manualRedactionEntry';
import {IdRemoval} from './idRemoval';
import {ManualRedactionEntry} from './manualRedactionEntry';
export interface ManualRedactions {
entriesToAdd?: Array<ManualRedactionEntry>;
idsToRemove?: Array<IdRemoval>;
}
export interface ManualRedactions {
entriesToAdd?: Array<ManualRedactionEntry>;
idsToRemove?: Array<IdRemoval>;
}

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,9 +1,17 @@
export * from './defaultColor';
export * from './addCommentRequest';
export * from './addRedactionRequest';
export * from './authInfo';
export * from './colors';
export * from './comment';
export * from './commentResponse';
export * from './dictionary';
export * from './fileIds';
export * from './fileStatus';
export * from './fileUploadResult';
export * from './idRemoval';
export * from './licenseReport';
export * from './licenseReportRequest';
export * from './manualAddResponse';
export * from './manualRedactionEntry';
export * from './manualRedactions';
export * from './modelFile';
@ -14,11 +22,12 @@ export * from './projectRequest';
export * from './rectangle';
export * from './redactionLog';
export * from './redactionLogEntry';
export * from './removeRedactionRequest';
export * from './reportData';
export * from './rules';
export * from './typeResponse';
export * from './typeValue';
export * from './fileUploadResult';
export * from './authInfo';
export * from './comment';
export * from './idRemoval';
export * from './updateTypeValue';
export * from './user';
export * from './userRequest';
export * from './userResponse';

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -13,6 +13,8 @@
export interface Project {
date?: string;
description?: string;
memberIds?: Array<string>;
ownerId?: string;
projectId?: string;
projectName?: string;
status?: Project.StatusEnum;

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -11,6 +11,6 @@
*/
export interface ProjectRequest {
description?: string;
projectName?: string;
description?: string;
}

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -21,6 +21,16 @@ export interface RedactionLogEntry {
redacted?: boolean;
section?: string;
sectionNumber?: number;
status?: RedactionLogEntry.StatusEnum;
type?: string;
value?: string;
}
export namespace RedactionLogEntry {
export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED';
export const StatusEnum = {
REQUESTED: 'REQUESTED' as StatusEnum,
APPROVED: 'APPROVED' as StatusEnum,
DECLINED: 'DECLINED' as StatusEnum
};
}

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.
*/
import {AddCommentRequest} from './addCommentRequest';
export interface RemoveRedactionRequest {
annotationId?: string;
removeFromDictionary?: boolean;
comment?: AddCommentRequest;
}

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*

View File

@ -1,6 +1,6 @@
/**
* Api Documentation
* Api Documentation
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
@ -19,9 +19,9 @@ export interface TypeValue {
*/
caseInsensitive?: boolean;
/**
* The value of color should be in range of [0, 1].
* The value of color must be a correct hex color
*/
color?: Array<number>;
hexColor?: string;
/**
* True if the type just for hint, not for redaction, default is false.
*/

View File

@ -0,0 +1,29 @@
/**
* 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.
*/
/**
* Object containing information of type to be updated.
*/
export interface UpdateTypeValue {
/**
* True if the entries in this type should be matched case insensitively, default is false.
*/
caseInsensitive?: boolean;
/**
* The value of color must be a correct hex color
*/
hexColor?: string;
/**
* True if the type just for hint, not for redaction, default is false.
*/
hint?: boolean;
}

View File

@ -0,0 +1,41 @@
/**
* 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.
*/
/**
* Object containing information of user and roles.
*/
export interface User {
/**
* Email of user.
*/
email?: string;
/**
* First name of user.
*/
firstName?: string;
/**
* Last name of user.
*/
lastName?: string;
/**
* The list of RED_* roles.
*/
roles?: Array<string>;
/**
* Id of user.
*/
userId?: string;
/**
* Username for login.
*/
username?: string;
}

View File

@ -0,0 +1,16 @@
/**
* API Documentation for Redaction Gateway
* Description for redaction
*
* OpenAPI spec version: 1.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
export interface UserRequest {
search?: string;
requestId?: string;
}

View File

@ -0,0 +1,34 @@
/**
* 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 {User} from './user';
/**
* Object containing a list of values of user.
*/
export interface UserResponse {
/**
* True if there is next page.
*/
hasNextPage?: boolean;
/**
* The requestId generated by server.
*/
requestId?: string;
/**
* Total number of available users.
*/
total?: number;
/**
* The list of user, which includes all the important information about a user.
*/
users?: Array<User>;
}