1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-04 00:18:40 +01:00
unleash.unleash/frontend/src/interfaces/instance.ts
Nuno Góis 395a4b6be3
chore: PAYG billing (#8743)
https://linear.app/unleash/issue/CTO-95/unleash-billing-page-for-enterprise-payg

Adds support for PAYG in Unleash's billing page.

Includes some refactoring, like splitting Pro and PAYG into different
details components. We're now also relying on shared billing-related
constants (see `BillingPlan.tsx`). This should make it much easier to
change any of these values in the future. I already changed a few that
were static / wrongly relying on instanceStatus.seats (we decided we're
not doing that for now).


![image](https://github.com/user-attachments/assets/97a5a420-a4f6-4b6c-93d6-3fffddbacbc7)
2024-11-14 11:29:05 +00:00

27 lines
541 B
TypeScript

export interface IInstanceStatus {
plan: InstancePlan;
trialExpiry?: string;
trialStart?: string;
trialExtended?: number;
billingCenter?: string;
state?: InstanceState;
seats?: number;
minSeats?: number;
}
export enum InstanceState {
UNASSIGNED = 'UNASSIGNED',
TRIAL = 'TRIAL',
ACTIVE = 'ACTIVE',
EXPIRED = 'EXPIRED',
CHURNED = 'CHURNED',
}
export enum InstancePlan {
PRO = 'Pro',
COMPANY = 'Company',
TEAM = 'Team',
ENTERPRISE = 'Enterprise',
UNKNOWN = 'Unknown',
}