|
|
|
|
@ -16,7 +16,7 @@ import { CustomHttpUrlEncodingCodec } from '../encoder';
|
|
|
|
|
|
|
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
|
|
|
|
|
|
import { BulkDownloadRedactedRequest } from '../model/bulkDownloadRedactedRequest';
|
|
|
|
|
import { DownloadSubmissionPackageRequest } from '../model/downloadSubmissionPackageRequest';
|
|
|
|
|
import { FileIds } from '../model/fileIds';
|
|
|
|
|
import { FileUploadResult } from '../model/fileUploadResult';
|
|
|
|
|
|
|
|
|
|
@ -27,7 +27,7 @@ import { Configuration } from '../configuration';
|
|
|
|
|
export class FileManagementControllerService {
|
|
|
|
|
public defaultHeaders = new HttpHeaders();
|
|
|
|
|
public configuration = new Configuration();
|
|
|
|
|
protected basePath = '';
|
|
|
|
|
protected basePath = '//localhost:8080/';
|
|
|
|
|
|
|
|
|
|
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
|
|
|
|
if (basePath) {
|
|
|
|
|
@ -71,7 +71,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = [];
|
|
|
|
|
let httpHeaderAccepts: string[] = [];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -124,7 +124,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = [];
|
|
|
|
|
let httpHeaderAccepts: string[] = [];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -147,23 +147,326 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the redaction preview file with the specified fileId
|
|
|
|
|
* Returns a downloadable byte stream of the annotated file with the specified fileId
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
|
|
|
|
* @param projectId projectId
|
|
|
|
|
* @param fileId fileId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadPreviewFile(fileId: string, inline?: boolean, indicator?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
|
public downloadPreviewFile(
|
|
|
|
|
public downloadAnnotatedFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadAnnotatedFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
public downloadPreviewFile(fileId: string, inline?: boolean, indicator?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
|
|
|
|
public downloadPreviewFile(fileId: string, inline?: boolean, indicator?: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
|
|
|
|
|
|
|
|
|
public downloadAnnotatedFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadAnnotatedFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: 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 downloadAnnotatedFile.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (fileId === null || fileId === undefined) {
|
|
|
|
|
throw new Error('Required parameter fileId was null or undefined when calling downloadAnnotatedFile.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
let 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>(
|
|
|
|
|
'get',
|
|
|
|
|
`${this.basePath}/download/annotated/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
|
|
|
|
{
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the fatted redacted file with the specified fileId
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this file will be opened in the browser.
|
|
|
|
|
* @param projectId projectId
|
|
|
|
|
* @param fileId fileId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadFlatRedacted(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadFlatRedacted(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadFlatRedacted(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadFlatRedacted(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: 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 downloadFlatRedacted.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projectId === null || projectId === undefined) {
|
|
|
|
|
throw new Error('Required parameter fileId was null or undefined when calling downloadFlatRedacted.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
let 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>(
|
|
|
|
|
'get',
|
|
|
|
|
`${this.basePath}/download/flatted/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
|
|
|
|
{
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the original file with the specified fileId
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
|
|
|
|
* @param projectId projectId
|
|
|
|
|
* @param fileId fileId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadOriginalFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadOriginalFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadOriginalFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadOriginalFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: 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 downloadOriginalFile.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (fileId === null || fileId === undefined) {
|
|
|
|
|
throw new Error('Required parameter fileId was null or undefined when calling downloadOriginalFile.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
// 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
|
|
|
|
|
let 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>(
|
|
|
|
|
'get',
|
|
|
|
|
`${this.basePath}/download/original/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
|
|
|
|
{
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the redaction preview file with the specified fileId
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
|
|
|
|
* @param projectId projectId
|
|
|
|
|
* @param fileId fileId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadPreviewFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadPreviewFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadPreviewFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadPreviewFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: 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 downloadPreviewFile.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (fileId === null || fileId === undefined) {
|
|
|
|
|
throw new Error('Required parameter fileId was null or undefined when calling downloadPreviewFile.');
|
|
|
|
|
}
|
|
|
|
|
@ -185,7 +488,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
let httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -194,53 +497,41 @@ export class FileManagementControllerService {
|
|
|
|
|
// to determine the Content-Type header
|
|
|
|
|
const consumes: string[] = [];
|
|
|
|
|
|
|
|
|
|
return this.httpClient.request('get', `${this.basePath}/download/preview/${encodeURIComponent(String(fileId))}`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
});
|
|
|
|
|
return this.httpClient.request<any>(
|
|
|
|
|
'get',
|
|
|
|
|
`${this.basePath}/download/preview/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
|
|
|
|
{
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the requested files in a zip format
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this report will be opened in the browser.
|
|
|
|
|
* @param body bulkDownloadRedactedRequest
|
|
|
|
|
* @param body fileIds
|
|
|
|
|
* @param projectId The projectId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadPreviewFiles(body: FileIds, projectId: string, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadPreviewFiles(
|
|
|
|
|
body: BulkDownloadRedactedRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
public downloadPreviewFiles(
|
|
|
|
|
body: BulkDownloadRedactedRequest,
|
|
|
|
|
body: FileIds,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
public downloadPreviewFiles(
|
|
|
|
|
body: BulkDownloadRedactedRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
public downloadPreviewFiles(
|
|
|
|
|
body: BulkDownloadRedactedRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe: any = 'body',
|
|
|
|
|
reportProgress: boolean = false
|
|
|
|
|
): Observable<any> {
|
|
|
|
|
|
|
|
|
|
public downloadPreviewFiles(body: FileIds, projectId: string, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadPreviewFiles(body: FileIds, projectId: string, inline?: 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 downloadPreviewFiles.');
|
|
|
|
|
}
|
|
|
|
|
@ -263,7 +554,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
let httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -276,8 +567,7 @@ export class FileManagementControllerService {
|
|
|
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return this.httpClient.request('post', `${this.basePath}/download/bulk/preview/${encodeURIComponent(String(projectId))}`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
return this.httpClient.request<any>('post', `${this.basePath}/download/bulk/preview/${encodeURIComponent(String(projectId))}`, {
|
|
|
|
|
body: body,
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
@ -287,208 +577,26 @@ export class FileManagementControllerService {
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the fatted redacted file with the specified fileId
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this file will be opened in the browser.
|
|
|
|
|
* @param fileId fileId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadFlatRedacted(fileId: string, inline?: boolean, indicator?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
|
public downloadFlatRedacted(
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
public downloadFlatRedacted(fileId: string, inline?: boolean, indicator?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
|
|
|
|
public downloadFlatRedacted(fileId: string, inline?: boolean, indicator?: 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 downloadFlatRedacted.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
// 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('get', `${this.basePath}/download/flatted/${encodeURIComponent(String(fileId))}`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the annotated file with the specified fileId
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
|
|
|
|
* @param fileId fileId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadAnnotatedFile(fileId: string, inline?: boolean, indicator?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadAnnotatedFile(
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadAnnotatedFile(
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadAnnotatedFile(
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: 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 downloadAnnotatedFile.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
// 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/octet-stream'];
|
|
|
|
|
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('get', `${this.basePath}/download/annotated/${encodeURIComponent(String(fileId))}`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the original file with the specified fileId
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
|
|
|
|
* @param fileId fileId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadOriginalFile(fileId: string, inline?: boolean, indicator?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadOriginalFile(
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadOriginalFile(fileId: string, inline?: boolean, indicator?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadOriginalFile(fileId: string, inline?: boolean, indicator?: 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 downloadOriginalFile.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
// 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/octet-stream'];
|
|
|
|
|
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('get', `${this.basePath}/download/original/${encodeURIComponent(String(fileId))}`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the redacted file with the specified fileId
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this downloadAnnotated will be opened in the browser.
|
|
|
|
|
* @param projectId projectId
|
|
|
|
|
* @param fileId fileId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadRedactedFile(fileId: string, inline?: boolean, indicator?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
|
public downloadRedactedFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadRedactedFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
@ -496,9 +604,27 @@ export class FileManagementControllerService {
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadRedactedFile(fileId: string, inline?: boolean, indicator?: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
|
|
|
|
public downloadRedactedFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: string,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadRedactedFile(
|
|
|
|
|
projectId: string,
|
|
|
|
|
fileId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
indicator?: 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 downloadRedactedFile.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public downloadRedactedFile(fileId: string, inline?: boolean, indicator?: 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 downloadRedactedFile.');
|
|
|
|
|
}
|
|
|
|
|
@ -520,7 +646,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = ['application/octet-stream'];
|
|
|
|
|
let httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -529,56 +655,41 @@ export class FileManagementControllerService {
|
|
|
|
|
// to determine the Content-Type header
|
|
|
|
|
const consumes: string[] = [];
|
|
|
|
|
|
|
|
|
|
return this.httpClient.request('get', `${this.basePath}/download/redacted/${encodeURIComponent(String(fileId))}`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
});
|
|
|
|
|
return this.httpClient.request<any>(
|
|
|
|
|
'get',
|
|
|
|
|
`${this.basePath}/download/redacted/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
|
|
|
|
{
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a downloadable byte stream of the requested files in a zip format
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this report will be opened in the browser.
|
|
|
|
|
* @param body bulkDownloadRedactedRequest
|
|
|
|
|
* @param body fileIds
|
|
|
|
|
* @param projectId The projectId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadRedactedFiles(
|
|
|
|
|
body: BulkDownloadRedactedRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
public downloadRedactedFiles(body: FileIds, projectId: string, inline?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadRedactedFiles(
|
|
|
|
|
body: BulkDownloadRedactedRequest,
|
|
|
|
|
body: FileIds,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadRedactedFiles(
|
|
|
|
|
body: BulkDownloadRedactedRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
public downloadRedactedFiles(body: FileIds, projectId: string, inline?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadRedactedFiles(
|
|
|
|
|
body: BulkDownloadRedactedRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe: any = 'body',
|
|
|
|
|
reportProgress: boolean = false
|
|
|
|
|
): Observable<any> {
|
|
|
|
|
public downloadRedactedFiles(body: FileIds, projectId: string, inline?: 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 downloadRedactedFiles.');
|
|
|
|
|
}
|
|
|
|
|
@ -601,7 +712,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
let httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -614,8 +725,7 @@ export class FileManagementControllerService {
|
|
|
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return this.httpClient.request('post', `${this.basePath}/download/bulk/redacted/${encodeURIComponent(String(projectId))}`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
return this.httpClient.request<any>('post', `${this.basePath}/download/bulk/redacted/${encodeURIComponent(String(projectId))}`, {
|
|
|
|
|
body: body,
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
@ -629,15 +739,24 @@ export class FileManagementControllerService {
|
|
|
|
|
* Returns a downloadable byte stream of the redaction report file for the specified fileIds
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this report will be opened in the browser.
|
|
|
|
|
* @param body fileIds
|
|
|
|
|
* @param projectId The projectId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @param template template
|
|
|
|
|
* @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 downloadRedactionReport(body: FileIds, inline?: boolean, template?: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
|
|
|
|
public downloadRedactionReport(
|
|
|
|
|
body: FileIds,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
template?: string,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadRedactionReport(
|
|
|
|
|
body: FileIds,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
template?: string,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
@ -646,6 +765,7 @@ export class FileManagementControllerService {
|
|
|
|
|
|
|
|
|
|
public downloadRedactionReport(
|
|
|
|
|
body: FileIds,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
template?: string,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
@ -654,6 +774,7 @@ export class FileManagementControllerService {
|
|
|
|
|
|
|
|
|
|
public downloadRedactionReport(
|
|
|
|
|
body: FileIds,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
template?: string,
|
|
|
|
|
observe: any = 'body',
|
|
|
|
|
@ -663,6 +784,10 @@ export class FileManagementControllerService {
|
|
|
|
|
throw new Error('Required parameter body was null or undefined when calling downloadRedactionReport.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projectId === null || projectId === undefined) {
|
|
|
|
|
throw new Error('Required parameter projectId was null or undefined when calling downloadRedactionReport.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
|
|
|
|
if (inline !== undefined && inline !== null) {
|
|
|
|
|
queryParameters = queryParameters.set('inline', <any>inline);
|
|
|
|
|
@ -680,7 +805,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
let httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -693,8 +818,7 @@ export class FileManagementControllerService {
|
|
|
|
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return this.httpClient.request('post', `${this.basePath}/download/report`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
return this.httpClient.request<any>('post', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`, {
|
|
|
|
|
body: body,
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
@ -765,7 +889,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
let httpHeaderAccepts: string[] = ['*/*'];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -774,8 +898,92 @@ export class FileManagementControllerService {
|
|
|
|
|
// to determine the Content-Type header
|
|
|
|
|
const consumes: string[] = [];
|
|
|
|
|
|
|
|
|
|
return this.httpClient.request('get', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`, {
|
|
|
|
|
responseType: 'blob',
|
|
|
|
|
return this.httpClient.request<any>('get', `${this.basePath}/download/report/${encodeURIComponent(String(projectId))}`, {
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
observe: observe,
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Returns a zip archive containing all preview, redacted and report files
|
|
|
|
|
* Use the optional \"inline\" request parameter to select, if this report will be opened in the browser.
|
|
|
|
|
* @param body downloadSubmissionPackageRequest
|
|
|
|
|
* @param projectId The projectId
|
|
|
|
|
* @param inline inline
|
|
|
|
|
* @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 downloadSubmissionPackage(
|
|
|
|
|
body: DownloadSubmissionPackageRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'body',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<any>;
|
|
|
|
|
|
|
|
|
|
public downloadSubmissionPackage(
|
|
|
|
|
body: DownloadSubmissionPackageRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'response',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpResponse<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadSubmissionPackage(
|
|
|
|
|
body: DownloadSubmissionPackageRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: boolean,
|
|
|
|
|
observe?: 'events',
|
|
|
|
|
reportProgress?: boolean
|
|
|
|
|
): Observable<HttpEvent<any>>;
|
|
|
|
|
|
|
|
|
|
public downloadSubmissionPackage(
|
|
|
|
|
body: DownloadSubmissionPackageRequest,
|
|
|
|
|
projectId: string,
|
|
|
|
|
inline?: 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 downloadSubmissionPackage.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (projectId === null || projectId === undefined) {
|
|
|
|
|
throw new Error('Required parameter projectId was null or undefined when calling downloadSubmissionPackage.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
|
|
|
|
if (inline !== undefined && inline !== null) {
|
|
|
|
|
queryParameters = queryParameters.set('inline', <any>inline);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
let 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}/download/bulk/submission/${encodeURIComponent(String(projectId))}`, {
|
|
|
|
|
body: body,
|
|
|
|
|
params: queryParameters,
|
|
|
|
|
withCredentials: this.configuration.withCredentials,
|
|
|
|
|
headers: headers,
|
|
|
|
|
@ -816,7 +1024,7 @@ export class FileManagementControllerService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// to determine the Accept header
|
|
|
|
|
const httpHeaderAccepts: string[] = ['application/json'];
|
|
|
|
|
let httpHeaderAccepts: string[] = ['application/json'];
|
|
|
|
|
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
|
|
|
|
if (httpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
|
|
|
|
@ -829,7 +1037,7 @@ export class FileManagementControllerService {
|
|
|
|
|
|
|
|
|
|
let formParams: { append(param: string, value: any): void };
|
|
|
|
|
let useForm = false;
|
|
|
|
|
const convertFormParamsToString = false;
|
|
|
|
|
let 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;
|
|
|
|
|
|