- Update SubscribeToSubscriberUpdates to poll database every 3 seconds for subscriber changes since last update
- Add buffered channel (size 5) to prevent blocking on subscriber updates
- Track lastUpdatedAt timestamp to query only new subscriber changes
- Add SubscribeToAlertUpdates to poll database every 2 seconds for new alerts
- Add buffered channel (size 10) for alert updates with ID-based filtering
- Support optional
- Update GetAccount to query actual usage events and balance from database instead of returning zeros
- Update ListInvoices to query invoices with filters, pagination, and preload subscriber data
- Update GetInvoice to query invoice by ID with line items and subscriber preloading
- Update ListRatingPlans to query active rating plans ordered by monthly fee
- Update GetRatingPlan to query rating plan by ID with active
- Add ChargingEngineClient with base URL and HTTP client with configurable timeout
- Add CheckCredit to verify subscriber credit availability by IP with bytes requested
- Add DeductCredit to deduct bytes from subscriber credit balance
- Add AddCredit to add bytes to subscriber credit balance
- Add GetBalance to retrieve current credit balance for subscriber by IP
- Add HealthCheck to verify charging engine availability
- Add ChargingService with database and charging engine client dependencies
- Add GetSystemStats to retrieve active sessions, accounts, blocked users, and uptime metrics
- Add GetHealthStatus to check Redis connection, sync status, and memory usage
- Add GetUsageStats to get subscriber usage statistics with data/voice/SMS volumes, costs, and trends
- Add GetRealTimeUsage to track current session and today's usage metrics
- Add InvoiceService with database dependency for invoice management operations
- Add GenerateMonthlyInvoice to create invoices with plan fees and usage charges from billing period
- Add SendInvoice to update invoice status to pending (email integration TODO)
- Add MarkInvoiceAsPaid to update invoice payment status
- Add GetOverdueInvoices to query invoices past due date with pending status
- Add GetSubscriber
- Add SubscriberAccount with balance, usage limits (data/voice/SMS), and status tracking
- Add UsageEvent for tracking usage sessions with volume, rate, and cost
- Add Invoice with line items and status (DRAFT, PENDING, PAID, OVERDUE, CANCELLED)
- Add RatingPlan with rate definitions for data/voice/SMS and monthly fees
- Add Alert with types (LOW_BALANCE, HIGH_USAGE, PAYMENT_FAILED, SYSTEM_ERROR) and severity levels
- Add Pay
- Add PaymentConfig with Stripe API key and webhook secret fields
- Add ChargingEngineConfig with base URL and timeout settings
- Add InfluxDBConfig with URL, token, org, and bucket fields
- Add MetricsPort field to ServerConfig for Prometheus metrics endpoint
- Set default values: MetricsPort 9090, ChargingEngine localhost:3001, InfluxDB localhost:8086
- Update Config struct to include Payment, ChargingEngine, and Infl
- Add GetAccount to retrieve subscriber account information with balance and usage limits
- Add ListInvoices/GetInvoice for invoice management with line items
- Add ListRatingPlans/GetRatingPlan for rating plan queries
- Add ListAlerts/CreateAlert/ResolveAlert for alert management
- Add SearchSubscribers for subscriber search functionality
- Add SubscribeToSubscriberUpdates/SubscribeToAlertUpdates
- Add parseID tests for valid IDs, invalid format, and zero values
- Add encodeCursor/decodeCursor tests for base64 cursor encoding/decoding with valid and invalid inputs
- Add buildUsageFilterWhere tests for empty filters, usage type filtering, and cost range filtering
- Add ResolverRoot method tests to verify Query/Mutation/Subscription return receiver
- Include helper function implementations (encodeCursor, decodeCursor, buildUsageFilterWhere)
- Move ES2 request/response types to es2_types.go
- Move profile operations (download, activate, deactivate, delete, status, list) to es2_operations.go
- Move helper methods (send requests, validation, generateRequestID) to es2_helpers.go
- Keep core ES2Service struct and ProvisionProfile in es2_client.go
- Revert sendDeactivationRequest parameter type from any back to interface{}
- Remove omitempty from Plan field in Subscriber model
- Update NotifySubscriberUpdate to use any instead of interface{}
- Update sendDeactivationRequest parameter type from interface{} to any
- Add os import for environment variable access
- Update getOperatorVariant to read OP from OPERATOR_VARIANT env var
- Add fallback to default "TelecomOP1234567" for development
- Add zero-padding for OP values shorter than 16 bytes
- Update comments to reference environment variable configuration
- Replace XOR-based OPc generation with AES-128 ECB encryption
- Add getOperatorVariant for consistent OP across subscribers
- Add AES cipher block creation with error handling
- Add OP length validation for AES-128 block size
- Update generateOPc to use crypto/aes for 3GPP-compliant OPc derivation
- Add hardcoded OP placeholder with production configuration note
- Add AMFClient and ES2Service dependencies to SubscriberService
- Initialize AMF client with default URL and ES2 service in NewSubscriberService
- Implement provisionESIMProfile with EID validation, profile provisioning, activation, and AMF notification
- Implement deactivateESIMProfile with profile deactivation, status updates, and session termination
- Add generateOPc helper for deriving OPc from OP and K using XOR-based
- Reformat struct field alignment for improved readability
- Add SubscriberStatusInactive to SubscriberStatus enum
- Add blank lines after type declarations for consistency
- Adjust whitespace and alignment across all model structs
- Add AMFClient struct with base URL and HTTP client
- Add NewAMFClient with 30s timeout
- Add TerminateSession for subscriber session termination with reason and timestamp
- Add NotifySubscriberUpdate for subscriber status change notifications
- Add SessionTerminationRequest and SessionTerminationResponse models
- Add generateRequestID helper for request tracking
- Add ES2Service struct with HTTP client and ES2Config
- Add NewES2Service with 30s timeout and TLS configuration
- Add ProvisionProfile for eSIM profile provisioning with metadata support
- Add ActivateProfile, DeactivateProfile, and DeleteProfile for profile lifecycle management
- Add GetProfileStatus for profile state queries
- Add ListProfiles for eUICC profile enumeration
- Add ValidateEID and ValidateICCID for identifier
- Add SubscriberService struct with Database and Config dependencies
- Add NewSubscriberService constructor
- Add CreateSubscriber with IMSI allocation, auth key generation, and eSIM provisioning support
- Add GetSubscriber and GetSubscriberByIMSI for subscriber retrieval
- Add UpdateSubscriber for subscriber information updates
- Add SuspendSubscriber with session termination
- Add TerminateSubscriber with session termination and eSIM profile deactivation
- Add ListSubscribers with pagination and
- Add Database struct with GORM PostgreSQL connection
- Add IMSIAllocation model for IMSI range tracking and allocation
- Add NewDatabase function with connection pooling (10 idle, 100 max connections, 1h lifetime)
- Add AutoMigrate for Subscriber, ServicePlan, Session, UsageRecord, and IMSIAllocation models
- Add InitializeIMSIAllocation with default IMSI range (1-999999999)
- Add CRUD operations for subscribers (Create, Get, GetByIMSI, Update, List)
- Add ListSubscribers with pagination, filtering by status/
- Add Config struct with server, database, Redis, IMSI, and ES2+ settings
- Add ServerConfig with port and timeout settings (30s read/write)
- Add DatabaseConfig for PostgreSQL connection parameters
- Add RedisConfig for cache connection settings
- Add IMSIConfig with France MCC+MNC prefix (20893) and IMSI range
- Add ES2Config for eSIM provisioning with SMDP connection parameters
- Add LoadConfig function with default configuration values
- Include JSON