|
|
|
@@ -17,14 +17,8 @@ import {
|
|
|
|
|
import {CustomHttpParameterCodec} from '../encoder';
|
|
|
|
|
import {Observable} from 'rxjs';
|
|
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
import {CreateSettingDto} from '../model/create-setting-dto';
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
import {GetSettingDto} from '../model/get-setting-dto';
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
import {PatchSettingElectronicSignatureDto} from '../model/patch-setting-electronic-signature-dto';
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
import {PatchSettingLogoDto} from '../model/patch-setting-logo-dto';
|
|
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
import {BASE_PATH, COLLECTION_FORMATS} from '../variables';
|
|
|
|
@@ -42,188 +36,30 @@ export class SettingsService extends BaseService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @endpoint post /API/settings
|
|
|
|
|
* @param createSettingDto
|
|
|
|
|
* @endpoint get /API/settings
|
|
|
|
|
* @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 createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'body', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any>;
|
|
|
|
|
public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'response', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpResponse<any>>;
|
|
|
|
|
public createSettingEndpoint(createSettingDto: CreateSettingDto, observe?: 'events', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpEvent<any>>;
|
|
|
|
|
public createSettingEndpoint(createSettingDto: CreateSettingDto, observe: any = 'body', reportProgress: boolean = false, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any> {
|
|
|
|
|
if (createSettingDto === null || createSettingDto === undefined) {
|
|
|
|
|
throw new Error('Required parameter createSettingDto was null or undefined when calling createSettingEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
|
|
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]);
|
|
|
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
|
|
|
|
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// to determine the Content-Type header
|
|
|
|
|
const consumes: string[] = [
|
|
|
|
|
'application/json'
|
|
|
|
|
];
|
|
|
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
|
|
|
if (httpContentTypeSelected !== undefined) {
|
|
|
|
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
|
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
|
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
|
|
|
responseType_ = 'text';
|
|
|
|
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
|
|
|
responseType_ = 'json';
|
|
|
|
|
} else {
|
|
|
|
|
responseType_ = 'blob';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarPath = `/API/settings`;
|
|
|
|
|
const {basePath, withCredentials} = this.configuration;
|
|
|
|
|
return this.httpClient.request<any>('post', `${basePath}${localVarPath}`,
|
|
|
|
|
{
|
|
|
|
|
context: localVarHttpContext,
|
|
|
|
|
body: createSettingDto,
|
|
|
|
|
responseType: <any>responseType_,
|
|
|
|
|
...(withCredentials ? {withCredentials} : {}),
|
|
|
|
|
headers: localVarHeaders,
|
|
|
|
|
observe: observe,
|
|
|
|
|
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @endpoint delete /API/settings/{id}
|
|
|
|
|
* @param id
|
|
|
|
|
* @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 deleteSettingEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any>;
|
|
|
|
|
public deleteSettingEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpResponse<any>>;
|
|
|
|
|
public deleteSettingEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpEvent<any>>;
|
|
|
|
|
public deleteSettingEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any> {
|
|
|
|
|
if (id === null || id === undefined) {
|
|
|
|
|
throw new Error('Required parameter id was null or undefined when calling deleteSettingEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
|
|
|
|
|
|
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([]);
|
|
|
|
|
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
|
|
|
|
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
|
|
|
|
|
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
|
|
|
if (localVarHttpHeaderAcceptSelected) {
|
|
|
|
|
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
|
|
|
|
responseType_ = 'text';
|
|
|
|
|
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
|
|
|
|
responseType_ = 'json';
|
|
|
|
|
} else {
|
|
|
|
|
responseType_ = 'blob';
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarPath = `/API/settings/${this.configuration.encodeParam({
|
|
|
|
|
name: "id",
|
|
|
|
|
value: id,
|
|
|
|
|
in: "path",
|
|
|
|
|
style: "simple",
|
|
|
|
|
explode: false,
|
|
|
|
|
dataType: "number",
|
|
|
|
|
dataFormat: "int32"
|
|
|
|
|
})}`;
|
|
|
|
|
const {basePath, withCredentials} = this.configuration;
|
|
|
|
|
return this.httpClient.request<any>('delete', `${basePath}${localVarPath}`,
|
|
|
|
|
{
|
|
|
|
|
context: localVarHttpContext,
|
|
|
|
|
responseType: <any>responseType_,
|
|
|
|
|
...(withCredentials ? {withCredentials} : {}),
|
|
|
|
|
headers: localVarHeaders,
|
|
|
|
|
observe: observe,
|
|
|
|
|
...(localVarTransferCache !== undefined ? {transferCache: localVarTransferCache} : {}),
|
|
|
|
|
reportProgress: reportProgress
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @endpoint get /API/settings/{id}
|
|
|
|
|
* @param id
|
|
|
|
|
* @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 getSettingEndpoint(id: number, observe?: 'body', reportProgress?: boolean, options?: {
|
|
|
|
|
public getSettingEndpoint(observe?: 'body', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: 'application/json',
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<GetSettingDto>;
|
|
|
|
|
public getSettingEndpoint(id: number, observe?: 'response', reportProgress?: boolean, options?: {
|
|
|
|
|
public getSettingEndpoint(observe?: 'response', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: 'application/json',
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpResponse<GetSettingDto>>;
|
|
|
|
|
public getSettingEndpoint(id: number, observe?: 'events', reportProgress?: boolean, options?: {
|
|
|
|
|
public getSettingEndpoint(observe?: 'events', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: 'application/json',
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpEvent<GetSettingDto>>;
|
|
|
|
|
public getSettingEndpoint(id: number, observe: any = 'body', reportProgress: boolean = false, options?: {
|
|
|
|
|
public getSettingEndpoint(observe: any = 'body', reportProgress: boolean = false, options?: {
|
|
|
|
|
httpHeaderAccept?: 'application/json',
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any> {
|
|
|
|
|
if (id === null || id === undefined) {
|
|
|
|
|
throw new Error('Required parameter id was null or undefined when calling getSettingEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
|
|
|
|
|
@@ -250,15 +86,7 @@ export class SettingsService extends BaseService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarPath = `/API/settings/${this.configuration.encodeParam({
|
|
|
|
|
name: "id",
|
|
|
|
|
value: id,
|
|
|
|
|
in: "path",
|
|
|
|
|
style: "simple",
|
|
|
|
|
explode: false,
|
|
|
|
|
dataType: "number",
|
|
|
|
|
dataFormat: "int32"
|
|
|
|
|
})}`;
|
|
|
|
|
let localVarPath = `/API/settings`;
|
|
|
|
|
const {basePath, withCredentials} = this.configuration;
|
|
|
|
|
return this.httpClient.request<GetSettingDto>('get', `${basePath}${localVarPath}`,
|
|
|
|
|
{
|
|
|
|
@@ -274,38 +102,31 @@ export class SettingsService extends BaseService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @endpoint patch /API/settings/{id}/ElectronicSignature
|
|
|
|
|
* @param id
|
|
|
|
|
* @param patchSettingElectronicSignatureDto
|
|
|
|
|
* @endpoint patch /API/settings/electronicSignature
|
|
|
|
|
* @param electronicSignature
|
|
|
|
|
* @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 patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'body', reportProgress?: boolean, options?: {
|
|
|
|
|
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'body', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any>;
|
|
|
|
|
public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'response', reportProgress?: boolean, options?: {
|
|
|
|
|
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'response', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpResponse<any>>;
|
|
|
|
|
public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe?: 'events', reportProgress?: boolean, options?: {
|
|
|
|
|
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe?: 'events', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpEvent<any>>;
|
|
|
|
|
public patchSettingElectronicSignatureEndpoint(id: number, patchSettingElectronicSignatureDto: PatchSettingElectronicSignatureDto, observe: any = 'body', reportProgress: boolean = false, options?: {
|
|
|
|
|
public patchSettingElectronicSignatureEndpoint(electronicSignature?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any> {
|
|
|
|
|
if (id === null || id === undefined) {
|
|
|
|
|
throw new Error('Required parameter id was null or undefined when calling patchSettingElectronicSignatureEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
if (patchSettingElectronicSignatureDto === null || patchSettingElectronicSignatureDto === undefined) {
|
|
|
|
|
throw new Error('Required parameter patchSettingElectronicSignatureDto was null or undefined when calling patchSettingElectronicSignatureEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
|
|
|
|
|
@@ -318,14 +139,27 @@ export class SettingsService extends BaseService {
|
|
|
|
|
|
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// to determine the Content-Type header
|
|
|
|
|
const consumes: string[] = [
|
|
|
|
|
'application/json'
|
|
|
|
|
'multipart/form-data'
|
|
|
|
|
];
|
|
|
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
|
|
|
if (httpContentTypeSelected !== undefined) {
|
|
|
|
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
|
|
|
|
|
|
|
|
const canConsumeForm = this.canConsumeForm(consumes);
|
|
|
|
|
|
|
|
|
|
let localVarFormParams: { append(param: string, value: any): any; };
|
|
|
|
|
let localVarUseForm = false;
|
|
|
|
|
let localVarConvertFormParamsToString = false;
|
|
|
|
|
// use FormData to transmit files using content-type "multipart/form-data"
|
|
|
|
|
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
|
|
|
|
localVarUseForm = canConsumeForm;
|
|
|
|
|
if (localVarUseForm) {
|
|
|
|
|
localVarFormParams = new FormData();
|
|
|
|
|
} else {
|
|
|
|
|
localVarFormParams = new HttpParams({encoder: this.encoder});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (electronicSignature !== undefined) {
|
|
|
|
|
localVarFormParams = localVarFormParams.append('electronicSignature', <any>electronicSignature) as any || localVarFormParams;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
|
|
@@ -339,20 +173,12 @@ export class SettingsService extends BaseService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarPath = `/API/settings/${this.configuration.encodeParam({
|
|
|
|
|
name: "id",
|
|
|
|
|
value: id,
|
|
|
|
|
in: "path",
|
|
|
|
|
style: "simple",
|
|
|
|
|
explode: false,
|
|
|
|
|
dataType: "number",
|
|
|
|
|
dataFormat: "int32"
|
|
|
|
|
})}/ElectronicSignature`;
|
|
|
|
|
let localVarPath = `/API/settings/electronicSignature`;
|
|
|
|
|
const {basePath, withCredentials} = this.configuration;
|
|
|
|
|
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
|
|
|
|
|
{
|
|
|
|
|
context: localVarHttpContext,
|
|
|
|
|
body: patchSettingElectronicSignatureDto,
|
|
|
|
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
|
|
|
|
responseType: <any>responseType_,
|
|
|
|
|
...(withCredentials ? {withCredentials} : {}),
|
|
|
|
|
headers: localVarHeaders,
|
|
|
|
@@ -364,38 +190,31 @@ export class SettingsService extends BaseService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @endpoint patch /API/settings/{id}/logo
|
|
|
|
|
* @param id
|
|
|
|
|
* @param patchSettingLogoDto
|
|
|
|
|
* @endpoint patch /API/settings/logo
|
|
|
|
|
* @param logo
|
|
|
|
|
* @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 patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'body', reportProgress?: boolean, options?: {
|
|
|
|
|
public patchSettingLogoEndpoint(logo?: Blob, observe?: 'body', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any>;
|
|
|
|
|
public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'response', reportProgress?: boolean, options?: {
|
|
|
|
|
public patchSettingLogoEndpoint(logo?: Blob, observe?: 'response', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpResponse<any>>;
|
|
|
|
|
public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe?: 'events', reportProgress?: boolean, options?: {
|
|
|
|
|
public patchSettingLogoEndpoint(logo?: Blob, observe?: 'events', reportProgress?: boolean, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<HttpEvent<any>>;
|
|
|
|
|
public patchSettingLogoEndpoint(id: number, patchSettingLogoDto: PatchSettingLogoDto, observe: any = 'body', reportProgress: boolean = false, options?: {
|
|
|
|
|
public patchSettingLogoEndpoint(logo?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {
|
|
|
|
|
httpHeaderAccept?: undefined,
|
|
|
|
|
context?: HttpContext,
|
|
|
|
|
transferCache?: boolean
|
|
|
|
|
}): Observable<any> {
|
|
|
|
|
if (id === null || id === undefined) {
|
|
|
|
|
throw new Error('Required parameter id was null or undefined when calling patchSettingLogoEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
if (patchSettingLogoDto === null || patchSettingLogoDto === undefined) {
|
|
|
|
|
throw new Error('Required parameter patchSettingLogoDto was null or undefined when calling patchSettingLogoEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
|
|
|
|
|
@@ -408,14 +227,27 @@ export class SettingsService extends BaseService {
|
|
|
|
|
|
|
|
|
|
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// to determine the Content-Type header
|
|
|
|
|
const consumes: string[] = [
|
|
|
|
|
'application/json'
|
|
|
|
|
'multipart/form-data'
|
|
|
|
|
];
|
|
|
|
|
const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
|
|
|
|
|
if (httpContentTypeSelected !== undefined) {
|
|
|
|
|
localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
|
|
|
|
|
|
|
|
|
|
const canConsumeForm = this.canConsumeForm(consumes);
|
|
|
|
|
|
|
|
|
|
let localVarFormParams: { append(param: string, value: any): any; };
|
|
|
|
|
let localVarUseForm = false;
|
|
|
|
|
let localVarConvertFormParamsToString = false;
|
|
|
|
|
// use FormData to transmit files using content-type "multipart/form-data"
|
|
|
|
|
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
|
|
|
|
|
localVarUseForm = canConsumeForm;
|
|
|
|
|
if (localVarUseForm) {
|
|
|
|
|
localVarFormParams = new FormData();
|
|
|
|
|
} else {
|
|
|
|
|
localVarFormParams = new HttpParams({encoder: this.encoder});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (logo !== undefined) {
|
|
|
|
|
localVarFormParams = localVarFormParams.append('logo', <any>logo) as any || localVarFormParams;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
|
|
@@ -429,20 +261,12 @@ export class SettingsService extends BaseService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarPath = `/API/settings/${this.configuration.encodeParam({
|
|
|
|
|
name: "id",
|
|
|
|
|
value: id,
|
|
|
|
|
in: "path",
|
|
|
|
|
style: "simple",
|
|
|
|
|
explode: false,
|
|
|
|
|
dataType: "number",
|
|
|
|
|
dataFormat: "int32"
|
|
|
|
|
})}/logo`;
|
|
|
|
|
let localVarPath = `/API/settings/logo`;
|
|
|
|
|
const {basePath, withCredentials} = this.configuration;
|
|
|
|
|
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
|
|
|
|
|
{
|
|
|
|
|
context: localVarHttpContext,
|
|
|
|
|
body: patchSettingLogoDto,
|
|
|
|
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
|
|
|
|
responseType: <any>responseType_,
|
|
|
|
|
...(withCredentials ? {withCredentials} : {}),
|
|
|
|
|
headers: localVarHeaders,
|
|
|
|
|