|
|
|
@@ -18,8 +18,6 @@ import { OpenApiHttpParams, QueryParamStyle } from '../query.params';
|
|
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
import { GetRandomChallengeDto } from '../model/get-random-challenge-dto';
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
import { RandomChallengeProofRequest } from '../model/random-challenge-proof-request';
|
|
|
|
|
|
|
|
|
|
// @ts-ignore
|
|
|
|
|
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
|
|
|
|
@@ -152,21 +150,18 @@ export class RandomchallengesService extends BaseService {
|
|
|
|
|
/**
|
|
|
|
|
* @endpoint patch /API/RandomChallenges/{randomChallengeId}/Proof
|
|
|
|
|
* @param randomChallengeId
|
|
|
|
|
* @param randomChallengeProofRequest
|
|
|
|
|
* @param proof
|
|
|
|
|
* @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 options additional options
|
|
|
|
|
*/
|
|
|
|
|
public patchProofEndpoint(randomChallengeId: number, randomChallengeProofRequest: RandomChallengeProofRequest, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
|
|
|
|
public patchProofEndpoint(randomChallengeId: number, randomChallengeProofRequest: RandomChallengeProofRequest, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
|
|
|
|
public patchProofEndpoint(randomChallengeId: number, randomChallengeProofRequest: RandomChallengeProofRequest, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
|
|
|
|
public patchProofEndpoint(randomChallengeId: number, randomChallengeProofRequest: RandomChallengeProofRequest, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
|
|
|
public patchProofEndpoint(randomChallengeId: number, proof?: Blob, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any>;
|
|
|
|
|
public patchProofEndpoint(randomChallengeId: number, proof?: Blob, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<any>>;
|
|
|
|
|
public patchProofEndpoint(randomChallengeId: number, proof?: Blob, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<any>>;
|
|
|
|
|
public patchProofEndpoint(randomChallengeId: number, proof?: Blob, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: undefined, context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
|
|
|
|
if (randomChallengeId === null || randomChallengeId === undefined) {
|
|
|
|
|
throw new Error('Required parameter randomChallengeId was null or undefined when calling patchProofEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
if (randomChallengeProofRequest === null || randomChallengeProofRequest === undefined) {
|
|
|
|
|
throw new Error('Required parameter randomChallengeProofRequest was null or undefined when calling patchProofEndpoint.');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let localVarHeaders = this.defaultHeaders;
|
|
|
|
|
|
|
|
|
@@ -183,14 +178,27 @@ export class RandomchallengesService 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 (proof !== undefined) {
|
|
|
|
|
localVarFormParams = localVarFormParams.append('proof', <any>proof) as any || localVarFormParams;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
|
|
|
@@ -209,7 +217,7 @@ export class RandomchallengesService extends BaseService {
|
|
|
|
|
return this.httpClient.request<any>('patch', `${basePath}${localVarPath}`,
|
|
|
|
|
{
|
|
|
|
|
context: localVarHttpContext,
|
|
|
|
|
body: randomChallengeProofRequest,
|
|
|
|
|
body: localVarConvertFormParamsToString ? localVarFormParams.toString() : localVarFormParams,
|
|
|
|
|
responseType: <any>responseType_,
|
|
|
|
|
...(withCredentials ? { withCredentials } : {}),
|
|
|
|
|
headers: localVarHeaders,
|
|
|
|
|