red-ui/libs/red-ui-http/src/lib/api/manualRedactionController.service.ts
2021-07-19 16:44:55 +03:00

1407 lines
54 KiB
TypeScript

/**
* 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, HttpResponse } from '@angular/common/http';
import { Observable } from 'rxjs';
import { AddCommentRequest } from '../model/addCommentRequest';
import { AddRedactionRequest } from '../model/addRedactionRequest';
import { ApproveRequest } from '../model/approveRequest';
import { CommentResponse } from '../model/commentResponse';
import { ForceRedactionRequest } from '../model/forceRedactionRequest';
import { ImageRecategorizationRequest } from '../model/imageRecategorizationRequest';
import { LegalBasisChangeRequest } from '../model/legalBasisChangeRequest';
import { ManualAddResponse } from '../model/manualAddResponse';
import { ManualRedactions } from '../model/manualRedactions';
import { RemoveRedactionRequest } from '../model/removeRedactionRequest';
import { BASE_PATH } from '../variables';
import { Configuration } from '../configuration';
@Injectable()
export class ManualRedactionControllerService {
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;
}
}
/**
* Adds a comment to a redaction/redaction request
* None
* @param body addCommentRequest
* @param annotationId annotationId
* @param dossierId dossierId
* @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 addComment(
body: AddCommentRequest,
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<CommentResponse>;
public addComment(
body: AddCommentRequest,
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<CommentResponse>>;
public addComment(
body: AddCommentRequest,
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<CommentResponse>>;
public addComment(
body: AddCommentRequest,
annotationId: string,
dossierId: 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 addComment.');
}
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling addComment.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling addComment.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId 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(dossierId))}/${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 dossierId dossierId
* @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,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public addRedaction(
body: AddRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public addRedaction(
body: AddRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public addRedaction(
body: AddRedactionRequest,
dossierId: 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 (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling addRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling addRedaction.');
}
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(dossierId))}/${encodeURIComponent(String(fileId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Approves a redaction request/ remove redaction request
* None
* @param body approveRequest
* @param annotationId annotationId
* @param dossierId dossierId
* @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 approveRequest(
body: ApproveRequest,
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public approveRequest(
body: ApproveRequest,
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public approveRequest(
body: ApproveRequest,
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public approveRequest(
body: ApproveRequest,
annotationId: string,
dossierId: 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 approveRequest.');
}
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling approveRequest.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling approveRequest.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId 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[] = ['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}/manualRedaction/approve/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(
String(fileId)
)}/${encodeURIComponent(String(annotationId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Declines a redaction request/ remove redaction request
* None
* @param annotationId annotationId
* @param dossierId dossierId
* @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 declineRequest(
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public declineRequest(
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public declineRequest(
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public declineRequest(
annotationId: string,
dossierId: string,
fileId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling declineRequest.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling declineRequest.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId 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);
}
return this.httpClient.request<any>(
'post',
`${this.basePath}/manualRedaction/decline/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(
String(fileId)
)}/${encodeURIComponent(String(annotationId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Forces a redaction
* None
* @param body forceRedactionRequest
* @param dossierId dossierId
* @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 forceRedaction(
body: ForceRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public forceRedaction(
body: ForceRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public forceRedaction(
body: ForceRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public forceRedaction(
body: ForceRedactionRequest,
dossierId: 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 forceRedaction.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling forceRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling forceRedaction.');
}
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/force/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(
String(fileId)
)}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Returns the manual redactions
* None
* @param dossierId dossierId
* @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 getManualRedaction(dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ManualRedactions>;
public getManualRedaction(
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualRedactions>>;
public getManualRedaction(
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualRedactions>>;
public getManualRedaction(dossierId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling getManualRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling getManualRedaction.');
}
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);
}
return this.httpClient.request<ManualRedactions>(
'get',
`${this.basePath}/manualRedaction/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Changes a legal basis reason
* None
* @param body legalBasisChangeRequest
* @param dossierId dossierId
* @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 legalBasisChange(
body: LegalBasisChangeRequest,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public legalBasisChange(
body: LegalBasisChangeRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public legalBasisChange(
body: LegalBasisChangeRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public legalBasisChange(
body: LegalBasisChangeRequest,
dossierId: 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 legalBasisChange.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling legalBasisChange.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling legalBasisChange.');
}
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/legalBasisChange/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(
String(fileId)
)}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Recategorizes an image
* None
* @param body imageRecategorizationRequest
* @param dossierId dossierId
* @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 recategorizeImage(
body: ImageRecategorizationRequest,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public recategorizeImage(
body: ImageRecategorizationRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public recategorizeImage(
body: ImageRecategorizationRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public recategorizeImage(
body: ImageRecategorizationRequest,
dossierId: 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 recategorizeImage.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling recategorizeImage.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling recategorizeImage.');
}
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/recategorize/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(
String(fileId)
)}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Removes a redaction
* None
* @param body removeRedactionRequest
* @param dossierId dossierId
* @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 removeRedaction(
body: RemoveRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public removeRedaction(
body: RemoveRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public removeRedaction(
body: RemoveRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public removeRedaction(
body: RemoveRedactionRequest,
dossierId: 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 removeRedaction.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling removeRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling removeRedaction.');
}
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/remove/${encodeURIComponent(String(dossierId))}/${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 dossierId dossierId
* @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,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public requestAddRedaction(
body: AddRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public requestAddRedaction(
body: AddRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public requestAddRedaction(
body: AddRedactionRequest,
dossierId: 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 (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling requestAddRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling requestAddRedaction.');
}
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(dossierId))}/${encodeURIComponent(String(fileId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Adds a request to force a redaction.
* None
* @param body forceRedactionRequest
* @param dossierId dossierId
* @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 requestForceRedaction(
body: ForceRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public requestForceRedaction(
body: ForceRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public requestForceRedaction(
body: ForceRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public requestForceRedaction(
body: ForceRedactionRequest,
dossierId: 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 requestForceRedaction.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling requestForceRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling requestForceRedaction.');
}
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/force/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(String(fileId))}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Adds a request to recategorize a image.
* None
* @param body imageRecategorizationRequest
* @param dossierId dossierId
* @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 requestImageRecategorization(
body: ImageRecategorizationRequest,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public requestImageRecategorization(
body: ImageRecategorizationRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public requestImageRecategorization(
body: ImageRecategorizationRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public requestImageRecategorization(
body: ImageRecategorizationRequest,
dossierId: 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 requestImageRecategorization.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling requestImageRecategorization.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling requestImageRecategorization.');
}
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/recategorize/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(
String(fileId)
)}`,
{
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
/**
* Adds a request to change the legal basis reason.
* None
* @param body legalBasisChangeRequest
* @param dossierId dossierId
* @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 requestLegalBasisChange(
body: LegalBasisChangeRequest,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public requestLegalBasisChange(
body: LegalBasisChangeRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public requestLegalBasisChange(
body: LegalBasisChangeRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public requestLegalBasisChange(
body: LegalBasisChangeRequest,
dossierId: 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 requestLegalBasisChange.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling requestLegalBasisChange.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling requestLegalBasisChange.');
}
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/legalBasis/${encodeURIComponent(String(dossierId))}/${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 dossierId dossierId
* @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,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<ManualAddResponse>;
public requestRemoveRedaction(
body: RemoveRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>;
public requestRemoveRedaction(
body: RemoveRedactionRequest,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>;
public requestRemoveRedaction(
body: RemoveRedactionRequest,
dossierId: 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 (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling requestRemoveRedaction.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling requestRemoveRedaction.');
}
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(dossierId))}/${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 annotationId annotationId
* @param dossierId dossierId
* @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 undo(annotationId: string, dossierId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public undo(
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public undo(
annotationId: string,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public undo(
annotationId: string,
dossierId: string,
fileId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (annotationId === null || annotationId === undefined) {
throw new Error('Required parameter annotationId was null or undefined when calling undo.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling undo.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId 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() : 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);
}
return this.httpClient.request<any>(
'delete',
`${this.basePath}/manualRedaction/undo/${encodeURIComponent(String(dossierId))}/${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 annotationId annotationId
* @param commentId commentId
* @param dossierId dossierId
* @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 undoComment(
annotationId: string,
commentId: string,
dossierId: string,
fileId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public undoComment(
annotationId: string,
commentId: string,
dossierId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public undoComment(
annotationId: string,
commentId: string,
dossierId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public undoComment(
annotationId: string,
commentId: string,
dossierId: string,
fileId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
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.');
}
if (dossierId === null || dossierId === undefined) {
throw new Error('Required parameter dossierId was null or undefined when calling undoComment.');
}
if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling undoComment.');
}
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
return this.httpClient.request<any>(
'delete',
`${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent(String(dossierId))}/${encodeURIComponent(
String(fileId)
)}/${encodeURIComponent(String(annotationId))}/${encodeURIComponent(String(commentId))}`,
{
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
}
}