updated file management generated code

This commit is contained in:
Timo 2021-01-28 09:13:36 +02:00
parent db4287eb88
commit 5db6dd9534
11 changed files with 501 additions and 320 deletions

View File

@ -5,7 +5,7 @@
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

View File

@ -3,6 +3,7 @@ import { HttpClient } from '@angular/common/http';
import { tap } from 'rxjs/operators';
import { Observable } from 'rxjs';
import { Title } from '@angular/platform-browser';
import { version } from '../../../../../package.json';
export enum AppConfigKey {
OAUTH_URL = 'OAUTH_URL',
@ -36,6 +37,7 @@ export class AppConfigService {
tap((config) => {
console.log('[REDACTION] Started with config: ', config);
this._config = config;
this._config["FRONTEND_APP_VERSION"] = version;
this._titleService.setTitle(this.getConfig(AppConfigKey.APP_NAME, 'DDA-R'));
})
);

View File

@ -62,7 +62,6 @@ import { CommentsComponent } from './components/comments/comments.component';
import { ManualAnnotationDialogComponent } from './dialogs/manual-redaction-dialog/manual-annotation-dialog.component';
import { ToastComponent } from './components/toast/toast.component';
import { FilterComponent } from './common/filter/filter.component';
import { AppInfoComponent } from './screens/app-info/app-info.component';
import { TableColNameComponent } from './components/table-col-name/table-col-name.component';
import { ProjectDetailsComponent } from './screens/project-overview-screen/project-details/project-details.component';
import { PageIndicatorComponent } from './screens/file/page-indicator/page-indicator.component';
@ -126,10 +125,6 @@ const routes = [
component: AuthErrorComponent,
canActivate: [AuthGuard]
},
{
path: 'info',
component: AppInfoComponent
},
{
path: 'pdf-preview/:fileId',
component: PdfViewerScreenComponent,
@ -314,7 +309,6 @@ const matImports = [
CommentsComponent,
ToastComponent,
FilterComponent,
AppInfoComponent,
TableColNameComponent,
ProjectDetailsComponent,
PageIndicatorComponent,

View File

@ -1,3 +0,0 @@
<section>
<p class="heading-xl">App Version: {{ version }}</p>
</section>

View File

@ -1,3 +0,0 @@
section {
padding: 24px;
}

View File

@ -1,17 +0,0 @@
import { Component, OnInit } from '@angular/core';
import { version } from '../../../../../../package.json';
@Component({
selector: 'redaction-app-info',
templateUrl: './app-info.component.html',
styleUrls: ['./app-info.component.scss']
})
export class AppInfoComponent implements OnInit {
version: string;
constructor() {
this.version = version;
}
ngOnInit(): void {}
}

View File

@ -1,11 +1,11 @@
{
"OAUTH_URL": "https://redkc-staging.iqser.cloud/auth/realms/redaction",
"OAUTH_CLIENT_ID": "redaction",
"API_URL": "https://redapi-staging.iqser.cloud",
"BACKEND_APP_VERSION": "1.0",
"API_URL": "http://localhost:8080",
"BACKEND_APP_VERSION": "4.4.40",
"FRONTEND_APP_VERSION": "1.0",
"EULA_URL": "EULA_URL",
"LICENSEE": "Timo Bejan",
"LICENSING_START": "06-01-2021",
"LICENSING_END": "20-01-2021"
"LICENSEE": "Redaction License",
"LICENSING_START": "01-01-2021",
"LICENSING_END": "31-12-2021"
}

View File

@ -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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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 \&quot;inline\&quot; 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;

View File

@ -10,6 +10,7 @@
* Do not edit the class manually.
*/
export interface BulkDownloadRedactedRequest {
export interface DownloadSubmissionPackageRequest {
fileIds?: Array<string>;
reportsAsSingleFiles?: boolean;
}

View File

@ -2,7 +2,7 @@ export * from './addCommentRequest';
export * from './addRedactionRequest';
export * from './approveRequest';
export * from './authInfo';
export * from './bulkDownloadRedactedRequest';
export * from './downloadSubmissionPackageRequest';
export * from './cellRectangle';
export * from './colors';
export * from './comment';

View File

@ -56,7 +56,6 @@
"keycloak-js": "10.0.2",
"lint-staged": "^10.5.0",
"ng2-ace-editor": "^0.3.9",
"ng2-file-upload": "^1.4.0",
"ngp-sort-pipe": "^0.0.4",
"ngx-color-picker": "^10.1.0",
"ngx-dropzone": "^2.2.2",