Coverage for src/lexigram/notification/constants.py: 91%
23 statements
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-26 02:26 +0800
« prev ^ index » next coverage.py v7.15.4, created at 2026-08-26 02:26 +0800
1"""lexigram-notification constants."""
3from __future__ import annotations
5import importlib.metadata
7try:
8 __version__: str = importlib.metadata.version("lexigram-notification")
9except ImportError:
10 __version__ = "0.0.0"
13# ---------------------------------------------------------------------------
14# Environment Variable Prefixes
15# ---------------------------------------------------------------------------
17ENV_PREFIX: str = "LEX_NOTIFICATION__"
18ENV_NESTED_DELIMITER: str = "__"
20TWILIO_API_BASE: str = "https://api.twilio.com/2010-04-01"
21FCM_SEND_URL: str = "https://fcm.googleapis.com/fcm/send"
22DEFAULT_FCM_TIMEOUT: int = 30
23DEFAULT_TWILIO_TIMEOUT: int = 30
25# ---------------------------------------------------------------------------
26# APNs (Apple Push Notification service)
27# ---------------------------------------------------------------------------
29APNS_BASE_URL: str = "https://api.push.apple.com"
30APNS_SANDBOX_URL: str = "https://api.development.push.apple.com"
31DEFAULT_APNS_TIMEOUT: int = 30
33# === Mailer Constants (merged from mail/constants.py) ===
34DEFAULT_FROM_EMAIL: str = "noreply@example.com"
35DEFAULT_SMTP_PORT: int = 587
36DEFAULT_SMTP_TIMEOUT: int = 30
37DEFAULT_SENDGRID_TIMEOUT: int = 30
38SENDGRID_API_URL: str = "https://api.sendgrid.com/v3/mail/send"
40# === Inbox Constants (merged from inbox/constants.py) ===
41MAX_INBOX_PAGE_SIZE: int = 100
42DEFAULT_RETENTION_DAYS: int = 90
44__all__ = [
45 "APNS_BASE_URL",
46 "APNS_SANDBOX_URL",
47 "DEFAULT_APNS_TIMEOUT",
48 "DEFAULT_FCM_TIMEOUT",
49 "DEFAULT_FROM_EMAIL",
50 "DEFAULT_RETENTION_DAYS",
51 "DEFAULT_SENDGRID_TIMEOUT",
52 "DEFAULT_SMTP_PORT",
53 "DEFAULT_SMTP_TIMEOUT",
54 "DEFAULT_TWILIO_TIMEOUT",
55 "ENV_NESTED_DELIMITER",
56 "ENV_PREFIX",
57 "FCM_SEND_URL",
58 "MAX_INBOX_PAGE_SIZE",
59 "SENDGRID_API_URL",
60 "TWILIO_API_BASE",
61]