Archer 5a04d015f9
perf: usages list;perf: move components (#3654)
* perf: usages list

* team sub plan load

* perf: usage dashboard code

* perf: dashboard ui

* perf: move components
2025-02-04 17:25:01 +08:00

43 lines
895 B
TypeScript

import { UsageSourceEnum } from './constants';
import { UsageListItemCountType, UsageListItemType } from './type';
export type CreateTrainingUsageProps = {
name: string;
datasetId: string;
};
export type GetUsageProps = {
dateStart: Date;
dateEnd: Date;
sources?: UsageSourceEnum[];
teamMemberIds?: string[];
projectName?: string;
};
export type GetUsageDashboardProps = GetUsageProps & {
unit: 'day' | 'month';
};
export type GetUsageDashboardResponseItem = {
date: Date;
totalPoints: number;
};
export type ConcatUsageProps = UsageListItemCountType & {
teamId: string;
tmbId: string;
billId?: string;
totalPoints: number;
listIndex?: number;
};
export type CreateUsageProps = {
teamId: string;
tmbId: string;
appName: string;
appId?: string;
pluginId?: string;
totalPoints: number;
source: `${UsageSourceEnum}`;
list: UsageListItemType[];
};