Replace billing plans with per-runtime usage pricing catalog.
Store explicit hourly/monthly/yearly rates in pricing_rates and addon_rates, compute deploy costs without cycle conversion, and simplify admin UI and wallet payment to cycle-only. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
import { AppRuntime, PricingResourceType } from '../common/enums';
|
||||
|
||||
export const BILLING_RUNTIMES: AppRuntime[] = [
|
||||
AppRuntime.NODEJS,
|
||||
AppRuntime.LARAVEL,
|
||||
AppRuntime.WORDPRESS,
|
||||
];
|
||||
|
||||
export const RUNTIME_PRICING_RESOURCES: PricingResourceType[] = [
|
||||
PricingResourceType.BASE_FEE,
|
||||
PricingResourceType.CPU_PER_CORE,
|
||||
PricingResourceType.MEMORY_PER_GB,
|
||||
PricingResourceType.STORAGE_PER_GB,
|
||||
PricingResourceType.DATABASE_ADDON,
|
||||
];
|
||||
|
||||
export const ADDON_PRICING_RESOURCES: PricingResourceType[] = [
|
||||
PricingResourceType.REDIS_ADDON,
|
||||
PricingResourceType.RABBITMQ_ADDON,
|
||||
PricingResourceType.ELASTICSEARCH_ADDON,
|
||||
PricingResourceType.CUSTOM_DOMAIN_ADDON,
|
||||
];
|
||||
|
||||
export const RESOURCE_LABELS: Record<PricingResourceType, string> = {
|
||||
[PricingResourceType.BASE_FEE]: 'Base fee',
|
||||
[PricingResourceType.CPU_PER_CORE]: 'CPU (per core)',
|
||||
[PricingResourceType.MEMORY_PER_GB]: 'Memory (per GB)',
|
||||
[PricingResourceType.STORAGE_PER_GB]: 'Storage (per GB)',
|
||||
[PricingResourceType.DATABASE_ADDON]: 'Database addon',
|
||||
[PricingResourceType.REDIS_ADDON]: 'Redis addon',
|
||||
[PricingResourceType.RABBITMQ_ADDON]: 'RabbitMQ addon',
|
||||
[PricingResourceType.ELASTICSEARCH_ADDON]: 'Elasticsearch addon',
|
||||
[PricingResourceType.CUSTOM_DOMAIN_ADDON]: 'Custom domain + SSL',
|
||||
};
|
||||
Reference in New Issue
Block a user