80 lines
1.5 KiB
TypeScript

/**
* SIM Domain - Contract
*/
// SIM Status
export const SIM_STATUS = {
ACTIVE: "active",
SUSPENDED: "suspended",
CANCELLED: "cancelled",
PENDING: "pending",
} as const;
export type SimStatus = (typeof SIM_STATUS)[keyof typeof SIM_STATUS];
// SIM Type
export const SIM_TYPE = {
STANDARD: "standard",
NANO: "nano",
MICRO: "micro",
ESIM: "esim",
} as const;
export type SimType = (typeof SIM_TYPE)[keyof typeof SIM_TYPE];
// SIM Details
export interface SimDetails {
account: string;
status: SimStatus;
planCode: string;
planName: string;
simType: SimType;
iccid: string;
eid: string;
msisdn: string;
imsi: string;
remainingQuotaMb: number;
remainingQuotaKb: number;
voiceMailEnabled: boolean;
callWaitingEnabled: boolean;
internationalRoamingEnabled: boolean;
networkType: string;
activatedAt?: string;
expiresAt?: string;
}
// SIM Usage
export interface RecentDayUsage {
date: string;
usageKb: number;
usageMb: number;
}
export interface SimUsage {
account: string;
todayUsageMb: number;
todayUsageKb: number;
monthlyUsageMb?: number;
monthlyUsageKb?: number;
recentDaysUsage: RecentDayUsage[];
isBlacklisted: boolean;
lastUpdated?: string;
}
// SIM Top-Up History
export interface SimTopUpHistoryEntry {
quotaKb: number;
quotaMb: number;
addedDate: string;
expiryDate: string;
campaignCode: string;
}
export interface SimTopUpHistory {
account: string;
totalAdditions: number;
additionCount: number;
history: SimTopUpHistoryEntry[];
}