feat: profit table and division of charts in statistics
This commit is contained in:
@@ -166,8 +166,10 @@ 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 { GetProfitChartDataRequest } from './models/GetProfitChartDataRequest';
|
||||
export type { GetProfitChartDataResponse } from './models/GetProfitChartDataResponse';
|
||||
export type { GetProfitTableDataRequest } from './models/GetProfitTableDataRequest';
|
||||
export type { GetProfitTableDataResponse } from './models/GetProfitTableDataResponse';
|
||||
export type { GetServiceKitSchema } from './models/GetServiceKitSchema';
|
||||
export type { GetTimeTrackingRecordsRequest } from './models/GetTimeTrackingRecordsRequest';
|
||||
export type { GetTimeTrackingRecordsResponse } from './models/GetTimeTrackingRecordsResponse';
|
||||
@@ -201,7 +203,9 @@ 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 { ProfitChartDataItem } from './models/ProfitChartDataItem';
|
||||
export type { ProfitTableDataItem } from './models/ProfitTableDataItem';
|
||||
export type { ProfitTableGroupBy } from './models/ProfitTableGroupBy';
|
||||
export type { RoleSchema } from './models/RoleSchema';
|
||||
export type { ServiceCategoryPriceSchema } from './models/ServiceCategoryPriceSchema';
|
||||
export type { ServiceCategoryReorderRequest } from './models/ServiceCategoryReorderRequest';
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type GetProfitDataRequest = {
|
||||
export type GetProfitChartDataRequest = {
|
||||
dateRange: any[];
|
||||
clientId: number;
|
||||
baseMarketplaceKey: string;
|
||||
9
src/client/models/GetProfitChartDataResponse.ts
Normal file
9
src/client/models/GetProfitChartDataResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ProfitChartDataItem } from './ProfitChartDataItem';
|
||||
export type GetProfitChartDataResponse = {
|
||||
data: Array<ProfitChartDataItem>;
|
||||
};
|
||||
|
||||
10
src/client/models/GetProfitTableDataRequest.ts
Normal file
10
src/client/models/GetProfitTableDataRequest.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ProfitTableGroupBy } from './ProfitTableGroupBy';
|
||||
export type GetProfitTableDataRequest = {
|
||||
dateRange: any[];
|
||||
groupTableBy: ProfitTableGroupBy;
|
||||
};
|
||||
|
||||
9
src/client/models/GetProfitTableDataResponse.ts
Normal file
9
src/client/models/GetProfitTableDataResponse.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ProfitTableDataItem } from './ProfitTableDataItem';
|
||||
export type GetProfitTableDataResponse = {
|
||||
data: Array<ProfitTableDataItem>;
|
||||
};
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProfitDataItem = {
|
||||
export type ProfitChartDataItem = {
|
||||
date: string;
|
||||
revenue: number;
|
||||
profit: number;
|
||||
11
src/client/models/ProfitTableDataItem.ts
Normal file
11
src/client/models/ProfitTableDataItem.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/* generated using openapi-typescript-codegen -- do not edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
export type ProfitTableDataItem = {
|
||||
groupedValue: (string | number);
|
||||
revenue: number;
|
||||
profit: number;
|
||||
dealsCount: number;
|
||||
};
|
||||
|
||||
@@ -2,8 +2,4 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { ProfitDataItem } from './ProfitDataItem';
|
||||
export type GetProfitDataResponse = {
|
||||
data: Array<ProfitDataItem>;
|
||||
};
|
||||
|
||||
export type ProfitTableGroupBy = 0 | 1 | 2 | 3 | 4;
|
||||
@@ -2,25 +2,47 @@
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { GetProfitDataRequest } from '../models/GetProfitDataRequest';
|
||||
import type { GetProfitDataResponse } from '../models/GetProfitDataResponse';
|
||||
import type { GetProfitChartDataRequest } from '../models/GetProfitChartDataRequest';
|
||||
import type { GetProfitChartDataResponse } from '../models/GetProfitChartDataResponse';
|
||||
import type { GetProfitTableDataRequest } from '../models/GetProfitTableDataRequest';
|
||||
import type { GetProfitTableDataResponse } from '../models/GetProfitTableDataResponse';
|
||||
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
|
||||
* Get Profit Chart Data
|
||||
* @returns GetProfitChartDataResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getProfitData({
|
||||
public static getProfitChartData({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: GetProfitDataRequest,
|
||||
}): CancelablePromise<GetProfitDataResponse> {
|
||||
requestBody: GetProfitChartDataRequest,
|
||||
}): CancelablePromise<GetProfitChartDataResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/statistics/get-profit-data',
|
||||
url: '/statistics/get-profit-chart-data',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* Get Profit Table Data
|
||||
* @returns GetProfitTableDataResponse Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static getProfitTableData({
|
||||
requestBody,
|
||||
}: {
|
||||
requestBody: GetProfitTableDataRequest,
|
||||
}): CancelablePromise<GetProfitTableDataResponse> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/statistics/get-profit-table-data',
|
||||
body: requestBody,
|
||||
mediaType: 'application/json',
|
||||
errors: {
|
||||
|
||||
Reference in New Issue
Block a user