1129 lines
43 KiB
TypeScript
1129 lines
43 KiB
TypeScript
/**
|
|
* API Documentation for Redaction Gateway
|
|
* Description for redaction
|
|
*
|
|
* OpenAPI spec version: 1.0
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
* Do not edit the class manually.
|
|
*/ /* tslint:disable:no-unused-variable member-ordering */
|
|
|
|
import {Inject, Injectable, Optional} from "@angular/core";
|
|
import {HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse} from "@angular/common/http";
|
|
import {CustomHttpUrlEncodingCodec} from "../encoder";
|
|
|
|
import {Observable} from "rxjs";
|
|
|
|
import {Colors} from "../model/colors";
|
|
import {IDictionary} from "../model/dictionary";
|
|
import {TypeResponse} from "../model/typeResponse";
|
|
import {ITypeValue} from "../model/typeValue";
|
|
import {UpdateTypeValue} from "../model/updateTypeValue";
|
|
|
|
import {BASE_PATH} from "../variables";
|
|
import {Configuration} from "../configuration";
|
|
|
|
@Injectable()
|
|
export class DictionaryControllerService {
|
|
public defaultHeaders = new HttpHeaders();
|
|
public configuration = new Configuration();
|
|
protected basePath = '';
|
|
|
|
constructor(
|
|
protected httpClient: HttpClient,
|
|
@Optional() @Inject(BASE_PATH) basePath: string,
|
|
@Optional() configuration: Configuration
|
|
) {
|
|
if (basePath) {
|
|
this.basePath = basePath;
|
|
}
|
|
if (configuration) {
|
|
this.configuration = configuration;
|
|
this.basePath = basePath || configuration.basePath || this.basePath;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Add dictionary entries with entry type.
|
|
* None
|
|
* @param body entries
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param type type
|
|
* @param dossierId dossierId
|
|
* @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>,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
removeCurrent?: boolean,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<any>;
|
|
|
|
public addEntry(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
removeCurrent?: boolean,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public addEntry(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
removeCurrent?: boolean,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
public addEntry(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: 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.');
|
|
}
|
|
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling addEntry.');
|
|
}
|
|
|
|
if (type === null || type === undefined) {
|
|
throw new Error('Required parameter type was null or undefined when calling addEntry.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
if (removeCurrent !== undefined && removeCurrent !== null) {
|
|
queryParameters = queryParameters.set('removeCurrent', <any>removeCurrent);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = [];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = ['application/json'];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>(
|
|
'post',
|
|
`${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`,
|
|
{
|
|
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 dossierId dossierId
|
|
* @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: ITypeValue, dossierId?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
public addType(body: ITypeValue, dossierId?: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
|
|
|
public addType(body: ITypeValue, dossierId?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
|
|
|
public addType(body: ITypeValue, dossierId?: 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.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = [];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = ['application/json'];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>('post', `${this.basePath}/dictionary/type`, {
|
|
body: body,
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Delete dictionary entries with entry type.
|
|
* None
|
|
* @param body entries
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param type type
|
|
* @param dossierId dossierId
|
|
* @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>,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<any>;
|
|
|
|
public deleteEntries(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public deleteEntries(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
public deleteEntries(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: 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.');
|
|
}
|
|
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteEntries.');
|
|
}
|
|
|
|
if (type === null || type === undefined) {
|
|
throw new Error('Required parameter type was null or undefined when calling deleteEntries.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = [];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = ['application/json'];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>(
|
|
'post',
|
|
`${this.basePath}/dictionary/delete/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`,
|
|
{
|
|
body: body,
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Delete dictionary entry with entry type.
|
|
* None
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param entry entry
|
|
* @param type type
|
|
* @param dossierId dossierId
|
|
* @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(
|
|
dossierTemplateId: string,
|
|
entry: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<any>;
|
|
|
|
public deleteEntry(
|
|
dossierTemplateId: string,
|
|
entry: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public deleteEntry(
|
|
dossierTemplateId: string,
|
|
entry: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
public deleteEntry(
|
|
dossierTemplateId: string,
|
|
entry: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId 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.');
|
|
}
|
|
|
|
if (type === null || type === undefined) {
|
|
throw new Error('Required parameter type was null or undefined when calling deleteEntry.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = [];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>(
|
|
'delete',
|
|
`${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(
|
|
String(dossierTemplateId)
|
|
)}/${encodeURIComponent(String(entry))}`,
|
|
{
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Deletes entry type
|
|
* None
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param type type
|
|
* @param dossierId dossierId
|
|
* @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(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<any>;
|
|
|
|
public deleteType(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public deleteType(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
public deleteType(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteType.');
|
|
}
|
|
|
|
if (type === null || type === undefined) {
|
|
throw new Error('Required parameter type was null or undefined when calling deleteType.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = [];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>(
|
|
'delete',
|
|
`${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`,
|
|
{
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Deletes entry types
|
|
* None
|
|
* @param body types
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param dossierId dossierId
|
|
* @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 deleteTypes(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
dossierId?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<any>;
|
|
|
|
public deleteTypes(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public deleteTypes(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
public deleteTypes(
|
|
body: Array<string>,
|
|
dossierTemplateId: string,
|
|
dossierId?: 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 deleteTypes.');
|
|
}
|
|
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling deleteTypes.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = [];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = ['application/json'];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>(
|
|
'post',
|
|
`${this.basePath}/dictionary/type/${encodeURIComponent(String(dossierTemplateId))}/delete`,
|
|
{
|
|
body: body,
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Returns file containing the the dictionary entries for given type..
|
|
*
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param type type
|
|
* @param dossierId dossierId
|
|
* @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(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<any>;
|
|
|
|
public downloadDictionaryFile(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public downloadDictionaryFile(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
public downloadDictionaryFile(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling downloadDictionaryFile.');
|
|
}
|
|
|
|
if (type === null || type === undefined) {
|
|
throw new Error('Required parameter type was null or undefined when calling downloadDictionaryFile.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = ['*/*'];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>(
|
|
'get',
|
|
`${this.basePath}/dictionary/download/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`,
|
|
{
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Retrieve all entry types
|
|
* None
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param dossierId dossierId
|
|
* @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(dossierTemplateId: string, dossierId?: string, observe?: 'body', reportProgress?: boolean): Observable<TypeResponse>;
|
|
|
|
public getAllTypes(
|
|
dossierTemplateId: string,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<TypeResponse>>;
|
|
|
|
public getAllTypes(
|
|
dossierTemplateId: string,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<TypeResponse>>;
|
|
|
|
public getAllTypes(
|
|
dossierTemplateId: string,
|
|
dossierId?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling getAllTypes.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = ['application/json'];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
return this.httpClient.request<TypeResponse>(
|
|
'get',
|
|
`${this.basePath}/dictionary/type/${encodeURIComponent(String(dossierTemplateId))}`,
|
|
{
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Retrieves system colors for redaction.
|
|
* None
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @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(dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable<Colors>;
|
|
|
|
public getColors(dossierTemplateId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Colors>>;
|
|
|
|
public getColors(dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Colors>>;
|
|
|
|
public getColors(dossierTemplateId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling getColors.');
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = ['application/json'];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
return this.httpClient.request<Colors>('get', `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, {
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Retrieves all dictionary entries of an entry type
|
|
* None
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param type type
|
|
* @param dossierId dossierId
|
|
* @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(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<IDictionary>;
|
|
|
|
public getDictionaryForType(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<IDictionary>>;
|
|
|
|
public getDictionaryForType(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<IDictionary>>;
|
|
|
|
public getDictionaryForType(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling getDictionaryForType.');
|
|
}
|
|
|
|
if (type === null || type === undefined) {
|
|
throw new Error('Required parameter type was null or undefined when calling getDictionaryForType.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = ['application/json'];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
return this.httpClient.request<IDictionary>(
|
|
'get',
|
|
`${this.basePath}/dictionary/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`,
|
|
{
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Set system colors for redaction
|
|
*
|
|
* @param body colors
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @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, dossierTemplateId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
public setColors(
|
|
body: Colors,
|
|
dossierTemplateId: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public setColors(body: Colors, dossierTemplateId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
|
|
|
public setColors(body: Colors, dossierTemplateId: 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 (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling setColors.');
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = [];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = ['application/json'];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>('post', `${this.basePath}/color/${encodeURIComponent(String(dossierTemplateId))}`, {
|
|
body: body,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Updates colors, hint and caseInsensitive of an entry type.
|
|
* None
|
|
* @param body typeValue
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param type type
|
|
* @param dossierId dossierId
|
|
* @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,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<any>;
|
|
|
|
public updateType(
|
|
body: UpdateTypeValue,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public updateType(
|
|
body: UpdateTypeValue,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
public updateType(
|
|
body: UpdateTypeValue,
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
dossierId?: 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.');
|
|
}
|
|
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling updateType.');
|
|
}
|
|
|
|
if (type === null || type === undefined) {
|
|
throw new Error('Required parameter type was null or undefined when calling updateType.');
|
|
}
|
|
|
|
let queryParameters = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
if (dossierId !== undefined && dossierId !== null) {
|
|
queryParameters = queryParameters.set('dossierId', <any>dossierId);
|
|
}
|
|
|
|
let headers = this.defaultHeaders;
|
|
|
|
// authentication (RED-OAUTH) required
|
|
if (this.configuration.accessToken) {
|
|
const accessToken =
|
|
typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
|
}
|
|
|
|
// to determine the Accept header
|
|
const httpHeaderAccepts: string[] = [];
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
}
|
|
|
|
// to determine the Content-Type header
|
|
const consumes: string[] = ['application/json'];
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
if (httpContentTypeSelected !== undefined) {
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
}
|
|
|
|
return this.httpClient.request<any>(
|
|
'post',
|
|
`${this.basePath}/dictionary/type/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`,
|
|
{
|
|
body: body,
|
|
params: queryParameters,
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Upload a text-file with 1 entry per line and add each line as an entry to a dictionary for a specific type
|
|
*
|
|
* @param dossierTemplateId dossierTemplateId
|
|
* @param type type
|
|
* @param file
|
|
* @param dossierId
|
|
* @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(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
file?: Blob,
|
|
dossierId?: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<any>;
|
|
|
|
public uploadDictionaryFileForm(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
file?: Blob,
|
|
dossierId?: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
public uploadDictionaryFileForm(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
file?: Blob,
|
|
dossierId?: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
public uploadDictionaryFileForm(
|
|
dossierTemplateId: string,
|
|
type: string,
|
|
file?: Blob,
|
|
dossierId?: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierTemplateId === null || dossierTemplateId === undefined) {
|
|
throw new Error('Required parameter dossierTemplateId was null or undefined when calling uploadDictionaryFile.');
|
|
}
|
|
|
|
if (type === null || type === undefined) {
|
|
throw new Error('Required parameter type was null or undefined when calling uploadDictionaryFile.');
|
|
}
|
|
|
|
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[] = ['multipart/form-data'];
|
|
|
|
const canConsumeForm = this.canConsumeForm(consumes);
|
|
|
|
let formParams: { append(param: string, value: any): void };
|
|
let useForm = false;
|
|
const convertFormParamsToString = false;
|
|
// use FormData to transmit files using content-type "multipart/form-data"
|
|
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
|
useForm = canConsumeForm;
|
|
if (useForm) {
|
|
formParams = new FormData();
|
|
} else {
|
|
formParams = new HttpParams({encoder: new CustomHttpUrlEncodingCodec()});
|
|
}
|
|
|
|
if (file !== undefined) {
|
|
formParams = (formParams.append('file', <any>file) as any) || formParams;
|
|
}
|
|
if (dossierId !== undefined) {
|
|
formParams = (formParams.append('dossierId', <any>dossierId) as any) || formParams;
|
|
}
|
|
|
|
return this.httpClient.request<any>(
|
|
'post',
|
|
`${this.basePath}/dictionary/upload/${encodeURIComponent(String(type))}/${encodeURIComponent(String(dossierTemplateId))}`,
|
|
{
|
|
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;
|
|
}
|
|
}
|