api for dossier deletion and dossier attributes
This commit is contained in:
parent
a66eeeca34
commit
fcaf97cfb1
@ -7,7 +7,7 @@ To re-generate http rune swagger
|
|||||||
YOu need swagger-codegen installed `brew install swagger-codegen`
|
YOu need swagger-codegen installed `brew install swagger-codegen`
|
||||||
|
|
||||||
```
|
```
|
||||||
BASE=https://red-staging.iqser.cloud/
|
BASE=https://dev-06.iqser.cloud/
|
||||||
URL="$BASE"redaction-gateway-v1/v2/api-docs?group=redaction-gateway-v1
|
URL="$BASE"redaction-gateway-v1/v2/api-docs?group=redaction-gateway-v1
|
||||||
rm -Rf /tmp/swagger
|
rm -Rf /tmp/swagger
|
||||||
mkdir -p /tmp/swagger
|
mkdir -p /tmp/swagger
|
||||||
|
|||||||
@ -540,7 +540,7 @@ export class FilePreviewScreenComponent implements OnInit, OnDestroy, OnAttach,
|
|||||||
this.dossierId,
|
this.dossierId,
|
||||||
this.fileId,
|
this.fileId,
|
||||||
true,
|
true,
|
||||||
this.fileData.fileStatus.lastUploaded,
|
this.fileData.fileStatus.cacheIdentifier,
|
||||||
'response'
|
'response'
|
||||||
)
|
)
|
||||||
.subscribe(data => {
|
.subscribe(data => {
|
||||||
|
|||||||
@ -11,7 +11,8 @@
|
|||||||
*/ /* tslint:disable:no-unused-variable member-ordering */
|
*/ /* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
import { Inject, Injectable, Optional } from '@angular/core';
|
import { Inject, Injectable, Optional } from '@angular/core';
|
||||||
import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http';
|
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http';
|
||||||
|
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
@ -21,14 +22,14 @@ import { DossierAttributesConfig } from '../model/dossierAttributesConfig';
|
|||||||
import { DossierAttributesReq } from '../model/dossierAttributesReq';
|
import { DossierAttributesReq } from '../model/dossierAttributesReq';
|
||||||
import { DossierAttributesRes } from '../model/dossierAttributesRes';
|
import { DossierAttributesRes } from '../model/dossierAttributesRes';
|
||||||
|
|
||||||
import { BASE_PATH } from '../variables';
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||||
import { Configuration } from '../configuration';
|
import { Configuration } from '../configuration';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DossierAttributesControllerService {
|
export class DossierAttributesControllerService {
|
||||||
|
protected basePath = '';
|
||||||
public defaultHeaders = new HttpHeaders();
|
public defaultHeaders = new HttpHeaders();
|
||||||
public configuration = new Configuration();
|
public configuration = new Configuration();
|
||||||
protected basePath = '';
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected httpClient: HttpClient,
|
protected httpClient: HttpClient,
|
||||||
@ -44,6 +45,20 @@ export class DossierAttributesControllerService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param consumes string[] mime-types
|
||||||
|
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||||
|
*/
|
||||||
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
|
const form = 'multipart/form-data';
|
||||||
|
for (const consume of consumes) {
|
||||||
|
if (form === consume) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add or update a dossier attribute in existing dossier.
|
* Add or update a dossier attribute in existing dossier.
|
||||||
* None
|
* None
|
||||||
@ -58,21 +73,18 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<DossierAttributesRes>;
|
): Observable<DossierAttributesRes>;
|
||||||
|
|
||||||
public addOrUpdateDossierAttributes(
|
public addOrUpdateDossierAttributes(
|
||||||
body: DossierAttributeReq,
|
body: DossierAttributeReq,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<DossierAttributesRes>>;
|
): Observable<HttpResponse<DossierAttributesRes>>;
|
||||||
|
|
||||||
public addOrUpdateDossierAttributes(
|
public addOrUpdateDossierAttributes(
|
||||||
body: DossierAttributeReq,
|
body: DossierAttributeReq,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<DossierAttributesRes>>;
|
): Observable<HttpEvent<DossierAttributesRes>>;
|
||||||
|
|
||||||
public addOrUpdateDossierAttributes(
|
public addOrUpdateDossierAttributes(
|
||||||
body: DossierAttributeReq,
|
body: DossierAttributeReq,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
@ -120,7 +132,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<DossierAttributesRes>(
|
return this.httpClient.request<DossierAttributesRes>(
|
||||||
'post',
|
'post',
|
||||||
`${this.basePath}/dossierAttributes/update/${encodeURIComponent(String(dossierId))}`,
|
`${this.basePath}/dossier-attributes/update/${encodeURIComponent(String(dossierId))}`,
|
||||||
{
|
{
|
||||||
body: body,
|
body: body,
|
||||||
withCredentials: this.configuration.withCredentials,
|
withCredentials: this.configuration.withCredentials,
|
||||||
@ -145,21 +157,18 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<DossierAttributeConfig>;
|
): Observable<DossierAttributeConfig>;
|
||||||
|
|
||||||
public addOrUpdateDossierAttributesConfig(
|
public addOrUpdateDossierAttributesConfig(
|
||||||
body: DossierAttributeConfig,
|
body: DossierAttributeConfig,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<DossierAttributeConfig>>;
|
): Observable<HttpResponse<DossierAttributeConfig>>;
|
||||||
|
|
||||||
public addOrUpdateDossierAttributesConfig(
|
public addOrUpdateDossierAttributesConfig(
|
||||||
body: DossierAttributeConfig,
|
body: DossierAttributeConfig,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<DossierAttributeConfig>>;
|
): Observable<HttpEvent<DossierAttributeConfig>>;
|
||||||
|
|
||||||
public addOrUpdateDossierAttributesConfig(
|
public addOrUpdateDossierAttributesConfig(
|
||||||
body: DossierAttributeConfig,
|
body: DossierAttributeConfig,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
@ -207,7 +216,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<DossierAttributeConfig>(
|
return this.httpClient.request<DossierAttributeConfig>(
|
||||||
'post',
|
'post',
|
||||||
`${this.basePath}/dossierAttributes/config/${encodeURIComponent(
|
`${this.basePath}/dossier-attributes/config/${encodeURIComponent(
|
||||||
String(dossierTemplateId)
|
String(dossierTemplateId)
|
||||||
)}`,
|
)}`,
|
||||||
{
|
{
|
||||||
@ -234,21 +243,18 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<any>;
|
): Observable<any>;
|
||||||
|
|
||||||
public deleteDossierAttribute(
|
public deleteDossierAttribute(
|
||||||
dossierAttributeId: string,
|
dossierAttributeId: string,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<any>>;
|
): Observable<HttpResponse<any>>;
|
||||||
|
|
||||||
public deleteDossierAttribute(
|
public deleteDossierAttribute(
|
||||||
dossierAttributeId: string,
|
dossierAttributeId: string,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<any>>;
|
): Observable<HttpEvent<any>>;
|
||||||
|
|
||||||
public deleteDossierAttribute(
|
public deleteDossierAttribute(
|
||||||
dossierAttributeId: string,
|
dossierAttributeId: string,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
@ -288,7 +294,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<any>(
|
return this.httpClient.request<any>(
|
||||||
'delete',
|
'delete',
|
||||||
`${this.basePath}/dossierAttributes/set/${encodeURIComponent(
|
`${this.basePath}/dossier-attributes/set/${encodeURIComponent(
|
||||||
String(dossierId)
|
String(dossierId)
|
||||||
)}/${encodeURIComponent(String(dossierAttributeId))}`,
|
)}/${encodeURIComponent(String(dossierAttributeId))}`,
|
||||||
{
|
{
|
||||||
@ -314,21 +320,18 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<any>;
|
): Observable<any>;
|
||||||
|
|
||||||
public deleteDossierAttributeConfig(
|
public deleteDossierAttributeConfig(
|
||||||
dossierAttributeId: string,
|
dossierAttributeId: string,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<any>>;
|
): Observable<HttpResponse<any>>;
|
||||||
|
|
||||||
public deleteDossierAttributeConfig(
|
public deleteDossierAttributeConfig(
|
||||||
dossierAttributeId: string,
|
dossierAttributeId: string,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<any>>;
|
): Observable<HttpEvent<any>>;
|
||||||
|
|
||||||
public deleteDossierAttributeConfig(
|
public deleteDossierAttributeConfig(
|
||||||
dossierAttributeId: string,
|
dossierAttributeId: string,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
@ -368,7 +371,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<any>(
|
return this.httpClient.request<any>(
|
||||||
'delete',
|
'delete',
|
||||||
`${this.basePath}/dossierAttributes/config/${encodeURIComponent(
|
`${this.basePath}/dossier-attributes/config/${encodeURIComponent(
|
||||||
String(dossierTemplateId)
|
String(dossierTemplateId)
|
||||||
)}/${encodeURIComponent(String(dossierAttributeId))}`,
|
)}/${encodeURIComponent(String(dossierAttributeId))}`,
|
||||||
{
|
{
|
||||||
@ -383,7 +386,7 @@ export class DossierAttributesControllerService {
|
|||||||
/**
|
/**
|
||||||
* Bulk delete dossier attributes.
|
* Bulk delete dossier attributes.
|
||||||
* None
|
* None
|
||||||
* @param body dossierAttributeIds
|
* @param body dossierId
|
||||||
* @param dossierTemplateId dossierTemplateId
|
* @param dossierTemplateId dossierTemplateId
|
||||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
* @param 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.
|
* @param reportProgress flag to report request and response progress.
|
||||||
@ -394,21 +397,18 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<any>;
|
): Observable<any>;
|
||||||
|
|
||||||
public deleteDossierAttributesConfig(
|
public deleteDossierAttributesConfig(
|
||||||
body: Array<string>,
|
body: Array<string>,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<any>>;
|
): Observable<HttpResponse<any>>;
|
||||||
|
|
||||||
public deleteDossierAttributesConfig(
|
public deleteDossierAttributesConfig(
|
||||||
body: Array<string>,
|
body: Array<string>,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<any>>;
|
): Observable<HttpEvent<any>>;
|
||||||
|
|
||||||
public deleteDossierAttributesConfig(
|
public deleteDossierAttributesConfig(
|
||||||
body: Array<string>,
|
body: Array<string>,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
@ -456,7 +456,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<any>(
|
return this.httpClient.request<any>(
|
||||||
'post',
|
'post',
|
||||||
`${this.basePath}/dossierAttributes/config/delete/${encodeURIComponent(
|
`${this.basePath}/dossier-attributes/config/delete/${encodeURIComponent(
|
||||||
String(dossierTemplateId)
|
String(dossierTemplateId)
|
||||||
)}`,
|
)}`,
|
||||||
{
|
{
|
||||||
@ -481,19 +481,16 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<DossierAttributesRes>;
|
): Observable<DossierAttributesRes>;
|
||||||
|
|
||||||
public getDossierAttributes(
|
public getDossierAttributes(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<DossierAttributesRes>>;
|
): Observable<HttpResponse<DossierAttributesRes>>;
|
||||||
|
|
||||||
public getDossierAttributes(
|
public getDossierAttributes(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<DossierAttributesRes>>;
|
): Observable<HttpEvent<DossierAttributesRes>>;
|
||||||
|
|
||||||
public getDossierAttributes(
|
public getDossierAttributes(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe: any = 'body',
|
observe: any = 'body',
|
||||||
@ -526,7 +523,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<DossierAttributesRes>(
|
return this.httpClient.request<DossierAttributesRes>(
|
||||||
'get',
|
'get',
|
||||||
`${this.basePath}/dossierAttributes/${encodeURIComponent(String(dossierId))}`,
|
`${this.basePath}/dossier-attributes/${encodeURIComponent(String(dossierId))}`,
|
||||||
{
|
{
|
||||||
withCredentials: this.configuration.withCredentials,
|
withCredentials: this.configuration.withCredentials,
|
||||||
headers: headers,
|
headers: headers,
|
||||||
@ -548,19 +545,16 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<DossierAttributesConfig>;
|
): Observable<DossierAttributesConfig>;
|
||||||
|
|
||||||
public getDossierAttributesConfig(
|
public getDossierAttributesConfig(
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<DossierAttributesConfig>>;
|
): Observable<HttpResponse<DossierAttributesConfig>>;
|
||||||
|
|
||||||
public getDossierAttributesConfig(
|
public getDossierAttributesConfig(
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<DossierAttributesConfig>>;
|
): Observable<HttpEvent<DossierAttributesConfig>>;
|
||||||
|
|
||||||
public getDossierAttributesConfig(
|
public getDossierAttributesConfig(
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe: any = 'body',
|
observe: any = 'body',
|
||||||
@ -593,7 +587,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<DossierAttributesConfig>(
|
return this.httpClient.request<DossierAttributesConfig>(
|
||||||
'get',
|
'get',
|
||||||
`${this.basePath}/dossierAttributes/config/${encodeURIComponent(
|
`${this.basePath}/dossier-attributes/config/${encodeURIComponent(
|
||||||
String(dossierTemplateId)
|
String(dossierTemplateId)
|
||||||
)}`,
|
)}`,
|
||||||
{
|
{
|
||||||
@ -619,21 +613,18 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<DossierAttributesRes>;
|
): Observable<DossierAttributesRes>;
|
||||||
|
|
||||||
public setDossierAttributes(
|
public setDossierAttributes(
|
||||||
body: DossierAttributesReq,
|
body: DossierAttributesReq,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<DossierAttributesRes>>;
|
): Observable<HttpResponse<DossierAttributesRes>>;
|
||||||
|
|
||||||
public setDossierAttributes(
|
public setDossierAttributes(
|
||||||
body: DossierAttributesReq,
|
body: DossierAttributesReq,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<DossierAttributesRes>>;
|
): Observable<HttpEvent<DossierAttributesRes>>;
|
||||||
|
|
||||||
public setDossierAttributes(
|
public setDossierAttributes(
|
||||||
body: DossierAttributesReq,
|
body: DossierAttributesReq,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
@ -681,7 +672,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<DossierAttributesRes>(
|
return this.httpClient.request<DossierAttributesRes>(
|
||||||
'post',
|
'post',
|
||||||
`${this.basePath}/dossierAttributes/set/${encodeURIComponent(String(dossierId))}`,
|
`${this.basePath}/dossier-attributes/set/${encodeURIComponent(String(dossierId))}`,
|
||||||
{
|
{
|
||||||
body: body,
|
body: body,
|
||||||
withCredentials: this.configuration.withCredentials,
|
withCredentials: this.configuration.withCredentials,
|
||||||
@ -706,21 +697,18 @@ export class DossierAttributesControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<DossierAttributesConfig>;
|
): Observable<DossierAttributesConfig>;
|
||||||
|
|
||||||
public setDossierAttributesConfig(
|
public setDossierAttributesConfig(
|
||||||
body: DossierAttributesConfig,
|
body: DossierAttributesConfig,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<DossierAttributesConfig>>;
|
): Observable<HttpResponse<DossierAttributesConfig>>;
|
||||||
|
|
||||||
public setDossierAttributesConfig(
|
public setDossierAttributesConfig(
|
||||||
body: DossierAttributesConfig,
|
body: DossierAttributesConfig,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<DossierAttributesConfig>>;
|
): Observable<HttpEvent<DossierAttributesConfig>>;
|
||||||
|
|
||||||
public setDossierAttributesConfig(
|
public setDossierAttributesConfig(
|
||||||
body: DossierAttributesConfig,
|
body: DossierAttributesConfig,
|
||||||
dossierTemplateId: string,
|
dossierTemplateId: string,
|
||||||
@ -768,7 +756,7 @@ export class DossierAttributesControllerService {
|
|||||||
|
|
||||||
return this.httpClient.request<DossierAttributesConfig>(
|
return this.httpClient.request<DossierAttributesConfig>(
|
||||||
'put',
|
'put',
|
||||||
`${this.basePath}/dossierAttributes/config/${encodeURIComponent(
|
`${this.basePath}/dossier-attributes/config/${encodeURIComponent(
|
||||||
String(dossierTemplateId)
|
String(dossierTemplateId)
|
||||||
)}`,
|
)}`,
|
||||||
{
|
{
|
||||||
|
|||||||
@ -11,21 +11,22 @@
|
|||||||
*/ /* tslint:disable:no-unused-variable member-ordering */
|
*/ /* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
import { Inject, Injectable, Optional } from '@angular/core';
|
import { Inject, Injectable, Optional } from '@angular/core';
|
||||||
import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http';
|
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http';
|
||||||
|
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
import { Dossier } from '../model/dossier';
|
import { Dossier } from '../model/dossier';
|
||||||
import { DossierRequest } from '../model/dossierRequest';
|
import { DossierRequest } from '../model/dossierRequest';
|
||||||
|
|
||||||
import { BASE_PATH } from '../variables';
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||||
import { Configuration } from '../configuration';
|
import { Configuration } from '../configuration';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class DossierControllerService {
|
export class DossierControllerService {
|
||||||
|
protected basePath = '';
|
||||||
public defaultHeaders = new HttpHeaders();
|
public defaultHeaders = new HttpHeaders();
|
||||||
public configuration = new Configuration();
|
public configuration = new Configuration();
|
||||||
protected basePath = '';
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected httpClient: HttpClient,
|
protected httpClient: HttpClient,
|
||||||
@ -41,6 +42,20 @@ export class DossierControllerService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param consumes string[] mime-types
|
||||||
|
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||||
|
*/
|
||||||
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
|
const form = 'multipart/form-data';
|
||||||
|
for (const consume of consumes) {
|
||||||
|
if (form === consume) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates or updates a dossier.
|
* Creates or updates a dossier.
|
||||||
* None
|
* None
|
||||||
@ -53,19 +68,16 @@ export class DossierControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<Dossier>;
|
): Observable<Dossier>;
|
||||||
|
|
||||||
public createOrUpdateDossier(
|
public createOrUpdateDossier(
|
||||||
body: DossierRequest,
|
body: DossierRequest,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<Dossier>>;
|
): Observable<HttpResponse<Dossier>>;
|
||||||
|
|
||||||
public createOrUpdateDossier(
|
public createOrUpdateDossier(
|
||||||
body: DossierRequest,
|
body: DossierRequest,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<Dossier>>;
|
): Observable<HttpEvent<Dossier>>;
|
||||||
|
|
||||||
public createOrUpdateDossier(
|
public createOrUpdateDossier(
|
||||||
body: DossierRequest,
|
body: DossierRequest,
|
||||||
observe: any = 'body',
|
observe: any = 'body',
|
||||||
@ -125,19 +137,16 @@ export class DossierControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<any>;
|
): Observable<any>;
|
||||||
|
|
||||||
public deleteDossier(
|
public deleteDossier(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<any>>;
|
): Observable<HttpResponse<any>>;
|
||||||
|
|
||||||
public deleteDossier(
|
public deleteDossier(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<any>>;
|
): Observable<HttpEvent<any>>;
|
||||||
|
|
||||||
public deleteDossier(
|
public deleteDossier(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe: any = 'body',
|
observe: any = 'body',
|
||||||
@ -180,6 +189,55 @@ export class DossierControllerService {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets all deleted dossiers.
|
||||||
|
* None
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
*/
|
||||||
|
public getDeletedDossiers(
|
||||||
|
observe?: 'body',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<Array<Dossier>>;
|
||||||
|
public getDeletedDossiers(
|
||||||
|
observe?: 'response',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpResponse<Array<Dossier>>>;
|
||||||
|
public getDeletedDossiers(
|
||||||
|
observe?: 'events',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpEvent<Array<Dossier>>>;
|
||||||
|
public getDeletedDossiers(
|
||||||
|
observe: any = 'body',
|
||||||
|
reportProgress: boolean = false
|
||||||
|
): Observable<any> {
|
||||||
|
let headers = this.defaultHeaders;
|
||||||
|
|
||||||
|
// authentication (RED-OAUTH) required
|
||||||
|
if (this.configuration.accessToken) {
|
||||||
|
const accessToken =
|
||||||
|
typeof this.configuration.accessToken === 'function'
|
||||||
|
? this.configuration.accessToken()
|
||||||
|
: this.configuration.accessToken;
|
||||||
|
headers = headers.set('Authorization', 'Bearer ' + accessToken);
|
||||||
|
}
|
||||||
|
|
||||||
|
// to determine the Accept header
|
||||||
|
const httpHeaderAccepts: string[] = ['application/json'];
|
||||||
|
const httpHeaderAcceptSelected: string | undefined =
|
||||||
|
this.configuration.selectHeaderAccept(httpHeaderAccepts);
|
||||||
|
if (httpHeaderAcceptSelected !== undefined) {
|
||||||
|
headers = headers.set('Accept', httpHeaderAcceptSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.httpClient.request<Array<Dossier>>('get', `${this.basePath}/deleted-dossiers`, {
|
||||||
|
withCredentials: this.configuration.withCredentials,
|
||||||
|
headers: headers,
|
||||||
|
observe: observe,
|
||||||
|
reportProgress: reportProgress
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets an existing dossier.
|
* Gets an existing dossier.
|
||||||
* None
|
* None
|
||||||
@ -192,19 +250,16 @@ export class DossierControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<Dossier>;
|
): Observable<Dossier>;
|
||||||
|
|
||||||
public getDossier(
|
public getDossier(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<Dossier>>;
|
): Observable<HttpResponse<Dossier>>;
|
||||||
|
|
||||||
public getDossier(
|
public getDossier(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<Dossier>>;
|
): Observable<HttpEvent<Dossier>>;
|
||||||
|
|
||||||
public getDossier(
|
public getDossier(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe: any = 'body',
|
observe: any = 'body',
|
||||||
@ -254,17 +309,14 @@ export class DossierControllerService {
|
|||||||
* @param reportProgress flag to report request and response progress.
|
* @param reportProgress flag to report request and response progress.
|
||||||
*/
|
*/
|
||||||
public getDossiers(observe?: 'body', reportProgress?: boolean): Observable<Array<Dossier>>;
|
public getDossiers(observe?: 'body', reportProgress?: boolean): Observable<Array<Dossier>>;
|
||||||
|
|
||||||
public getDossiers(
|
public getDossiers(
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<Array<Dossier>>>;
|
): Observable<HttpResponse<Array<Dossier>>>;
|
||||||
|
|
||||||
public getDossiers(
|
public getDossiers(
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<Array<Dossier>>>;
|
): Observable<HttpEvent<Array<Dossier>>>;
|
||||||
|
|
||||||
public getDossiers(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
public getDossiers(observe: any = 'body', reportProgress: boolean = false): Observable<any> {
|
||||||
let headers = this.defaultHeaders;
|
let headers = this.defaultHeaders;
|
||||||
|
|
||||||
@ -292,4 +344,146 @@ export class DossierControllerService {
|
|||||||
reportProgress: reportProgress
|
reportProgress: reportProgress
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hard deletes existing dossiers.
|
||||||
|
* None
|
||||||
|
* @param body dossierId
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
*/
|
||||||
|
public hardDeleteDossiers(
|
||||||
|
body: Array<string>,
|
||||||
|
observe?: 'body',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<any>;
|
||||||
|
public hardDeleteDossiers(
|
||||||
|
body: Array<string>,
|
||||||
|
observe?: 'response',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpResponse<any>>;
|
||||||
|
public hardDeleteDossiers(
|
||||||
|
body: Array<string>,
|
||||||
|
observe?: 'events',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpEvent<any>>;
|
||||||
|
public hardDeleteDossiers(
|
||||||
|
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 hardDeleteDossiers.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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[] = ['*/*'];
|
||||||
|
const httpContentTypeSelected: string | undefined =
|
||||||
|
this.configuration.selectHeaderContentType(consumes);
|
||||||
|
if (httpContentTypeSelected !== undefined) {
|
||||||
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.httpClient.request<any>(
|
||||||
|
'delete',
|
||||||
|
`${this.basePath}/deleted-dossiers/hard-delete`,
|
||||||
|
{
|
||||||
|
body: body,
|
||||||
|
withCredentials: this.configuration.withCredentials,
|
||||||
|
headers: headers,
|
||||||
|
observe: observe,
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restores dossiers.
|
||||||
|
* None
|
||||||
|
* @param body dossierId
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
*/
|
||||||
|
public restoreDossiers(
|
||||||
|
body: Array<string>,
|
||||||
|
observe?: 'body',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<any>;
|
||||||
|
public restoreDossiers(
|
||||||
|
body: Array<string>,
|
||||||
|
observe?: 'response',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpResponse<any>>;
|
||||||
|
public restoreDossiers(
|
||||||
|
body: Array<string>,
|
||||||
|
observe?: 'events',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpEvent<any>>;
|
||||||
|
public restoreDossiers(
|
||||||
|
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 restoreDossiers.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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}/deleted-dossiers/restore`, {
|
||||||
|
body: body,
|
||||||
|
withCredentials: this.configuration.withCredentials,
|
||||||
|
headers: headers,
|
||||||
|
observe: observe,
|
||||||
|
reportProgress: reportProgress
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,19 +11,19 @@
|
|||||||
*/ /* tslint:disable:no-unused-variable member-ordering */
|
*/ /* tslint:disable:no-unused-variable member-ordering */
|
||||||
|
|
||||||
import { Inject, Injectable, Optional } from '@angular/core';
|
import { Inject, Injectable, Optional } from '@angular/core';
|
||||||
import { HttpClient, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
|
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent } from '@angular/common/http';
|
||||||
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
import { CustomHttpUrlEncodingCodec } from '../encoder';
|
||||||
|
|
||||||
import { Observable } from 'rxjs';
|
import { Observable } from 'rxjs';
|
||||||
|
|
||||||
import { BASE_PATH } from '../variables';
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
||||||
import { Configuration } from '../configuration';
|
import { Configuration } from '../configuration';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class FileManagementControllerService {
|
export class FileManagementControllerService {
|
||||||
|
protected basePath = '';
|
||||||
public defaultHeaders = new HttpHeaders();
|
public defaultHeaders = new HttpHeaders();
|
||||||
public configuration = new Configuration();
|
public configuration = new Configuration();
|
||||||
protected basePath = '';
|
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
protected httpClient: HttpClient,
|
protected httpClient: HttpClient,
|
||||||
@ -39,6 +39,20 @@ export class FileManagementControllerService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param consumes string[] mime-types
|
||||||
|
* @return true: consumes contains 'multipart/form-data', false: otherwise
|
||||||
|
*/
|
||||||
|
private canConsumeForm(consumes: string[]): boolean {
|
||||||
|
const form = 'multipart/form-data';
|
||||||
|
for (const consume of consumes) {
|
||||||
|
if (form === consume) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Deletes a file for a given dossierId and FileId
|
* Deletes a file for a given dossierId and FileId
|
||||||
* None
|
* None
|
||||||
@ -53,21 +67,18 @@ export class FileManagementControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<any>;
|
): Observable<any>;
|
||||||
|
|
||||||
public deleteFile(
|
public deleteFile(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
fileId: string,
|
fileId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<any>>;
|
): Observable<HttpResponse<any>>;
|
||||||
|
|
||||||
public deleteFile(
|
public deleteFile(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
fileId: string,
|
fileId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<any>>;
|
): Observable<HttpEvent<any>>;
|
||||||
|
|
||||||
public deleteFile(
|
public deleteFile(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
fileId: string,
|
fileId: string,
|
||||||
@ -133,21 +144,18 @@ export class FileManagementControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<any>;
|
): Observable<any>;
|
||||||
|
|
||||||
public deleteFiles(
|
public deleteFiles(
|
||||||
body: Array<string>,
|
body: Array<string>,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<any>>;
|
): Observable<HttpResponse<any>>;
|
||||||
|
|
||||||
public deleteFiles(
|
public deleteFiles(
|
||||||
body: Array<string>,
|
body: Array<string>,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<any>>;
|
): Observable<HttpEvent<any>>;
|
||||||
|
|
||||||
public deleteFiles(
|
public deleteFiles(
|
||||||
body: Array<string>,
|
body: Array<string>,
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
@ -222,7 +230,6 @@ export class FileManagementControllerService {
|
|||||||
observe?: 'body',
|
observe?: 'body',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<any>;
|
): Observable<any>;
|
||||||
|
|
||||||
public downloadAnnotatedFile(
|
public downloadAnnotatedFile(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
fileId: string,
|
fileId: string,
|
||||||
@ -230,7 +237,6 @@ export class FileManagementControllerService {
|
|||||||
observe?: 'response',
|
observe?: 'response',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpResponse<any>>;
|
): Observable<HttpResponse<any>>;
|
||||||
|
|
||||||
public downloadAnnotatedFile(
|
public downloadAnnotatedFile(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
fileId: string,
|
fileId: string,
|
||||||
@ -238,7 +244,6 @@ export class FileManagementControllerService {
|
|||||||
observe?: 'events',
|
observe?: 'events',
|
||||||
reportProgress?: boolean
|
reportProgress?: boolean
|
||||||
): Observable<HttpEvent<any>>;
|
): Observable<HttpEvent<any>>;
|
||||||
|
|
||||||
public downloadAnnotatedFile(
|
public downloadAnnotatedFile(
|
||||||
dossierId: string,
|
dossierId: string,
|
||||||
fileId: string,
|
fileId: string,
|
||||||
@ -395,4 +400,172 @@ export class FileManagementControllerService {
|
|||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hard deletes an uploaded file.
|
||||||
|
* None
|
||||||
|
* @param body fileId
|
||||||
|
* @param dossierId dossierId
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
*/
|
||||||
|
public hardDeleteFile(
|
||||||
|
body: Array<string>,
|
||||||
|
dossierId: string,
|
||||||
|
observe?: 'body',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<any>;
|
||||||
|
public hardDeleteFile(
|
||||||
|
body: Array<string>,
|
||||||
|
dossierId: string,
|
||||||
|
observe?: 'response',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpResponse<any>>;
|
||||||
|
public hardDeleteFile(
|
||||||
|
body: Array<string>,
|
||||||
|
dossierId: string,
|
||||||
|
observe?: 'events',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpEvent<any>>;
|
||||||
|
public hardDeleteFile(
|
||||||
|
body: Array<string>,
|
||||||
|
dossierId: string,
|
||||||
|
observe: any = 'body',
|
||||||
|
reportProgress: boolean = false
|
||||||
|
): Observable<any> {
|
||||||
|
if (body === null || body === undefined) {
|
||||||
|
throw new Error(
|
||||||
|
'Required parameter body was null or undefined when calling hardDeleteFile.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dossierId === null || dossierId === undefined) {
|
||||||
|
throw new Error(
|
||||||
|
'Required parameter dossierId was null or undefined when calling hardDeleteFile.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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[] = ['*/*'];
|
||||||
|
const httpContentTypeSelected: string | undefined =
|
||||||
|
this.configuration.selectHeaderContentType(consumes);
|
||||||
|
if (httpContentTypeSelected !== undefined) {
|
||||||
|
headers = headers.set('Content-Type', httpContentTypeSelected);
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.httpClient.request<any>(
|
||||||
|
'delete',
|
||||||
|
`${this.basePath}/delete/hard-delete/${encodeURIComponent(String(dossierId))}`,
|
||||||
|
{
|
||||||
|
body: body,
|
||||||
|
withCredentials: this.configuration.withCredentials,
|
||||||
|
headers: headers,
|
||||||
|
observe: observe,
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Restores an deleted file.
|
||||||
|
* None
|
||||||
|
* @param body fileIds
|
||||||
|
* @param dossierId dossierId
|
||||||
|
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||||
|
* @param reportProgress flag to report request and response progress.
|
||||||
|
*/
|
||||||
|
public restoreFiles(
|
||||||
|
body: Array<string>,
|
||||||
|
dossierId: string,
|
||||||
|
observe?: 'body',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<any>;
|
||||||
|
public restoreFiles(
|
||||||
|
body: Array<string>,
|
||||||
|
dossierId: string,
|
||||||
|
observe?: 'response',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpResponse<any>>;
|
||||||
|
public restoreFiles(
|
||||||
|
body: Array<string>,
|
||||||
|
dossierId: string,
|
||||||
|
observe?: 'events',
|
||||||
|
reportProgress?: boolean
|
||||||
|
): Observable<HttpEvent<any>>;
|
||||||
|
public restoreFiles(
|
||||||
|
body: Array<string>,
|
||||||
|
dossierId: string,
|
||||||
|
observe: any = 'body',
|
||||||
|
reportProgress: boolean = false
|
||||||
|
): Observable<any> {
|
||||||
|
if (body === null || body === undefined) {
|
||||||
|
throw new Error(
|
||||||
|
'Required parameter body was null or undefined when calling restoreFiles.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (dossierId === null || dossierId === undefined) {
|
||||||
|
throw new Error(
|
||||||
|
'Required parameter dossierId was null or undefined when calling restoreFiles.'
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
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}/delete/restore/${encodeURIComponent(String(dossierId))}`,
|
||||||
|
{
|
||||||
|
body: body,
|
||||||
|
withCredentials: this.configuration.withCredentials,
|
||||||
|
headers: headers,
|
||||||
|
observe: observe,
|
||||||
|
reportProgress: reportProgress
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user