285 lines
9.5 KiB
TypeScript
285 lines
9.5 KiB
TypeScript
/**
|
|
* API Documentation for Redaction Gateway
|
|
* Description for redaction
|
|
*
|
|
* OpenAPI spec version: 1.0
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by the swagger code generator program.
|
|
* https://github.com/swagger-api/swagger-codegen.git
|
|
* Do not edit the class manually.
|
|
*/ /* tslint:disable:no-unused-variable member-ordering */
|
|
|
|
import { Inject, Injectable, Optional } from '@angular/core';
|
|
import { HttpClient, HttpEvent, HttpHeaders, HttpResponse } from '@angular/common/http';
|
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
import { RedactionChangeLog } from '../model/redactionChangeLog';
|
|
import { RedactionLog } from '../model/redactionLog';
|
|
import { SectionGrid } from '../model/sectionGrid';
|
|
|
|
import { BASE_PATH } from '../variables';
|
|
import { Configuration } from '../configuration';
|
|
|
|
@Injectable()
|
|
export class RedactionLogControllerService {
|
|
public defaultHeaders = new HttpHeaders();
|
|
public configuration = new Configuration();
|
|
protected basePath = '';
|
|
|
|
constructor(
|
|
protected httpClient: HttpClient,
|
|
@Optional() @Inject(BASE_PATH) basePath: string,
|
|
@Optional() configuration: Configuration
|
|
) {
|
|
if (basePath) {
|
|
this.basePath = basePath;
|
|
}
|
|
if (configuration) {
|
|
this.configuration = configuration;
|
|
this.basePath = basePath || configuration.basePath || this.basePath;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Gets the redaction changelog for a fileId
|
|
* None
|
|
* @param dossierId dossierId
|
|
* @param fileId fileId
|
|
* @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 getRedactionLog(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<RedactionChangeLog>;
|
|
|
|
public getRedactionLog(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<RedactionChangeLog>>;
|
|
|
|
public getRedactionLog(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<RedactionChangeLog>>;
|
|
|
|
public getRedactionLog(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierId === null || dossierId === undefined) {
|
|
throw new Error(
|
|
'Required parameter dossierId was null or undefined when calling getRedactionLog.'
|
|
);
|
|
}
|
|
|
|
if (fileId === null || fileId === undefined) {
|
|
throw new Error(
|
|
'Required parameter fileId was null or undefined when calling getRedactionLog.'
|
|
);
|
|
}
|
|
|
|
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<RedactionChangeLog>(
|
|
'get',
|
|
`${this.basePath}/redactionChnageLog/${encodeURIComponent(
|
|
String(dossierId)
|
|
)}/${encodeURIComponent(String(fileId))}`,
|
|
{
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Gets the redaction log for a fileId
|
|
* None
|
|
* @param dossierId dossierId
|
|
* @param fileId fileId
|
|
* @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 getRedactionChangeLog(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<RedactionLog>;
|
|
|
|
public getRedactionChangeLog(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<RedactionLog>>;
|
|
|
|
public getRedactionChangeLog(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<RedactionLog>>;
|
|
|
|
public getRedactionChangeLog(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierId === null || dossierId === undefined) {
|
|
throw new Error(
|
|
'Required parameter dossierId was null or undefined when calling getRedactionLog1.'
|
|
);
|
|
}
|
|
|
|
if (fileId === null || fileId === undefined) {
|
|
throw new Error(
|
|
'Required parameter fileId was null or undefined when calling getRedactionLog1.'
|
|
);
|
|
}
|
|
|
|
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<RedactionLog>(
|
|
'get',
|
|
`${this.basePath}/redactionLog/${encodeURIComponent(
|
|
String(dossierId)
|
|
)}/${encodeURIComponent(String(fileId))}`,
|
|
{
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
|
|
/**
|
|
* Gets the section grid for a fileId
|
|
* None
|
|
* @param dossierId dossierId
|
|
* @param fileId fileId
|
|
* @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 getSectionGrid(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'body',
|
|
reportProgress?: boolean
|
|
): Observable<SectionGrid>;
|
|
|
|
public getSectionGrid(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'response',
|
|
reportProgress?: boolean
|
|
): Observable<HttpResponse<SectionGrid>>;
|
|
|
|
public getSectionGrid(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe?: 'events',
|
|
reportProgress?: boolean
|
|
): Observable<HttpEvent<SectionGrid>>;
|
|
|
|
public getSectionGrid(
|
|
dossierId: string,
|
|
fileId: string,
|
|
observe: any = 'body',
|
|
reportProgress: boolean = false
|
|
): Observable<any> {
|
|
if (dossierId === null || dossierId === undefined) {
|
|
throw new Error(
|
|
'Required parameter dossierId was null or undefined when calling getSectionGrid.'
|
|
);
|
|
}
|
|
|
|
if (fileId === null || fileId === undefined) {
|
|
throw new Error(
|
|
'Required parameter fileId was null or undefined when calling getSectionGrid.'
|
|
);
|
|
}
|
|
|
|
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<SectionGrid>(
|
|
'get',
|
|
`${this.basePath}/sectionGrid/${encodeURIComponent(
|
|
String(dossierId)
|
|
)}/${encodeURIComponent(String(fileId))}`,
|
|
{
|
|
withCredentials: this.configuration.withCredentials,
|
|
headers: headers,
|
|
observe: observe,
|
|
reportProgress: reportProgress
|
|
}
|
|
);
|
|
}
|
|
}
|