feat: profit chart in statistics

This commit is contained in:
2024-11-15 15:19:14 +04:00
parent 90530f0530
commit 608a063369
22 changed files with 515 additions and 2 deletions

View File

@@ -166,6 +166,8 @@ export type { GetProductBarcodePdfRequest } from './models/GetProductBarcodePdfR
export type { GetProductBarcodePdfResponse } from './models/GetProductBarcodePdfResponse';
export type { GetProductBarcodeRequest } from './models/GetProductBarcodeRequest';
export type { GetProductBarcodeResponse } from './models/GetProductBarcodeResponse';
export type { GetProfitDataRequest } from './models/GetProfitDataRequest';
export type { GetProfitDataResponse } from './models/GetProfitDataResponse';
export type { GetServiceKitSchema } from './models/GetServiceKitSchema';
export type { GetTimeTrackingRecordsRequest } from './models/GetTimeTrackingRecordsRequest';
export type { GetTimeTrackingRecordsResponse } from './models/GetTimeTrackingRecordsResponse';
@@ -199,6 +201,7 @@ export type { ProductUpdateRequest } from './models/ProductUpdateRequest';
export type { ProductUpdateResponse } from './models/ProductUpdateResponse';
export type { ProductUploadBarcodeImageResponse } from './models/ProductUploadBarcodeImageResponse';
export type { ProductUploadImageResponse } from './models/ProductUploadImageResponse';
export type { ProfitDataItem } from './models/ProfitDataItem';
export type { RoleSchema } from './models/RoleSchema';
export type { ServiceCategoryPriceSchema } from './models/ServiceCategoryPriceSchema';
export type { ServiceCategoryReorderRequest } from './models/ServiceCategoryReorderRequest';
@@ -260,6 +263,7 @@ export { ProductService } from './services/ProductService';
export { RoleService } from './services/RoleService';
export { ServiceService } from './services/ServiceService';
export { ShippingWarehouseService } from './services/ShippingWarehouseService';
export { StatisticsService } from './services/StatisticsService';
export { TaskService } from './services/TaskService';
export { TimeTrackingService } from './services/TimeTrackingService';
export { UserService } from './services/UserService';

View File

@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type GetProfitDataRequest = {
dateRange: any[];
clientId: number;
baseMarketplaceKey: string;
dealStatusId: number;
};

View File

@@ -0,0 +1,9 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { ProfitDataItem } from './ProfitDataItem';
export type GetProfitDataResponse = {
data: Array<ProfitDataItem>;
};

View File

@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ProfitDataItem = {
date: string;
revenue: number;
profit: number;
dealsCount: number;
};

View File

@@ -0,0 +1,31 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { GetProfitDataRequest } from '../models/GetProfitDataRequest';
import type { GetProfitDataResponse } from '../models/GetProfitDataResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
import { OpenAPI } from '../core/OpenAPI';
import { request as __request } from '../core/request';
export class StatisticsService {
/**
* Get Profit Data
* @returns GetProfitDataResponse Successful Response
* @throws ApiError
*/
public static getProfitData({
requestBody,
}: {
requestBody: GetProfitDataRequest,
}): CancelablePromise<GetProfitDataResponse> {
return __request(OpenAPI, {
method: 'POST',
url: '/statistics/get-profit-data',
body: requestBody,
mediaType: 'application/json',
errors: {
422: `Validation Error`,
},
});
}
}