Merge remote-tracking branch 'origin/statistics'

# Conflicts:
#	src/client/models/DealSchema.ts
This commit is contained in:
2024-11-21 02:05:01 +03:00
36 changed files with 845 additions and 3 deletions

View File

@@ -166,11 +166,16 @@ export type { GetClientMarketplacesResponse } from './models/GetClientMarketplac
export type { GetDealBillById } from './models/GetDealBillById';
export type { GetDealProductsBarcodesPdfRequest } from './models/GetDealProductsBarcodesPdfRequest';
export type { GetDealProductsBarcodesPdfResponse } from './models/GetDealProductsBarcodesPdfResponse';
export type { GetManagersResponse } from './models/GetManagersResponse';
export type { GetPaymentRecordsResponse } from './models/GetPaymentRecordsResponse';
export type { GetProductBarcodePdfRequest } from './models/GetProductBarcodePdfRequest';
export type { GetProductBarcodePdfResponse } from './models/GetProductBarcodePdfResponse';
export type { GetProductBarcodeRequest } from './models/GetProductBarcodeRequest';
export type { GetProductBarcodeResponse } from './models/GetProductBarcodeResponse';
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';
@@ -205,6 +210,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 { 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';
@@ -267,6 +275,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

@@ -2,6 +2,7 @@
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
import type { UserSchema } from './UserSchema';
export type DealGeneralInfoSchema = {
name: string;
isDeleted: boolean;
@@ -10,5 +11,6 @@ export type DealGeneralInfoSchema = {
shippingWarehouse?: (string | null);
deliveryDate?: (string | null);
receivingSlotDate?: (string | null);
manager?: (UserSchema | null);
};

View File

@@ -4,12 +4,14 @@
/* eslint-disable */
import type { ClientSchema } from './ClientSchema';
import type { DealBillRequestSchema } from './DealBillRequestSchema';
import type { DealGroupSchema } from './DealGroupSchema';
import type { DealProductSchema } from './DealProductSchema';
import type { DealServiceSchema } from './DealServiceSchema';
import type { DealStatusHistorySchema } from './DealStatusHistorySchema';
import type { ServicePriceCategorySchema } from './ServicePriceCategorySchema';
import type { ShippingWarehouseSchema } from './ShippingWarehouseSchema';
import type { UserSchema } from './UserSchema';
import type { DealGroupSchema } from './DealGroupSchema';
export type DealSchema = {
id: number;
name: string;
@@ -28,6 +30,8 @@ export type DealSchema = {
billRequest?: (DealBillRequestSchema | null);
category?: (ServicePriceCategorySchema | null);
group?: (DealGroupSchema | null);
manager?: (UserSchema | null);
deliveryDate?: (string | null);
receivingSlotDate?: (string | null);
};

View File

@@ -0,0 +1,11 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type GetProfitChartDataRequest = {
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 { ProfitChartDataItem } from './ProfitChartDataItem';
export type GetProfitChartDataResponse = {
data: Array<ProfitChartDataItem>;
};

View 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;
};

View 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>;
};

View File

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

View 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;
};

View File

@@ -0,0 +1,5 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
export type ProfitTableGroupBy = 0 | 1 | 2 | 3 | 4;

View File

@@ -0,0 +1,53 @@
/* generated using openapi-typescript-codegen -- do not edit */
/* istanbul ignore file */
/* tslint:disable */
/* eslint-disable */
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 Chart Data
* @returns GetProfitChartDataResponse Successful Response
* @throws ApiError
*/
public static getProfitChartData({
requestBody,
}: {
requestBody: GetProfitChartDataRequest,
}): CancelablePromise<GetProfitChartDataResponse> {
return __request(OpenAPI, {
method: 'POST',
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: {
422: `Validation Error`,
},
});
}
}

View File

@@ -5,6 +5,7 @@
import type { CreateUserRequest } from '../models/CreateUserRequest';
import type { CreateUserResponse } from '../models/CreateUserResponse';
import type { GetAllUsersResponse } from '../models/GetAllUsersResponse';
import type { GetManagersResponse } from '../models/GetManagersResponse';
import type { UpdateUserRequest } from '../models/UpdateUserRequest';
import type { UpdateUserResponse } from '../models/UpdateUserResponse';
import type { CancelablePromise } from '../core/CancelablePromise';
@@ -62,4 +63,15 @@ export class UserService {
},
});
}
/**
* Get Managers
* @returns GetManagersResponse Successful Response
* @throws ApiError
*/
public static getManagers(): CancelablePromise<GetManagersResponse> {
return __request(OpenAPI, {
method: 'GET',
url: '/user/get-managers',
});
}
}