From a707a33a879b5076a844b8fd5399f8e8e38041b5 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Fri, 12 Dec 2025 21:19:39 +0100 Subject: [PATCH] first commit --- src/app/services/api/.openapi-generator/FILES | 1 + .../services/api/api/quotations.service.ts | 70 +++++++++++++++++++ src/app/services/api/model/models.ts | 1 + 3 files changed, 72 insertions(+) diff --git a/src/app/services/api/.openapi-generator/FILES b/src/app/services/api/.openapi-generator/FILES index 3066d77..a90289b 100644 --- a/src/app/services/api/.openapi-generator/FILES +++ b/src/app/services/api/.openapi-generator/FILES @@ -59,6 +59,7 @@ model/patch-ware-house-product-quantity-dto.ts model/update-deliverer-dto.ts model/update-delivery-note-dto.ts model/update-product-dto.ts +model/update-quotation-dto.ts model/update-supplier-dto.ts model/update-user-dto.ts param.ts diff --git a/src/app/services/api/api/quotations.service.ts b/src/app/services/api/api/quotations.service.ts index f26e058..07ec481 100644 --- a/src/app/services/api/api/quotations.service.ts +++ b/src/app/services/api/api/quotations.service.ts @@ -20,6 +20,8 @@ import { Observable } from 'rxjs'; import { GetQuotationDto } from '../model/get-quotation-dto'; // @ts-ignore import { PatchQuotationConditionsSaleDto } from '../model/patch-quotation-conditions-sale-dto'; +// @ts-ignore +import { UpdateQuotationDto } from '../model/update-quotation-dto'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; @@ -305,4 +307,72 @@ export class QuotationsService extends BaseService { ); } + /** + * @endpoint put /API/quotations/{id} + * @param id + * @param updateQuotationDto + * @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 updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public updateQuotationEndpoint(id: number, updateQuotationDto: UpdateQuotationDto, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling updateQuotationEndpoint.'); + } + if (updateQuotationDto === null || updateQuotationDto === undefined) { + throw new Error('Required parameter updateQuotationDto was null or undefined when calling updateQuotationEndpoint.'); + } + + let localVarHeaders = this.defaultHeaders; + + const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([ + 'application/json' + ]); + 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/quotations/${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('put', `${basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: updateQuotationDto, + responseType: responseType_, + ...(withCredentials ? { withCredentials } : {}), + headers: localVarHeaders, + observe: observe, + ...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}), + reportProgress: reportProgress + } + ); + } + } diff --git a/src/app/services/api/model/models.ts b/src/app/services/api/model/models.ts index 39dd319..d228c54 100644 --- a/src/app/services/api/model/models.ts +++ b/src/app/services/api/model/models.ts @@ -37,5 +37,6 @@ export * from './patch-ware-house-product-quantity-dto'; export * from './update-deliverer-dto'; export * from './update-delivery-note-dto'; export * from './update-product-dto'; +export * from './update-quotation-dto'; export * from './update-supplier-dto'; export * from './update-user-dto';