2025-10-03 14:26:55 +09:00
|
|
|
/**
|
|
|
|
|
* SIM Domain - Contract
|
2025-12-25 17:30:02 +09:00
|
|
|
*
|
2025-10-08 10:33:33 +09:00
|
|
|
* Constants and types for the SIM domain.
|
|
|
|
|
* All validated types are derived from schemas (see schema.ts).
|
2025-10-03 14:26:55 +09:00
|
|
|
*/
|
|
|
|
|
|
2025-10-08 10:33:33 +09:00
|
|
|
// ============================================================================
|
|
|
|
|
// SIM Status Constants
|
|
|
|
|
// ============================================================================
|
|
|
|
|
|
2025-10-03 14:26:55 +09:00
|
|
|
export const SIM_STATUS = {
|
|
|
|
|
ACTIVE: "active",
|
|
|
|
|
SUSPENDED: "suspended",
|
|
|
|
|
CANCELLED: "cancelled",
|
|
|
|
|
PENDING: "pending",
|
|
|
|
|
} as const;
|
|
|
|
|
|
2025-10-08 10:33:33 +09:00
|
|
|
// ============================================================================
|
|
|
|
|
// SIM Type Constants
|
|
|
|
|
// ============================================================================
|
2025-10-03 14:26:55 +09:00
|
|
|
|
|
|
|
|
export const SIM_TYPE = {
|
|
|
|
|
STANDARD: "standard",
|
|
|
|
|
NANO: "nano",
|
|
|
|
|
MICRO: "micro",
|
|
|
|
|
ESIM: "esim",
|
|
|
|
|
} as const;
|
|
|
|
|
|
2025-11-18 18:18:25 +09:00
|
|
|
// ============================================================================
|
|
|
|
|
// SIM Plan Codes (frontend-safe subset; authoritative list lives in WHMCS)
|
|
|
|
|
// ============================================================================
|
|
|
|
|
|
|
|
|
|
export const SIM_PLAN_CODES = ["PASI_5G", "PASI_10G", "PASI_25G", "PASI_50G"] as const;
|
|
|
|
|
|
|
|
|
|
export type SimPlanCode = (typeof SIM_PLAN_CODES)[number];
|
|
|
|
|
|
|
|
|
|
export const SIM_PLAN_LABELS: Record<SimPlanCode, string> = {
|
|
|
|
|
PASI_5G: "5GB",
|
|
|
|
|
PASI_10G: "10GB",
|
|
|
|
|
PASI_25G: "25GB",
|
|
|
|
|
PASI_50G: "50GB",
|
|
|
|
|
};
|
|
|
|
|
|
2025-10-08 10:33:33 +09:00
|
|
|
// ============================================================================
|
|
|
|
|
// Re-export Types from Schema (Schema-First Approach)
|
2025-10-07 17:38:39 +09:00
|
|
|
// ============================================================================
|
|
|
|
|
|
2025-10-08 10:33:33 +09:00
|
|
|
export type {
|
|
|
|
|
SimStatus,
|
|
|
|
|
SimType,
|
|
|
|
|
SimDetails,
|
|
|
|
|
RecentDayUsage,
|
|
|
|
|
SimUsage,
|
|
|
|
|
SimTopUpHistoryEntry,
|
|
|
|
|
SimTopUpHistory,
|
|
|
|
|
// Request types
|
|
|
|
|
SimTopUpRequest,
|
|
|
|
|
SimPlanChangeRequest,
|
|
|
|
|
SimCancelRequest,
|
|
|
|
|
SimTopUpHistoryRequest,
|
|
|
|
|
SimFeaturesUpdateRequest,
|
|
|
|
|
// Activation types
|
|
|
|
|
SimOrderActivationRequest,
|
|
|
|
|
SimOrderActivationMnp,
|
|
|
|
|
SimOrderActivationAddons,
|
2025-12-25 17:30:02 +09:00
|
|
|
} from "./schema.js";
|