from enum import StrEnum class SubscriptionTargetType(StrEnum): USER = "user" CHAT = "chat" class SubscriptionScheduleType(StrEnum): ONCE = "once" DAILY = "daily" WEEKDAY = "weekday" WEEKLY = "weekly" MONTHLY = "monthly" INTERVAL = "interval" class PushSubscriptionStatus(StrEnum): ACTIVE = "active" PAUSED = "paused" CANCELLED = "cancelled" COMPLETED = "completed" class PushDeliveryStatus(StrEnum): PENDING = "pending" PROCESSING = "processing" RETRY = "retry" SENT = "sent" FAILED = "failed" SKIPPED = "skipped" class SubscriptionAuditAction(StrEnum): CREATE = "subscription.create" PAUSE = "subscription.pause" RESUME = "subscription.resume" CANCEL = "subscription.cancel" UPDATE_TIMEZONE = "subscription.update_timezone" UPDATE_QUIET_HOURS = "subscription.update_quiet_hours" DELIVERY_SENT = "subscription.delivery.sent" DELIVERY_FAILED = "subscription.delivery.failed" DELIVERY_SKIPPED = "subscription.delivery.skipped" DEFAULT_SUBSCRIPTION_TIMEZONE = "Asia/Shanghai" MAX_ACTIVE_SUBSCRIPTIONS = 50 MAX_DAILY_DELIVERIES = 96 MIN_INTERVAL_MINUTES = 15 DELIVERY_RETRY_DELAYS_SECONDS = (60, 300, 900) SUBSCRIPTION_LEASE_SECONDS = 120 DELIVERY_LEASE_SECONDS = 300 SUBSCRIPTION_NOT_FOUND = "Subscription not found" DELIVERY_NOT_FOUND = "Subscription delivery not found" SUBSCRIPTION_LIMIT_REACHED = "A user may enable at most 50 subscriptions" DAILY_DELIVERY_LIMIT_REACHED = "Daily delivery limit reached" INVALID_SCHEDULE = "Unsupported or invalid schedule expression" INVALID_TIMEZONE = "Invalid IANA timezone" INVALID_QUIET_HOURS = "Quiet hours must use different HH:MM start and end values" INVALID_PRIVATE_TARGET = "Private subscriptions must target the current user's open_id" INVALID_GROUP_TARGET = "Group subscriptions must be created by an administrator in the current group" INACTIVE_USER = "Feishu user is disabled" EMPTY_PROMPT = "Subscription prompt is required"