""" Application constants """ from exponent_server_sdk import PushTicket APP_NAME: str = "send_push_messages" ENV_PROD: str = "prod" MAX_EXPO_MESSAGES_CHUNK_SIZE = 100 # should be less or equal (Expo restriction) MULTIPLE_ORGANIZATIONS_ERROR_CODE = "PUSH_TOO_MANY_EXPERIENCE_IDS" class PushMessagePriority: """Allowed Expo message priorities.""" DEFAULT = "default" NORMAL = "normal" HIGH = "high" ALL = (DEFAULT, NORMAL, HIGH) class PushMessageSound: """Allowed Expo message sounds.""" DEFAULT = "default" ALL = (DEFAULT,) class PushMessageStatus: """Push message delivery status to save.""" DELIVERED = "delivered" FAILED = "failed" ALL = (DELIVERED, FAILED) RECEIPT_STATUS_MAPPING = { PushTicket.ERROR_STATUS: PushMessageStatus.FAILED, PushTicket.SUCCESS_STATUS: PushMessageStatus.DELIVERED, } class PushMessageErrors: """Message sending errors.""" INVALID_INPUT_DATA_ERROR = "Invalid message data" EXPO_ERROR = "Expo returned error"