mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 13:03:50 +00:00
fix colection create api (#766)
Co-authored-by: heheer <71265218+newfish-cmyk@users.noreply.github.com>
This commit is contained in:
13
packages/global/support/wallet/sub/api.d.ts
vendored
13
packages/global/support/wallet/sub/api.d.ts
vendored
@@ -1,4 +1,15 @@
|
||||
import { SubModeEnum } from './constants';
|
||||
|
||||
export type SubDatasetSizeParams = {
|
||||
size: number;
|
||||
renew: boolean;
|
||||
};
|
||||
export type SubDatasetSizePreviewCheckResponse = {
|
||||
payForNewSub: boolean; // Does this change require payment
|
||||
newSubSize: number; // new sub dataset size
|
||||
alreadySubSize: number; // old sub dataset size
|
||||
payPrice: number; // this change require payment
|
||||
newPrice: number; // the new sub price
|
||||
newSubStartTime: Date;
|
||||
newSubExpiredTime: Date;
|
||||
balanceEnough: boolean; // team balance is enough
|
||||
};
|
||||
|
@@ -1,37 +1,73 @@
|
||||
export enum SubTypeEnum {
|
||||
datasetStore = 'datasetStore'
|
||||
standard = 'standard',
|
||||
extraDatasetSize = 'extraDatasetSize',
|
||||
extraPoints = 'extraPoints'
|
||||
}
|
||||
|
||||
export const subTypeMap = {
|
||||
[SubTypeEnum.datasetStore]: {
|
||||
label: 'support.user.team.subscription.type.datasetStore'
|
||||
[SubTypeEnum.standard]: {
|
||||
label: 'support.user.team.subscription.type.standard'
|
||||
},
|
||||
[SubTypeEnum.extraDatasetSize]: {
|
||||
label: 'support.user.team.subscription.type.extraDatasetSize'
|
||||
},
|
||||
[SubTypeEnum.extraPoints]: {
|
||||
label: 'support.user.team.subscription.type.extraPoints'
|
||||
}
|
||||
};
|
||||
|
||||
export enum SubStatusEnum {
|
||||
active = 'active',
|
||||
canceled = 'canceled'
|
||||
}
|
||||
export const subStatusMap = {
|
||||
[SubStatusEnum.active]: {
|
||||
label: 'support.user.team.subscription.status.active'
|
||||
},
|
||||
[SubStatusEnum.canceled]: {
|
||||
label: 'support.user.team.subscription.status.canceled'
|
||||
}
|
||||
};
|
||||
export const subSelectMap = {
|
||||
true: SubStatusEnum.active,
|
||||
false: SubStatusEnum.canceled
|
||||
};
|
||||
|
||||
export enum SubModeEnum {
|
||||
month = 'month',
|
||||
year = 'year'
|
||||
}
|
||||
|
||||
export const subModeMap = {
|
||||
[SubModeEnum.month]: {
|
||||
label: 'support.user.team.subscription.mode.month'
|
||||
label: 'support.user.team.subscription.mode.month',
|
||||
durationMonth: 1
|
||||
},
|
||||
[SubModeEnum.year]: {
|
||||
label: 'support.user.team.subscription.mode.year'
|
||||
label: 'support.user.team.subscription.mode.year',
|
||||
durationMonth: 12
|
||||
}
|
||||
};
|
||||
|
||||
export enum SubStatusEnum {
|
||||
active = 'active',
|
||||
expired = 'expired'
|
||||
export enum StandardSubLevelEnum {
|
||||
free = 'free',
|
||||
experience = 'experience',
|
||||
team = 'team',
|
||||
enterprise = 'enterprise',
|
||||
custom = 'custom'
|
||||
}
|
||||
|
||||
export const subStatusMap = {
|
||||
[SubStatusEnum.active]: {
|
||||
label: 'support.user.team.subscription.status.active'
|
||||
export const standardSubLevelMap = {
|
||||
[StandardSubLevelEnum.free]: {
|
||||
label: 'support.user.team.subscription.standardSubLevel.free'
|
||||
},
|
||||
[SubStatusEnum.expired]: {
|
||||
label: 'support.user.team.subscription.status.expired'
|
||||
[StandardSubLevelEnum.experience]: {
|
||||
label: 'support.user.team.subscription.standardSubLevel.experience'
|
||||
},
|
||||
[StandardSubLevelEnum.team]: {
|
||||
label: 'support.user.team.subscription.standardSubLevel.team'
|
||||
},
|
||||
[StandardSubLevelEnum.enterprise]: {
|
||||
label: 'support.user.team.subscription.standardSubLevel.enterprise'
|
||||
},
|
||||
[StandardSubLevelEnum.custom]: {
|
||||
label: 'support.user.team.subscription.standardSubLevel.custom'
|
||||
}
|
||||
};
|
||||
|
33
packages/global/support/wallet/sub/type.d.ts
vendored
33
packages/global/support/wallet/sub/type.d.ts
vendored
@@ -1,12 +1,39 @@
|
||||
import { SubModeEnum, SubStatusEnum, SubTypeEnum } from './constants';
|
||||
import { StandardSubLevelEnum, SubModeEnum, SubStatusEnum, SubTypeEnum } from './constants';
|
||||
|
||||
export type TeamSubSchema = {
|
||||
_id: string;
|
||||
teamId: string;
|
||||
type: `${SubTypeEnum}`;
|
||||
mode: `${SubModeEnum}`;
|
||||
status: `${SubStatusEnum}`;
|
||||
renew: boolean;
|
||||
mode: `${SubModeEnum}`;
|
||||
startTime: Date;
|
||||
expiredTime: Date;
|
||||
price: number;
|
||||
|
||||
currentSubLevel?: `${StandardSubLevelEnum}`;
|
||||
nextSubLevel?: `${StandardSubLevelEnum}`;
|
||||
|
||||
currentExtraDatasetSize?: number;
|
||||
nextExtraDatasetSize?: number;
|
||||
|
||||
currentExtraPoints?: number;
|
||||
nextExtraPoints?: number;
|
||||
|
||||
maxTeamMember?: number;
|
||||
maxAppAmount?: number;
|
||||
maxDatasetAmount?: number;
|
||||
chatHistoryStoreDuration?: number;
|
||||
maxDatasetSize?: number;
|
||||
customApiKey?: boolean;
|
||||
customCopyright?: number;
|
||||
exportDatasetInterval?: number;
|
||||
websiteSyncInterval?: number;
|
||||
reRankWeight?: number;
|
||||
totalPoints?: number;
|
||||
|
||||
surplusPoints?: number;
|
||||
|
||||
// abandon
|
||||
datasetStoreAmount?: number;
|
||||
renew?: boolean;
|
||||
};
|
||||
|
Reference in New Issue
Block a user