feat: add billing foundation and entitlement enforcement
- add workspace-scoped billing storage, usage tracking, and add-on catalog - enforce plan entitlements for search and deep research routes - expand pricing and account UI around billing state, usage, and upgrades
This commit is contained in:
@@ -524,6 +524,18 @@ export function getPublicPricingPlans() {
|
||||
return ACTIVE_PLAN_CATALOG.filter((plan) => plan.listingCategory === 'pricing_page_primary');
|
||||
}
|
||||
|
||||
export function getPublicPricingPlansForInterval(billingInterval: BillingInterval) {
|
||||
return ACTIVE_PLAN_CATALOG.filter((plan) => {
|
||||
if (plan.code === 'enterprise_custom') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return plan.listingCategory === 'pricing_page_hidden'
|
||||
? plan.billingInterval === billingInterval
|
||||
: plan.listingCategory === 'pricing_page_primary' && plan.billingInterval === billingInterval;
|
||||
});
|
||||
}
|
||||
|
||||
export function getPlanVariant(tier: PlanTier, billingInterval: BillingInterval) {
|
||||
return ACTIVE_PLAN_CATALOG.find((plan) => plan.planFamily === tier && plan.billingInterval === billingInterval) ?? null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user