Type alias ConnectionState

ConnectionState: {
    connection: WAConnectionState;
    isNewLogin?: boolean;
    isOnline?: boolean;
    lastDisconnect?: {
        date: Date;
        error: Error | undefined;
    };
    legacy?: {
        phoneConnected: boolean;
        user?: Contact;
    };
    qr?: string;
    receivedPendingNotifications?: boolean;
}

Type declaration

  • connection: WAConnectionState

    connection is now open, connecting or closed

  • Optional isNewLogin?: boolean

    is this a new login

  • Optional isOnline?: boolean

    if the client is shown as an active, online client. If this is false, the primary phone and other devices will receive notifs

  • Optional lastDisconnect?: {
        date: Date;
        error: Error | undefined;
    }

    the error that caused the connection to close

    • date: Date
    • error: Error | undefined
  • Optional legacy?: {
        phoneConnected: boolean;
        user?: Contact;
    }

    legacy connection options

    • phoneConnected: boolean
    • Optional user?: Contact
  • Optional qr?: string

    the current QR code

  • Optional receivedPendingNotifications?: boolean

    has the device received all pending notifications while it was offline

Generated using TypeDoc