mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-10 03:16:51 +08:00
feat: add billing switch. (#1789)
Co-authored-by: StyleZhang <jasonapring2015@outlook.com>
This commit is contained in:
@@ -32,9 +32,11 @@ export enum DocumentProcessingPriority {
|
||||
}
|
||||
|
||||
export type CurrentPlanInfoBackend = {
|
||||
enabled: boolean
|
||||
subscription: {
|
||||
plan: Plan
|
||||
billing: {
|
||||
enabled: boolean
|
||||
subscription: {
|
||||
plan: Plan
|
||||
}
|
||||
}
|
||||
members: {
|
||||
size: number
|
||||
@@ -53,6 +55,7 @@ export type CurrentPlanInfoBackend = {
|
||||
limit: number // total. 0 means unlimited
|
||||
}
|
||||
docs_processing: DocumentProcessingPriority
|
||||
can_replace_logo: boolean
|
||||
}
|
||||
|
||||
export type SubscriptionItem = {
|
||||
|
||||
@@ -10,7 +10,7 @@ const parseLimit = (limit: number) => {
|
||||
|
||||
export const parseCurrentPlan = (data: CurrentPlanInfoBackend) => {
|
||||
return {
|
||||
type: data.subscription.plan,
|
||||
type: data.billing.subscription.plan,
|
||||
usage: {
|
||||
vectorSpace: data.vector_space.size,
|
||||
buildApps: data.apps?.size || 0,
|
||||
|
||||
Reference in New Issue
Block a user