Fixed various mentioned issues
This commit is contained in:
parent
4d98535430
commit
b859977ceb
@ -5,7 +5,7 @@
|
||||
To regnerate http rune swaagger
|
||||
|
||||
```
|
||||
BASE=https://timo-redaction-dev.iqser.cloud/
|
||||
BASE=https://redapi-staging.iqser.cloud/
|
||||
URL="$BASE"v2/api-docs?group=redaction-gateway-v1
|
||||
mkdir -p /tmp/swagger
|
||||
swagger-codegen generate -i "$URL" -l typescript-angular -o /tmp/swagger
|
||||
|
||||
@ -9,7 +9,8 @@ export enum AppConfigKey {
|
||||
API_URL = 'API_URL',
|
||||
ADMIN_CONTACT_NAME = 'ADMIN_CONTACT_NAME',
|
||||
ADMIN_CONTACT_URL = 'ADMIN_CONTACT_URL',
|
||||
AUTO_READ_TIME = 'AUTO_READ_TIME'
|
||||
AUTO_READ_TIME = 'AUTO_READ_TIME',
|
||||
MAX_FILE_SIZE_MB = 'MAX_FILE_SIZE_MB'
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
|
||||
@ -77,9 +77,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="red-input-group mr-16">
|
||||
<mat-checkbox [(ngModel)]="compareActive" color="primary"> {{ 'dictionary-overview.compare' | translate }} </mat-checkbox>
|
||||
</div>
|
||||
<!-- Not yet used-->
|
||||
<!-- <div class="red-input-group mr-16">-->
|
||||
<!-- <mat-checkbox [(ngModel)]="compareActive" color="primary"> {{ 'dictionary-overview.compare' | translate }} </mat-checkbox>-->
|
||||
<!-- </div>-->
|
||||
<div class="flex-1"></div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ declare var ace;
|
||||
styleUrls: ['./dictionary-overview-screen.component.scss']
|
||||
})
|
||||
export class DictionaryOverviewScreenComponent {
|
||||
static readonly MIN_WORD_LENGTH: number = 3;
|
||||
static readonly MIN_WORD_LENGTH: number = 2;
|
||||
public compareActive = false;
|
||||
|
||||
@ViewChild('editorComponent')
|
||||
@ -207,6 +207,7 @@ export class DictionaryOverviewScreenComponent {
|
||||
}
|
||||
);
|
||||
} else {
|
||||
console.log(invalidRowsExist);
|
||||
this._notificationService.showToastNotification(
|
||||
this._translateService.instant('dictionary-overview.error.entries-too-short'),
|
||||
null,
|
||||
|
||||
@ -175,7 +175,7 @@
|
||||
|
||||
<div redactionHasScrollbar class="grid-container">
|
||||
<div
|
||||
*ngFor="let fileStatus of displayedFiles | sortBy: sortingOption.order:sortingOption.column"
|
||||
*ngFor="let fileStatus of displayedFiles | sortBy: sortingOption.order:sortingOption.column; trackBy: fileId"
|
||||
[class.pointer]="permissionsService.canOpenFile(fileStatus)"
|
||||
[routerLink]="fileLink(fileStatus)"
|
||||
class="table-item"
|
||||
|
||||
@ -86,7 +86,7 @@ export class ProjectOverviewScreenComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.filesAutoUpdateTimer = timer(0, 5000)
|
||||
this.filesAutoUpdateTimer = timer(0, 10000)
|
||||
.pipe(
|
||||
tap(async () => {
|
||||
await this.appStateService.reloadActiveProjectFilesIfNecessary();
|
||||
|
||||
@ -2,6 +2,7 @@ import { EventEmitter, Injectable } from '@angular/core';
|
||||
import {
|
||||
DictionaryControllerService,
|
||||
FileManagementControllerService,
|
||||
FileStatus,
|
||||
Project,
|
||||
ProjectControllerService,
|
||||
ReanalysisControllerService,
|
||||
@ -153,8 +154,12 @@ export class AppStateService {
|
||||
return new ProjectWrapper(p, this._getExistingFiles(p.projectId));
|
||||
});
|
||||
|
||||
for (const project of mappedProjects) {
|
||||
await this.getFiles(project);
|
||||
const fileData = await this._statusControllerService.getFileStatusForProjects(mappedProjects.map((p) => p.projectId)).toPromise();
|
||||
for (let projectId of Object.keys(fileData)) {
|
||||
this._processFiles(
|
||||
mappedProjects.find((p) => p.projectId === projectId),
|
||||
fileData[projectId]
|
||||
);
|
||||
}
|
||||
|
||||
this._appState.projects = mappedProjects;
|
||||
@ -222,6 +227,10 @@ export class AppStateService {
|
||||
}
|
||||
const files = await this._statusControllerService.getProjectStatus(project.project.projectId).toPromise();
|
||||
|
||||
return this._processFiles(project, files);
|
||||
}
|
||||
|
||||
private _processFiles(project: ProjectWrapper, files: FileStatus[]) {
|
||||
const oldFiles = [...project.files];
|
||||
|
||||
const fileStatusChangedEvent = [];
|
||||
@ -251,7 +260,7 @@ export class AppStateService {
|
||||
}
|
||||
|
||||
project.files = files.map((f) => new FileStatusWrapper(f, this._userService.getNameForId(f.currentReviewer)));
|
||||
this._automaticallyReanalyseErrorFiles(project);
|
||||
// this._automaticallyReanalyseErrorFiles(project);
|
||||
this._computeStats();
|
||||
|
||||
fileReanalysedEvent.forEach((file) => this.fileReanalysed.emit(file));
|
||||
|
||||
@ -4,6 +4,8 @@ import { AppStateService } from '../state/app-state.service';
|
||||
import { HttpEventType } from '@angular/common/http';
|
||||
import { FileManagementControllerService } from '@redaction/red-ui-http';
|
||||
import { interval, Subscription } from 'rxjs';
|
||||
import { AppConfigKey, AppConfigService } from '../app-config/app-config.service';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
@ -19,6 +21,8 @@ export class FileUploadService {
|
||||
constructor(
|
||||
private readonly _appStateService: AppStateService,
|
||||
private readonly _applicationRef: ApplicationRef,
|
||||
private readonly _translateService: TranslateService,
|
||||
private readonly _appConfigService: AppConfigService,
|
||||
private readonly _fileManagementControllerService: FileManagementControllerService
|
||||
) {
|
||||
interval(2500).subscribe((val) => {
|
||||
@ -27,15 +31,24 @@ export class FileUploadService {
|
||||
}
|
||||
|
||||
scheduleUpload(item: FileUploadModel) {
|
||||
item.progress = 0;
|
||||
item.completed = false;
|
||||
item.error = null;
|
||||
this._pendingUploads.push(item);
|
||||
if (!item.sizeError) {
|
||||
item.progress = 0;
|
||||
item.completed = false;
|
||||
item.error = null;
|
||||
this._pendingUploads.push(item);
|
||||
}
|
||||
}
|
||||
|
||||
uploadFiles(files: FileUploadModel[]) {
|
||||
files = files.filter((file) => file.file.type?.toLowerCase() === 'application/pdf' || file.file.name.toLowerCase().endsWith('.pdf'));
|
||||
files.sort((a, b) => a.file.size - b.file.size);
|
||||
const maxSizeMB = this._appConfigService.getConfig(AppConfigKey.MAX_FILE_SIZE_MB, 50);
|
||||
const maxSizeBytes = maxSizeMB * 1024 * 1024;
|
||||
files.forEach((file) => {
|
||||
if (file.size > maxSizeBytes) {
|
||||
file.completed = true;
|
||||
file.error = { message: this._translateService.instant('upload-status.error.file-size', { size: maxSizeMB }) };
|
||||
file.sizeError = true;
|
||||
}
|
||||
});
|
||||
this.files.push(...files);
|
||||
files.forEach((newFile) => {
|
||||
this.scheduleUpload(newFile);
|
||||
@ -82,7 +95,7 @@ export class FileUploadService {
|
||||
uploadFile.completed = true;
|
||||
} else {
|
||||
uploadFile.completed = true;
|
||||
uploadFile.error = event.body;
|
||||
uploadFile.error = { message: this._translateService.instant('upload-status.error.generic') };
|
||||
}
|
||||
this._removeUpload(subscription);
|
||||
await this._appStateService.reloadActiveProjectFiles();
|
||||
@ -90,7 +103,7 @@ export class FileUploadService {
|
||||
},
|
||||
(error) => {
|
||||
uploadFile.completed = true;
|
||||
uploadFile.error = error;
|
||||
uploadFile.error = { message: this._translateService.instant('upload-status.error.generic') };
|
||||
this._removeUpload(subscription);
|
||||
if (uploadFile.retryCount < 5) {
|
||||
uploadFile.retryCount += 1;
|
||||
|
||||
@ -4,4 +4,6 @@ export interface FileUploadModel {
|
||||
completed: boolean;
|
||||
error: any;
|
||||
retryCount: number;
|
||||
size: number;
|
||||
sizeError: any;
|
||||
}
|
||||
|
||||
@ -35,6 +35,7 @@
|
||||
|
||||
<div class="upload-progress">
|
||||
<div
|
||||
*ngIf="!model.sizeError"
|
||||
(click)="uploadItem(model)"
|
||||
[matTooltip]="'upload-status.dialog.actions.re-upload' | translate"
|
||||
matTooltipPosition="above"
|
||||
|
||||
@ -31,11 +31,10 @@ section {
|
||||
}
|
||||
|
||||
.collapse-icon {
|
||||
padding-left: 8px;
|
||||
padding-right: 8px;
|
||||
transform: translate(0, 2px);
|
||||
|
||||
mat-icon {
|
||||
width: 10px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -21,12 +21,10 @@ export class UploadStatusOverlay implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.uploadStatusInterval = setInterval(() => {
|
||||
if (this.uploadService.files.length > 0) {
|
||||
// keep only errors
|
||||
this.uploadService.files = this.uploadService.files.filter((file) => !file.completed || file.error);
|
||||
if (this.uploadService.files.length === 0) {
|
||||
this.closeDialog();
|
||||
}
|
||||
// keep only errors
|
||||
this.uploadService.files = this.uploadService.files.filter((file) => !file.completed || file.error);
|
||||
if (this.uploadService.files.length === 0) {
|
||||
this.closeDialog();
|
||||
}
|
||||
}, 2500);
|
||||
}
|
||||
|
||||
@ -4,8 +4,8 @@ export function handleFileDrop(event: DragEvent, uploadFiles: (files: FileUpload
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
const { dataTransfer } = event;
|
||||
let files: any = [];
|
||||
if (dataTransfer.items) {
|
||||
const files = [];
|
||||
for (let i = 0; i < dataTransfer.items.length; i++) {
|
||||
// If dropped items aren't files, reject them
|
||||
if (dataTransfer.items[i].kind === 'file') {
|
||||
@ -13,16 +13,20 @@ export function handleFileDrop(event: DragEvent, uploadFiles: (files: FileUpload
|
||||
}
|
||||
}
|
||||
dataTransfer.items.clear();
|
||||
uploadFiles(convertFiles(files));
|
||||
} else {
|
||||
const files = dataTransfer.files;
|
||||
files = dataTransfer.files;
|
||||
dataTransfer.clearData();
|
||||
uploadFiles(convertFiles(files));
|
||||
}
|
||||
|
||||
const convertedFiles = convertFiles(files);
|
||||
if (convertedFiles.length > 0) {
|
||||
uploadFiles(convertedFiles);
|
||||
}
|
||||
}
|
||||
|
||||
export function convertFiles(files: FileList | File[]): FileUploadModel[] {
|
||||
const uploadFiles: FileUploadModel[] = [];
|
||||
let uploadFiles: FileUploadModel[] = [];
|
||||
for (let i = 0; i < files.length; i++) {
|
||||
const file = files[i];
|
||||
uploadFiles.push({
|
||||
@ -30,8 +34,12 @@ export function convertFiles(files: FileList | File[]): FileUploadModel[] {
|
||||
progress: 0,
|
||||
completed: false,
|
||||
error: null,
|
||||
retryCount: 0
|
||||
retryCount: 0,
|
||||
size: file.size
|
||||
});
|
||||
}
|
||||
|
||||
uploadFiles = uploadFiles.filter((file) => file.file.type?.toLowerCase() === 'application/pdf' || file.file.name.toLowerCase().endsWith('.pdf'));
|
||||
uploadFiles.sort((a, b) => a.size - b.size);
|
||||
return uploadFiles;
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
{
|
||||
"OAUTH_URL": "https://redkc-staging.iqser.cloud/auth/realms/redaction",
|
||||
"OAUTH_CLIENT_ID": "redaction",
|
||||
"API_URL": "https://timo-redaction-dev.iqser.cloud"
|
||||
"API_URL": "https://redapi-staging.iqser.cloud"
|
||||
}
|
||||
|
||||
@ -9,6 +9,10 @@
|
||||
"app-name": "DDA-R",
|
||||
"dev-mode": "[ DEV MODE ]",
|
||||
"upload-status": {
|
||||
"error": {
|
||||
"file-size": "File to large. Limit is {{size}}MB.",
|
||||
"generic": "Failed to upload file ... "
|
||||
},
|
||||
"dialog": {
|
||||
"title": "File Upload",
|
||||
"actions": {
|
||||
|
||||
@ -6,6 +6,7 @@ API_URL="${API_URL:-}"
|
||||
ADMIN_CONTACT_NAME="${ADMIN_CONTACT_NAME:-}"
|
||||
ADMIN_CONTACT_URL="${ADMIN_CONTACT_URL:-}"
|
||||
AUTO_READ_TIME="${AUTO_READ_TIME:-1.5}"
|
||||
MAX_FILE_SIZE_MB="${MAX_FILE_SIZE_MB:-50}"
|
||||
|
||||
|
||||
echo '{
|
||||
|
||||
@ -11,7 +11,8 @@
|
||||
*/ /* tslint:disable:no-unused-variable member-ordering */
|
||||
|
||||
import { Inject, Injectable, Optional } from '@angular/core';
|
||||
import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http';
|
||||
import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
|
||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
|
||||
@ -24,11 +25,7 @@ export class ReanalysisControllerService {
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string,
|
||||
@Optional() configuration: Configuration
|
||||
) {
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
@ -46,61 +43,32 @@ export class ReanalysisControllerService {
|
||||
* @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 reanalyzeFile(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public reanalyzeFile(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public reanalyzeFile(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public reanalyzeFile(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public reanalyzeFile(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public reanalyzeFile(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public reanalyzeFile(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public reanalyzeFile(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling reanalyzeFile.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling reanalyzeFile.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling reanalyzeFile.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling reanalyzeFile.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -110,9 +78,7 @@ export class ReanalysisControllerService {
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/reanalyze/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/reanalyze/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -123,57 +89,94 @@ export class ReanalysisControllerService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Reanalyze all files of the project.
|
||||
* Reanalyze multiple files for a project
|
||||
* None
|
||||
* @param body fileIds
|
||||
* @param projectId projectId
|
||||
* @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 reanalyzeProject(
|
||||
projectId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public reanalyzeFilesForProject(body: Array<string>, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public reanalyzeProject(
|
||||
projectId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public reanalyzeFilesForProject(body: Array<string>, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public reanalyzeProject(
|
||||
projectId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public reanalyzeFilesForProject(body: Array<string>, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public reanalyzeFilesForProject(body: Array<string>, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling reanalyzeFilesForProject.');
|
||||
}
|
||||
|
||||
public reanalyzeProject(
|
||||
projectId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling reanalyzeProject.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling reanalyzeFilesForProject.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['application/json'];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/reanalyze/${encodeURIComponent(String(projectId))}/bulk`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reanalyze all files of the project.
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @param force force
|
||||
* @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 reanalyzeProject(projectId: string, force?: boolean, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public reanalyzeProject(projectId: string, force?: boolean, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public reanalyzeProject(projectId: string, force?: boolean, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public reanalyzeProject(projectId: string, force?: boolean, 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 reanalyzeProject.');
|
||||
}
|
||||
|
||||
let queryParameters = new HttpParams({ encoder: new CustomHttpUrlEncodingCodec() });
|
||||
if (force !== undefined && force !== null) {
|
||||
queryParameters = queryParameters.set('force', <any>force);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
@ -181,16 +184,13 @@ export class ReanalysisControllerService {
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/reanalyze/${encodeURIComponent(String(projectId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
return this.httpClient.request<any>('post', `${this.basePath}/reanalyze/${encodeURIComponent(String(projectId))}`, {
|
||||
params: queryParameters,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -22,15 +22,11 @@ import { Configuration } from '../configuration';
|
||||
|
||||
@Injectable()
|
||||
export class StatusControllerService {
|
||||
protected basePath = '';
|
||||
public defaultHeaders = new HttpHeaders();
|
||||
public configuration = new Configuration();
|
||||
protected basePath = '';
|
||||
|
||||
constructor(
|
||||
protected httpClient: HttpClient,
|
||||
@Optional() @Inject(BASE_PATH) basePath: string,
|
||||
@Optional() configuration: Configuration
|
||||
) {
|
||||
constructor(protected httpClient: HttpClient, @Optional() @Inject(BASE_PATH) basePath: string, @Optional() configuration: Configuration) {
|
||||
if (basePath) {
|
||||
this.basePath = basePath;
|
||||
}
|
||||
@ -40,112 +36,6 @@ export class StatusControllerService {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns new owner to project.
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @param fileId fileId
|
||||
* @param reviewerId reviewerId
|
||||
* @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 assignProjectOwner(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
reviewerId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public assignProjectOwner(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
reviewerId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public assignProjectOwner(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
reviewerId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public assignProjectOwner(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
reviewerId: 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 assignProjectOwner.'
|
||||
);
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling assignProjectOwner.'
|
||||
);
|
||||
}
|
||||
|
||||
if (reviewerId === null || reviewerId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter reviewerId was null or undefined when calling assignProjectOwner.'
|
||||
);
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/status/${encodeURIComponent(String(projectId))}/${encodeURIComponent(
|
||||
String(fileId)
|
||||
)}/${encodeURIComponent(String(reviewerId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status for a file.
|
||||
* None
|
||||
@ -154,58 +44,32 @@ export class StatusControllerService {
|
||||
* @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 getFileStatus(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<FileStatus>;
|
||||
public getFileStatus(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<FileStatus>>;
|
||||
public getFileStatus(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<FileStatus>>;
|
||||
public getFileStatus(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public getFileStatus(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<FileStatus>;
|
||||
|
||||
public getFileStatus(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<FileStatus>>;
|
||||
|
||||
public getFileStatus(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<FileStatus>>;
|
||||
|
||||
public getFileStatus(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling getFileStatus.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling getFileStatus.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling getFileStatus.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling getFileStatus.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = ['application/json'];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -215,9 +79,7 @@ export class StatusControllerService {
|
||||
|
||||
return this.httpClient.request<FileStatus>(
|
||||
'get',
|
||||
`${this.basePath}/status/${encodeURIComponent(String(projectId))}/${encodeURIComponent(
|
||||
String(fileId)
|
||||
)}`,
|
||||
`${this.basePath}/status/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -228,54 +90,91 @@ export class StatusControllerService {
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status for all files in a project.
|
||||
* Gets the status for all files of a list of projects.
|
||||
* None
|
||||
* @param projectId The id of the project you want the status for.
|
||||
* @param body projectIds
|
||||
* @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 getProjectStatus(
|
||||
projectId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<Array<FileStatus>>;
|
||||
public getProjectStatus(
|
||||
projectId: string,
|
||||
public getFileStatusForProjects(body: Array<string>, observe?: 'body', reportProgress?: boolean): Observable<{ [key: string]: Array<FileStatus> }>;
|
||||
|
||||
public getFileStatusForProjects(
|
||||
body: Array<string>,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<Array<FileStatus>>>;
|
||||
public getProjectStatus(
|
||||
projectId: string,
|
||||
): Observable<HttpResponse<{ [key: string]: Array<FileStatus> }>>;
|
||||
|
||||
public getFileStatusForProjects(
|
||||
body: Array<string>,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<Array<FileStatus>>>;
|
||||
public getProjectStatus(
|
||||
projectId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling getProjectStatus.'
|
||||
);
|
||||
): Observable<HttpEvent<{ [key: string]: Array<FileStatus> }>>;
|
||||
|
||||
public getFileStatusForProjects(body: Array<string>, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling getFileStatusForProjects.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = ['application/json'];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = ['application/json'];
|
||||
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
||||
if (httpContentTypeSelected !== undefined) {
|
||||
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||
}
|
||||
|
||||
return this.httpClient.request<{ [key: string]: Array<FileStatus> }>('post', `${this.basePath}/status`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the status for all files in a project.
|
||||
* None
|
||||
* @param projectId The id of the project you want the status for.
|
||||
* @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 getProjectStatus(projectId: string, observe?: 'body', reportProgress?: boolean): Observable<Array<FileStatus>>;
|
||||
|
||||
public getProjectStatus(projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<Array<FileStatus>>>;
|
||||
|
||||
public getProjectStatus(projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<Array<FileStatus>>>;
|
||||
|
||||
public getProjectStatus(projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling getProjectStatus.');
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
@ -283,9 +182,69 @@ export class StatusControllerService {
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<Array<FileStatus>>(
|
||||
'get',
|
||||
`${this.basePath}/status/${encodeURIComponent(String(projectId))}`,
|
||||
return this.httpClient.request<Array<FileStatus>>('get', `${this.basePath}/status/${encodeURIComponent(String(projectId))}`, {
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Assigns a reviewer for a file.
|
||||
* None
|
||||
* @param projectId projectId
|
||||
* @param fileId fileId
|
||||
* @param reviewerId reviewerId
|
||||
* @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 setFileReviewer(projectId: string, fileId: string, reviewerId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setFileReviewer(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
reviewerId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
|
||||
public setFileReviewer(projectId: string, fileId: string, reviewerId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public setFileReviewer(projectId: string, fileId: string, reviewerId: 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 setFileReviewer.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error('Required parameter fileId was null or undefined when calling setFileReviewer.');
|
||||
}
|
||||
|
||||
if (reviewerId === null || reviewerId === undefined) {
|
||||
throw new Error('Required parameter reviewerId was null or undefined when calling setFileReviewer.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
// to determine the Content-Type header
|
||||
const consumes: string[] = [];
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/status/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}/${encodeURIComponent(String(reviewerId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -295,6 +254,87 @@ export class StatusControllerService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign a reviewer for a list of files.
|
||||
* None
|
||||
* @param body fileIds
|
||||
* @param projectId projectId
|
||||
* @param reviewerId reviewerId
|
||||
* @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 setFileReviewerForList(body: Array<string>, projectId: string, reviewerId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setFileReviewerForList(
|
||||
body: Array<string>,
|
||||
projectId: string,
|
||||
reviewerId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
|
||||
public setFileReviewerForList(
|
||||
body: Array<string>,
|
||||
projectId: string,
|
||||
reviewerId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
|
||||
public setFileReviewerForList(
|
||||
body: Array<string>,
|
||||
projectId: string,
|
||||
reviewerId: 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 setFileReviewerForList.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling setFileReviewerForList.');
|
||||
}
|
||||
|
||||
if (reviewerId === null || reviewerId === undefined) {
|
||||
throw new Error('Required parameter reviewerId was null or undefined when calling setFileReviewerForList.');
|
||||
}
|
||||
|
||||
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}/status/${encodeURIComponent(String(projectId))}/bulk/${encodeURIComponent(String(reviewerId))}`,
|
||||
{
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the status APPROVED for a file.
|
||||
* None
|
||||
@ -303,58 +343,32 @@ export class StatusControllerService {
|
||||
* @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 setStatusApproved(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public setStatusApproved(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public setStatusApproved(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public setStatusApproved(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public setStatusApproved(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setStatusApproved(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public setStatusApproved(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public setStatusApproved(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling setStatusApproved.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling setStatusApproved.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling setStatusApproved.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling setStatusApproved.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -364,9 +378,7 @@ export class StatusControllerService {
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/status/approved/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/status/approved/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -376,6 +388,60 @@ export class StatusControllerService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the status APPROVED for a list of files.
|
||||
* None
|
||||
* @param body fileIds
|
||||
* @param projectId projectId
|
||||
* @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 setStatusApprovedForList(body: Array<string>, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setStatusApprovedForList(body: Array<string>, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public setStatusApprovedForList(body: Array<string>, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public setStatusApprovedForList(body: Array<string>, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling setStatusApprovedForList.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling setStatusApprovedForList.');
|
||||
}
|
||||
|
||||
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}/status/approved/${encodeURIComponent(String(projectId))}/bulk`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the status UNDER_APPROVAL for a file.
|
||||
* None
|
||||
@ -384,58 +450,32 @@ export class StatusControllerService {
|
||||
* @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 setStatusUnderApproval(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public setStatusUnderApproval(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public setStatusUnderApproval(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public setStatusUnderApproval(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public setStatusUnderApproval(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setStatusUnderApproval(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public setStatusUnderApproval(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public setStatusUnderApproval(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling setStatusUnderApproval.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling setStatusUnderApproval.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling setStatusUnderApproval.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling setStatusUnderApproval.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -445,9 +485,7 @@ export class StatusControllerService {
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/status/underapproval/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/status/underapproval/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -457,6 +495,60 @@ export class StatusControllerService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the status UNDER_APPROVAL for a list of files.
|
||||
* None
|
||||
* @param body fileIds
|
||||
* @param projectId projectId
|
||||
* @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 setStatusUnderApprovalForList(body: Array<string>, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setStatusUnderApprovalForList(body: Array<string>, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public setStatusUnderApprovalForList(body: Array<string>, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public setStatusUnderApprovalForList(body: Array<string>, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling setStatusUnderApprovalForList.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling setStatusUnderApprovalForList.');
|
||||
}
|
||||
|
||||
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}/status/underapproval/${encodeURIComponent(String(projectId))}/bulk`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the status UNDER_REVIEW for a file.
|
||||
* None
|
||||
@ -465,58 +557,32 @@ export class StatusControllerService {
|
||||
* @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 setStatusUnderReview(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'body',
|
||||
reportProgress?: boolean
|
||||
): Observable<any>;
|
||||
public setStatusUnderReview(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'response',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpResponse<any>>;
|
||||
public setStatusUnderReview(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe?: 'events',
|
||||
reportProgress?: boolean
|
||||
): Observable<HttpEvent<any>>;
|
||||
public setStatusUnderReview(
|
||||
projectId: string,
|
||||
fileId: string,
|
||||
observe: any = 'body',
|
||||
reportProgress: boolean = false
|
||||
): Observable<any> {
|
||||
public setStatusUnderReview(projectId: string, fileId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setStatusUnderReview(projectId: string, fileId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public setStatusUnderReview(projectId: string, fileId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public setStatusUnderReview(projectId: string, fileId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter projectId was null or undefined when calling setStatusUnderReview.'
|
||||
);
|
||||
throw new Error('Required parameter projectId was null or undefined when calling setStatusUnderReview.');
|
||||
}
|
||||
|
||||
if (fileId === null || fileId === undefined) {
|
||||
throw new Error(
|
||||
'Required parameter fileId was null or undefined when calling setStatusUnderReview.'
|
||||
);
|
||||
throw new Error('Required parameter fileId was null or undefined when calling setStatusUnderReview.');
|
||||
}
|
||||
|
||||
let headers = this.defaultHeaders;
|
||||
|
||||
// authentication (RED-OAUTH) required
|
||||
if (this.configuration.accessToken) {
|
||||
const accessToken =
|
||||
typeof this.configuration.accessToken === 'function'
|
||||
? this.configuration.accessToken()
|
||||
: this.configuration.accessToken;
|
||||
const accessToken = typeof this.configuration.accessToken === 'function' ? this.configuration.accessToken() : this.configuration.accessToken;
|
||||
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||
}
|
||||
|
||||
// to determine the Accept header
|
||||
const httpHeaderAccepts: string[] = [];
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(
|
||||
httpHeaderAccepts
|
||||
);
|
||||
const httpHeaderAcceptSelected: string | undefined = this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||
if (httpHeaderAcceptSelected !== undefined) {
|
||||
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||
}
|
||||
@ -526,9 +592,7 @@ export class StatusControllerService {
|
||||
|
||||
return this.httpClient.request<any>(
|
||||
'post',
|
||||
`${this.basePath}/status/underreview/${encodeURIComponent(
|
||||
String(projectId)
|
||||
)}/${encodeURIComponent(String(fileId))}`,
|
||||
`${this.basePath}/status/underreview/${encodeURIComponent(String(projectId))}/${encodeURIComponent(String(fileId))}`,
|
||||
{
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
@ -537,4 +601,72 @@ export class StatusControllerService {
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the status UNDER_REVIEW for a list of files.
|
||||
* None
|
||||
* @param body fileIds
|
||||
* @param projectId projectId
|
||||
* @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 setStatusUnderReviewForList(body: Array<string>, projectId: string, observe?: 'body', reportProgress?: boolean): Observable<any>;
|
||||
|
||||
public setStatusUnderReviewForList(body: Array<string>, projectId: string, observe?: 'response', reportProgress?: boolean): Observable<HttpResponse<any>>;
|
||||
|
||||
public setStatusUnderReviewForList(body: Array<string>, projectId: string, observe?: 'events', reportProgress?: boolean): Observable<HttpEvent<any>>;
|
||||
|
||||
public setStatusUnderReviewForList(body: Array<string>, projectId: string, observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||
if (body === null || body === undefined) {
|
||||
throw new Error('Required parameter body was null or undefined when calling setStatusUnderReviewForList.');
|
||||
}
|
||||
|
||||
if (projectId === null || projectId === undefined) {
|
||||
throw new Error('Required parameter projectId was null or undefined when calling setStatusUnderReviewForList.');
|
||||
}
|
||||
|
||||
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}/status/underreview/${encodeURIComponent(String(projectId))}/bulk`, {
|
||||
body: body,
|
||||
withCredentials: this.configuration.withCredentials,
|
||||
headers: headers,
|
||||
observe: observe,
|
||||
reportProgress: reportProgress
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* @param consumes string[] mime-types
|
||||
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||
*/
|
||||
private canConsumeForm(consumes: string[]): boolean {
|
||||
const form = 'multipart/form-data';
|
||||
for (const consume of consumes) {
|
||||
if (form === consume) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user