feat: total services amount and recalculating
This commit is contained in:
@@ -98,6 +98,8 @@ export type { DealProductSchema } from './models/DealProductSchema';
|
||||
export type { DealProductServiceSchema } from './models/DealProductServiceSchema';
|
||||
export type { DealQuickCreateRequest } from './models/DealQuickCreateRequest';
|
||||
export type { DealQuickCreateResponse } from './models/DealQuickCreateResponse';
|
||||
export type { DealRecalculatePriceRequest } from './models/DealRecalculatePriceRequest';
|
||||
export type { DealRecalculatePriceResponse } from './models/DealRecalculatePriceResponse';
|
||||
export type { DealSchema } from './models/DealSchema';
|
||||
export type { DealServiceSchema } from './models/DealServiceSchema';
|
||||
export type { DealServicesCopyRequest } from './models/DealServicesCopyRequest';
|
||||
|
||||
@@ -8,5 +8,6 @@ export type DealProductServiceSchema = {
|
||||
service: ServiceSchema;
|
||||
price: number;
|
||||
employees: Array<UserSchema>;
|
||||
isFixedPrice: boolean;
|
||||
};
|
||||
|
||||
|
||||
8
src/client/models/DealRecalculatePriceRequest.ts
Normal file
8
src/client/models/DealRecalculatePriceRequest.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealRecalculatePriceRequest = {
|
||||
dealId: number;
|
||||
};
|
||||
|
||||
9
src/client/models/DealRecalculatePriceResponse.ts
Normal file
9
src/client/models/DealRecalculatePriceResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type DealRecalculatePriceResponse = {
|
||||
ok: boolean;
|
||||
message: string;
|
||||
};
|
||||
|
||||
@@ -9,5 +9,6 @@ export type DealServiceSchema = {
|
||||
quantity: number;
|
||||
price: number;
|
||||
employees: Array<UserSchema>;
|
||||
isFixedPrice: boolean;
|
||||
};
|
||||
|
||||
|
||||
@@ -34,6 +34,8 @@ import type { DealProductAddKitRequest } from '../models/DealProductAddKitReques
|
||||
import type { DealProductAddKitResponse } from '../models/DealProductAddKitResponse';
|
||||
import type { DealQuickCreateRequest } from '../models/DealQuickCreateRequest';
|
||||
import type { DealQuickCreateResponse } from '../models/DealQuickCreateResponse';
|
||||
import type { DealRecalculatePriceRequest } from '../models/DealRecalculatePriceRequest';
|
||||
import type { DealRecalculatePriceResponse } from '../models/DealRecalculatePriceResponse';
|
||||
import type { DealSchema } from '../models/DealSchema';
|
||||
import type { DealServicesCopyRequest } from '../models/DealServicesCopyRequest';
|
||||
import type { DealServicesCopyResponse } from '../models/DealServicesCopyResponse';
|
||||
@@ -350,6 +352,26 @@ export class DealService {
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Recalculate Deal Price
|
||||
* @returns DealRecalculatePriceResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static recalculateDealPrice({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: DealRecalculatePriceRequest,
|
||||
}): CancelablePromise<DealRecalculatePriceResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/deal/recalculate-price',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Services Add
|
||||
* @returns DealAddServicesResponse Successful Response
|
||||
|
||||
Reference in New Issue
Block a user