ruleSet basics
This commit is contained in:
parent
3959db3ffa
commit
caec8cc007
@ -5,10 +5,11 @@
|
||||
To regnerate http rune swaagger
|
||||
|
||||
```
|
||||
BASE=https://redapi-staging.iqser.cloud/
|
||||
BASE=http://localhost:8080/
|
||||
URL="$BASE"v2/api-docs?group=redaction-gateway-v1
|
||||
mkdir -p /tmp/swagger
|
||||
swagger-codegen generate -i "$URL" -l typescript-angular -o /tmp/swagger
|
||||
cd /tmp/swagger
|
||||
```
|
||||
|
||||
## To Create a new Stack in rancher
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"OAUTH_URL": "https://redkc-staging.iqser.cloud/auth/realms/redaction",
|
||||
"OAUTH_CLIENT_ID": "redaction",
|
||||
"API_URL": "https://redapi-staging.iqser.cloud"
|
||||
"API_URL": "https://timo-redaction-dev.iqser.cloud"
|
||||
}
|
||||
|
||||
@ -1,25 +1,31 @@
|
||||
import { VersionsControllerService } from './versionsController.service';
|
||||
|
||||
export * from './debugController.service';
|
||||
import { DebugControllerService } from './debugController.service';
|
||||
import { DictionaryControllerService } from './dictionaryController.service';
|
||||
import { FileManagementControllerService } from './fileManagementController.service';
|
||||
import { InfoControllerService } from './infoController.service';
|
||||
import { LegalBasisMappingControllerService } from './legalBasisMappingController.service';
|
||||
import { LicenseReportControllerService } from './licenseReportController.service';
|
||||
import { ManualRedactionControllerService } from './manualRedactionController.service';
|
||||
import { ProjectControllerService } from './projectController.service';
|
||||
import { ReanalysisControllerService } from './reanalysisController.service';
|
||||
import { RedactionLogControllerService } from './redactionLogController.service';
|
||||
import { RuleSetControllerService } from './ruleSetController.service';
|
||||
import { RulesControllerService } from './rulesController.service';
|
||||
import { StatusControllerService } from './statusController.service';
|
||||
import { UserControllerService } from './userController.service';
|
||||
import { UserPreferenceControllerService } from './userPreferenceController.service';
|
||||
import { VersionsControllerService } from './versionsController.service';
|
||||
import { ViewedPagesControllerService } from './viewedPagesController.service';
|
||||
import { LegalBasisMappingControllerService } from './legalBasisMappingController.service';
|
||||
import { WatermarkControllerService } from './watermarkController.service';
|
||||
|
||||
export * from './dictionaryController.service';
|
||||
|
||||
export * from './fileManagementController.service';
|
||||
|
||||
export * from './infoController.service';
|
||||
|
||||
export * from './legalBasisMappingController.service';
|
||||
|
||||
export * from './licenseReportController.service';
|
||||
|
||||
export * from './manualRedactionController.service';
|
||||
@ -30,34 +36,39 @@ export * from './reanalysisController.service';
|
||||
|
||||
export * from './redactionLogController.service';
|
||||
|
||||
export * from './ruleSetController.service';
|
||||
|
||||
export * from './rulesController.service';
|
||||
|
||||
export * from './statusController.service';
|
||||
|
||||
export * from './userController.service';
|
||||
|
||||
export * from './userPreferenceController.service';
|
||||
|
||||
export * from './versionsController.service';
|
||||
|
||||
export * from './viewedPagesController.service';
|
||||
|
||||
export * from './legalBasisMappingController.service';
|
||||
|
||||
export * from './watermarkController.service';
|
||||
|
||||
export const APIS = [
|
||||
DebugControllerService,
|
||||
DictionaryControllerService,
|
||||
FileManagementControllerService,
|
||||
InfoControllerService,
|
||||
LegalBasisMappingControllerService,
|
||||
LicenseReportControllerService,
|
||||
ManualRedactionControllerService,
|
||||
ProjectControllerService,
|
||||
ReanalysisControllerService,
|
||||
RedactionLogControllerService,
|
||||
RuleSetControllerService,
|
||||
RulesControllerService,
|
||||
StatusControllerService,
|
||||
UserControllerService,
|
||||
UserPreferenceControllerService,
|
||||
VersionsControllerService,
|
||||
ViewedPagesControllerService,
|
||||
LegalBasisMappingControllerService,
|
||||
WatermarkControllerService
|
||||
];
|
||||
|
||||
@ -68,7 +68,7 @@ export class DebugControllerService {
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = ['application/octet-stream'];
|
||||
const httpHeaderAccepts: string[] = ['*/*'];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
@ -138,7 +138,7 @@ export class DebugControllerService {
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = ['application/octet-stream'];
|
||||
const httpHeaderAccepts: string[] = ['*/*'];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
@ -165,8 +165,7 @@ export class DebugControllerService {
|
||||
formParams = (formParams.append('file', <any>file) as any) || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request('post', `${this.basePath}/debug/htmlTables`, {
|
||||
responseType: 'text',
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/debug/htmlTables`, {
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
@ -209,7 +208,7 @@ export class DebugControllerService {
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = ['application/octet-stream'];
|
||||
const httpHeaderAccepts: string[] = ['*/*'];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
@ -283,7 +282,7 @@ export class DebugControllerService {
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = ['application/octet-stream'];
|
||||
const httpHeaderAccepts: string[] = ['*/*'];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
|
||||
@ -27,9 +27,9 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class DictionaryControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
@ -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.
|
||||
* None
|
||||
* @param body entries
|
||||
* @param type type
|
||||
* @param ruleSetId ruleSetId
|
||||
* @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 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, 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(body: Array<string>, type: string, removeCurrent?: boolean, observe: any = 'body', reportProgress: boolean = false): 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,
|
||||
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) {
|
||||
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.');
|
||||
}
|
||||
|
||||
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() });
|
||||
if (removeCurrent !== undefined && removeCurrent !== null) {
|
||||
queryParameters = queryParameters.set('removeCurrent', <any>removeCurrent);
|
||||
@ -103,31 +118,43 @@ export class DictionaryControllerService {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/${encodeURIComponent(String(type))}`, {
|
||||
body: body,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
|
||||
{
|
||||
body: body,
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates entry type with colors, hint and caseInsensitive
|
||||
* None
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public addType(body: TypeValue, 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, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public addType(body: TypeValue, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public addType(body: TypeValue, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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) {
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -150,7 +177,7 @@ export class DictionaryControllerService {
|
||||
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,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -164,19 +191,27 @@ export class DictionaryControllerService {
|
||||
* None
|
||||
* @param body entries
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteEntry(body: Array<string>, type: 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 deleteEntry(body: Array<string>, type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public deleteEntries(body: Array<string>, type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public deleteEntries(body: Array<string>, type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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) {
|
||||
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) {
|
||||
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;
|
||||
@ -195,34 +230,51 @@ export class DictionaryControllerService {
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['*/*'];
|
||||
const consumes: string[] = ['application/json'];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('delete', `${this.basePath}/dictionary/${encodeURIComponent(String(type))}`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/dictionary/delete/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deletes entry type
|
||||
* Delete dictionary entry with entry type.
|
||||
* None
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteType(type: 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 deleteType(type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public deleteEntry(type: string, ruleSetId: string, entry: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public deleteEntry(type: string, ruleSetId: string, entry: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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) {
|
||||
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;
|
||||
@ -243,32 +295,39 @@ export class DictionaryControllerService {
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>('delete', `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}`, {
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
return this.httpClient.request<any>(
|
||||
'delete',
|
||||
`${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}/${encodeURIComponent(String(entry))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete dictionary entries with entry type.
|
||||
* Deletes entry type
|
||||
* None
|
||||
* @param body entries
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteEntries(body: Array<string>, type: 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 deleteEntries(body: Array<string>, type: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling deleteEntries.');
|
||||
public deleteType(type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public deleteType(type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public deleteType(type: string, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
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) {
|
||||
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 deleteType.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
@ -287,36 +346,43 @@ export class DictionaryControllerService {
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['application/json'];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/delete/${encodeURIComponent(String(type))}`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
return this.httpClient.request<any>(
|
||||
'delete',
|
||||
`${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns file containing the the dictionary entries for given 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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public downloadDictionaryFile(type: 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, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public downloadDictionaryFile(type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public downloadDictionaryFile(type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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) {
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -335,24 +401,36 @@ export class DictionaryControllerService {
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>('get', `${this.basePath}/dictionary/download/${encodeURIComponent(String(type))}`, {
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
return this.httpClient.request<any>(
|
||||
'get',
|
||||
`${this.basePath}/dictionary/download/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve all entry types
|
||||
* 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 getAllTypes(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(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public getAllTypes(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<TypeResponse>;
|
||||
|
||||
public getAllTypes(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<TypeResponse>>;
|
||||
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -371,7 +449,7 @@ export class DictionaryControllerService {
|
||||
// to determine the Content-Type header
|
||||
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,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
@ -382,13 +460,21 @@ export class DictionaryControllerService {
|
||||
/**
|
||||
* Retrieves system colors for redaction.
|
||||
* 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 getColors(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(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public getColors(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<Colors>;
|
||||
|
||||
public getColors(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Colors>>;
|
||||
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -407,7 +493,7 @@ export class DictionaryControllerService {
|
||||
// to determine the Content-Type header
|
||||
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,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
@ -419,17 +505,25 @@ export class DictionaryControllerService {
|
||||
* Retrieves all dictionary entries of an entry type
|
||||
* None
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getDictionaryForType(type: 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, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public getDictionaryForType(type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<Dictionary>;
|
||||
|
||||
public getDictionaryForType(type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Dictionary>>;
|
||||
|
||||
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) {
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -448,29 +542,41 @@ export class DictionaryControllerService {
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<Dictionary>('get', `${this.basePath}/dictionary/${encodeURIComponent(String(type))}`, {
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
return this.httpClient.request<Dictionary>(
|
||||
'get',
|
||||
`${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set system colors for redaction
|
||||
*
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public setColors(body: Colors, 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, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public setColors(body: Colors, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setColors(body: Colors, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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) {
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -493,7 +599,7 @@ export class DictionaryControllerService {
|
||||
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,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -507,13 +613,17 @@ export class DictionaryControllerService {
|
||||
* None
|
||||
* @param body typeValue
|
||||
* @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 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, 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, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public updateType(body: UpdateTypeValue, type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public updateType(body: UpdateTypeValue, type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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) {
|
||||
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.');
|
||||
}
|
||||
|
||||
if (ruleSetId === null || ruleSetId === undefined) {
|
||||
throw new Error('Required parameter ruleSetId was null or undefined when calling updateType.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -544,13 +658,17 @@ export class DictionaryControllerService {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -558,13 +676,17 @@ export class DictionaryControllerService {
|
||||
*
|
||||
* @param file
|
||||
* @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 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, 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, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public uploadDictionaryFileForm(file: Blob, type: string, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public uploadDictionaryFileForm(file: Blob, type: string, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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) {
|
||||
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.');
|
||||
}
|
||||
|
||||
if (ruleSetId === null || ruleSetId === undefined) {
|
||||
throw new Error('Required parameter ruleSetId was null or undefined when calling uploadDictionaryFile.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -609,12 +735,30 @@ export class DictionaryControllerService {
|
||||
formParams = (formParams.append('file', <any>file) as any) || formParams;
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/upload/${encodeURIComponent(String(type))}`, {
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/dictionary/upload/${encodeURIComponent(String(type))}/${encodeURIComponent(String(ruleSetId))}`,
|
||||
{
|
||||
body: convertFormParamsToString ? formParams.toString() : formParams,
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,9 +25,9 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class FileManagementControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
@ -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
|
||||
* None
|
||||
@ -62,8 +48,11 @@ export class FileManagementControllerService {
|
||||
* @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?: '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: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
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.
|
||||
*/
|
||||
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?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public deleteFiles(body: Array<string>, projectId: 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 deleteFiles.');
|
||||
@ -195,6 +187,9 @@ export class FileManagementControllerService {
|
||||
if (inline !== undefined && inline !== null) {
|
||||
queryParameters = queryParameters.set('inline', <any>inline);
|
||||
}
|
||||
if (indicator !== undefined && indicator !== null) {
|
||||
queryParameters = queryParameters.set('indicator', <any>indicator);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
@ -361,6 +356,7 @@ export class FileManagementControllerService {
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
|
||||
public downloadRedactedFiles(
|
||||
body: BulkDownloadRedactedRequest,
|
||||
projectId: string,
|
||||
@ -368,6 +364,7 @@ export class FileManagementControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
|
||||
public downloadRedactedFiles(
|
||||
body: BulkDownloadRedactedRequest,
|
||||
projectId: string,
|
||||
@ -375,6 +372,7 @@ export class FileManagementControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
|
||||
public downloadRedactedFiles(
|
||||
body: BulkDownloadRedactedRequest,
|
||||
projectId: string,
|
||||
@ -438,6 +436,7 @@ export class FileManagementControllerService {
|
||||
* @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,
|
||||
@ -445,6 +444,7 @@ export class FileManagementControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
|
||||
public downloadRedactionReport(
|
||||
body: FileIds,
|
||||
inline?: boolean,
|
||||
@ -452,6 +452,7 @@ export class FileManagementControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
|
||||
public downloadRedactionReport(
|
||||
body: FileIds,
|
||||
inline?: boolean,
|
||||
@ -520,6 +521,7 @@ export class FileManagementControllerService {
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
|
||||
public downloadRedactionReportForProject(
|
||||
projectId: string,
|
||||
inline?: boolean,
|
||||
@ -527,6 +529,7 @@ export class FileManagementControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
|
||||
public downloadRedactionReportForProject(
|
||||
projectId: string,
|
||||
inline?: boolean,
|
||||
@ -534,6 +537,7 @@ export class FileManagementControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
|
||||
public downloadRedactionReportForProject(
|
||||
projectId: string,
|
||||
inline?: boolean,
|
||||
@ -590,8 +594,11 @@ export class FileManagementControllerService {
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public uploadFileForm(file: Blob, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<FileUploadResult>;
|
||||
|
||||
public uploadFileForm(file: Blob, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<FileUploadResult>>;
|
||||
|
||||
public uploadFileForm(file: Blob, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<FileUploadResult>>;
|
||||
|
||||
public uploadFileForm(file: Blob, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error('Required parameter file was null or undefined when calling uploadFile.');
|
||||
@ -645,4 +652,18 @@ export class FileManagementControllerService {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,11 +26,7 @@ export class InfoControllerService {
|
||||
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) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
@ -48,33 +44,22 @@ export class InfoControllerService {
|
||||
*/
|
||||
public getAuthInfo(observe?: 'body', reportProgress?: boolean): Observable<AuthInfo>;
|
||||
|
||||
public getAuthInfo(
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<AuthInfo>>;
|
||||
public getAuthInfo(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<AuthInfo>>;
|
||||
|
||||
public getAuthInfo(
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<AuthInfo>>;
|
||||
public getAuthInfo(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<AuthInfo>>;
|
||||
|
||||
public getAuthInfo(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;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
@ -22,9 +22,9 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class LegalBasisMappingControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
@ -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.
|
||||
* 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 getLegalBasisMapping(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(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public getLegalBasisMapping(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<LegalBasisMapping>;
|
||||
|
||||
public getLegalBasisMapping(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<LegalBasisMapping>>;
|
||||
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -78,7 +72,7 @@ export class LegalBasisMappingControllerService {
|
||||
// to determine the Content-Type header
|
||||
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,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
@ -90,17 +84,25 @@ export class LegalBasisMappingControllerService {
|
||||
* Set the mapping between legal basis and redaction reason.
|
||||
* None
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public setLegalBasisMapping(body: LegalBasisMapping, 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, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public setLegalBasisMapping(body: LegalBasisMapping, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setLegalBasisMapping(body: LegalBasisMapping, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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) {
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -123,7 +125,7 @@ export class LegalBasisMappingControllerService {
|
||||
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,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -131,4 +133,18 @@ export class LegalBasisMappingControllerService {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -28,11 +28,7 @@ export class LicenseReportControllerService {
|
||||
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) {
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public licenseReport(
|
||||
body: LicenseReportRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<LicenseReport>;
|
||||
public licenseReport(body: LicenseReportRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<LicenseReport>;
|
||||
|
||||
public licenseReport(
|
||||
body: LicenseReportRequest,
|
||||
@ -75,17 +65,9 @@ export class LicenseReportControllerService {
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<LicenseReport>>;
|
||||
|
||||
public licenseReport(
|
||||
body: LicenseReportRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public licenseReport(body: LicenseReportRequest, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling licenseReport.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling licenseReport.');
|
||||
}
|
||||
|
||||
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
||||
@ -100,27 +82,20 @@ export class LicenseReportControllerService {
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: 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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
@ -28,15 +28,11 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class ManualRedactionControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string,
|
||||
@Optional() configuration: Configuration
|
||||
) {
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (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
|
||||
* None
|
||||
@ -78,6 +60,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<CommentResponse>;
|
||||
|
||||
public addComment(
|
||||
body: AddCommentRequest,
|
||||
projectId: string,
|
||||
@ -86,6 +69,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<CommentResponse>>;
|
||||
|
||||
public addComment(
|
||||
body: AddCommentRequest,
|
||||
projectId: string,
|
||||
@ -94,6 +78,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<CommentResponse>>;
|
||||
|
||||
public addComment(
|
||||
body: AddCommentRequest,
|
||||
projectId: string,
|
||||
@ -103,63 +88,48 @@ export class ManualRedactionControllerService {
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling addComment.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling addComment.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling addComment.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling addComment.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling addComment.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling addComment.');
|
||||
}
|
||||
|
||||
if (annotationId === null || annotationId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter annotationId was null or undefined when calling addComment.'
|
||||
);
|
||||
throw new Error('Required parameter annotationId was null or undefined when calling addComment.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<CommentResponse>(
|
||||
'post',
|
||||
`${this.basePath}/manualRedaction/comment/add/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`,
|
||||
`${this.basePath}/manualRedaction/comment/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
|
||||
String(annotationId)
|
||||
)}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
@ -186,6 +156,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<ManualAddResponse>;
|
||||
|
||||
public addRedaction(
|
||||
body: AddRedactionRequest,
|
||||
projectId: string,
|
||||
@ -193,6 +164,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<ManualAddResponse>>;
|
||||
|
||||
public addRedaction(
|
||||
body: AddRedactionRequest,
|
||||
projectId: string,
|
||||
@ -200,65 +172,45 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<ManualAddResponse>>;
|
||||
public addRedaction(
|
||||
body: AddRedactionRequest,
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
|
||||
public addRedaction(body: AddRedactionRequest, projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling addRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling addRedaction.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling addRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling addRedaction.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling addRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling addRedaction.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<ManualAddResponse>(
|
||||
'post',
|
||||
`${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/manualRedaction/redaction/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
@ -287,6 +239,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
|
||||
public approveRequest(
|
||||
body: ApproveRequest,
|
||||
projectId: string,
|
||||
@ -295,6 +248,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
|
||||
public approveRequest(
|
||||
body: ApproveRequest,
|
||||
projectId: string,
|
||||
@ -303,6 +257,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
|
||||
public approveRequest(
|
||||
body: ApproveRequest,
|
||||
projectId: string,
|
||||
@ -312,63 +267,48 @@ export class ManualRedactionControllerService {
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling approveRequest.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling approveRequest.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling approveRequest.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling approveRequest.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling approveRequest.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling approveRequest.');
|
||||
}
|
||||
|
||||
if (annotationId === null || annotationId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter annotationId was null or undefined when calling approveRequest.'
|
||||
);
|
||||
throw new Error('Required parameter annotationId was null or undefined when calling approveRequest.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/manualRedaction/approve/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`,
|
||||
`${this.basePath}/manualRedaction/approve/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
|
||||
String(annotationId)
|
||||
)}`,
|
||||
{
|
||||
body: body,
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public declineRequest(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
annotationId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public declineRequest(projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public declineRequest(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
@ -402,54 +337,33 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public declineRequest(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
annotationId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public declineRequest(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
annotationId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
|
||||
public declineRequest(projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public declineRequest(projectId: string, fileId: string, annotationId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling declineRequest.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling declineRequest.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling declineRequest.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling declineRequest.');
|
||||
}
|
||||
|
||||
if (annotationId === null || annotationId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter annotationId was null or undefined when calling declineRequest.'
|
||||
);
|
||||
throw new Error('Required parameter annotationId was null or undefined when calling declineRequest.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -459,9 +373,9 @@ export class ManualRedactionControllerService {
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/manualRedaction/decline/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`,
|
||||
`${this.basePath}/manualRedaction/decline/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
|
||||
String(annotationId)
|
||||
)}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getManualRedaction(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<ManualRedactions>;
|
||||
public getManualRedaction(
|
||||
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> {
|
||||
public getManualRedaction(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ManualRedactions>;
|
||||
|
||||
public getManualRedaction(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) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling getManualRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling getManualRedaction.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling getManualRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling getManualRedaction.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -540,9 +428,7 @@ export class ManualRedactionControllerService {
|
||||
|
||||
return this.httpClient.request<ManualRedactions>(
|
||||
'get',
|
||||
`${this.basePath}/manualRedaction/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/manualRedaction/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -551,6 +437,7 @@ export class ManualRedactionControllerService {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes a redaction
|
||||
* None
|
||||
@ -567,6 +454,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<ManualAddResponse>;
|
||||
|
||||
public removeRedaction(
|
||||
body: RemoveRedactionRequest,
|
||||
projectId: string,
|
||||
@ -574,6 +462,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<ManualAddResponse>>;
|
||||
|
||||
public removeRedaction(
|
||||
body: RemoveRedactionRequest,
|
||||
projectId: string,
|
||||
@ -581,6 +470,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<ManualAddResponse>>;
|
||||
|
||||
public removeRedaction(
|
||||
body: RemoveRedactionRequest,
|
||||
projectId: string,
|
||||
@ -589,57 +479,42 @@ export class ManualRedactionControllerService {
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling removeRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling removeRedaction.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling removeRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling removeRedaction.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling removeRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling removeRedaction.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<ManualAddResponse>(
|
||||
'post',
|
||||
`${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/manualRedaction/redaction/remove/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
@ -666,6 +541,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<ManualAddResponse>;
|
||||
|
||||
public requestAddRedaction(
|
||||
body: AddRedactionRequest,
|
||||
projectId: string,
|
||||
@ -673,6 +549,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<ManualAddResponse>>;
|
||||
|
||||
public requestAddRedaction(
|
||||
body: AddRedactionRequest,
|
||||
projectId: string,
|
||||
@ -680,6 +557,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<ManualAddResponse>>;
|
||||
|
||||
public requestAddRedaction(
|
||||
body: AddRedactionRequest,
|
||||
projectId: string,
|
||||
@ -688,57 +566,42 @@ export class ManualRedactionControllerService {
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling requestAddRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling requestAddRedaction.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling requestAddRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling requestAddRedaction.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling requestAddRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling requestAddRedaction.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<ManualAddResponse>(
|
||||
'post',
|
||||
`${this.basePath}/manualRedaction/request/add/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/manualRedaction/request/add/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
@ -765,6 +628,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<ManualAddResponse>;
|
||||
|
||||
public requestRemoveRedaction(
|
||||
body: RemoveRedactionRequest,
|
||||
projectId: string,
|
||||
@ -772,6 +636,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<ManualAddResponse>>;
|
||||
|
||||
public requestRemoveRedaction(
|
||||
body: RemoveRedactionRequest,
|
||||
projectId: string,
|
||||
@ -779,6 +644,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<ManualAddResponse>>;
|
||||
|
||||
public requestRemoveRedaction(
|
||||
body: RemoveRedactionRequest,
|
||||
projectId: string,
|
||||
@ -787,57 +653,42 @@ export class ManualRedactionControllerService {
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling requestRemoveRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling requestRemoveRedaction.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling requestRemoveRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling requestRemoveRedaction.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling requestRemoveRedaction.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling requestRemoveRedaction.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<ManualAddResponse>(
|
||||
'post',
|
||||
`${this.basePath}/manualRedaction/request/remove/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/manualRedaction/request/remove/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
body: body,
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public undo(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
annotationId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public undo(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
annotationId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public undo(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
annotationId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public undo(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
annotationId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public undo(projectId: string, fileId: string, annotationId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public undo(projectId: string, fileId: string, annotationId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public undo(projectId: string, fileId: string, annotationId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public undo(projectId: string, fileId: string, annotationId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling undo.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling undo.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
@ -896,27 +724,20 @@ export class ManualRedactionControllerService {
|
||||
}
|
||||
|
||||
if (annotationId === null || annotationId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter annotationId was null or undefined when calling undo.'
|
||||
);
|
||||
throw new Error('Required parameter annotationId was null or undefined when calling undo.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: 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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -926,9 +747,9 @@ export class ManualRedactionControllerService {
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'delete',
|
||||
`${this.basePath}/manualRedaction/undo/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(annotationId))}`,
|
||||
`${this.basePath}/manualRedaction/undo/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
|
||||
String(annotationId)
|
||||
)}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public undoComment(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
annotationId: string,
|
||||
commentId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public undoComment(projectId: string, fileId: string, annotationId: string, commentId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public undoComment(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
@ -964,6 +779,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
|
||||
public undoComment(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
@ -972,6 +788,7 @@ export class ManualRedactionControllerService {
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
|
||||
public undoComment(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
@ -981,45 +798,32 @@ export class ManualRedactionControllerService {
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling undoComment.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling undoComment.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling undoComment.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling undoComment.');
|
||||
}
|
||||
|
||||
if (annotationId === null || annotationId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter annotationId was null or undefined when calling undoComment.'
|
||||
);
|
||||
throw new Error('Required parameter annotationId was null or undefined when calling undoComment.');
|
||||
}
|
||||
|
||||
if (commentId === null || commentId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter commentId was null or undefined when calling undoComment.'
|
||||
);
|
||||
throw new Error('Required parameter commentId was null or undefined when calling undoComment.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -1029,9 +833,7 @@ export class ManualRedactionControllerService {
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'delete',
|
||||
`${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
|
||||
`${this.basePath}/manualRedaction/comment/undo/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(
|
||||
String(annotationId)
|
||||
)}/${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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,15 +23,11 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class ProjectControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string,
|
||||
@Optional() configuration: Configuration
|
||||
) {
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
@ -42,77 +38,41 @@ export class ProjectControllerService {
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates or update a project.
|
||||
* Creates or updates a project.
|
||||
* None
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public createProjectOrUpdateProject(
|
||||
body: ProjectRequest,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<Project>;
|
||||
public createProjectOrUpdateProject(
|
||||
body: ProjectRequest,
|
||||
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> {
|
||||
public createOrUpdateProject(body: ProjectRequest, observe?: 'body', reportProgress?: boolean): Observable<Project>;
|
||||
|
||||
public createOrUpdateProject(body: ProjectRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Project>>;
|
||||
|
||||
public createOrUpdateProject(body: ProjectRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Project>>;
|
||||
|
||||
public createOrUpdateProject(body: ProjectRequest, 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 createProjectOrUpdateProject.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling createOrUpdateProject.');
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteProject(
|
||||
projectId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public deleteProject(
|
||||
projectId: string,
|
||||
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> {
|
||||
public deleteProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public deleteProject(projectId: string, 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) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling deleteProject.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling deleteProject.');
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -182,16 +122,12 @@ export class ProjectControllerService {
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'delete',
|
||||
`${this.basePath}/project/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
return this.httpClient.request<any>('delete', `${this.basePath}/project/${encodeURIComponent(String(projectId))}`, {
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getProject(
|
||||
projectId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<Project>;
|
||||
public getProject(
|
||||
projectId: string,
|
||||
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> {
|
||||
public getProject(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<Project>;
|
||||
|
||||
public getProject(projectId: string, 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) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling getProject.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling getProject.');
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -250,16 +166,12 @@ export class ProjectControllerService {
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<Project>(
|
||||
'get',
|
||||
`${this.basePath}/project/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
return this.httpClient.request<Project>('get', `${this.basePath}/project/${encodeURIComponent(String(projectId))}`, {
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
@ -269,31 +181,23 @@ export class ProjectControllerService {
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getProjects(observe?: 'body', reportProgress?: boolean): Observable<Array<Project>>;
|
||||
public getProjects(
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<Array<Project>>>;
|
||||
public getProjects(
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<Array<Project>>>;
|
||||
|
||||
public getProjects(observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<Project>>>;
|
||||
|
||||
public getProjects(observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<Project>>>;
|
||||
|
||||
public getProjects(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;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -308,4 +212,18 @@ export class ProjectControllerService {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,9 +23,9 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class RedactionLogControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
@ -37,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
|
||||
* None
|
||||
@ -59,8 +45,11 @@ export class RedactionLogControllerService {
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
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?: 'events', reportProgress?: boolean): Observable<HttpEvent<RedactionLog>>;
|
||||
|
||||
public getRedactionLog(fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (fileId === null || fileId === undefined) {
|
||||
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.
|
||||
*/
|
||||
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?: 'events', reportProgress?: boolean): Observable<HttpEvent<SectionGrid>>;
|
||||
|
||||
public getSectionGrid(fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling getSectionGrid.');
|
||||
@ -132,4 +124,18 @@ export class RedactionLogControllerService {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
228
libs/red-ui-http/src/lib/api/ruleSetController.service.ts
Normal file
228
libs/red-ui-http/src/lib/api/ruleSetController.service.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
@ -27,11 +27,7 @@ export class RulesControllerService {
|
||||
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) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
@ -44,38 +40,32 @@ export class RulesControllerService {
|
||||
/**
|
||||
* 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 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(
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<Rules>>;
|
||||
public downloadRules(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Rules>>;
|
||||
|
||||
public downloadRules(
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<Rules>>;
|
||||
public downloadRules(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Rules>>;
|
||||
|
||||
public downloadRules(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 downloadRules.');
|
||||
}
|
||||
|
||||
public downloadRules(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;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -83,7 +73,7 @@ export class RulesControllerService {
|
||||
// to determine the Content-Type header
|
||||
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,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
@ -94,41 +84,32 @@ export class RulesControllerService {
|
||||
/**
|
||||
* 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 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(
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public downloadRulesFile(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public downloadRulesFile(
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public downloadRulesFile(ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public downloadRulesFile(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 downloadRulesFile.');
|
||||
}
|
||||
|
||||
public downloadRulesFile(
|
||||
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;
|
||||
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/octet-stream'];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
const httpHeaderAccepts: string[] = ['*/*'];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -136,7 +117,7 @@ export class RulesControllerService {
|
||||
// to determine the Content-Type header
|
||||
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,
|
||||
headers: headers,
|
||||
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.
|
||||
*
|
||||
* @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 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(
|
||||
body: Rules,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public uploadRules(body: Rules, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public uploadRules(
|
||||
body: Rules,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public uploadRules(body: Rules, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public uploadRules(
|
||||
body: Rules,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public uploadRules(body: Rules, ruleSetId: 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 uploadRules.'
|
||||
);
|
||||
throw new Error('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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: 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
|
||||
);
|
||||
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);
|
||||
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}/rules`, {
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/rules/${encodeURIComponent(String(ruleSetId))}`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
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.
|
||||
*
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public uploadRulesFileForm(
|
||||
file: Blob,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public uploadRulesFileForm(file: Blob, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public uploadRulesFileForm(
|
||||
file: Blob,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public uploadRulesFileForm(file: Blob, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public uploadRulesFileForm(
|
||||
file: Blob,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public uploadRulesFileForm(file: Blob, ruleSetId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public uploadRulesFileForm(
|
||||
file: Blob,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public uploadRulesFileForm(file: Blob, ruleSetId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (file === null || file === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter file was null or undefined when calling uploadRulesFile.'
|
||||
);
|
||||
throw new Error('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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: 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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -291,7 +238,7 @@ export class RulesControllerService {
|
||||
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,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
|
||||
@ -16,6 +16,8 @@ import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { RolesRequest } from '../model/rolesRequest';
|
||||
import { User } from '../model/user';
|
||||
import { UserRequest } from '../model/userRequest';
|
||||
import { UserResponse } from '../model/userResponse';
|
||||
|
||||
@ -28,11 +30,7 @@ export class UserControllerService {
|
||||
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) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
@ -45,64 +43,39 @@ export class UserControllerService {
|
||||
/**
|
||||
* Add admin role to users
|
||||
* 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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public addAdminRoleToUsers(
|
||||
body: Array<string>,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public addAdminRoleToUsers(body: RolesRequest, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public addAdminRoleToUsers(
|
||||
body: Array<string>,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public addAdminRoleToUsers(body: RolesRequest, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public addAdminRoleToUsers(
|
||||
body: Array<string>,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public addAdminRoleToUsers(body: RolesRequest, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public addAdminRoleToUsers(
|
||||
body: Array<string>,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public addAdminRoleToUsers(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 addAdminRoleToUsers.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling addAdminRoleToUsers.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
@ -119,158 +92,142 @@ export class UserControllerService {
|
||||
/**
|
||||
* Add a role to users
|
||||
* None
|
||||
* @param body userIds
|
||||
* @param body rolesRequest
|
||||
* @param role role
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public addRoleToUsers(
|
||||
body: Array<string>,
|
||||
role: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public addRoleToUsers(body: RolesRequest, role: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public addRoleToUsers(
|
||||
body: Array<string>,
|
||||
role: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public addRoleToUsers(body: RolesRequest, role: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public addRoleToUsers(
|
||||
body: Array<string>,
|
||||
role: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public addRoleToUsers(body: RolesRequest, role: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public addRoleToUsers(
|
||||
body: Array<string>,
|
||||
role: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public addRoleToUsers(body: RolesRequest, role: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling addRoleToUsers.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling addRoleToUsers.');
|
||||
}
|
||||
|
||||
if (role === null || role === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter role was null or undefined when calling addRoleToUsers.'
|
||||
);
|
||||
throw new Error('Required parameter role was null or undefined when calling addRoleToUsers.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/user/role/${encodeURIComponent(String(role))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/user/role/${encodeURIComponent(String(role))}`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete admin role from users
|
||||
* Delete admin role from user
|
||||
* 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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteAdminRoleFromUsers(
|
||||
body: Array<string>,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public deleteAdminRoleFromUser(userId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public deleteAdminRoleFromUsers(
|
||||
body: Array<string>,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public deleteAdminRoleFromUser(userId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public deleteAdminRoleFromUsers(
|
||||
body: Array<string>,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public deleteAdminRoleFromUser(userId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public deleteAdminRoleFromUsers(
|
||||
body: Array<string>,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling deleteAdminRoleFromUsers.'
|
||||
);
|
||||
public deleteAdminRoleFromUser(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 deleteAdminRoleFromUser.');
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['*/*'];
|
||||
const httpContentTypeSelected:
|
||||
| string
|
||||
| undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>('delete', `${this.basePath}/user/admin/${encodeURIComponent(String(userId))}`, {
|
||||
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) {
|
||||
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,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
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
|
||||
* None
|
||||
* @param body userIds
|
||||
* @param body rolesRequest
|
||||
* @param role role
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public deleteRoleFromUsers(
|
||||
body: Array<string>,
|
||||
role: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public deleteRoleFromUsers(body: RolesRequest, role: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public deleteRoleFromUsers(
|
||||
body: Array<string>,
|
||||
role: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public deleteRoleFromUsers(body: RolesRequest, role: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public deleteRoleFromUsers(
|
||||
body: Array<string>,
|
||||
role: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public deleteRoleFromUsers(body: RolesRequest, role: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public deleteRoleFromUsers(
|
||||
body: Array<string>,
|
||||
role: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public deleteRoleFromUsers(body: RolesRequest, role: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling deleteRoleFromUsers.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling deleteRoleFromUsers.');
|
||||
}
|
||||
|
||||
if (role === null || role === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter role was null or undefined when calling deleteRoleFromUsers.'
|
||||
);
|
||||
throw new Error('Required parameter role was null or undefined when calling deleteRoleFromUsers.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['*/*'];
|
||||
const httpContentTypeSelected:
|
||||
| string
|
||||
| undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
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>(
|
||||
'delete',
|
||||
`${this.basePath}/user/role/${encodeURIComponent(String(role))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/user/role/delete/${encodeURIComponent(String(role))}`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getAllUsers(
|
||||
body: UserRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<UserResponse>;
|
||||
public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<UserResponse>;
|
||||
|
||||
public getAllUsers(
|
||||
body: UserRequest,
|
||||
@ -393,25 +358,11 @@ export class UserControllerService {
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<UserResponse>>;
|
||||
|
||||
public getAllUsers(
|
||||
body: UserRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<UserResponse>>;
|
||||
public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<UserResponse>>;
|
||||
|
||||
public getAllUsers(
|
||||
body: UserRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public getAllUsers(body: UserRequest, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter body was null or undefined when calling getAllUsers.'
|
||||
);
|
||||
throw new Error('Required parameter body was null or undefined when calling getAllUsers.');
|
||||
}
|
||||
|
||||
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
||||
@ -426,27 +377,20 @@ export class UserControllerService {
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: 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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
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.
|
||||
* 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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getUsers(
|
||||
body: UserRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<UserResponse>;
|
||||
public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean): Observable<UserResponse>;
|
||||
|
||||
public getUsers(
|
||||
body: UserRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<UserResponse>>;
|
||||
public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<UserResponse>>;
|
||||
|
||||
public getUsers(
|
||||
body: UserRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<UserResponse>>;
|
||||
public getUsers(body: UserRequest, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<UserResponse>>;
|
||||
|
||||
public getUsers(
|
||||
body: UserRequest,
|
||||
offset?: number,
|
||||
limit?: number,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public getUsers(body: UserRequest, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling getUsers.');
|
||||
}
|
||||
@ -517,27 +481,20 @@ export class UserControllerService {
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: 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
|
||||
);
|
||||
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);
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
192
libs/red-ui-http/src/lib/api/userPreferenceController.service.ts
Normal file
192
libs/red-ui-http/src/lib/api/userPreferenceController.service.ts
Normal 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;
|
||||
}
|
||||
}
|
||||
@ -11,7 +11,8 @@
|
||||
*/ /* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
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';
|
||||
|
||||
@ -22,15 +23,11 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class VersionsControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string,
|
||||
@Optional() configuration: Configuration
|
||||
) {
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (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
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
@ -53,51 +102,4 @@ export class VersionsControllerService {
|
||||
}
|
||||
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
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,15 +23,11 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class ViewedPagesControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string,
|
||||
@Optional() configuration: Configuration
|
||||
) {
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (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
|
||||
* 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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public addPage(
|
||||
body: ViewedPagesRequest,
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): 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> {
|
||||
public addPage(body: ViewedPagesRequest, projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): 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) {
|
||||
throw new Error('Required parameter body was null or undefined when calling addPage.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling addPage.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling addPage.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling addPage.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling addPage.');
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
);
|
||||
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);
|
||||
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}/viewedPages/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/viewedPages/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
body: body,
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getViewedPages(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<ViewedPages>;
|
||||
public getViewedPages(
|
||||
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> {
|
||||
public getViewedPages(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<ViewedPages>;
|
||||
|
||||
public getViewedPages(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) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling getViewedPages.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling getViewedPages.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling getViewedPages.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling getViewedPages.');
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -221,9 +143,7 @@ export class ViewedPagesControllerService {
|
||||
|
||||
return this.httpClient.request<ViewedPages>(
|
||||
'get',
|
||||
`${this.basePath}/viewedPages/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/viewedPages/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public removePage(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
page: number,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): 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> {
|
||||
public removePage(projectId: string, fileId: string, page: number, observe?: 'body', reportProgress?: boolean): 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) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling removePage.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling removePage.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling removePage.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling removePage.');
|
||||
}
|
||||
|
||||
if (page === null || page === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter page was null or undefined when calling removePage.'
|
||||
);
|
||||
throw new Error('Required parameter page was null or undefined when calling removePage.');
|
||||
}
|
||||
|
||||
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;
|
||||
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
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -313,9 +201,7 @@ export class ViewedPagesControllerService {
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'delete',
|
||||
`${this.basePath}/viewedPages/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(page))}`,
|
||||
`${this.basePath}/viewedPages/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(page))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,21 +11,20 @@
|
||||
*/ /* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
import { WatermarkModel } from '../model/watermarkModel';
|
||||
|
||||
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||
import { BASE_PATH } from '../variables';
|
||||
import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class WatermarkControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
@ -37,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
|
||||
* 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 deleteWatermark(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(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public deleteWatermark(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public deleteWatermark(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -79,7 +72,7 @@ export class WatermarkControllerService {
|
||||
// to determine the Content-Type header
|
||||
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,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
@ -90,13 +83,21 @@ export class WatermarkControllerService {
|
||||
/**
|
||||
* Get the current watermark configuration
|
||||
* 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 getWatermark(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(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public getWatermark(ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<WatermarkModel>;
|
||||
|
||||
public getWatermark(ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<WatermarkModel>>;
|
||||
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -115,7 +116,7 @@ export class WatermarkControllerService {
|
||||
// to determine the Content-Type header
|
||||
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,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
@ -127,17 +128,25 @@ export class WatermarkControllerService {
|
||||
* Save/Update watermark configuration
|
||||
* None
|
||||
* @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 reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public saveWatermark(body: WatermarkModel, 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, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
public saveWatermark(body: WatermarkModel, ruleSetId: string, observe?: 'body', reportProgress?: boolean): Observable<WatermarkModel>;
|
||||
|
||||
public saveWatermark(body: WatermarkModel, ruleSetId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<WatermarkModel>>;
|
||||
|
||||
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) {
|
||||
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;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
@ -160,7 +169,7 @@ export class WatermarkControllerService {
|
||||
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,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -168,4 +177,18 @@ export class WatermarkControllerService {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
@ -38,4 +38,8 @@ export interface Dictionary {
|
||||
* True if the type just for recommendations, not for redaction, default is false.
|
||||
*/
|
||||
recommendation?: boolean;
|
||||
/**
|
||||
* The RuleSet Id for this type
|
||||
*/
|
||||
ruleSetId?: string;
|
||||
}
|
||||
|
||||
@ -30,10 +30,6 @@ export interface FileStatus {
|
||||
* The current reviewer's (if any) user id.
|
||||
*/
|
||||
currentReviewer?: string;
|
||||
/**
|
||||
* The last reviewer's (if any) user id.
|
||||
*/
|
||||
lastReviewer?: string;
|
||||
/**
|
||||
* Shows which dictionary versions was used during the analysis.
|
||||
*/
|
||||
@ -62,6 +58,10 @@ export interface FileStatus {
|
||||
* Shows the last date of a successful analysis.
|
||||
*/
|
||||
lastProcessed?: string;
|
||||
/**
|
||||
* The last reviewer's (if any) user id.
|
||||
*/
|
||||
lastReviewer?: string;
|
||||
/**
|
||||
* Date and time when the file was last updated.
|
||||
*/
|
||||
@ -95,6 +95,7 @@ export interface FileStatus {
|
||||
*/
|
||||
uploader?: string;
|
||||
}
|
||||
|
||||
export namespace FileStatus {
|
||||
export type StatusEnum = 'UNPROCESSED' | 'REPROCESS' | 'PROCESSING' | 'ERROR' | 'UNASSIGNED' | 'UNDER_REVIEW' | 'UNDER_APPROVAL' | 'APPROVED';
|
||||
export const StatusEnum = {
|
||||
|
||||
@ -18,6 +18,7 @@ export interface IdRemoval {
|
||||
status?: IdRemoval.StatusEnum;
|
||||
user?: string;
|
||||
}
|
||||
|
||||
export namespace IdRemoval {
|
||||
export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED';
|
||||
export const StatusEnum = {
|
||||
|
||||
@ -24,6 +24,7 @@ export interface ManualRedactionEntry {
|
||||
user?: string;
|
||||
value?: string;
|
||||
}
|
||||
|
||||
export namespace ManualRedactionEntry {
|
||||
export type StatusEnum = 'REQUESTED' | 'APPROVED' | 'DECLINED';
|
||||
export const StatusEnum = {
|
||||
|
||||
@ -28,6 +28,7 @@ export * from './redactionLogEntry';
|
||||
export * from './removeRedactionRequest';
|
||||
export * from './reportData';
|
||||
export * from './rolesRequest';
|
||||
export * from './ruleSetModel';
|
||||
export * from './rules';
|
||||
export * from './sectionGrid';
|
||||
export * from './sectionRectangle';
|
||||
|
||||
@ -18,8 +18,10 @@ export interface Project {
|
||||
ownerId?: string;
|
||||
projectId?: string;
|
||||
projectName?: string;
|
||||
ruleSetId?: string;
|
||||
status?: Project.StatusEnum;
|
||||
}
|
||||
|
||||
export namespace Project {
|
||||
export type StatusEnum = 'ACTIVE' | 'DELETED';
|
||||
export const StatusEnum = {
|
||||
|
||||
@ -38,4 +38,8 @@ export interface ProjectRequest {
|
||||
* The name of the project. Must be unique.
|
||||
*/
|
||||
projectName?: string;
|
||||
/**
|
||||
* The ruleSetId for this project. can be null for update request.
|
||||
*/
|
||||
ruleSetId?: string;
|
||||
}
|
||||
|
||||
@ -15,5 +15,6 @@ export interface RedactionLog {
|
||||
dictionaryVersion?: number;
|
||||
filename?: string;
|
||||
redactionLogEntry?: Array<RedactionLogEntry>;
|
||||
ruleSetId?: string;
|
||||
rulesVersion?: number;
|
||||
}
|
||||
|
||||
@ -20,6 +20,7 @@ export interface ReportData {
|
||||
project?: string;
|
||||
status?: ReportData.StatusEnum;
|
||||
}
|
||||
|
||||
export namespace ReportData {
|
||||
export type StatusEnum = 'UNPROCESSED' | 'REPROCESS' | 'PROCESSING' | 'ERROR' | 'DELETED' | 'UNASSIGNED' | 'UNDER_REVIEW' | 'UNDER_APPROVAL' | 'APPROVED';
|
||||
export const StatusEnum = {
|
||||
|
||||
50
libs/red-ui-http/src/lib/model/ruleSetModel.ts
Normal file
50
libs/red-ui-http/src/lib/model/ruleSetModel.ts
Normal 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;
|
||||
}
|
||||
@ -18,4 +18,8 @@ export interface Rules {
|
||||
* The actual string of rules.
|
||||
*/
|
||||
rules?: string;
|
||||
/**
|
||||
* The ruleSetId for these rules
|
||||
*/
|
||||
ruleSetId?: string;
|
||||
}
|
||||
|
||||
@ -39,6 +39,12 @@ export interface TypeValue {
|
||||
* The nonnull entry type.
|
||||
*/
|
||||
type?: string;
|
||||
|
||||
/**
|
||||
* The ruleSetId for this type
|
||||
*/
|
||||
ruleSetId?: string;
|
||||
|
||||
isDefaultFilter?: boolean;
|
||||
|
||||
virtual?: boolean;
|
||||
|
||||
@ -15,4 +15,14 @@ export interface WatermarkModel {
|
||||
hexColor?: string;
|
||||
opacity?: number;
|
||||
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
|
||||
};
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user