import { Contact } from "./Contact"; export declare type WAConnectionState = "open" | "connecting" | "close"; export declare type ConnectionState = { /** connection is now open, connecting or closed */ connection: WAConnectionState; /** the error that caused the connection to close */ lastDisconnect?: { error: Error | undefined; date: Date; }; /** is this a new login */ isNewLogin?: boolean; /** the current QR code */ qr?: string; /** has the device received all pending notifications while it was offline */ receivedPendingNotifications?: boolean; /** legacy connection options */ legacy?: { phoneConnected: boolean; user?: Contact; }; /** * if the client is shown as an active, online client. * If this is false, the primary phone and other devices will receive notifs * */ isOnline?: boolean; /** * When you are in this state, WhatsApp prevents outgoing messages and calls. */ reachOutTimeLock?: ReachOutTimeLockState; }; export declare type ReachOutTimeLockState = { isActive?: boolean; timeEnforcementEnds?: string; enforcementType?: ReachOutTimeLockEnforcementType; }; export declare enum ReachOutTimeLockEnforcementType { BIZ_COMMERCE_VIOLATION_ALCOHOL = "BIZ_COMMERCE_VIOLATION_ALCOHOL", BIZ_COMMERCE_VIOLATION_ADULT = "BIZ_COMMERCE_VIOLATION_ADULT", BIZ_COMMERCE_VIOLATION_ANIMALS = "BIZ_COMMERCE_VIOLATION_ANIMALS", BIZ_COMMERCE_VIOLATION_BODY_PARTS_FLUIDS = "BIZ_COMMERCE_VIOLATION_BODY_PARTS_FLUIDS", BIZ_COMMERCE_VIOLATION_DATING = "BIZ_COMMERCE_VIOLATION_DATING", BIZ_COMMERCE_VIOLATION_DIGITAL_SERVICES_PRODUCTS = "BIZ_COMMERCE_VIOLATION_DIGITAL_SERVICES_PRODUCTS", BIZ_COMMERCE_VIOLATION_DRUGS = "BIZ_COMMERCE_VIOLATION_DRUGS", BIZ_COMMERCE_VIOLATION_DRUGS_ONLY_OTC = "BIZ_COMMERCE_VIOLATION_DRUGS_ONLY_OTC", BIZ_COMMERCE_VIOLATION_GAMBLING = "BIZ_COMMERCE_VIOLATION_GAMBLING", BIZ_COMMERCE_VIOLATION_HEALTHCARE = "BIZ_COMMERCE_VIOLATION_HEALTHCARE", BIZ_COMMERCE_VIOLATION_REAL_FAKE_CURRENCY = "BIZ_COMMERCE_VIOLATION_REAL_FAKE_CURRENCY", BIZ_COMMERCE_VIOLATION_SUPPLEMENTS = "BIZ_COMMERCE_VIOLATION_SUPPLEMENTS", BIZ_COMMERCE_VIOLATION_TOBACCO = "BIZ_COMMERCE_VIOLATION_TOBACCO", BIZ_COMMERCE_VIOLATION_VIOLENT_CONTENT = "BIZ_COMMERCE_VIOLATION_VIOLENT_CONTENT", BIZ_COMMERCE_VIOLATION_WEAPONS = "BIZ_COMMERCE_VIOLATION_WEAPONS", BIZ_QUALITY = "BIZ_QUALITY", /** This means there is no restriction */ DEFAULT = "DEFAULT", WEB_COMPANION_ONLY = "WEB_COMPANION_ONLY" } export declare enum NewChatMessageCappingStatusType { NONE = 0, FIRST_WARNING = 1, SECOND_WARNING = 2, CAPPED = 3 } export declare enum NewChatMessageCappingMVStatusType { NOT_ELIGIBLE = 0, NOT_ACTIVE = 1, ACTIVE = 2, ACTIVE_UPGRADE_AVAILABLE = 3 } export declare enum NewChatMessageCappingOTEStatusType { NOT_ELIGIBLE = 0, ELIGIBLE = 1, ACTIVE_IN_CURRENT_CYCLE = 2, EXHAUSTED = 3 } export declare type NewChatMessageCapInfo = { total_quota?: number; used_quota?: number; cycle_start_timestamp?: number; cycle_end_timestamp?: number; server_sent_timestamp?: number; ote_status?: NewChatMessageCappingOTEStatusType; mv_status?: NewChatMessageCappingMVStatusType; capping_status?: NewChatMessageCappingStatusType; };