1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-04-06 01:15:28 +02:00
unleash.unleash/frontend/src/interfaces/instance.ts
Nuno Góis 3fa54f4465
chore: instance status prices (#9588)
https://linear.app/unleash/issue/2-3429/use-the-correct-prices-for-each-instance-in-unleashs-ui

Uses the instance prices exposed through instance status to display the
correct price amounts in Unleash's UI.
2025-03-21 09:15:49 +00:00

44 lines
878 B
TypeScript

type InstancePrices = {
pro?: {
base?: number;
seat?: number;
traffic?: number;
};
payg?: {
seat?: number;
traffic?: number;
};
};
type InstanceBilling = 'pay-as-you-go' | 'subscription';
export interface IInstanceStatus {
plan: InstancePlan;
trialExpiry?: string;
trialStart?: string;
trialExtended?: number;
billingCenter?: string;
state?: InstanceState;
seats?: number;
minSeats?: number;
isCustomBilling?: boolean;
prices?: InstancePrices;
billing?: InstanceBilling;
}
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',
}