ruleSet basics

This commit is contained in:
Timo 2021-01-06 14:59:27 +02:00
parent 3959db3ffa
commit caec8cc007
32 changed files with 1558 additions and 1331 deletions

View File

@ -5,10 +5,11 @@
To regnerate http rune swaagger To regnerate http rune swaagger
``` ```
BASE=https://redapi-staging.iqser.cloud/ BASE=http://localhost:8080/
URL="$BASE"v2/api-docs?group=redaction-gateway-v1 URL="$BASE"v2/api-docs?group=redaction-gateway-v1
mkdir -p /tmp/swagger mkdir -p /tmp/swagger
swagger-codegen generate -i "$URL" -l typescript-angular -o /tmp/swagger swagger-codegen generate -i "$URL" -l typescript-angular -o /tmp/swagger
cd /tmp/swagger
``` ```
## To Create a new Stack in rancher ## To Create a new Stack in rancher

View File

@ -1,5 +1,5 @@
{ {
"OAUTH_URL": "https://redkc-staging.iqser.cloud/auth/realms/redaction", "OAUTH_URL": "https://redkc-staging.iqser.cloud/auth/realms/redaction",
"OAUTH_CLIENT_ID": "redaction", "OAUTH_CLIENT_ID": "redaction",
"API_URL": "https://redapi-staging.iqser.cloud" "API_URL": "https://timo-redaction-dev.iqser.cloud"
} }

View File

@ -1,25 +1,31 @@
import { VersionsControllerService } from './versionsController.service';
export * from './debugController.service'; export * from './debugController.service';
import { DebugControllerService } from './debugController.service'; import { DebugControllerService } from './debugController.service';
import { DictionaryControllerService } from './dictionaryController.service'; import { DictionaryControllerService } from './dictionaryController.service';
import { FileManagementControllerService } from './fileManagementController.service'; import { FileManagementControllerService } from './fileManagementController.service';
import { InfoControllerService } from './infoController.service';
import { LegalBasisMappingControllerService } from './legalBasisMappingController.service';
import { LicenseReportControllerService } from './licenseReportController.service'; import { LicenseReportControllerService } from './licenseReportController.service';
import { ManualRedactionControllerService } from './manualRedactionController.service'; import { ManualRedactionControllerService } from './manualRedactionController.service';
import { ProjectControllerService } from './projectController.service'; import { ProjectControllerService } from './projectController.service';
import { ReanalysisControllerService } from './reanalysisController.service'; import { ReanalysisControllerService } from './reanalysisController.service';
import { RedactionLogControllerService } from './redactionLogController.service'; import { RedactionLogControllerService } from './redactionLogController.service';
import { RuleSetControllerService } from './ruleSetController.service';
import { RulesControllerService } from './rulesController.service'; import { RulesControllerService } from './rulesController.service';
import { StatusControllerService } from './statusController.service'; import { StatusControllerService } from './statusController.service';
import { UserControllerService } from './userController.service'; import { UserControllerService } from './userController.service';
import { UserPreferenceControllerService } from './userPreferenceController.service';
import { VersionsControllerService } from './versionsController.service';
import { ViewedPagesControllerService } from './viewedPagesController.service'; import { ViewedPagesControllerService } from './viewedPagesController.service';
import { LegalBasisMappingControllerService } from './legalBasisMappingController.service';
import { WatermarkControllerService } from './watermarkController.service'; import { WatermarkControllerService } from './watermarkController.service';
export * from './dictionaryController.service'; export * from './dictionaryController.service';
export * from './fileManagementController.service'; export * from './fileManagementController.service';
export * from './infoController.service';
export * from './legalBasisMappingController.service';
export * from './licenseReportController.service'; export * from './licenseReportController.service';
export * from './manualRedactionController.service'; export * from './manualRedactionController.service';
@ -30,34 +36,39 @@ export * from './reanalysisController.service';
export * from './redactionLogController.service'; export * from './redactionLogController.service';
export * from './ruleSetController.service';
export * from './rulesController.service'; export * from './rulesController.service';
export * from './statusController.service'; export * from './statusController.service';
export * from './userController.service'; export * from './userController.service';
export * from './userPreferenceController.service';
export * from './versionsController.service'; export * from './versionsController.service';
export * from './viewedPagesController.service'; export * from './viewedPagesController.service';
export * from './legalBasisMappingController.service';
export * from './watermarkController.service'; export * from './watermarkController.service';
export const APIS = [ export const APIS = [
DebugControllerService, DebugControllerService,
DictionaryControllerService, DictionaryControllerService,
FileManagementControllerService, FileManagementControllerService,
InfoControllerService,
LegalBasisMappingControllerService,
LicenseReportControllerService, LicenseReportControllerService,
ManualRedactionControllerService, ManualRedactionControllerService,
ProjectControllerService, ProjectControllerService,
ReanalysisControllerService, ReanalysisControllerService,
RedactionLogControllerService, RedactionLogControllerService,
RuleSetControllerService,
RulesControllerService, RulesControllerService,
StatusControllerService, StatusControllerService,
UserControllerService, UserControllerService,
UserPreferenceControllerService,
VersionsControllerService, VersionsControllerService,
ViewedPagesControllerService, ViewedPagesControllerService,
LegalBasisMappingControllerService,
WatermarkControllerService WatermarkControllerService
]; ];

View File

@ -68,7 +68,7 @@ export class DebugControllerService {
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/octet-stream']; const httpHeaderAccepts: string[] = ['*/*'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
@ -138,7 +138,7 @@ export class DebugControllerService {
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/octet-stream']; const httpHeaderAccepts: string[] = ['*/*'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
@ -165,8 +165,7 @@ export class DebugControllerService {
formParams = (formParams.append('file', <any>file) as any) || formParams; formParams = (formParams.append('file', <any>file) as any) || formParams;
} }
return this.httpClient.request('post', `${this.basePath}/debug/htmlTables`, { return this.httpClient.request<any>('post', `${this.basePath}/debug/htmlTables`, {
responseType: 'text',
body: convertFormParamsToString ? formParams.toString() : formParams, body: convertFormParamsToString ? formParams.toString() : formParams,
params: queryParameters, params: queryParameters,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
@ -209,7 +208,7 @@ export class DebugControllerService {
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/octet-stream']; const httpHeaderAccepts: string[] = ['*/*'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
@ -283,7 +282,7 @@ export class DebugControllerService {
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/octet-stream']; const httpHeaderAccepts: string[] = ['*/*'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts); const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);

View File

@ -27,9 +27,9 @@ import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class DictionaryControllerService { export class DictionaryControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
if (basePath) { if (basePath) {
@ -41,33 +41,44 @@ export class DictionaryControllerService {
} }
} }
/**
* @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;
}
/** /**
* Add dictionary entries with entry type. * Add dictionary entries with entry type.
* None * None
* @param body entries * @param body entries
* @param type type * @param type type
* @param ruleSetId ruleSetId
* @param removeCurrent removeCurrent * @param removeCurrent removeCurrent
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public addEntry(body: Array<string>, type: string, removeCurrent?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>; public addEntry(body: Array<string>, type: string, ruleSetId: string, removeCurrent?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
public addEntry(body: Array<string>, type: string, removeCurrent?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public addEntry(body: Array<string>, type: string, removeCurrent?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public addEntry(
public addEntry(body: Array<string>, type: string, removeCurrent?: boolean, observe: any = 'body', reportProgress: boolean = false): Observable<any> { body: Array<string>,
type: string,
ruleSetId: string,
removeCurrent?: boolean,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public addEntry(
body: Array<string>,
type: string,
ruleSetId: string,
removeCurrent?: boolean,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public addEntry(
body: Array<string>,
type: string,
ruleSetId: string,
removeCurrent?: boolean,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling addEntry.'); throw new Error('Required parameter body was null or undefined when calling addEntry.');
} }
@ -76,6 +87,10 @@ export class DictionaryControllerService {
throw new Error('Required parameter type was null or undefined when calling addEntry.'); throw new Error('Required parameter type was null or undefined when calling addEntry.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling addEntry.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (removeCurrent !== undefined && removeCurrent !== null) { if (removeCurrent !== undefined && removeCurrent !== null) {
queryParameters = queryParameters.set('removeCurrent', <any>removeCurrent); queryParameters = queryParameters.set('removeCurrent', <any>removeCurrent);
@ -103,31 +118,43 @@ export class DictionaryControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/${encodeURIComponent(String(type))}`, { return this.httpClient.request<any>(
body: body, 'post',
params: queryParameters, `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
withCredentials: this.configuration.withCredentials, {
headers: headers, body: body,
observe: observe, params: queryParameters,
reportProgress: reportProgress withCredentials: this.configuration.withCredentials,
}); headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
* Creates entry type with colors, hint and caseInsensitive * Creates entry type with colors, hint and caseInsensitive
* None * None
* @param body typeValue * @param body typeValue
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public addType(body: TypeValue, observe?: 'body', reportProgress?: boolean): Observable<any>; public addType(body: TypeValue, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public addType(body: TypeValue, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public addType(body: TypeValue, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public addType(body: TypeValue, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public addType(body: TypeValue, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public addType(body: TypeValue, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public addType(body: TypeValue, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling addType.'); throw new Error('Required parameter body was null or undefined when calling addType.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling addType.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -150,7 +177,7 @@ export class DictionaryControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/type`, { return this.httpClient.request<any>('post', `${this.basePath}/dictionary/type/${encodeURIComponent(String(ruleSetId))}`, {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -164,19 +191,27 @@ export class DictionaryControllerService {
* None * None
* @param body entries * @param body entries
* @param type type * @param type type
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteEntry(body: Array<string>, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public deleteEntries(body: Array<string>, type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteEntry(body: Array<string>, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteEntry(body: Array<string>, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public deleteEntries(body: Array<string>, type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteEntry(body: Array<string>, type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public deleteEntries(body: Array<string>, type: string, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteEntries(body: Array<string>, type: string, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling deleteEntry.'); throw new Error('Required parameter body was null or undefined when calling deleteEntries.');
} }
if (type === null || type === undefined) { if (type === null || type === undefined) {
throw new Error('Required parameter type was null or undefined when calling deleteEntry.'); throw new Error('Required parameter type was null or undefined when calling deleteEntries.');
}
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling deleteEntries.');
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
@ -195,34 +230,51 @@ export class DictionaryControllerService {
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['*/*']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>('delete', `${this.basePath}/dictionary/${encodeURIComponent(String(type))}`, { return this.httpClient.request<any>(
body: body, 'post',
withCredentials: this.configuration.withCredentials, `${this.basePath}/dictionary/delete/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
headers: headers, {
observe: observe, body: body,
reportProgress: reportProgress withCredentials: this.configuration.withCredentials,
}); headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
* Deletes entry type * Delete dictionary entry with entry type.
* None * None
* @param type type * @param type type
* @param ruleSetId ruleSetId
* @param entry entry
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteType(type: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public deleteEntry(type: string, ruleSetId: string, entry: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteType(type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteType(type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public deleteEntry(type: string, ruleSetId: string, entry: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteType(type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public deleteEntry(type: string, ruleSetId: string, entry: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteEntry(type: string, ruleSetId: string, entry: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (type === null || type === undefined) { if (type === null || type === undefined) {
throw new Error('Required parameter type was null or undefined when calling deleteType.'); throw new Error('Required parameter type was null or undefined when calling deleteEntry.');
}
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling deleteEntry.');
}
if (entry === null || entry === undefined) {
throw new Error('Required parameter entry was null or undefined when calling deleteEntry.');
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
@ -243,32 +295,39 @@ export class DictionaryControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<any>('delete', `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}`, { return this.httpClient.request<any>(
withCredentials: this.configuration.withCredentials, 'delete',
headers: headers, `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}/${encodeURIComponent(String(entry))}`,
observe: observe, {
reportProgress: reportProgress withCredentials: this.configuration.withCredentials,
}); headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
* Delete dictionary entries with entry type. * Deletes entry type
* None * None
* @param body entries
* @param type type * @param type type
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteEntries(body: Array<string>, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public deleteType(type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteEntries(body: Array<string>, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteEntries(body: Array<string>, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public deleteType(type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteEntries(body: Array<string>, type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) { public deleteType(type: string, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
throw new Error('Required parameter body was null or undefined when calling deleteEntries.');
public deleteType(type: string, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (type === null || type === undefined) {
throw new Error('Required parameter type was null or undefined when calling deleteType.');
} }
if (type === null || type === undefined) { if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter type was null or undefined when calling deleteEntries.'); throw new Error('Required parameter ruleSetId was null or undefined when calling deleteType.');
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
@ -287,36 +346,43 @@ export class DictionaryControllerService {
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; 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>('post', `${this.basePath}/dictionary/delete/${encodeURIComponent(String(type))}`, { return this.httpClient.request<any>(
body: body, 'delete',
withCredentials: this.configuration.withCredentials, `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
headers: headers, {
observe: observe, withCredentials: this.configuration.withCredentials,
reportProgress: reportProgress headers: headers,
}); observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
* Returns file containing the the dictionary entries for given type.. * Returns file containing the the dictionary entries for given type..
* *
* @param type type * @param type type
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public downloadDictionaryFile(type: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public downloadDictionaryFile(type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public downloadDictionaryFile(type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public downloadDictionaryFile(type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public downloadDictionaryFile(type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public downloadDictionaryFile(type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public downloadDictionaryFile(type: string, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public downloadDictionaryFile(type: string, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (type === null || type === undefined) { if (type === null || type === undefined) {
throw new Error('Required parameter type was null or undefined when calling downloadDictionaryFile.'); throw new Error('Required parameter type was null or undefined when calling downloadDictionaryFile.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling downloadDictionaryFile.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -335,24 +401,36 @@ export class DictionaryControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<any>('get', `${this.basePath}/dictionary/download/${encodeURIComponent(String(type))}`, { return this.httpClient.request<any>(
withCredentials: this.configuration.withCredentials, 'get',
headers: headers, `${this.basePath}/dictionary/download/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
observe: observe, {
reportProgress: reportProgress withCredentials: this.configuration.withCredentials,
}); headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
* Retrieve all entry types * Retrieve all entry types
* None * None
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getAllTypes(observe?: 'body', reportProgress?: boolean): Observable<TypeResponse>; public getAllTypes(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<TypeResponse>;
public getAllTypes(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<TypeResponse>>;
public getAllTypes(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<TypeResponse>>; public getAllTypes(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<TypeResponse>>;
public getAllTypes(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public getAllTypes(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<TypeResponse>>;
public getAllTypes(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling getAllTypes.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -371,7 +449,7 @@ export class DictionaryControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<TypeResponse>('get', `${this.basePath}/dictionary/type`, { return this.httpClient.request<TypeResponse>('get', `${this.basePath}/dictionary/type/${encodeURIComponent(String(ruleSetId))}`, {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
observe: observe, observe: observe,
@ -382,13 +460,21 @@ export class DictionaryControllerService {
/** /**
* Retrieves system colors for redaction. * Retrieves system colors for redaction.
* None * None
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getColors(observe?: 'body', reportProgress?: boolean): Observable<Colors>; public getColors(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<Colors>;
public getColors(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Colors>>;
public getColors(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Colors>>; public getColors(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Colors>>;
public getColors(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public getColors(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Colors>>;
public getColors(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling getColors.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -407,7 +493,7 @@ export class DictionaryControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<Colors>('get', `${this.basePath}/color`, { return this.httpClient.request<Colors>('get', `${this.basePath}/color/${encodeURIComponent(String(ruleSetId))}`, {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
observe: observe, observe: observe,
@ -419,17 +505,25 @@ export class DictionaryControllerService {
* Retrieves all dictionary entries of an entry type * Retrieves all dictionary entries of an entry type
* None * None
* @param type type * @param type type
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getDictionaryForType(type: string, observe?: 'body', reportProgress?: boolean): Observable<Dictionary>; public getDictionaryForType(type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<Dictionary>;
public getDictionaryForType(type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Dictionary>>;
public getDictionaryForType(type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Dictionary>>; public getDictionaryForType(type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Dictionary>>;
public getDictionaryForType(type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public getDictionaryForType(type: string, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Dictionary>>;
public getDictionaryForType(type: string, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (type === null || type === undefined) { if (type === null || type === undefined) {
throw new Error('Required parameter type was null or undefined when calling getDictionaryForType.'); throw new Error('Required parameter type was null or undefined when calling getDictionaryForType.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling getDictionaryForType.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -448,29 +542,41 @@ export class DictionaryControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<Dictionary>('get', `${this.basePath}/dictionary/${encodeURIComponent(String(type))}`, { return this.httpClient.request<Dictionary>(
withCredentials: this.configuration.withCredentials, 'get',
headers: headers, `${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
observe: observe, {
reportProgress: reportProgress withCredentials: this.configuration.withCredentials,
}); headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
* Set system colors for redaction * Set system colors for redaction
* *
* @param body colors * @param body colors
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public setColors(body: Colors, observe?: 'body', reportProgress?: boolean): Observable<any>; public setColors(body: Colors, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public setColors(body: Colors, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public setColors(body: Colors, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public setColors(body: Colors, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public setColors(body: Colors, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public setColors(body: Colors, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public setColors(body: Colors, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling setColors.'); throw new Error('Required parameter body was null or undefined when calling setColors.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling setColors.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -493,7 +599,7 @@ export class DictionaryControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>('post', `${this.basePath}/color`, { return this.httpClient.request<any>('post', `${this.basePath}/color/${encodeURIComponent(String(ruleSetId))}`, {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -507,13 +613,17 @@ export class DictionaryControllerService {
* None * None
* @param body typeValue * @param body typeValue
* @param type type * @param type type
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public updateType(body: UpdateTypeValue, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public updateType(body: UpdateTypeValue, type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public updateType(body: UpdateTypeValue, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public updateType(body: UpdateTypeValue, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public updateType(body: UpdateTypeValue, type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public updateType(body: UpdateTypeValue, type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public updateType(body: UpdateTypeValue, type: string, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public updateType(body: UpdateTypeValue, type: string, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling updateType.'); throw new Error('Required parameter body was null or undefined when calling updateType.');
} }
@ -522,6 +632,10 @@ export class DictionaryControllerService {
throw new Error('Required parameter type was null or undefined when calling updateType.'); throw new Error('Required parameter type was null or undefined when calling updateType.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling updateType.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -544,13 +658,17 @@ export class DictionaryControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}`, { return this.httpClient.request<any>(
body: body, 'post',
withCredentials: this.configuration.withCredentials, `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
headers: headers, {
observe: observe, body: body,
reportProgress: reportProgress withCredentials: this.configuration.withCredentials,
}); headers: headers,
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
@ -558,13 +676,17 @@ export class DictionaryControllerService {
* *
* @param file * @param file
* @param type type * @param type type
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public uploadDictionaryFileForm(file: Blob, type: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public uploadDictionaryFileForm(file: Blob, type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public uploadDictionaryFileForm(file: Blob, type: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public uploadDictionaryFileForm(file: Blob, type: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public uploadDictionaryFileForm(file: Blob, type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public uploadDictionaryFileForm(file: Blob, type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public uploadDictionaryFileForm(file: Blob, type: string, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public uploadDictionaryFileForm(file: Blob, type: string, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (file === null || file === undefined) { if (file === null || file === undefined) {
throw new Error('Required parameter file was null or undefined when calling uploadDictionaryFile.'); throw new Error('Required parameter file was null or undefined when calling uploadDictionaryFile.');
} }
@ -573,6 +695,10 @@ export class DictionaryControllerService {
throw new Error('Required parameter type was null or undefined when calling uploadDictionaryFile.'); throw new Error('Required parameter type was null or undefined when calling uploadDictionaryFile.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling uploadDictionaryFile.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -609,12 +735,30 @@ export class DictionaryControllerService {
formParams = (formParams.append('file', <any>file) as any) || formParams; formParams = (formParams.append('file', <any>file) as any) || formParams;
} }
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/upload/${encodeURIComponent(String(type))}`, { return this.httpClient.request<any>(
body: convertFormParamsToString ? formParams.toString() : formParams, 'post',
withCredentials: this.configuration.withCredentials, `${this.basePath}/dictionary/upload/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
headers: headers, {
observe: observe, body: convertFormParamsToString ? formParams.toString() : formParams,
reportProgress: reportProgress 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

@ -25,9 +25,9 @@ import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class FileManagementControllerService { export class FileManagementControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
if (basePath) { if (basePath) {
@ -39,20 +39,6 @@ export class FileManagementControllerService {
} }
} }
/**
* @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;
}
/** /**
* Deletes a file for a given projectId and FileId * Deletes a file for a given projectId and FileId
* None * None
@ -62,8 +48,11 @@ export class FileManagementControllerService {
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteFile(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public deleteFile(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; public deleteFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public deleteFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteFile(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> { public deleteFile(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error('Required parameter projectId was null or undefined when calling deleteFile.'); throw new Error('Required parameter projectId was null or undefined when calling deleteFile.');
@ -112,8 +101,11 @@ export class FileManagementControllerService {
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public deleteFiles(body: Array<string>, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public deleteFiles(body: Array<string>, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteFiles(body: Array<string>, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>; public deleteFiles(body: Array<string>, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteFiles(body: Array<string>, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public deleteFiles(body: Array<string>, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteFiles(body: Array<string>, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> { public deleteFiles(body: Array<string>, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling deleteFiles.'); throw new Error('Required parameter body was null or undefined when calling deleteFiles.');
@ -195,6 +187,9 @@ export class FileManagementControllerService {
if (inline !== undefined && inline !== null) { if (inline !== undefined && inline !== null) {
queryParameters = queryParameters.set('inline', <any>inline); queryParameters = queryParameters.set('inline', <any>inline);
} }
if (indicator !== undefined && indicator !== null) {
queryParameters = queryParameters.set('indicator', <any>indicator);
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
@ -361,6 +356,7 @@ export class FileManagementControllerService {
observe?: 'body', observe?: 'body',
reportProgress?: boolean reportProgress?: boolean
): Observable<any>; ): Observable<any>;
public downloadRedactedFiles( public downloadRedactedFiles(
body: BulkDownloadRedactedRequest, body: BulkDownloadRedactedRequest,
projectId: string, projectId: string,
@ -368,6 +364,7 @@ export class FileManagementControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<any>>; ): Observable<HttpResponse<any>>;
public downloadRedactedFiles( public downloadRedactedFiles(
body: BulkDownloadRedactedRequest, body: BulkDownloadRedactedRequest,
projectId: string, projectId: string,
@ -375,6 +372,7 @@ export class FileManagementControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<any>>; ): Observable<HttpEvent<any>>;
public downloadRedactedFiles( public downloadRedactedFiles(
body: BulkDownloadRedactedRequest, body: BulkDownloadRedactedRequest,
projectId: string, projectId: string,
@ -438,6 +436,7 @@ export class FileManagementControllerService {
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public downloadRedactionReport(body: FileIds, inline?: boolean, template?: string, observe?: 'body', reportProgress?: boolean): Observable<any>; public downloadRedactionReport(body: FileIds, inline?: boolean, template?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public downloadRedactionReport( public downloadRedactionReport(
body: FileIds, body: FileIds,
inline?: boolean, inline?: boolean,
@ -445,6 +444,7 @@ export class FileManagementControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<any>>; ): Observable<HttpResponse<any>>;
public downloadRedactionReport( public downloadRedactionReport(
body: FileIds, body: FileIds,
inline?: boolean, inline?: boolean,
@ -452,6 +452,7 @@ export class FileManagementControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<any>>; ): Observable<HttpEvent<any>>;
public downloadRedactionReport( public downloadRedactionReport(
body: FileIds, body: FileIds,
inline?: boolean, inline?: boolean,
@ -520,6 +521,7 @@ export class FileManagementControllerService {
observe?: 'body', observe?: 'body',
reportProgress?: boolean reportProgress?: boolean
): Observable<any>; ): Observable<any>;
public downloadRedactionReportForProject( public downloadRedactionReportForProject(
projectId: string, projectId: string,
inline?: boolean, inline?: boolean,
@ -527,6 +529,7 @@ export class FileManagementControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<any>>; ): Observable<HttpResponse<any>>;
public downloadRedactionReportForProject( public downloadRedactionReportForProject(
projectId: string, projectId: string,
inline?: boolean, inline?: boolean,
@ -534,6 +537,7 @@ export class FileManagementControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<any>>; ): Observable<HttpEvent<any>>;
public downloadRedactionReportForProject( public downloadRedactionReportForProject(
projectId: string, projectId: string,
inline?: boolean, inline?: boolean,
@ -590,8 +594,11 @@ export class FileManagementControllerService {
* @param reportProgress flag to report request and response progress. * @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?: '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?: '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?: 'events', reportProgress?: boolean): Observable<HttpEvent<FileUploadResult>>;
public uploadFileForm(file: Blob, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> { public uploadFileForm(file: Blob, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (file === null || file === undefined) { if (file === null || file === undefined) {
throw new Error('Required parameter file was null or undefined when calling uploadFile.'); throw new Error('Required parameter file was null or undefined when calling uploadFile.');
@ -645,4 +652,18 @@ export class FileManagementControllerService {
reportProgress: reportProgress 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

@ -26,11 +26,7 @@ export class InfoControllerService {
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = ''; protected basePath = '';
constructor( constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string,
@Optional() configuration: Configuration
) {
if (basePath) { if (basePath) {
this.basePath = basePath; this.basePath = basePath;
} }
@ -48,33 +44,22 @@ export class InfoControllerService {
*/ */
public getAuthInfo(observe?: 'body', reportProgress?: boolean): Observable<AuthInfo>; public getAuthInfo(observe?: 'body', reportProgress?: boolean): Observable<AuthInfo>;
public getAuthInfo( public getAuthInfo(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<AuthInfo>>;
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<AuthInfo>>;
public getAuthInfo( public getAuthInfo(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<AuthInfo>>;
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<AuthInfo>>;
public getAuthInfo(observe: any = 'body', reportProgress: boolean = false): Observable<any> { public getAuthInfo(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }

View File

@ -22,9 +22,9 @@ import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class LegalBasisMappingControllerService { export class LegalBasisMappingControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
if (basePath) { if (basePath) {
@ -36,30 +36,24 @@ export class LegalBasisMappingControllerService {
} }
} }
/**
* @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;
}
/** /**
* Set the mapping between legal basis and redaction reason. * Set the mapping between legal basis and redaction reason.
* None * None
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getLegalBasisMapping(observe?: 'body', reportProgress?: boolean): Observable<LegalBasisMapping>; public getLegalBasisMapping(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<LegalBasisMapping>;
public getLegalBasisMapping(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<LegalBasisMapping>>;
public getLegalBasisMapping(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<LegalBasisMapping>>; public getLegalBasisMapping(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<LegalBasisMapping>>;
public getLegalBasisMapping(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public getLegalBasisMapping(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<LegalBasisMapping>>;
public getLegalBasisMapping(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling getLegalBasisMapping.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -78,7 +72,7 @@ export class LegalBasisMappingControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<LegalBasisMapping>('get', `${this.basePath}/legalBasis`, { return this.httpClient.request<LegalBasisMapping>('get', `${this.basePath}/legalBasis/${encodeURIComponent(String(ruleSetId))}`, {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
observe: observe, observe: observe,
@ -90,17 +84,25 @@ export class LegalBasisMappingControllerService {
* Set the mapping between legal basis and redaction reason. * Set the mapping between legal basis and redaction reason.
* None * None
* @param body legalBasisMapping * @param body legalBasisMapping
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public setLegalBasisMapping(body: LegalBasisMapping, observe?: 'body', reportProgress?: boolean): Observable<any>; public setLegalBasisMapping(body: LegalBasisMapping, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public setLegalBasisMapping(body: LegalBasisMapping, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public setLegalBasisMapping(body: LegalBasisMapping, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public setLegalBasisMapping(body: LegalBasisMapping, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public setLegalBasisMapping(body: LegalBasisMapping, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public setLegalBasisMapping(body: LegalBasisMapping, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public setLegalBasisMapping(body: LegalBasisMapping, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling setLegalBasisMapping.'); throw new Error('Required parameter body was null or undefined when calling setLegalBasisMapping.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling setLegalBasisMapping.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -123,7 +125,7 @@ export class LegalBasisMappingControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>('post', `${this.basePath}/legalBasis`, { return this.httpClient.request<any>('post', `${this.basePath}/legalBasis/${encodeURIComponent(String(ruleSetId))}`, {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -131,4 +133,18 @@ export class LegalBasisMappingControllerService {
reportProgress: reportProgress 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

@ -28,11 +28,7 @@ export class LicenseReportControllerService {
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = ''; protected basePath = '';
constructor( constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string,
@Optional() configuration: Configuration
) {
if (basePath) { if (basePath) {
this.basePath = basePath; this.basePath = basePath;
} }
@ -51,13 +47,7 @@ export class LicenseReportControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public licenseReport( public licenseReport(body: LicenseReportRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<LicenseReport>;
body: LicenseReportRequest,
offset?: number,
limit?: number,
observe?: 'body',
reportProgress?: boolean
): Observable<LicenseReport>;
public licenseReport( public licenseReport(
body: LicenseReportRequest, body: LicenseReportRequest,
@ -75,17 +65,9 @@ export class LicenseReportControllerService {
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<LicenseReport>>; ): Observable<HttpEvent<LicenseReport>>;
public licenseReport( public licenseReport(body: LicenseReportRequest, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
body: LicenseReportRequest,
offset?: number,
limit?: number,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling licenseReport.');
'Required parameter body was null or undefined when calling licenseReport.'
);
} }
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
@ -100,27 +82,20 @@ export class LicenseReportControllerService {
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -28,15 +28,11 @@ import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class ManualRedactionControllerService { export class ManualRedactionControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor( constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string,
@Optional() configuration: Configuration
) {
if (basePath) { if (basePath) {
this.basePath = basePath; this.basePath = basePath;
} }
@ -46,20 +42,6 @@ export class ManualRedactionControllerService {
} }
} }
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/** /**
* Adds a comment to a redaction/redaction request * Adds a comment to a redaction/redaction request
* None * None
@ -78,6 +60,7 @@ export class ManualRedactionControllerService {
observe?: 'body', observe?: 'body',
reportProgress?: boolean reportProgress?: boolean
): Observable<CommentResponse>; ): Observable<CommentResponse>;
public addComment( public addComment(
body: AddCommentRequest, body: AddCommentRequest,
projectId: string, projectId: string,
@ -86,6 +69,7 @@ export class ManualRedactionControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<CommentResponse>>; ): Observable<HttpResponse<CommentResponse>>;
public addComment( public addComment(
body: AddCommentRequest, body: AddCommentRequest,
projectId: string, projectId: string,
@ -94,6 +78,7 @@ export class ManualRedactionControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<CommentResponse>>; ): Observable<HttpEvent<CommentResponse>>;
public addComment( public addComment(
body: AddCommentRequest, body: AddCommentRequest,
projectId: string, projectId: string,
@ -103,63 +88,48 @@ export class ManualRedactionControllerService {
reportProgress: boolean = false reportProgress: boolean = false
): Observable<any> { ): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling addComment.');
'Required parameter body was null or undefined when calling addComment.'
);
} }
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling addComment.');
'Required parameter projectId was null or undefined when calling addComment.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling addComment.');
'Required parameter fileId was null or undefined when calling addComment.'
);
} }
if (annotationId === null || annotationId === undefined) { if (annotationId === null || annotationId === undefined) {
throw new Error( throw new Error('Required parameter annotationId was null or undefined when calling addComment.');
'Required parameter annotationId was null or undefined when calling addComment.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<CommentResponse>( return this.httpClient.request<CommentResponse>(
'post', 'post',
`${this.basePath}/manualRedaction/comment/add/${encodeURIComponent( `${this.basePath}/manualRedaction/comment/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
String(projectId) String(annotationId)
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, )}`,
{ {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
@ -186,6 +156,7 @@ export class ManualRedactionControllerService {
observe?: 'body', observe?: 'body',
reportProgress?: boolean reportProgress?: boolean
): Observable<ManualAddResponse>; ): Observable<ManualAddResponse>;
public addRedaction( public addRedaction(
body: AddRedactionRequest, body: AddRedactionRequest,
projectId: string, projectId: string,
@ -193,6 +164,7 @@ export class ManualRedactionControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>; ): Observable<HttpResponse<ManualAddResponse>>;
public addRedaction( public addRedaction(
body: AddRedactionRequest, body: AddRedactionRequest,
projectId: string, projectId: string,
@ -200,65 +172,45 @@ export class ManualRedactionControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>; ): Observable<HttpEvent<ManualAddResponse>>;
public addRedaction(
body: AddRedactionRequest, public addRedaction(body: AddRedactionRequest, projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
projectId: string,
fileId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling addRedaction.');
'Required parameter body was null or undefined when calling addRedaction.'
);
} }
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling addRedaction.');
'Required parameter projectId was null or undefined when calling addRedaction.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling addRedaction.');
'Required parameter fileId was null or undefined when calling addRedaction.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<ManualAddResponse>( return this.httpClient.request<ManualAddResponse>(
'post', 'post',
`${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent( `${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
String(projectId)
)}/${encodeURIComponent(String(fileId))}`,
{ {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
@ -287,6 +239,7 @@ export class ManualRedactionControllerService {
observe?: 'body', observe?: 'body',
reportProgress?: boolean reportProgress?: boolean
): Observable<any>; ): Observable<any>;
public approveRequest( public approveRequest(
body: ApproveRequest, body: ApproveRequest,
projectId: string, projectId: string,
@ -295,6 +248,7 @@ export class ManualRedactionControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<any>>; ): Observable<HttpResponse<any>>;
public approveRequest( public approveRequest(
body: ApproveRequest, body: ApproveRequest,
projectId: string, projectId: string,
@ -303,6 +257,7 @@ export class ManualRedactionControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<any>>; ): Observable<HttpEvent<any>>;
public approveRequest( public approveRequest(
body: ApproveRequest, body: ApproveRequest,
projectId: string, projectId: string,
@ -312,63 +267,48 @@ export class ManualRedactionControllerService {
reportProgress: boolean = false reportProgress: boolean = false
): Observable<any> { ): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling approveRequest.');
'Required parameter body was null or undefined when calling approveRequest.'
);
} }
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling approveRequest.');
'Required parameter projectId was null or undefined when calling approveRequest.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling approveRequest.');
'Required parameter fileId was null or undefined when calling approveRequest.'
);
} }
if (annotationId === null || annotationId === undefined) { if (annotationId === null || annotationId === undefined) {
throw new Error( throw new Error('Required parameter annotationId was null or undefined when calling approveRequest.');
'Required parameter annotationId was null or undefined when calling approveRequest.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>( return this.httpClient.request<any>(
'post', 'post',
`${this.basePath}/manualRedaction/approve/${encodeURIComponent( `${this.basePath}/manualRedaction/approve/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
String(projectId) String(annotationId)
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, )}`,
{ {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
@ -388,13 +328,8 @@ export class ManualRedactionControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public declineRequest( public declineRequest(projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
projectId: string,
fileId: string,
annotationId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public declineRequest( public declineRequest(
projectId: string, projectId: string,
fileId: string, fileId: string,
@ -402,54 +337,33 @@ export class ManualRedactionControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<any>>; ): Observable<HttpResponse<any>>;
public declineRequest(
projectId: string, public declineRequest(projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
fileId: string,
annotationId: string, public declineRequest(projectId: string, fileId: string, annotationId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
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) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling declineRequest.');
'Required parameter projectId was null or undefined when calling declineRequest.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling declineRequest.');
'Required parameter fileId was null or undefined when calling declineRequest.'
);
} }
if (annotationId === null || annotationId === undefined) { if (annotationId === null || annotationId === undefined) {
throw new Error( throw new Error('Required parameter annotationId was null or undefined when calling declineRequest.');
'Required parameter annotationId was null or undefined when calling declineRequest.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -459,9 +373,9 @@ export class ManualRedactionControllerService {
return this.httpClient.request<any>( return this.httpClient.request<any>(
'post', 'post',
`${this.basePath}/manualRedaction/decline/${encodeURIComponent( `${this.basePath}/manualRedaction/decline/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
String(projectId) String(annotationId)
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, )}`,
{ {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -479,58 +393,32 @@ export class ManualRedactionControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getManualRedaction( public getManualRedaction(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ManualRedactions>;
projectId: string,
fileId: string, public getManualRedaction(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ManualRedactions>>;
observe?: 'body',
reportProgress?: boolean public getManualRedaction(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ManualRedactions>>;
): Observable<ManualRedactions>;
public getManualRedaction( public getManualRedaction(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
projectId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ManualRedactions>>;
public getManualRedaction(
projectId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ManualRedactions>>;
public getManualRedaction(
projectId: string,
fileId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling getManualRedaction.');
'Required parameter projectId was null or undefined when calling getManualRedaction.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling getManualRedaction.');
'Required parameter fileId was null or undefined when calling getManualRedaction.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -540,9 +428,7 @@ export class ManualRedactionControllerService {
return this.httpClient.request<ManualRedactions>( return this.httpClient.request<ManualRedactions>(
'get', 'get',
`${this.basePath}/manualRedaction/${encodeURIComponent( `${this.basePath}/manualRedaction/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
String(projectId)
)}/${encodeURIComponent(String(fileId))}`,
{ {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -551,6 +437,7 @@ export class ManualRedactionControllerService {
} }
); );
} }
/** /**
* Removes a redaction * Removes a redaction
* None * None
@ -567,6 +454,7 @@ export class ManualRedactionControllerService {
observe?: 'body', observe?: 'body',
reportProgress?: boolean reportProgress?: boolean
): Observable<ManualAddResponse>; ): Observable<ManualAddResponse>;
public removeRedaction( public removeRedaction(
body: RemoveRedactionRequest, body: RemoveRedactionRequest,
projectId: string, projectId: string,
@ -574,6 +462,7 @@ export class ManualRedactionControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>; ): Observable<HttpResponse<ManualAddResponse>>;
public removeRedaction( public removeRedaction(
body: RemoveRedactionRequest, body: RemoveRedactionRequest,
projectId: string, projectId: string,
@ -581,6 +470,7 @@ export class ManualRedactionControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>; ): Observable<HttpEvent<ManualAddResponse>>;
public removeRedaction( public removeRedaction(
body: RemoveRedactionRequest, body: RemoveRedactionRequest,
projectId: string, projectId: string,
@ -589,57 +479,42 @@ export class ManualRedactionControllerService {
reportProgress: boolean = false reportProgress: boolean = false
): Observable<any> { ): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling removeRedaction.');
'Required parameter body was null or undefined when calling removeRedaction.'
);
} }
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling removeRedaction.');
'Required parameter projectId was null or undefined when calling removeRedaction.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling removeRedaction.');
'Required parameter fileId was null or undefined when calling removeRedaction.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<ManualAddResponse>( return this.httpClient.request<ManualAddResponse>(
'post', 'post',
`${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent( `${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
String(projectId)
)}/${encodeURIComponent(String(fileId))}`,
{ {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
@ -666,6 +541,7 @@ export class ManualRedactionControllerService {
observe?: 'body', observe?: 'body',
reportProgress?: boolean reportProgress?: boolean
): Observable<ManualAddResponse>; ): Observable<ManualAddResponse>;
public requestAddRedaction( public requestAddRedaction(
body: AddRedactionRequest, body: AddRedactionRequest,
projectId: string, projectId: string,
@ -673,6 +549,7 @@ export class ManualRedactionControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>; ): Observable<HttpResponse<ManualAddResponse>>;
public requestAddRedaction( public requestAddRedaction(
body: AddRedactionRequest, body: AddRedactionRequest,
projectId: string, projectId: string,
@ -680,6 +557,7 @@ export class ManualRedactionControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>; ): Observable<HttpEvent<ManualAddResponse>>;
public requestAddRedaction( public requestAddRedaction(
body: AddRedactionRequest, body: AddRedactionRequest,
projectId: string, projectId: string,
@ -688,57 +566,42 @@ export class ManualRedactionControllerService {
reportProgress: boolean = false reportProgress: boolean = false
): Observable<any> { ): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling requestAddRedaction.');
'Required parameter body was null or undefined when calling requestAddRedaction.'
);
} }
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling requestAddRedaction.');
'Required parameter projectId was null or undefined when calling requestAddRedaction.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling requestAddRedaction.');
'Required parameter fileId was null or undefined when calling requestAddRedaction.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<ManualAddResponse>( return this.httpClient.request<ManualAddResponse>(
'post', 'post',
`${this.basePath}/manualRedaction/request/add/${encodeURIComponent( `${this.basePath}/manualRedaction/request/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
String(projectId)
)}/${encodeURIComponent(String(fileId))}`,
{ {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
@ -765,6 +628,7 @@ export class ManualRedactionControllerService {
observe?: 'body', observe?: 'body',
reportProgress?: boolean reportProgress?: boolean
): Observable<ManualAddResponse>; ): Observable<ManualAddResponse>;
public requestRemoveRedaction( public requestRemoveRedaction(
body: RemoveRedactionRequest, body: RemoveRedactionRequest,
projectId: string, projectId: string,
@ -772,6 +636,7 @@ export class ManualRedactionControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<ManualAddResponse>>; ): Observable<HttpResponse<ManualAddResponse>>;
public requestRemoveRedaction( public requestRemoveRedaction(
body: RemoveRedactionRequest, body: RemoveRedactionRequest,
projectId: string, projectId: string,
@ -779,6 +644,7 @@ export class ManualRedactionControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<ManualAddResponse>>; ): Observable<HttpEvent<ManualAddResponse>>;
public requestRemoveRedaction( public requestRemoveRedaction(
body: RemoveRedactionRequest, body: RemoveRedactionRequest,
projectId: string, projectId: string,
@ -787,57 +653,42 @@ export class ManualRedactionControllerService {
reportProgress: boolean = false reportProgress: boolean = false
): Observable<any> { ): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling requestRemoveRedaction.');
'Required parameter body was null or undefined when calling requestRemoveRedaction.'
);
} }
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling requestRemoveRedaction.');
'Required parameter projectId was null or undefined when calling requestRemoveRedaction.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling requestRemoveRedaction.');
'Required parameter fileId was null or undefined when calling requestRemoveRedaction.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<ManualAddResponse>( return this.httpClient.request<ManualAddResponse>(
'post', 'post',
`${this.basePath}/manualRedaction/request/remove/${encodeURIComponent( `${this.basePath}/manualRedaction/request/remove/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
String(projectId)
)}/${encodeURIComponent(String(fileId))}`,
{ {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
@ -857,38 +708,15 @@ export class ManualRedactionControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public undo( public undo(projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
projectId: string,
fileId: string, public undo(projectId: string, fileId: string, annotationId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
annotationId: string,
observe?: 'body', public undo(projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
reportProgress?: boolean
): Observable<any>; public undo(projectId: string, fileId: string, annotationId: string, observe: any = 'body', reportProgress: boolean = false): 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) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling undo.');
'Required parameter projectId was null or undefined when calling undo.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
@ -896,27 +724,20 @@ export class ManualRedactionControllerService {
} }
if (annotationId === null || annotationId === undefined) { if (annotationId === null || annotationId === undefined) {
throw new Error( throw new Error('Required parameter annotationId was null or undefined when calling undo.');
'Required parameter annotationId was null or undefined when calling undo.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -926,9 +747,9 @@ export class ManualRedactionControllerService {
return this.httpClient.request<any>( return this.httpClient.request<any>(
'delete', 'delete',
`${this.basePath}/manualRedaction/undo/${encodeURIComponent( `${this.basePath}/manualRedaction/undo/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
String(projectId) String(annotationId)
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`, )}`,
{ {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -948,14 +769,8 @@ export class ManualRedactionControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public undoComment( public undoComment(projectId: string, fileId: string, annotationId: string, commentId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
projectId: string,
fileId: string,
annotationId: string,
commentId: string,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public undoComment( public undoComment(
projectId: string, projectId: string,
fileId: string, fileId: string,
@ -964,6 +779,7 @@ export class ManualRedactionControllerService {
observe?: 'response', observe?: 'response',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<any>>; ): Observable<HttpResponse<any>>;
public undoComment( public undoComment(
projectId: string, projectId: string,
fileId: string, fileId: string,
@ -972,6 +788,7 @@ export class ManualRedactionControllerService {
observe?: 'events', observe?: 'events',
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpEvent<any>>; ): Observable<HttpEvent<any>>;
public undoComment( public undoComment(
projectId: string, projectId: string,
fileId: string, fileId: string,
@ -981,45 +798,32 @@ export class ManualRedactionControllerService {
reportProgress: boolean = false reportProgress: boolean = false
): Observable<any> { ): Observable<any> {
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling undoComment.');
'Required parameter projectId was null or undefined when calling undoComment.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling undoComment.');
'Required parameter fileId was null or undefined when calling undoComment.'
);
} }
if (annotationId === null || annotationId === undefined) { if (annotationId === null || annotationId === undefined) {
throw new Error( throw new Error('Required parameter annotationId was null or undefined when calling undoComment.');
'Required parameter annotationId was null or undefined when calling undoComment.'
);
} }
if (commentId === null || commentId === undefined) { if (commentId === null || commentId === undefined) {
throw new Error( throw new Error('Required parameter commentId was null or undefined when calling undoComment.');
'Required parameter commentId was null or undefined when calling undoComment.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -1029,9 +833,7 @@ export class ManualRedactionControllerService {
return this.httpClient.request<any>( return this.httpClient.request<any>(
'delete', 'delete',
`${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent( `${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
String(projectId)
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
String(annotationId) String(annotationId)
)}/${encodeURIComponent(String(commentId))}`, )}/${encodeURIComponent(String(commentId))}`,
{ {
@ -1042,4 +844,18 @@ export class ManualRedactionControllerService {
} }
); );
} }
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
} }

View File

@ -23,15 +23,11 @@ import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class ProjectControllerService { export class ProjectControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor( constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string,
@Optional() configuration: Configuration
) {
if (basePath) { if (basePath) {
this.basePath = basePath; this.basePath = basePath;
} }
@ -42,77 +38,41 @@ export class ProjectControllerService {
} }
/** /**
* @param consumes string[] mime-types * Creates or updates a project.
* @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;
}
/**
* Creates or update a project.
* None * None
* @param body project * @param body project
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public createProjectOrUpdateProject( public createOrUpdateProject(body: ProjectRequest, observe?: 'body', reportProgress?: boolean): Observable<Project>;
body: ProjectRequest,
observe?: 'body', public createOrUpdateProject(body: ProjectRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Project>>;
reportProgress?: boolean
): Observable<Project>; public createOrUpdateProject(body: ProjectRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Project>>;
public createProjectOrUpdateProject(
body: ProjectRequest, public createOrUpdateProject(body: ProjectRequest, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<Project>>;
public createProjectOrUpdateProject(
body: ProjectRequest,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<Project>>;
public createProjectOrUpdateProject(
body: ProjectRequest,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling createOrUpdateProject.');
'Required parameter body was null or undefined when calling createProjectOrUpdateProject.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
@ -133,48 +93,28 @@ export class ProjectControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteProject( public deleteProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
projectId: string,
observe?: 'body', public deleteProject(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
reportProgress?: boolean
): Observable<any>; public deleteProject(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteProject(
projectId: string, public deleteProject(projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public deleteProject(
projectId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public deleteProject(
projectId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling deleteProject.');
'Required parameter projectId was null or undefined when calling deleteProject.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -182,16 +122,12 @@ export class ProjectControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<any>( return this.httpClient.request<any>('delete', `${this.basePath}/project/${encodeURIComponent(String(projectId))}`, {
'delete', withCredentials: this.configuration.withCredentials,
`${this.basePath}/project/${encodeURIComponent(String(projectId))}`, headers: headers,
{ observe: observe,
withCredentials: this.configuration.withCredentials, reportProgress: reportProgress
headers: headers, });
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
@ -201,48 +137,28 @@ export class ProjectControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getProject( public getProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<Project>;
projectId: string,
observe?: 'body', public getProject(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Project>>;
reportProgress?: boolean
): Observable<Project>; public getProject(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Project>>;
public getProject(
projectId: string, public getProject(projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<Project>>;
public getProject(
projectId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<Project>>;
public getProject(
projectId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling getProject.');
'Required parameter projectId was null or undefined when calling getProject.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -250,16 +166,12 @@ export class ProjectControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<Project>( return this.httpClient.request<Project>('get', `${this.basePath}/project/${encodeURIComponent(String(projectId))}`, {
'get', withCredentials: this.configuration.withCredentials,
`${this.basePath}/project/${encodeURIComponent(String(projectId))}`, headers: headers,
{ observe: observe,
withCredentials: this.configuration.withCredentials, reportProgress: reportProgress
headers: headers, });
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
@ -269,31 +181,23 @@ export class ProjectControllerService {
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getProjects(observe?: 'body', reportProgress?: boolean): Observable<Array<Project>>; public getProjects(observe?: 'body', reportProgress?: boolean): Observable<Array<Project>>;
public getProjects(
observe?: 'response', public getProjects(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Project>>>;
reportProgress?: boolean
): Observable<HttpResponse<Array<Project>>>; public getProjects(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Project>>>;
public getProjects(
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<Array<Project>>>;
public getProjects(observe: any = 'body', reportProgress: boolean = false): Observable<any> { public getProjects(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -308,4 +212,18 @@ export class ProjectControllerService {
reportProgress: reportProgress 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

@ -23,9 +23,9 @@ import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class RedactionLogControllerService { export class RedactionLogControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
if (basePath) { if (basePath) {
@ -37,20 +37,6 @@ export class RedactionLogControllerService {
} }
} }
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/** /**
* Gets the redaction log for a fileId * Gets the redaction log for a fileId
* None * None
@ -59,8 +45,11 @@ export class RedactionLogControllerService {
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getRedactionLog(fileId: string, observe?: 'body', reportProgress?: boolean): Observable<RedactionLog>; public getRedactionLog(fileId: string, observe?: 'body', reportProgress?: boolean): Observable<RedactionLog>;
public getRedactionLog(fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<RedactionLog>>; public getRedactionLog(fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<RedactionLog>>;
public getRedactionLog(fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<RedactionLog>>; public getRedactionLog(fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<RedactionLog>>;
public getRedactionLog(fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> { public getRedactionLog(fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling getRedactionLog.'); throw new Error('Required parameter fileId was null or undefined when calling getRedactionLog.');
@ -100,8 +89,11 @@ export class RedactionLogControllerService {
* @param reportProgress flag to report request and response progress. * @param reportProgress flag to report request and response progress.
*/ */
public getSectionGrid(fileId: string, observe?: 'body', reportProgress?: boolean): Observable<SectionGrid>; public getSectionGrid(fileId: string, observe?: 'body', reportProgress?: boolean): Observable<SectionGrid>;
public getSectionGrid(fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<SectionGrid>>; public getSectionGrid(fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<SectionGrid>>;
public getSectionGrid(fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<SectionGrid>>; public getSectionGrid(fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<SectionGrid>>;
public getSectionGrid(fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> { public getSectionGrid(fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error('Required parameter fileId was null or undefined when calling getSectionGrid.'); throw new Error('Required parameter fileId was null or undefined when calling getSectionGrid.');
@ -132,4 +124,18 @@ export class RedactionLogControllerService {
reportProgress: reportProgress 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,228 @@
/**
* 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 { RuleSetModel } from '../model/ruleSetModel';
import { BASE_PATH } from '../variables';
import { Configuration } from '../configuration';
@Injectable()
export class RuleSetControllerService {
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;
}
}
/**
* Creates a new RuleSets or updates an existing one.
* None
* @param body ruleSetModel
* @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 createOrUpdateRuleSet(body: RuleSetModel, observe?: 'body', reportProgress?: boolean): Observable<RuleSetModel>;
public createOrUpdateRuleSet(body: RuleSetModel, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<RuleSetModel>>;
public createOrUpdateRuleSet(body: RuleSetModel, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<RuleSetModel>>;
public createOrUpdateRuleSet(body: RuleSetModel, 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 createOrUpdateRuleSet.');
}
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<RuleSetModel>('post', `${this.basePath}/rule-set/${encodeURIComponent(String(ruleSetId))}`, {
body: body,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/**
* Get a specific RuleSet by its ID
* None
* @param ruleSetId ruleSetId
* @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 getAllRuleSets(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public getAllRuleSets(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public getAllRuleSets(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public getAllRuleSets(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling getAllRuleSets.');
}
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}/rule-set/${encodeURIComponent(String(ruleSetId))}`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/**
* Lists all existing RuleSets.
* 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 getAllRuleSets1(observe?: 'body', reportProgress?: boolean): Observable<Array<RuleSetModel>>;
public getAllRuleSets1(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<RuleSetModel>>>;
public getAllRuleSets1(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<RuleSetModel>>>;
public getAllRuleSets1(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<Array<RuleSetModel>>('get', `${this.basePath}/rule-set`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/**
* Get a specific RuleSet by its ID
* None
* @param ruleSetId ruleSetId
* @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 getAllRuleSets2(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<RuleSetModel>;
public getAllRuleSets2(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<RuleSetModel>>;
public getAllRuleSets2(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<RuleSetModel>>;
public getAllRuleSets2(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling getAllRuleSets2.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<RuleSetModel>('get', `${this.basePath}/rule-set/${encodeURIComponent(String(ruleSetId))}`, {
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

@ -27,11 +27,7 @@ export class RulesControllerService {
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = ''; protected basePath = '';
constructor( constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string,
@Optional() configuration: Configuration
) {
if (basePath) { if (basePath) {
this.basePath = basePath; this.basePath = basePath;
} }
@ -44,38 +40,32 @@ export class RulesControllerService {
/** /**
* Returns object containing the currently used Drools rules. * Returns object containing the currently used Drools rules.
* *
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public downloadRules(observe?: 'body', reportProgress?: boolean): Observable<Rules>; public downloadRules(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<Rules>;
public downloadRules( public downloadRules(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Rules>>;
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<Rules>>;
public downloadRules( public downloadRules(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Rules>>;
observe?: 'events',
reportProgress?: boolean public downloadRules(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
): Observable<HttpEvent<Rules>>; if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling downloadRules.');
}
public downloadRules(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -83,7 +73,7 @@ export class RulesControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<Rules>('get', `${this.basePath}/rules`, { return this.httpClient.request<Rules>('get', `${this.basePath}/rules/${encodeURIComponent(String(ruleSetId))}`, {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
observe: observe, observe: observe,
@ -94,41 +84,32 @@ export class RulesControllerService {
/** /**
* Returns file containing the currently used Drools rules. * Returns file containing the currently used Drools rules.
* *
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public downloadRulesFile(observe?: 'body', reportProgress?: boolean): Observable<any>; public downloadRulesFile(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public downloadRulesFile( public downloadRulesFile(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public downloadRulesFile( public downloadRulesFile(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
observe?: 'events',
reportProgress?: boolean public downloadRulesFile(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
): Observable<HttpEvent<any>>; if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling downloadRulesFile.');
}
public downloadRulesFile(
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/octet-stream']; const httpHeaderAccepts: string[] = ['*/*'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -136,7 +117,7 @@ export class RulesControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<any>('get', `${this.basePath}/rules/download`, { return this.httpClient.request<any>('get', `${this.basePath}/rules/${encodeURIComponent(String(ruleSetId))}/download`, {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
observe: observe, observe: observe,
@ -148,64 +129,48 @@ export class RulesControllerService {
* Takes object containing string or rules as argument, which will be used by the redaction service. * Takes object containing string or rules as argument, which will be used by the redaction service.
* *
* @param body rules * @param body rules
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public uploadRules(body: Rules, observe?: 'body', reportProgress?: boolean): Observable<any>; public uploadRules(body: Rules, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public uploadRules( public uploadRules(body: Rules, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
body: Rules,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public uploadRules( public uploadRules(body: Rules, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
body: Rules,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public uploadRules( public uploadRules(body: Rules, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
body: Rules,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling uploadRules.');
'Required parameter body was null or undefined when calling uploadRules.' }
);
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling uploadRules.');
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>('post', `${this.basePath}/rules`, { return this.httpClient.request<any>('post', `${this.basePath}/rules/${encodeURIComponent(String(ruleSetId))}`, {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -218,54 +183,36 @@ export class RulesControllerService {
* Takes object containing string or rules as argument, which will be used by the redaction service. * Takes object containing string or rules as argument, which will be used by the redaction service.
* *
* @param file * @param file
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public uploadRulesFileForm( public uploadRulesFileForm(file: Blob, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
file: Blob,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public uploadRulesFileForm( public uploadRulesFileForm(file: Blob, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
file: Blob,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public uploadRulesFileForm( public uploadRulesFileForm(file: Blob, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
file: Blob,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public uploadRulesFileForm( public uploadRulesFileForm(file: Blob, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
file: Blob,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (file === null || file === undefined) { if (file === null || file === undefined) {
throw new Error( throw new Error('Required parameter file was null or undefined when calling uploadRulesFile.');
'Required parameter file was null or undefined when calling uploadRulesFile.' }
);
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling uploadRulesFile.');
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -291,7 +238,7 @@ export class RulesControllerService {
formParams = (formParams.append('file', <any>file) as any) || formParams; formParams = (formParams.append('file', <any>file) as any) || formParams;
} }
return this.httpClient.request<any>('post', `${this.basePath}/rules/upload`, { return this.httpClient.request<any>('post', `${this.basePath}/rules/${encodeURIComponent(String(ruleSetId))}/upload`, {
body: convertFormParamsToString ? formParams.toString() : formParams, body: convertFormParamsToString ? formParams.toString() : formParams,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,

View File

@ -16,6 +16,8 @@ import { CustomHttpUrlEncodingCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { RolesRequest } from '../model/rolesRequest';
import { User } from '../model/user';
import { UserRequest } from '../model/userRequest'; import { UserRequest } from '../model/userRequest';
import { UserResponse } from '../model/userResponse'; import { UserResponse } from '../model/userResponse';
@ -28,11 +30,7 @@ export class UserControllerService {
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = ''; protected basePath = '';
constructor( constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string,
@Optional() configuration: Configuration
) {
if (basePath) { if (basePath) {
this.basePath = basePath; this.basePath = basePath;
} }
@ -45,64 +43,39 @@ export class UserControllerService {
/** /**
* Add admin role to users * Add admin role to users
* None * None
* @param body userIds * @param body rolesRequest
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public addAdminRoleToUsers( public addAdminRoleToUsers(body: RolesRequest, observe?: 'body', reportProgress?: boolean): Observable<any>;
body: Array<string>,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public addAdminRoleToUsers( public addAdminRoleToUsers(body: RolesRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
body: Array<string>,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public addAdminRoleToUsers( public addAdminRoleToUsers(body: RolesRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
body: Array<string>,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public addAdminRoleToUsers( public addAdminRoleToUsers(body: RolesRequest, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
body: Array<string>,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling addAdminRoleToUsers.');
'Required parameter body was null or undefined when calling addAdminRoleToUsers.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
@ -119,158 +92,142 @@ export class UserControllerService {
/** /**
* Add a role to users * Add a role to users
* None * None
* @param body userIds * @param body rolesRequest
* @param role role * @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 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. * @param reportProgress flag to report request and response progress.
*/ */
public addRoleToUsers( public addRoleToUsers(body: RolesRequest, role: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
body: Array<string>,
role: string,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public addRoleToUsers( public addRoleToUsers(body: RolesRequest, role: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
body: Array<string>,
role: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public addRoleToUsers( public addRoleToUsers(body: RolesRequest, role: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
body: Array<string>,
role: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public addRoleToUsers( public addRoleToUsers(body: RolesRequest, role: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
body: Array<string>,
role: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling addRoleToUsers.');
'Required parameter body was null or undefined when calling addRoleToUsers.'
);
} }
if (role === null || role === undefined) { if (role === null || role === undefined) {
throw new Error( throw new Error('Required parameter role was null or undefined when calling addRoleToUsers.');
'Required parameter role was null or undefined when calling addRoleToUsers.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>( return this.httpClient.request<any>('post', `${this.basePath}/user/role/${encodeURIComponent(String(role))}`, {
'post', body: body,
`${this.basePath}/user/role/${encodeURIComponent(String(role))}`, withCredentials: this.configuration.withCredentials,
{ headers: headers,
body: body, observe: observe,
withCredentials: this.configuration.withCredentials, reportProgress: reportProgress
headers: headers, });
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
* Delete admin role from users * Delete admin role from user
* None * None
* @param body userIds * @param userId userId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteAdminRoleFromUsers( public deleteAdminRoleFromUser(userId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
body: Array<string>,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public deleteAdminRoleFromUsers( public deleteAdminRoleFromUser(userId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
body: Array<string>,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public deleteAdminRoleFromUsers( public deleteAdminRoleFromUser(userId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
body: Array<string>,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public deleteAdminRoleFromUsers( public deleteAdminRoleFromUser(userId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
body: Array<string>, if (userId === null || userId === undefined) {
observe: any = 'body', throw new Error('Required parameter userId was null or undefined when calling deleteAdminRoleFromUser.');
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; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['*/*']; const consumes: string[] = [];
const httpContentTypeSelected:
| string return this.httpClient.request<any>('delete', `${this.basePath}/user/admin/${encodeURIComponent(String(userId))}`, {
| undefined = this.configuration.selectHeaderContentType(consumes); withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/**
* Delete admin role from users
* None
* @param body rolesRequest
* @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: RolesRequest, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteAdminRoleFromUsers(body: RolesRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteAdminRoleFromUsers(body: RolesRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteAdminRoleFromUsers(body: RolesRequest, 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[] = ['application/json'];
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>('delete', `${this.basePath}/user/admin`, { return this.httpClient.request<any>('put', `${this.basePath}/user/admin`, {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -279,93 +236,107 @@ export class UserControllerService {
}); });
} }
/**
* Delete a role from user
* None
* @param role role
* @param userId userId
* @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 deleteRoleFromUser(role: string, userId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteRoleFromUser(role: string, userId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteRoleFromUser(role: string, userId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteRoleFromUser(role: string, userId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (role === null || role === undefined) {
throw new Error('Required parameter role was null or undefined when calling deleteRoleFromUser.');
}
if (userId === null || userId === undefined) {
throw new Error('Required parameter userId was null or undefined when calling deleteRoleFromUser.');
}
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}/user/role/${encodeURIComponent(String(role))}/${encodeURIComponent(String(userId))}`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/** /**
* Delete a role from users * Delete a role from users
* None * None
* @param body userIds * @param body rolesRequest
* @param role role * @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 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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteRoleFromUsers( public deleteRoleFromUsers(body: RolesRequest, role: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
body: Array<string>,
role: string,
observe?: 'body',
reportProgress?: boolean
): Observable<any>;
public deleteRoleFromUsers( public deleteRoleFromUsers(body: RolesRequest, role: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
body: Array<string>,
role: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public deleteRoleFromUsers( public deleteRoleFromUsers(body: RolesRequest, role: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
body: Array<string>,
role: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public deleteRoleFromUsers( public deleteRoleFromUsers(body: RolesRequest, role: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
body: Array<string>,
role: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling deleteRoleFromUsers.');
'Required parameter body was null or undefined when calling deleteRoleFromUsers.'
);
} }
if (role === null || role === undefined) { if (role === null || role === undefined) {
throw new Error( throw new Error('Required parameter role was null or undefined when calling deleteRoleFromUsers.');
'Required parameter role was null or undefined when calling deleteRoleFromUsers.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['*/*']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>( return this.httpClient.request<any>('post', `${this.basePath}/user/role/delete/${encodeURIComponent(String(role))}`, {
'delete', body: body,
`${this.basePath}/user/role/${encodeURIComponent(String(role))}`, withCredentials: this.configuration.withCredentials,
{ headers: headers,
body: body, observe: observe,
withCredentials: this.configuration.withCredentials, reportProgress: reportProgress
headers: headers, });
observe: observe,
reportProgress: reportProgress
}
);
} }
/** /**
@ -377,13 +348,7 @@ export class UserControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getAllUsers( public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<UserResponse>;
body: UserRequest,
offset?: number,
limit?: number,
observe?: 'body',
reportProgress?: boolean
): Observable<UserResponse>;
public getAllUsers( public getAllUsers(
body: UserRequest, body: UserRequest,
@ -393,25 +358,11 @@ export class UserControllerService {
reportProgress?: boolean reportProgress?: boolean
): Observable<HttpResponse<UserResponse>>; ): Observable<HttpResponse<UserResponse>>;
public getAllUsers( public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<UserResponse>>;
body: UserRequest,
offset?: number,
limit?: number,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<UserResponse>>;
public getAllUsers( public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
body: UserRequest,
offset?: number,
limit?: number,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error( throw new Error('Required parameter body was null or undefined when calling getAllUsers.');
'Required parameter body was null or undefined when calling getAllUsers.'
);
} }
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() }); let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
@ -426,27 +377,20 @@ export class UserControllerService {
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
@ -461,6 +405,50 @@ export class UserControllerService {
}); });
} }
/**
* Gets the user in realm with information of roles.
* None
* @param userId userId
* @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 getUserById(userId: string, observe?: 'body', reportProgress?: boolean): Observable<User>;
public getUserById(userId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<User>>;
public getUserById(userId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<User>>;
public getUserById(userId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (userId === null || userId === undefined) {
throw new Error('Required parameter userId was null or undefined when calling getUserById.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<User>('get', `${this.basePath}/user/${encodeURIComponent(String(userId))}`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/** /**
* Gets the users who contain redaction roles. * Gets the users who contain redaction roles.
* None * None
@ -470,37 +458,13 @@ export class UserControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getUsers( public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<UserResponse>;
body: UserRequest,
offset?: number,
limit?: number,
observe?: 'body',
reportProgress?: boolean
): Observable<UserResponse>;
public getUsers( public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<UserResponse>>;
body: UserRequest,
offset?: number,
limit?: number,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<UserResponse>>;
public getUsers( public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<UserResponse>>;
body: UserRequest,
offset?: number,
limit?: number,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<UserResponse>>;
public getUsers( public getUsers(body: UserRequest, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
body: UserRequest,
offset?: number,
limit?: number,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling getUsers.'); throw new Error('Required parameter body was null or undefined when calling getUsers.');
} }
@ -517,27 +481,20 @@ export class UserControllerService {
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }

View File

@ -0,0 +1,192 @@
/**
* 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 { BASE_PATH } from '../variables';
import { Configuration } from '../configuration';
@Injectable()
export class UserPreferenceControllerService {
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;
}
}
/**
* Delete User Preferences by key.
* None
* @param key key
* @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 deletePreferences(key: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deletePreferences(key: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deletePreferences(key: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deletePreferences(key: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (key === null || key === undefined) {
throw new Error('Required parameter key was null or undefined when calling deletePreferences.');
}
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}/preferences/${encodeURIComponent(String(key))}`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/**
* Get User Preferences by key.
* None
* @param key key
* @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 getPreferences(key: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public getPreferences(key: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public getPreferences(key: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public getPreferences(key: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (key === null || key === undefined) {
throw new Error('Required parameter key was null or undefined when calling getPreferences.');
}
let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required
if (this.configuration.accessToken) {
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken);
}
// to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected);
}
// to determine the Content-Type header
const consumes: string[] = [];
return this.httpClient.request<any>('get', `${this.basePath}/preferences/${encodeURIComponent(String(key))}`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/**
* Store User JSON Preferences.
* None
* @param body jsonNode
* @param key key
* @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 savePreferences(body: any, key: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public savePreferences(body: any, key: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public savePreferences(body: any, key: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public savePreferences(body: any, key: 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 savePreferences.');
}
if (key === null || key === undefined) {
throw new Error('Required parameter key was null or undefined when calling savePreferences.');
}
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>('put', `${this.basePath}/preferences/${encodeURIComponent(String(key))}`, {
body: body,
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

@ -11,7 +11,8 @@
*/ /* tslint:disable:no-unused-variable member-ordering */ */ /* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http'; import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
import { CustomHttpUrlEncodingCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
@ -22,15 +23,11 @@ import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class VersionsControllerService { export class VersionsControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor( constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string,
@Optional() configuration: Configuration
) {
if (basePath) { if (basePath) {
this.basePath = basePath; this.basePath = basePath;
} }
@ -40,6 +37,58 @@ export class VersionsControllerService {
} }
} }
/**
* Retrieves current versions.
* None
* @param ruleSetId ruleSetId
* @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 getVersions(ruleSetId: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: VersionsResponse }>;
public getVersions(ruleSetId: Array<string>, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<{ [key: string]: VersionsResponse }>>;
public getVersions(ruleSetId: Array<string>, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<{ [key: string]: VersionsResponse }>>;
public getVersions(ruleSetId: Array<string>, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling getVersions.');
}
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
if (ruleSetId) {
ruleSetId.forEach((element) => {
queryParameters = queryParameters.append('ruleSetId', <any>element);
});
}
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<{ [key: string]: VersionsResponse }>('get', `${this.basePath}/version`, {
params: queryParameters,
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
/** /**
* @param consumes string[] mime-types * @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise * @return true: consumes contains 'multipart/form-data', false: otherwise
@ -53,51 +102,4 @@ export class VersionsControllerService {
} }
return false; return false;
} }
/**
* Retrieves current versions.
* 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 getVersions(observe?: 'body', reportProgress?: boolean): Observable<VersionsResponse>;
public getVersions(
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<VersionsResponse>>;
public getVersions(
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<VersionsResponse>>;
public getVersions(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
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<VersionsResponse>('get', `${this.basePath}/version`, {
withCredentials: this.configuration.withCredentials,
headers: headers,
observe: observe,
reportProgress: reportProgress
});
}
} }

View File

@ -23,15 +23,11 @@ import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class ViewedPagesControllerService { export class ViewedPagesControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor( constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
protected httpClient: HttpClient,
@Optional() @Inject(BASE_PATH) basePath: string,
@Optional() configuration: Configuration
) {
if (basePath) { if (basePath) {
this.basePath = basePath; this.basePath = basePath;
} }
@ -41,20 +37,6 @@ export class ViewedPagesControllerService {
} }
} }
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
/** /**
* Adds a page to the viewed pages * Adds a page to the viewed pages
* None * None
@ -64,84 +46,50 @@ export class ViewedPagesControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public addPage( public addPage(body: ViewedPagesRequest, projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
body: ViewedPagesRequest,
projectId: string, public addPage(body: ViewedPagesRequest, projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
fileId: string,
observe?: 'body', public addPage(body: ViewedPagesRequest, projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
reportProgress?: boolean
): Observable<any>; public addPage(body: ViewedPagesRequest, projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public addPage(
body: ViewedPagesRequest,
projectId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public addPage(
body: ViewedPagesRequest,
projectId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public addPage(
body: ViewedPagesRequest,
projectId: string,
fileId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling addPage.'); throw new Error('Required parameter body was null or undefined when calling addPage.');
} }
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling addPage.');
'Required parameter projectId was null or undefined when calling addPage.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling addPage.');
'Required parameter fileId was null or undefined when calling addPage.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = ['application/json']; const consumes: string[] = ['application/json'];
const httpContentTypeSelected: const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
| string
| undefined = this.configuration.selectHeaderContentType(consumes);
if (httpContentTypeSelected !== undefined) { if (httpContentTypeSelected !== undefined) {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<any>( return this.httpClient.request<any>(
'post', 'post',
`${this.basePath}/viewedPages/${encodeURIComponent( `${this.basePath}/viewedPages/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
String(projectId)
)}/${encodeURIComponent(String(fileId))}`,
{ {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
@ -160,58 +108,32 @@ export class ViewedPagesControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getViewedPages( public getViewedPages(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ViewedPages>;
projectId: string,
fileId: string, public getViewedPages(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<ViewedPages>>;
observe?: 'body',
reportProgress?: boolean public getViewedPages(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<ViewedPages>>;
): Observable<ViewedPages>;
public getViewedPages( public getViewedPages(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
projectId: string,
fileId: string,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<ViewedPages>>;
public getViewedPages(
projectId: string,
fileId: string,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<ViewedPages>>;
public getViewedPages(
projectId: string,
fileId: string,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling getViewedPages.');
'Required parameter projectId was null or undefined when calling getViewedPages.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling getViewedPages.');
'Required parameter fileId was null or undefined when calling getViewedPages.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = ['application/json']; const httpHeaderAccepts: string[] = ['application/json'];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -221,9 +143,7 @@ export class ViewedPagesControllerService {
return this.httpClient.request<ViewedPages>( return this.httpClient.request<ViewedPages>(
'get', 'get',
`${this.basePath}/viewedPages/${encodeURIComponent( `${this.basePath}/viewedPages/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
String(projectId)
)}/${encodeURIComponent(String(fileId))}`,
{ {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -242,68 +162,36 @@ export class ViewedPagesControllerService {
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public removePage( public removePage(projectId: string, fileId: string, page: number, observe?: 'body', reportProgress?: boolean): Observable<any>;
projectId: string,
fileId: string, public removePage(projectId: string, fileId: string, page: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
page: number,
observe?: 'body', public removePage(projectId: string, fileId: string, page: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
reportProgress?: boolean
): Observable<any>; public removePage(projectId: string, fileId: string, page: number, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public removePage(
projectId: string,
fileId: string,
page: number,
observe?: 'response',
reportProgress?: boolean
): Observable<HttpResponse<any>>;
public removePage(
projectId: string,
fileId: string,
page: number,
observe?: 'events',
reportProgress?: boolean
): Observable<HttpEvent<any>>;
public removePage(
projectId: string,
fileId: string,
page: number,
observe: any = 'body',
reportProgress: boolean = false
): Observable<any> {
if (projectId === null || projectId === undefined) { if (projectId === null || projectId === undefined) {
throw new Error( throw new Error('Required parameter projectId was null or undefined when calling removePage.');
'Required parameter projectId was null or undefined when calling removePage.'
);
} }
if (fileId === null || fileId === undefined) { if (fileId === null || fileId === undefined) {
throw new Error( throw new Error('Required parameter fileId was null or undefined when calling removePage.');
'Required parameter fileId was null or undefined when calling removePage.'
);
} }
if (page === null || page === undefined) { if (page === null || page === undefined) {
throw new Error( throw new Error('Required parameter page was null or undefined when calling removePage.');
'Required parameter page was null or undefined when calling removePage.'
);
} }
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
if (this.configuration.accessToken) { if (this.configuration.accessToken) {
const accessToken = const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
typeof this.configuration.accessToken === 'function'
? this.configuration.accessToken()
: this.configuration.accessToken;
headers = headers.set('Authorization', 'Bearer ' + accessToken); headers = headers.set('Authorization', 'Bearer ' + accessToken);
} }
// to determine the Accept header // to determine the Accept header
const httpHeaderAccepts: string[] = []; const httpHeaderAccepts: string[] = [];
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept( const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
httpHeaderAccepts
);
if (httpHeaderAcceptSelected !== undefined) { if (httpHeaderAcceptSelected !== undefined) {
headers = headers.set('Accept', httpHeaderAcceptSelected); headers = headers.set('Accept', httpHeaderAcceptSelected);
} }
@ -313,9 +201,7 @@ export class ViewedPagesControllerService {
return this.httpClient.request<any>( return this.httpClient.request<any>(
'delete', 'delete',
`${this.basePath}/viewedPages/${encodeURIComponent( `${this.basePath}/viewedPages/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(page))}`,
String(projectId)
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(page))}`,
{ {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -324,4 +210,18 @@ export class ViewedPagesControllerService {
} }
); );
} }
/**
* @param consumes string[] mime-types
* @return true: consumes contains 'multipart/form-data', false: otherwise
*/
private canConsumeForm(consumes: string[]): boolean {
const form = 'multipart/form-data';
for (const consume of consumes) {
if (form === consume) {
return true;
}
}
return false;
}
} }

View File

@ -11,21 +11,20 @@
*/ /* tslint:disable:no-unused-variable member-ordering */ */ /* tslint:disable:no-unused-variable member-ordering */
import { Inject, Injectable, Optional } from '@angular/core'; import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http'; import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http';
import { CustomHttpUrlEncodingCodec } from '../encoder';
import { Observable } from 'rxjs'; import { Observable } from 'rxjs';
import { WatermarkModel } from '../model/watermarkModel'; import { WatermarkModel } from '../model/watermarkModel';
import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; import { BASE_PATH } from '../variables';
import { Configuration } from '../configuration'; import { Configuration } from '../configuration';
@Injectable() @Injectable()
export class WatermarkControllerService { export class WatermarkControllerService {
protected basePath = '';
public defaultHeaders = new HttpHeaders(); public defaultHeaders = new HttpHeaders();
public configuration = new Configuration(); public configuration = new Configuration();
protected basePath = '';
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) { constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
if (basePath) { if (basePath) {
@ -37,30 +36,24 @@ export class WatermarkControllerService {
} }
} }
/**
* @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;
}
/** /**
* Remove watermark configuration * Remove watermark configuration
* None * None
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public deleteWatermark(observe?: 'body', reportProgress?: boolean): Observable<any>; public deleteWatermark(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
public deleteWatermark(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteWatermark(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>; public deleteWatermark(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
public deleteWatermark(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public deleteWatermark(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
public deleteWatermark(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling deleteWatermark.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -79,7 +72,7 @@ export class WatermarkControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<any>('delete', `${this.basePath}/watermark`, { return this.httpClient.request<any>('delete', `${this.basePath}/watermark/${encodeURIComponent(String(ruleSetId))}`, {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
observe: observe, observe: observe,
@ -90,13 +83,21 @@ export class WatermarkControllerService {
/** /**
* Get the current watermark configuration * Get the current watermark configuration
* None * None
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public getWatermark(observe?: 'body', reportProgress?: boolean): Observable<WatermarkModel>; public getWatermark(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<WatermarkModel>;
public getWatermark(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<WatermarkModel>>;
public getWatermark(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<WatermarkModel>>; public getWatermark(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<WatermarkModel>>;
public getWatermark(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public getWatermark(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<WatermarkModel>>;
public getWatermark(ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling getWatermark.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -115,7 +116,7 @@ export class WatermarkControllerService {
// to determine the Content-Type header // to determine the Content-Type header
const consumes: string[] = []; const consumes: string[] = [];
return this.httpClient.request<WatermarkModel>('get', `${this.basePath}/watermark`, { return this.httpClient.request<WatermarkModel>('get', `${this.basePath}/watermark/${encodeURIComponent(String(ruleSetId))}`, {
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
observe: observe, observe: observe,
@ -127,17 +128,25 @@ export class WatermarkControllerService {
* Save/Update watermark configuration * Save/Update watermark configuration
* None * None
* @param body watermark * @param body watermark
* @param ruleSetId ruleSetId
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @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. * @param reportProgress flag to report request and response progress.
*/ */
public saveWatermark(body: WatermarkModel, observe?: 'body', reportProgress?: boolean): Observable<WatermarkModel>; public saveWatermark(body: WatermarkModel, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<WatermarkModel>;
public saveWatermark(body: WatermarkModel, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<WatermarkModel>>;
public saveWatermark(body: WatermarkModel, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<WatermarkModel>>; public saveWatermark(body: WatermarkModel, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<WatermarkModel>>;
public saveWatermark(body: WatermarkModel, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
public saveWatermark(body: WatermarkModel, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<WatermarkModel>>;
public saveWatermark(body: WatermarkModel, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
if (body === null || body === undefined) { if (body === null || body === undefined) {
throw new Error('Required parameter body was null or undefined when calling saveWatermark.'); throw new Error('Required parameter body was null or undefined when calling saveWatermark.');
} }
if (ruleSetId === null || ruleSetId === undefined) {
throw new Error('Required parameter ruleSetId was null or undefined when calling saveWatermark.');
}
let headers = this.defaultHeaders; let headers = this.defaultHeaders;
// authentication (RED-OAUTH) required // authentication (RED-OAUTH) required
@ -160,7 +169,7 @@ export class WatermarkControllerService {
headers = headers.set('Content-Type', httpContentTypeSelected); headers = headers.set('Content-Type', httpContentTypeSelected);
} }
return this.httpClient.request<WatermarkModel>('post', `${this.basePath}/watermark`, { return this.httpClient.request<WatermarkModel>('post', `${this.basePath}/watermark/${encodeURIComponent(String(ruleSetId))}`, {
body: body, body: body,
withCredentials: this.configuration.withCredentials, withCredentials: this.configuration.withCredentials,
headers: headers, headers: headers,
@ -168,4 +177,18 @@ export class WatermarkControllerService {
reportProgress: reportProgress 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

@ -38,4 +38,8 @@ export interface Dictionary {
* True if the type just for recommendations, not for redaction, default is false. * True if the type just for recommendations, not for redaction, default is false.
*/ */
recommendation?: boolean; recommendation?: boolean;
/**
* The RuleSet Id for this type
*/
ruleSetId?: string;
} }

View File

@ -30,10 +30,6 @@ export interface FileStatus {
* The current reviewer's (if any) user id. * The current reviewer's (if any) user id.
*/ */
currentReviewer?: string; currentReviewer?: string;
/**
* The last reviewer's (if any) user id.
*/
lastReviewer?: string;
/** /**
* Shows which dictionary versions was used during the analysis. * Shows which dictionary versions was used during the analysis.
*/ */
@ -62,6 +58,10 @@ export interface FileStatus {
* Shows the last date of a successful analysis. * Shows the last date of a successful analysis.
*/ */
lastProcessed?: string; lastProcessed?: string;
/**
* The last reviewer's (if any) user id.
*/
lastReviewer?: string;
/** /**
* Date and time when the file was last updated. * Date and time when the file was last updated.
*/ */
@ -95,6 +95,7 @@ export interface FileStatus {
*/ */
uploader?: string; uploader?: string;
} }
export namespace FileStatus { export namespace FileStatus {
export type StatusEnum = 'UNPROCESSED' | 'REPROCESS' | 'PROCESSING' | 'ERROR' | 'UNASSIGNED' | 'UNDER_REVIEW' | 'UNDER_APPROVAL' | 'APPROVED'; export type StatusEnum = 'UNPROCESSED' | 'REPROCESS' | 'PROCESSING' | 'ERROR' | 'UNASSIGNED' | 'UNDER_REVIEW' | 'UNDER_APPROVAL' | 'APPROVED';
export const StatusEnum = { export const StatusEnum = {

View File

@ -18,6 +18,7 @@ export interface IdRemoval {
status?: IdRemoval.StatusEnum; status?: IdRemoval.StatusEnum;
user?: string; user?: string;
} }
export namespace IdRemoval { export namespace IdRemoval {
export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED'; export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED';
export const StatusEnum = { export const StatusEnum = {

View File

@ -24,6 +24,7 @@ export interface ManualRedactionEntry {
user?: string; user?: string;
value?: string; value?: string;
} }
export namespace ManualRedactionEntry { export namespace ManualRedactionEntry {
export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED'; export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED';
export const StatusEnum = { export const StatusEnum = {

View File

@ -28,6 +28,7 @@ export * from './redactionLogEntry';
export * from './removeRedactionRequest'; export * from './removeRedactionRequest';
export * from './reportData'; export * from './reportData';
export * from './rolesRequest'; export * from './rolesRequest';
export * from './ruleSetModel';
export * from './rules'; export * from './rules';
export * from './sectionGrid'; export * from './sectionGrid';
export * from './sectionRectangle'; export * from './sectionRectangle';

View File

@ -18,8 +18,10 @@ export interface Project {
ownerId?: string; ownerId?: string;
projectId?: string; projectId?: string;
projectName?: string; projectName?: string;
ruleSetId?: string;
status?: Project.StatusEnum; status?: Project.StatusEnum;
} }
export namespace Project { export namespace Project {
export type StatusEnum = 'ACTIVE' | 'DELETED'; export type StatusEnum = 'ACTIVE' | 'DELETED';
export const StatusEnum = { export const StatusEnum = {

View File

@ -38,4 +38,8 @@ export interface ProjectRequest {
* The name of the project. Must be unique. * The name of the project. Must be unique.
*/ */
projectName?: string; projectName?: string;
/**
* The ruleSetId for this project. can be null for update request.
*/
ruleSetId?: string;
} }

View File

@ -15,5 +15,6 @@ export interface RedactionLog {
dictionaryVersion?: number; dictionaryVersion?: number;
filename?: string; filename?: string;
redactionLogEntry?: Array<RedactionLogEntry>; redactionLogEntry?: Array<RedactionLogEntry>;
ruleSetId?: string;
rulesVersion?: number; rulesVersion?: number;
} }

View File

@ -20,6 +20,7 @@ export interface ReportData {
project?: string; project?: string;
status?: ReportData.StatusEnum; status?: ReportData.StatusEnum;
} }
export namespace ReportData { export namespace ReportData {
export type StatusEnum = 'UNPROCESSED' | 'REPROCESS' | 'PROCESSING' | 'ERROR' | 'DELETED' | 'UNASSIGNED' | 'UNDER_REVIEW' | 'UNDER_APPROVAL' | 'APPROVED'; export type StatusEnum = 'UNPROCESSED' | 'REPROCESS' | 'PROCESSING' | 'ERROR' | 'DELETED' | 'UNASSIGNED' | 'UNDER_REVIEW' | 'UNDER_APPROVAL' | 'APPROVED';
export const StatusEnum = { export const StatusEnum = {

View File

@ -0,0 +1,50 @@
/**
* 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 RuleSetModel {
/**
* The userId of the user who created this RuleSet. Set by the system.
*/
createdBy?: string;
/**
* The date when this ruleSet was created. Set by System on create.
*/
dateAdded?: string;
/**
* The date when this ruleSet was last modified. Set by System on create.
*/
dateModified?: string;
/**
* The description of this ruleSet
*/
description?: string;
/**
* The userId of the user who last modified this RuleSet. Set by the system.
*/
modifiedBy?: string;
/**
* The name of this ruleSet. Must be set on create / update requests
*/
name?: string;
/**
* The Rule Set Id. Generated by the system on create.
*/
ruleSetId?: string;
/**
* Validity of start this ruleSet.
*/
validFrom?: string;
/**
* Validity of end this ruleSet.
*/
validTo?: string;
}

View File

@ -18,4 +18,8 @@ export interface Rules {
* The actual string of rules. * The actual string of rules.
*/ */
rules?: string; rules?: string;
/**
* The ruleSetId for these rules
*/
ruleSetId?: string;
} }

View File

@ -39,6 +39,12 @@ export interface TypeValue {
* The nonnull entry type. * The nonnull entry type.
*/ */
type?: string; type?: string;
/**
* The ruleSetId for this type
*/
ruleSetId?: string;
isDefaultFilter?: boolean; isDefaultFilter?: boolean;
virtual?: boolean; virtual?: boolean;

View File

@ -15,4 +15,14 @@ export interface WatermarkModel {
hexColor?: string; hexColor?: string;
opacity?: number; opacity?: number;
text?: string; text?: string;
watermarkOrientation?: WatermarkModel.WatermarkOrientationEnum;
}
export namespace WatermarkModel {
export type WatermarkOrientationEnum = 'VERTICAL' | 'HORIZONTAL' | 'ROTATE_LEFT_45_DEG';
export const WatermarkOrientationEnum = {
VERTICAL: 'VERTICAL' as WatermarkOrientationEnum,
HORIZONTAL: 'HORIZONTAL' as WatermarkOrientationEnum,
ROTATELEFT45DEG: 'ROTATE_LEFT_45_DEG' as WatermarkOrientationEnum
};
} }