* New pay (#2484)

* remove sub status

* feat: new pay mode

* fix: ts

* limit
This commit is contained in:
Archer
2024-08-26 09:52:09 +08:00
committed by GitHub
parent a4c19fbd0a
commit c1d08c0ccc
17 changed files with 170 additions and 440 deletions

View File

@@ -1,16 +1,25 @@
import { StandardSubLevelEnum, SubModeEnum } from '../sub/constants';
import { BillTypeEnum } from './constants';
export type CreateBillProps = {
type: BillTypeEnum;
// balance
balance?: number; // read
month?: number;
// extra dataset size
extraDatasetSize?: number; // 1k
extraPoints?: number; // 100w
export type CreateStandPlanBill = {
type: BillTypeEnum.standSubPlan;
level: `${StandardSubLevelEnum}`;
subMode: `${SubModeEnum}`;
};
type CreateExtractPointsBill = {
type: BillTypeEnum.extraPoints;
extraPoints: number;
};
type CreateExtractDatasetBill = {
type: BillTypeEnum.extraDatasetSub;
extraDatasetSize: number;
month: number;
};
export type CreateBillProps =
| CreateStandPlanBill
| CreateExtractPointsBill
| CreateExtractDatasetBill;
export type CreateBillResponse = {
billId: string;
codeUrl: string;

View File

@@ -19,7 +19,6 @@ export type BillSchemaType = {
month?: number;
datasetSize?: number;
extraPoints?: number;
invoice: boolean;
};
};