@@ -19,7 +19,7 @@ import type { WhatsAppSocketTimingOptions } from "./socket-timing.js";
1919const LOGGED_OUT_STATUS = DisconnectReason ?. loggedOut ?? 401 ;
2020const WHATSAPP_LOGIN_RESTART_MESSAGE =
2121 "WhatsApp asked for a restart after pairing (code 515); waiting for creds to save…" ;
22- export const WHATSAPP_LOGGED_OUT_RELINK_MESSAGE =
22+ const WHATSAPP_LOGGED_OUT_RELINK_MESSAGE =
2323 "WhatsApp reported the session is logged out. Cleared cached web session; please rerun openclaw channels login and scan the QR again." ;
2424export const WHATSAPP_LOGGED_OUT_QR_MESSAGE =
2525 "WhatsApp reported the session is logged out. Cleared cached web session; please scan a new QR." ;
@@ -33,7 +33,7 @@ export type ManagedWhatsAppListener = ActiveWebListener & {
3333 signalClose ?: ( reason ?: WebListenerCloseReason ) => void ;
3434} ;
3535
36- export type WhatsAppLiveConnection = {
36+ type WhatsAppLiveConnection = {
3737 connectionId : string ;
3838 startedAt : number ;
3939 sock : WASocket ;
@@ -51,7 +51,7 @@ export type WhatsAppLiveConnection = {
5151 resolveClose : ( reason : WebListenerCloseReason ) => void ;
5252} ;
5353
54- export type WhatsAppConnectionSnapshot = {
54+ type WhatsAppConnectionSnapshot = {
5555 connectionId : string ;
5656 startedAt : number ;
5757 lastInboundAt : number | null ;
@@ -61,23 +61,23 @@ export type WhatsAppConnectionSnapshot = {
6161 uptimeMs : number ;
6262} ;
6363
64- export type NormalizedConnectionCloseReason = {
64+ type NormalizedConnectionCloseReason = {
6565 statusCode ?: number ;
6666 statusLabel : number | "unknown" ;
6767 isLoggedOut : boolean ;
6868 error ?: unknown ;
6969 errorText : string ;
7070} ;
7171
72- export type WhatsAppConnectionCloseDecision = {
72+ type WhatsAppConnectionCloseDecision = {
7373 action : "stop" | "retry" ;
7474 delayMs ?: number ;
7575 reconnectAttempts : number ;
7676 healthState : "logged-out" | "conflict" | "stopped" | "reconnecting" ;
7777 normalized : NormalizedConnectionCloseReason ;
7878} ;
7979
80- export type WhatsAppReconnectAttemptDecision = {
80+ type WhatsAppReconnectAttemptDecision = {
8181 action : "stop" | "retry" ;
8282 delayMs ?: number ;
8383 reconnectAttempts : number ;
@@ -148,7 +148,7 @@ export function closeWaSocketSoon(
148148 } , delayMs ) ;
149149}
150150
151- export type WhatsAppLoginWaitResult =
151+ type WhatsAppLoginWaitResult =
152152 | {
153153 outcome : "connected" ;
154154 restarted : boolean ;
0 commit comments