@oxidezap/whatsapp-rust-bridge 0.6.0 → 0.6.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/whatsapp_rust_bridge.d.ts +2 -1402
- package/dist/whatsapp_rust_bridge_bg.wasm +0 -0
- package/package.json +1 -1
|
@@ -91,1406 +91,6 @@ export interface Jid {
|
|
|
91
91
|
integrator: number;
|
|
92
92
|
}
|
|
93
93
|
|
|
94
|
-
/** Addressing mode for a group (phone number vs LID). */
|
|
95
|
-
export type AddressingMode = "pn" | "lid";
|
|
96
|
-
|
|
97
|
-
/** A batched app-state sync finished without leaving every collection synced. Collections are named as they appear on the wire (`critical_block`, `regular_high`, …) rather than as an enum, so the payload stays stable if the set of collections changes. `fatal` is the one a consumer usually has to act on: the server refused the collection, and repeating the request gets the same answer. WhatsApp Web treats that as grounds to notify the primary device and log out; this library will not end a session on its own, so it reports the refusal and keeps the connection. When `connected` is true the client dispatched [`Event::Connected`] anyway and is usable, minus whatever those collections carry — for `critical_block` that includes the push name, so presence stays unavailable until it syncs. */
|
|
98
|
-
export interface AppStateSyncFailed {
|
|
99
|
-
/** Refused outright by the server (400/404). Terminal for this connection. */
|
|
100
|
-
fatal: string[];
|
|
101
|
-
/** Did not sync, but a later attempt can. */
|
|
102
|
-
retryable: string[];
|
|
103
|
-
/** Another writer held the collection, so this sync did nothing for it. */
|
|
104
|
-
skipped: string[];
|
|
105
|
-
/** Whether the client went on to dispatch [`Event::Connected`]. */
|
|
106
|
-
connected: boolean;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
/** App state synchronization key for WhatsApp's app state protocol. */
|
|
110
|
-
export interface AppStateSyncKey {
|
|
111
|
-
key_data: Uint8Array;
|
|
112
|
-
fingerprint: Uint8Array;
|
|
113
|
-
timestamp: number | string;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
export interface ArchiveUpdate {
|
|
117
|
-
/** The chat being archived or unarchived. */
|
|
118
|
-
jid: Jid;
|
|
119
|
-
timestamp: number;
|
|
120
|
-
action: ArchiveChatAction;
|
|
121
|
-
from_full_sync: boolean;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
/** How a [`MessageBatch`] was delivered. This describes the delivery shape, not a message's provenance: whether a stanza came from the offline queue is `info.is_offline` on each [`InboundMessage`]. */
|
|
125
|
-
export type BatchOrigin = "Live" | "OfflineDrain";
|
|
126
|
-
|
|
127
|
-
/** Action to perform on a blocklist entry. */
|
|
128
|
-
export type BlocklistAction = "block" | "unblock";
|
|
129
|
-
|
|
130
|
-
export type BotEditType = "first" | "inner" | "last";
|
|
131
|
-
|
|
132
|
-
export type BusinessHourMode = "open_24h" | "specific_hours" | "appointment_only" | string;
|
|
133
|
-
|
|
134
|
-
/** Parsed `<notification type="business">` stanza. */
|
|
135
|
-
export interface BusinessNotification {
|
|
136
|
-
from: Jid;
|
|
137
|
-
stanza_id: string;
|
|
138
|
-
timestamp: number | string;
|
|
139
|
-
notification_type: BusinessNotificationType;
|
|
140
|
-
jid?: Jid | null;
|
|
141
|
-
hash?: string | null;
|
|
142
|
-
verified_name?: VerifiedName | null;
|
|
143
|
-
product_ids: string[];
|
|
144
|
-
collection_ids: string[];
|
|
145
|
-
subscriptions: BusinessSubscription[];
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
/** Business notification type based on child element. */
|
|
149
|
-
export type BusinessNotificationType = "remove_jid" | "remove_hash" | "verified_name_jid" | "verified_name_hash" | "profile" | "profile_hash" | "product" | "collection" | "subscriptions" | "unknown";
|
|
150
|
-
|
|
151
|
-
/** Business status update notification. */
|
|
152
|
-
export interface BusinessStatusUpdate {
|
|
153
|
-
/** The business account whose status changed. */
|
|
154
|
-
jid: Jid;
|
|
155
|
-
update_type: BusinessUpdateType;
|
|
156
|
-
timestamp: number;
|
|
157
|
-
target_jid?: Jid | null;
|
|
158
|
-
hash?: string | null;
|
|
159
|
-
verified_name?: string | null;
|
|
160
|
-
product_ids: string[];
|
|
161
|
-
collection_ids: string[];
|
|
162
|
-
subscriptions: BusinessSubscription[];
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/** Business subscription information (SMB features). */
|
|
166
|
-
export interface BusinessSubscription {
|
|
167
|
-
id: string;
|
|
168
|
-
status: string;
|
|
169
|
-
expiration_date?: number | string | null;
|
|
170
|
-
creation_time?: number | string | null;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
/** Type of business status update. */
|
|
174
|
-
export type BusinessUpdateType = "removed_as_business" | "verified_name_changed" | "profile_updated" | "products_updated" | "collections_updated" | "subscriptions_updated" | "unknown";
|
|
175
|
-
|
|
176
|
-
/** Minimal cached form of a Noise certificate. Mirrors the JSON shape WA Web persists in `waNoiseInfo.certificateChainBuffer` (only `key` plus the validity window — signatures and issuer_serial are intentionally dropped). */
|
|
177
|
-
export interface CachedNoiseCert {
|
|
178
|
-
/** 32-byte X25519 public key from `NoiseCertificate.Details.key`. */
|
|
179
|
-
key: Uint8Array;
|
|
180
|
-
/** Unix epoch seconds. Validation window from `NoiseCertificate.Details`. */
|
|
181
|
-
not_before: number | string;
|
|
182
|
-
not_after: number | string;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/** Cached form of the server's two-cert chain. `leaf.key` is the server static public key consumed by Noise IK; the intermediate is kept solely to mirror WA Web's expiry checks. */
|
|
186
|
-
export interface CachedServerCertChain {
|
|
187
|
-
intermediate: CachedNoiseCert;
|
|
188
|
-
leaf: CachedNoiseCert;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/** Fields kept per-variant (not a shared `BasicCallMeta`) so the `serde` shape mirrors the stanza 1:1 for downstream JS consumers. */
|
|
192
|
-
export type CallAction =
|
|
193
|
-
| { type: "offer"; call_id: string; call_creator: Jid; caller_pn?: Jid | null; caller_country_code?: string | null; device_class?: string | null; joinable: boolean; is_video: boolean; audio: CallAudioCodec[]; group_jid?: Jid | null }
|
|
194
|
-
| { type: "offer_notice"; call_id: string; call_creator: Jid; is_video: boolean; is_group: boolean }
|
|
195
|
-
| { type: "preaccept"; call_id: string; call_creator: Jid; audio: CallAudioCodec[] }
|
|
196
|
-
| { type: "accept"; call_id: string; call_creator: Jid; audio: CallAudioCodec[] }
|
|
197
|
-
| { type: "reject"; call_id: string; call_creator: Jid; reason?: string | null }
|
|
198
|
-
| { type: "terminate"; call_id: string; call_creator: Jid; reason?: string | null; duration?: number | null; audio_duration?: number | null }
|
|
199
|
-
| { type: "transport"; call_id: string; call_creator: Jid; p2p_cand_round?: string | null; transport_message_type?: string | null }
|
|
200
|
-
| { type: "relaylatency"; call_id: string; call_creator: Jid }
|
|
201
|
-
| { type: "video"; call_id: string; call_creator: Jid; state: VideoState; orientation?: number | null; dec?: string | null }
|
|
202
|
-
| { type: "group_update"; update: GroupCallUpdate }
|
|
203
|
-
| { type: "enc_rekey"; rekey: GroupCallEncRekey }
|
|
204
|
-
| { type: "waiting_room_update"; room: WaitingRoom }
|
|
205
|
-
| { type: "user_action"; call_id: string; call_creator: Jid; raised: boolean }
|
|
206
|
-
| { type: "screen_share"; call_id: string; call_creator: Jid; screen_share: ScreenShare };
|
|
207
|
-
|
|
208
|
-
export interface CallAudioCodec {
|
|
209
|
-
enc: string;
|
|
210
|
-
rate: number;
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
/** An incoming call we were ringing for was resolved on ANOTHER of our devices (multi-device): the caller dismissed this device with a `<terminate reason="accepted_elsewhere"|"rejected_elsewhere">`. Distinct from [`MissedCall`] (a genuinely unanswered call) so a consumer can render "answered on another device" instead of a missed call. Mirrors WA Web's AcceptedElsewhere / Rejected outcomes. */
|
|
214
|
-
export interface CallEndedElsewhere {
|
|
215
|
-
from: Jid;
|
|
216
|
-
/** The call id (from the `<offer>` action); distinct from the `<call>` stanza id. */
|
|
217
|
-
call_id: string;
|
|
218
|
-
timestamp: number;
|
|
219
|
-
outcome: ElsewhereOutcome;
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
/** Result of creating a reusable call link. */
|
|
223
|
-
export interface CallLink {
|
|
224
|
-
token: string;
|
|
225
|
-
media: CallLinkMedia;
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
/** Admission state returned after joining a reusable call link. */
|
|
229
|
-
export interface CallLinkJoin {
|
|
230
|
-
token: string;
|
|
231
|
-
media: CallLinkMedia;
|
|
232
|
-
call_id: string;
|
|
233
|
-
call_creator: Jid;
|
|
234
|
-
waiting_room_enabled: boolean;
|
|
235
|
-
in_waiting_room: boolean;
|
|
236
|
-
is_admin: boolean;
|
|
237
|
-
waiting_room?: WaitingRoom | null;
|
|
238
|
-
group?: GroupCallUpdate | null;
|
|
239
|
-
}
|
|
240
|
-
|
|
241
|
-
/** Audio/video mode of a reusable call link. */
|
|
242
|
-
export type CallLinkMedia = "audio" | "video";
|
|
243
|
-
|
|
244
|
-
/** Metadata returned without joining a reusable call link. */
|
|
245
|
-
export interface CallLinkPreview {
|
|
246
|
-
token: string;
|
|
247
|
-
media: CallLinkMedia;
|
|
248
|
-
creator: Jid;
|
|
249
|
-
creator_pn?: Jid | null;
|
|
250
|
-
waiting_room_enabled: boolean;
|
|
251
|
-
is_admin: boolean;
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
/** Identifies a specific message within a chat. */
|
|
255
|
-
export interface ChatMessageId {
|
|
256
|
-
chat: Jid;
|
|
257
|
-
id: string;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
export type ChatPresence = "composing" | "paused";
|
|
261
|
-
|
|
262
|
-
export type ChatPresenceMedia = "" | "audio";
|
|
263
|
-
|
|
264
|
-
export interface ChatPresenceUpdate {
|
|
265
|
-
source: MessageSource;
|
|
266
|
-
state: ChatPresence;
|
|
267
|
-
media: ChatPresenceMedia;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
/** Chat state type for typing indicators. */
|
|
271
|
-
export type ChatStateType = "composing" | "recording" | "paused";
|
|
272
|
-
|
|
273
|
-
/** A chat's messages were cleared (kept) on a linked device. */
|
|
274
|
-
export interface ClearChatUpdate {
|
|
275
|
-
/** The chat being cleared. */
|
|
276
|
-
jid: Jid;
|
|
277
|
-
/** From the index, not the proto — ClearChatAction only has messageRange. */
|
|
278
|
-
delete_starred: boolean;
|
|
279
|
-
/** From the index, not the proto. */
|
|
280
|
-
delete_media: boolean;
|
|
281
|
-
timestamp: number;
|
|
282
|
-
action: ClearChatAction;
|
|
283
|
-
from_full_sync: boolean;
|
|
284
|
-
}
|
|
285
|
-
|
|
286
|
-
export interface ClientOutdated {
|
|
287
|
-
/** The whole `<failure>` stanza, so no attribute is lost to a log line. */
|
|
288
|
-
raw?: any | null;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
export interface ConnectFailure {
|
|
292
|
-
reason: ConnectFailureReason;
|
|
293
|
-
/** The server's `message` attribute on the `<failure>` stanza, when present. */
|
|
294
|
-
message?: string | null;
|
|
295
|
-
raw?: any | null;
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
/** Wire codes: 400=Generic, 401=LoggedOut, 402=TempBanned, 403=AccountLocked, 406=UnknownLogout, 405=ClientOutdated, 409=BadUserAgent, 413=CatExpired, 414=CatInvalid, 415=NotFound, 418=ClientUnknown, 500=InternalServerError, 501=Experimental, 503=ServiceUnavailable */
|
|
299
|
-
export type ConnectFailureReason = number;
|
|
300
|
-
|
|
301
|
-
/** A contact changed their phone number. Emitted from `<notification type="contacts"><modify old="..." new="..." old_lid="..." new_lid="..."/>`. The library updates the global LID-PN cache when both `old_lid` and `new_lid` are present, mirroring `WAWebDBCreateLidPnMappings`. No Signal session is wiped (WA Web `WAWebHandleContactNotification` also leaves sessions intact). Group participant updates arrive via separate `w:gp2` notifications, so per-group caches are not touched here. Consumers can subscribe and refresh their own caches if needed. */
|
|
302
|
-
export interface ContactNumberChanged {
|
|
303
|
-
/** Old phone number JID. */
|
|
304
|
-
old_jid: Jid;
|
|
305
|
-
/** New phone number JID. */
|
|
306
|
-
new_jid: Jid;
|
|
307
|
-
/** Old LID (if provided by server). */
|
|
308
|
-
old_lid?: Jid | null;
|
|
309
|
-
/** New LID (if provided by server). */
|
|
310
|
-
new_lid?: Jid | null;
|
|
311
|
-
timestamp: number;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
/** Server requests a full contact re-sync. Emitted from `<notification type="contacts"><sync after="..."/>`. */
|
|
315
|
-
export interface ContactSyncRequested {
|
|
316
|
-
after?: number | null;
|
|
317
|
-
timestamp: number;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
export interface ContactUpdate {
|
|
321
|
-
/** The chat/contact this sync action applies to. */
|
|
322
|
-
jid: Jid;
|
|
323
|
-
timestamp: number;
|
|
324
|
-
action: ContactAction;
|
|
325
|
-
from_full_sync: boolean;
|
|
326
|
-
}
|
|
327
|
-
|
|
328
|
-
/** A contact's profile changed (server notification). Emitted from `<notification type="contacts"><update jid="..."/>`. WA Web resets cached presence and refreshes the profile picture on this event — consumers should invalidate any cached presence/profile data. Not to be confused with [`ContactUpdate`] which comes from app-state sync mutations (different source, different payload). */
|
|
329
|
-
export interface ContactUpdated {
|
|
330
|
-
/** The contact whose profile was updated. */
|
|
331
|
-
jid: Jid;
|
|
332
|
-
timestamp: number;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export type DayOfWeek = "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat" | string;
|
|
336
|
-
|
|
337
|
-
export type DecryptFailMode = "show" | "hide";
|
|
338
|
-
|
|
339
|
-
export interface DeleteChatUpdate {
|
|
340
|
-
/** The chat being deleted. */
|
|
341
|
-
jid: Jid;
|
|
342
|
-
/** From the index, not the proto — DeleteChatAction only has messageRange. */
|
|
343
|
-
delete_media: boolean;
|
|
344
|
-
timestamp: number;
|
|
345
|
-
action: DeleteChatAction;
|
|
346
|
-
from_full_sync: boolean;
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export interface DeleteMessageForMeUpdate {
|
|
350
|
-
/** The chat containing the deleted message. */
|
|
351
|
-
chat_jid: Jid;
|
|
352
|
-
participant_jid?: Jid | null;
|
|
353
|
-
message_id: string;
|
|
354
|
-
from_me: boolean;
|
|
355
|
-
timestamp: number;
|
|
356
|
-
action: DeleteMessageForMeAction;
|
|
357
|
-
from_full_sync: boolean;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
export interface Device {
|
|
361
|
-
pn?: Jid | null;
|
|
362
|
-
lid?: Jid | null;
|
|
363
|
-
registration_id: number;
|
|
364
|
-
noise_key: KeyPair;
|
|
365
|
-
identity_key: KeyPair;
|
|
366
|
-
signed_pre_key: KeyPair;
|
|
367
|
-
signed_pre_key_id: number;
|
|
368
|
-
signed_pre_key_signature: Uint8Array;
|
|
369
|
-
adv_secret_key: Uint8Array;
|
|
370
|
-
account?: ADVSignedDeviceIdentity | null;
|
|
371
|
-
push_name: string;
|
|
372
|
-
app_version_primary: number;
|
|
373
|
-
app_version_secondary: number;
|
|
374
|
-
app_version_tertiary: number;
|
|
375
|
-
app_version_last_fetched_ms: number | string;
|
|
376
|
-
/** Edge routing info received from server, used for optimized reconnection. When present, this should be sent as a pre-intro before the Noise handshake. */
|
|
377
|
-
edge_routing_info?: Uint8Array | null;
|
|
378
|
-
/** Hash from the last props (A/B experiment config) fetch. Sent on subsequent connects to enable delta updates instead of full fetches. */
|
|
379
|
-
props_hash?: string | null;
|
|
380
|
-
/** Monotonically increasing counter for one-time pre-key ID generation. Matches WhatsApp Web's `NEXT_PK_ID` pattern: only increases, never resets. Advances at GENERATION time (WA Web `savePreKeys`), so it covers every key that exists in the store, uploaded or not. */
|
|
381
|
-
next_pre_key_id: number;
|
|
382
|
-
/** Watermark of the first generated-but-not-yet-uploaded one-time prekey, matching WA Web's `FIRST_UNUPLOAD_PK_ID`. `next_pre_key_id - this` is the pool of leftover keys an upload re-offers before generating new ones. `0` = unset (legacy device); initialised on the first upload. */
|
|
383
|
-
first_unupload_pre_key_id: number;
|
|
384
|
-
/** Persisted flag matching WA Web's `signal_sever_has_pre_keys` metadata. */
|
|
385
|
-
server_has_prekeys: boolean;
|
|
386
|
-
/** NCT salt provisioned by the server via app state sync or history sync. */
|
|
387
|
-
nct_salt?: Uint8Array | null;
|
|
388
|
-
/** Server cert chain cached from the last successful XX (or XX-fallback) handshake. Enables Noise IK on the next connect by exposing `leaf.key` as the server's static public key, and lets us reject stale entries via `not_after` before even attempting IK. `None` forces XX on the next connect. */
|
|
389
|
-
server_cert_chain?: CachedServerCertChain | null;
|
|
390
|
-
/** Login counter sent as `ClientPayload.lc` on every login. WA Web's `WAWebUserPrefsGeneral.getLoginCounter()` reads (and bumps) this from localStorage on each connect; the server uses it as an anti-abuse signal. Persisted so it survives restarts. */
|
|
391
|
-
login_counter: number;
|
|
392
|
-
/** WA Web's `WAIsAccountLidFieldMigrated` pref: whether the account is 1:1-LID-migrated. Set from `ClientPairingProps.isChatDbLidMigrated` at pair time or when the primary pushes migration mappings. Gates outbound DM wire addressing (LID vs PN); the Signal session layer stays LID-first regardless, mirroring WAWebSignalAddress. Once set it never reverts, like the WA Web pref. */
|
|
393
|
-
lid_migrated: boolean;
|
|
394
|
-
/** Wall-clock ms of the last signed-pre-key rotation, driving WA Web's `RotateKeyJob` cadence. Fresh devices baseline off creation; devices persisted before this field existed deserialize to `0`, which the rotation path treats as "seed the baseline, don't rotate yet". */
|
|
395
|
-
last_signed_pre_key_rotation_ms: number | string;
|
|
396
|
-
/** true means the account's `readreceipts` privacy is `none`, so DM read/played receipts go out as `*-self` (which don't notify the sender). Persisted so the value is known on reconnect before the privacy fetch completes; `false` (WA default `all`) sends plain `read`/`played`. */
|
|
397
|
-
read_receipts_disabled: boolean;
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
/** Device element from notification. Wire format: ```xml <device jid="185169143189667:75@lid" key-index="2" lid="..."/> ``` Device ID is extracted from the JID's device part (e.g., 75 from "user:75@lid"). Per WhatsApp Web: if both `jid` and `lid` attributes are present, the device IDs must match or the notification is rejected. */
|
|
401
|
-
export interface DeviceElement {
|
|
402
|
-
/** Device JID (contains user and device ID) */
|
|
403
|
-
jid: Jid;
|
|
404
|
-
/** Optional key index */
|
|
405
|
-
key_index?: number | null;
|
|
406
|
-
/** Optional LID (device ID must match jid's device ID if present) */
|
|
407
|
-
lid?: Jid | null;
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
/** Device information for registry tracking. */
|
|
411
|
-
export interface DeviceInfo {
|
|
412
|
-
/** The device ID (0 = primary device, 1+ = companion devices) */
|
|
413
|
-
device_id: number;
|
|
414
|
-
/** The key index, if known */
|
|
415
|
-
key_index?: number | null;
|
|
416
|
-
/** Whether the device uses the hosted PN/LID address space. */
|
|
417
|
-
is_hosted: boolean;
|
|
418
|
-
}
|
|
419
|
-
|
|
420
|
-
/** Device list record matching WhatsApp Web's DeviceListRecord structure. */
|
|
421
|
-
export interface DeviceListRecord {
|
|
422
|
-
/** The user part of the JID (phone number or LID) */
|
|
423
|
-
user: string;
|
|
424
|
-
/** List of known devices for this user */
|
|
425
|
-
devices: DeviceInfo[];
|
|
426
|
-
/** Timestamp when this record was last updated */
|
|
427
|
-
timestamp: number | string;
|
|
428
|
-
/** Participant hash from usync, if available */
|
|
429
|
-
phash?: string | null;
|
|
430
|
-
/** ADV raw_id from `ADVKeyIndexList` — used to detect identity changes. When this changes, all sessions and sender keys for the user must be cleared. */
|
|
431
|
-
raw_id?: number | null;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
/** Device list update notification. Emitted when a user's device list changes (device added/removed/updated). */
|
|
435
|
-
export interface DeviceListUpdate {
|
|
436
|
-
/** The user whose device list changed (from attribute) */
|
|
437
|
-
user: Jid;
|
|
438
|
-
/** Optional LID user (for LID-PN mapping) */
|
|
439
|
-
lid_user?: Jid | null;
|
|
440
|
-
/** Type of update (add/remove/update) */
|
|
441
|
-
update_type: DeviceListUpdateType;
|
|
442
|
-
/** Affected devices with detailed info */
|
|
443
|
-
devices: DeviceNotificationInfo[];
|
|
444
|
-
/** Key index info (for add/remove) */
|
|
445
|
-
key_index?: KeyIndexInfo | null;
|
|
446
|
-
/** Contact hash (for update - used for contact lookup) */
|
|
447
|
-
contact_hash?: string | null;
|
|
448
|
-
}
|
|
449
|
-
|
|
450
|
-
/** Type of device list update notification. Matches WhatsApp Web's device notification types. */
|
|
451
|
-
export type DeviceListUpdateType = "add" | "remove" | "update";
|
|
452
|
-
|
|
453
|
-
/** Parsed device notification stanza. Wire format: ```xml <notification from="185169143189667@lid" id="..." t="..." type="devices" lid="..."> <remove> <device jid="185169143189667:75@lid"/> <key-index-list ts="1769296600"/> </remove> </notification> ``` Reference: WhatsApp Web `WAWebHandleDeviceNotification` parser (5Yec01dI04o.js:23125-23183) Per WhatsApp Web: Only ONE operation per notification is processed. Priority order: remove > add > update */
|
|
454
|
-
export interface DeviceNotification {
|
|
455
|
-
/** User JID (from attribute) */
|
|
456
|
-
from: Jid;
|
|
457
|
-
/** Optional LID user (for LID-PN mapping learning) */
|
|
458
|
-
lid_user?: Jid | null;
|
|
459
|
-
/** Stanza ID (for ACK) */
|
|
460
|
-
stanza_id: string;
|
|
461
|
-
/** Timestamp */
|
|
462
|
-
timestamp: number | string;
|
|
463
|
-
/** The operation (one per notification, priority: remove > add > update) */
|
|
464
|
-
operation: DeviceOperation;
|
|
465
|
-
}
|
|
466
|
-
|
|
467
|
-
/** Device information from notification. */
|
|
468
|
-
export interface DeviceNotificationInfo {
|
|
469
|
-
/** Device ID (extracted from JID) */
|
|
470
|
-
device_id: number;
|
|
471
|
-
/** Optional key index */
|
|
472
|
-
key_index?: number | null;
|
|
473
|
-
}
|
|
474
|
-
|
|
475
|
-
/** Device notification operation type. Wire format: Child element tag of `<notification type="devices">` - `<add>` - Device was added - `<remove>` - Device was removed - `<update>` - Device info updated (hash-based lookup) */
|
|
476
|
-
export type DeviceNotificationType = "add" | "remove" | "update";
|
|
477
|
-
|
|
478
|
-
/** Operation content (add/remove/update child element). Wire format per WhatsApp Web (5Yec01dI04o.js:23141-23180): ```xml <add> <device jid="user:75@lid" key-index="2"/> <key-index-list ts="...">SIGNED_BYTES</key-index-list> </add> <!-- OR --> <remove> <device jid="user:75@lid"/> <key-index-list ts="..."/> <!-- ts required for remove --> </remove> <!-- OR --> <update hash="CONTACT_HASH"/> ``` Note: WhatsApp Web does NOT read any attributes from add/remove nodes. The `device_hash` attribute (if present) is not used by the official client. */
|
|
479
|
-
export interface DeviceOperation {
|
|
480
|
-
/** Operation type (add/remove/update) */
|
|
481
|
-
operation_type: DeviceNotificationType;
|
|
482
|
-
/** Contact hash (for update only) - from `hash` attribute, used for contact lookup */
|
|
483
|
-
contact_hash?: string | null;
|
|
484
|
-
/** Device elements (for add/remove, single device per WhatsApp Web) */
|
|
485
|
-
devices: DeviceElement[];
|
|
486
|
-
/** Key index info (required for add/remove per WhatsApp Web) */
|
|
487
|
-
key_index?: KeyIndexInfo | null;
|
|
488
|
-
}
|
|
489
|
-
|
|
490
|
-
export interface DeviceSentMeta {
|
|
491
|
-
destination_jid: string;
|
|
492
|
-
phash: string;
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
/** A valid `<ib><dirty>` marker received from the server. The client still performs its built-in clean/resync work; this event lets consumers refresh domain-specific derived state without observing every raw stanza. */
|
|
496
|
-
export interface DirtyState {
|
|
497
|
-
dirty_type: DirtyType;
|
|
498
|
-
timestamp?: number | string | null;
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
export type DirtyType = "account_sync" | "groups" | "syncd_app_state" | "newsletter_metadata" | string;
|
|
502
|
-
|
|
503
|
-
export type DisallowedListAction = "add" | "remove";
|
|
504
|
-
|
|
505
|
-
/** A contact's default disappearing messages setting changed. Sent by the server as `<notification type="disappearing_mode">`. WA Web: `WAWebHandleDisappearingModeNotification` → `WAWebUpdateDisappearingModeForContact`. */
|
|
506
|
-
export interface DisappearingModeChanged {
|
|
507
|
-
/** The contact whose setting changed. */
|
|
508
|
-
from: Jid;
|
|
509
|
-
/** New duration in seconds (0 = disabled, 86400 = 24h, etc.). */
|
|
510
|
-
duration: number;
|
|
511
|
-
/** When the setting was changed. Consumers should only apply this if it's newer than their stored value. */
|
|
512
|
-
setting_timestamp: number;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
|
-
/** Why the transport connection ended. Lets a benign server-initiated stream recycle (a clean Close frame) be told apart from an abrupt EOF or a real read error when diagnosing reconnect behavior. Serialize: carried by `events::Disconnected`, whose payload consumers forward as JSON (webhooks, dashboards) — snake_case so the wire shape doesn't leak Rust variant naming. */
|
|
516
|
-
export type DisconnectReason =
|
|
517
|
-
| { "server_close": { code?: number | null; reason: string } }
|
|
518
|
-
| "stream_ended"
|
|
519
|
-
| { "read_error": string }
|
|
520
|
-
| "unknown";
|
|
521
|
-
|
|
522
|
-
export interface Disconnected {
|
|
523
|
-
/** Why the transport ended — lets consumers tell a routine server stream recycle (`reason.is_clean_shutdown()`) from a genuine transport failure without parsing logs. */
|
|
524
|
-
reason: DisconnectReason;
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
export type EditAttribute = "" | "1" | "2" | "3" | "7" | "8" | string;
|
|
528
|
-
|
|
529
|
-
/** Which terminal outcome another of our devices reached for a call we were ringing for. */
|
|
530
|
-
export type ElsewhereOutcome = "accepted" | "rejected";
|
|
531
|
-
|
|
532
|
-
/** Review state for an appeal on a suspended group. */
|
|
533
|
-
export type GroupAppealStatus = "approved" | "in_review" | "none" | "rejected";
|
|
534
|
-
|
|
535
|
-
/** One device in an authoritative group-call roster. */
|
|
536
|
-
export interface GroupCallDevice {
|
|
537
|
-
jid: Jid;
|
|
538
|
-
platform?: string | null;
|
|
539
|
-
pid?: number | null;
|
|
540
|
-
capability_version?: number | null;
|
|
541
|
-
}
|
|
542
|
-
|
|
543
|
-
/** One encrypted keygen-v2 epoch delivered to a participant device. */
|
|
544
|
-
export interface GroupCallEncRekey {
|
|
545
|
-
call_id: string;
|
|
546
|
-
call_creator: Jid;
|
|
547
|
-
transaction_id: number;
|
|
548
|
-
key_generation: number;
|
|
549
|
-
encryption_type: string;
|
|
550
|
-
encryption_version: number;
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
/** One user in an authoritative group-call roster. */
|
|
554
|
-
export interface GroupCallParticipant {
|
|
555
|
-
jid: Jid;
|
|
556
|
-
state?: string | null;
|
|
557
|
-
participant_type?: string | null;
|
|
558
|
-
devices: GroupCallDevice[];
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
/** Shared relay allocation embedded in a group snapshot. */
|
|
562
|
-
export interface GroupCallRelay {
|
|
563
|
-
transaction_id?: number | null;
|
|
564
|
-
self_pid?: number | null;
|
|
565
|
-
uuid: string;
|
|
566
|
-
participant_uuid: string;
|
|
567
|
-
attribute_padding: boolean;
|
|
568
|
-
warp_mi_tag_len?: number | null;
|
|
569
|
-
endpoints: GroupCallRelayEndpoint[];
|
|
570
|
-
}
|
|
571
|
-
|
|
572
|
-
/** One address advertised by the shared group relay. */
|
|
573
|
-
export interface GroupCallRelayEndpoint {
|
|
574
|
-
relay_id: number;
|
|
575
|
-
token_id: number;
|
|
576
|
-
auth_token_id: number;
|
|
577
|
-
relay_name: string;
|
|
578
|
-
domain_name?: string | null;
|
|
579
|
-
rtt_ms?: number | null;
|
|
580
|
-
is_fna: boolean;
|
|
581
|
-
ipv4?: string | null;
|
|
582
|
-
port?: number | null;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
/** One transaction-ordered authoritative group-call snapshot. */
|
|
586
|
-
export interface GroupCallUpdate {
|
|
587
|
-
call_id: string;
|
|
588
|
-
call_creator: Jid;
|
|
589
|
-
group_jid?: Jid | null;
|
|
590
|
-
transaction_id: number;
|
|
591
|
-
media: string;
|
|
592
|
-
connected_limit: number;
|
|
593
|
-
joinable: boolean;
|
|
594
|
-
av_upgradable: boolean;
|
|
595
|
-
rekey_requested: boolean;
|
|
596
|
-
participants: GroupCallParticipant[];
|
|
597
|
-
relay?: GroupCallRelay | null;
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
/** Delivery state for history shared with a newly joined participant. */
|
|
601
|
-
export type GroupHistorySentState = "HISTORY_NOT_SENT" | "HISTORY_SENT" | "NOTICE_SENT";
|
|
602
|
-
|
|
603
|
-
export interface GroupInfo {
|
|
604
|
-
participants: Jid[];
|
|
605
|
-
addressing_mode: AddressingMode;
|
|
606
|
-
/** Whether this group is a Community Announcement Group (WA Web `isCag`, derived from `default_sub_group`). `None` means the persisted blob predates the field, so the answer is unknown and callers must re-query. */
|
|
607
|
-
is_community_announce?: boolean | null;
|
|
608
|
-
/** Maps a LID user identifier (the `user` part of the LID JID) to the corresponding phone-number JID. This is used for device queries since LID usync requests may not work reliably. */
|
|
609
|
-
lid_to_pn_map: Record<string, Jid>;
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
/** All possible group notification action types. Maps 1:1 to `GROUP_NOTIFICATION_TAG` child element tags from WhatsApp Web. The `#[wire = "..."]` attribute is the SINGLE source of truth for each variant's wire tag: the JSON discriminator (via the auto-derived `Serialize`), the parser dispatch (via the auto-generated sibling `GroupNotificationActionTag` enum), and `wire_tag()` / `tag_name()` all read from the same table. */
|
|
613
|
-
export type GroupNotificationAction =
|
|
614
|
-
| { type: "add"; participants: GroupParticipantInfo[]; reason?: string | null }
|
|
615
|
-
| { type: "remove"; participants: GroupParticipantInfo[]; reason?: string | null }
|
|
616
|
-
| { type: "promote"; participants: GroupParticipantInfo[] }
|
|
617
|
-
| { type: "demote"; participants: GroupParticipantInfo[] }
|
|
618
|
-
| { type: "modify"; participants: GroupParticipantInfo[] }
|
|
619
|
-
| { type: "subject"; subject: string; subject_owner?: Jid | null; subject_time?: number | string | null }
|
|
620
|
-
| { type: "description"; id: string; description?: string | null }
|
|
621
|
-
| { type: "locked"; threshold?: string | null }
|
|
622
|
-
| { type: "unlocked" }
|
|
623
|
-
| { type: "announcement" }
|
|
624
|
-
| { type: "not_announcement" }
|
|
625
|
-
| { type: "ephemeral"; expiration: number; trigger?: number | null }
|
|
626
|
-
| { type: "membership_approval_mode"; enabled: boolean }
|
|
627
|
-
| { type: "membership_approval_request"; request_method: MembershipRequestMethod; parent_group_jid?: Jid | null }
|
|
628
|
-
| { type: "created_membership_requests"; request_method: MembershipRequestMethod; parent_group_jid?: Jid | null; requests: GroupParticipantInfo[] }
|
|
629
|
-
| { type: "revoked_membership_requests"; participants: Jid[] }
|
|
630
|
-
| { type: "member_add_mode"; mode: string }
|
|
631
|
-
| { type: "no_frequently_forwarded" }
|
|
632
|
-
| { type: "frequently_forwarded_ok" }
|
|
633
|
-
| { type: "invite"; code: string }
|
|
634
|
-
| { type: "revoke" }
|
|
635
|
-
| { type: "growth_locked"; expiration: number; lock_type: string }
|
|
636
|
-
| { type: "growth_unlocked" }
|
|
637
|
-
| { type: "create" }
|
|
638
|
-
| { type: "delete"; reason?: string | null }
|
|
639
|
-
| { type: "link"; link_type: string }
|
|
640
|
-
| { type: "unlink"; unlink_type: string; unlink_reason?: string | null }
|
|
641
|
-
| { type: "linked_group_promote"; participants: GroupParticipantInfo[] }
|
|
642
|
-
| { type: "linked_group_demote"; participants: GroupParticipantInfo[] }
|
|
643
|
-
| { type: "suspended" }
|
|
644
|
-
| { type: "unsuspended" }
|
|
645
|
-
| { type: "auto_add_disabled" }
|
|
646
|
-
| { type: "is_capi_hosted_group" }
|
|
647
|
-
| { type: "group_safety_check" }
|
|
648
|
-
| { type: "limit_sharing_enabled"; trigger?: number | null }
|
|
649
|
-
| { type: "allow_admin_reports" }
|
|
650
|
-
| { type: "not_allow_admin_reports" }
|
|
651
|
-
| { type: "reports" }
|
|
652
|
-
| { type: "allow_non_admin_sub_group_creation" }
|
|
653
|
-
| { type: "not_allow_non_admin_sub_group_creation" }
|
|
654
|
-
| { type: "created_sub_group_suggestion" }
|
|
655
|
-
| { type: "revoked_sub_group_suggestions" }
|
|
656
|
-
| { type: "change_number"; new_owner?: Jid | null; sub_group_suggestions: Jid[] }
|
|
657
|
-
| { type: string; tag: string };
|
|
658
|
-
|
|
659
|
-
/** Participant info extracted from `<participant>` child elements. Wire format: ```xml <participant jid="..." type="..." lid="..." phone_number="..." username="..." display_name="..." join_time="..."/> ``` `display_name` is the server-rendered label (e.g. `"+55∙∙∙∙∙∙∙∙∙79"` when the requester is not in the participant's contacts). `type` flags admin/superadmin tier; LID-addressed groups also carry `lid` and `username`. WA Web's `WAWebHandleGroupNotification` y() reads all of these into the participant model so the UI can render notifications and patch admin caches without resolving the contact locally. */
|
|
660
|
-
export interface GroupParticipantInfo {
|
|
661
|
-
jid: Jid;
|
|
662
|
-
phone_number?: Jid | null;
|
|
663
|
-
/** Server-provided display label for this participant. Only populated for `<participant>` children inside group notifications; `None` for `<requested_user>` (WA Web doesn't read it there either). */
|
|
664
|
-
display_name?: string | null;
|
|
665
|
-
/** Admin tier. Defaults to `Participant` when the attr is missing. */
|
|
666
|
-
type?: GroupParticipantType | null;
|
|
667
|
-
/** LID JID when this `<participant>` carries a separate `lid` attr. Distinct from `jid` which may already be a LID. */
|
|
668
|
-
lid?: Jid | null;
|
|
669
|
-
/** Username, gated by `WAWebUsernameGatingUtils`. Empty in classic PN-addressed groups. */
|
|
670
|
-
username?: string | null;
|
|
671
|
-
/** Unix seconds since the participant joined the group. Used by admin UI for tenure display. */
|
|
672
|
-
join_time?: number | string | null;
|
|
673
|
-
/** Delivery state for post-join group history. */
|
|
674
|
-
group_history_sent_state?: GroupHistorySentState | null;
|
|
675
|
-
}
|
|
676
|
-
|
|
677
|
-
/** Admin tier from `<participant type="...">`. Mirrors `GROUP_PARTICIPANT_TYPES` in `WAWebGroupApiConst`. */
|
|
678
|
-
export type GroupParticipantType = "participant" | "admin" | "superadmin";
|
|
679
|
-
|
|
680
|
-
/** Query request type. */
|
|
681
|
-
export type GroupQueryRequestType = "interactive";
|
|
682
|
-
|
|
683
|
-
/** Group update notification. Emitted for each action in a `<notification type="w:gp2">` stanza. A single notification may produce multiple `GroupUpdate` events (one per action). */
|
|
684
|
-
export interface GroupUpdate {
|
|
685
|
-
/** The group this update applies to */
|
|
686
|
-
group_jid: Jid;
|
|
687
|
-
/** Identifier of the source notification stanza. */
|
|
688
|
-
notification_id?: string | null;
|
|
689
|
-
/** Display name supplied with the source notification. */
|
|
690
|
-
notify?: string | null;
|
|
691
|
-
/** Raw offline-delivery marker supplied with the source notification. */
|
|
692
|
-
offline?: string | null;
|
|
693
|
-
/** Zero-based emitted-action index within the source notification. */
|
|
694
|
-
action_index: number;
|
|
695
|
-
/** The admin/user who triggered the change (`participant` attribute) */
|
|
696
|
-
participant?: Jid | null;
|
|
697
|
-
/** Phone number JID of the participant (for LID-addressed groups) */
|
|
698
|
-
participant_pn?: Jid | null;
|
|
699
|
-
/** Username of the participant, when supplied by the group notification. */
|
|
700
|
-
participant_username?: string | null;
|
|
701
|
-
/** Country code supplied for the participant by the server. */
|
|
702
|
-
participant_country_code?: string | null;
|
|
703
|
-
/** When the change occurred */
|
|
704
|
-
timestamp: number;
|
|
705
|
-
/** Whether the group uses LID addressing mode */
|
|
706
|
-
is_lid_addressing_mode: boolean;
|
|
707
|
-
/** Whether participant identity information was incomplete in the source stanza. */
|
|
708
|
-
has_incomplete_participant_information: boolean;
|
|
709
|
-
/** The specific action */
|
|
710
|
-
action: GroupNotificationAction;
|
|
711
|
-
}
|
|
712
|
-
|
|
713
|
-
export type HostType = "primary" | "fallback" | string;
|
|
714
|
-
|
|
715
|
-
/** Identity key changed for a user (e.g., user reinstalled WhatsApp). Emitted after device record cleanup so sessions and sender keys are cleared. */
|
|
716
|
-
export interface IdentityChange {
|
|
717
|
-
/** The user whose identity changed */
|
|
718
|
-
user: Jid;
|
|
719
|
-
/** Optional LID for the user */
|
|
720
|
-
lid_user?: Jid | null;
|
|
721
|
-
/** `true` when detected locally while saving a peer's new identity during decrypt (mirrors WA Web `saveIdentity` -> `handleNewIdentity`), `false` when triggered by the server's `<identity/>` notification. */
|
|
722
|
-
implicit: boolean;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
/** One decrypted inbound message. The same items (and order) back both consumer surfaces: the durability hook's batch and [`Event::Messages`]. */
|
|
726
|
-
export interface InboundMessage {
|
|
727
|
-
message: any;
|
|
728
|
-
info: MessageInfo;
|
|
729
|
-
}
|
|
730
|
-
|
|
731
|
-
export interface IncomingCall {
|
|
732
|
-
from: Jid;
|
|
733
|
-
/** Stanza id; distinct from `CallAction::call_id`. */
|
|
734
|
-
stanza_id: string;
|
|
735
|
-
notify?: string | null;
|
|
736
|
-
platform?: string | null;
|
|
737
|
-
version?: string | null;
|
|
738
|
-
/** Companion-routing metadata copied from the outer `<call>` wrapper. */
|
|
739
|
-
participant?: Jid | null;
|
|
740
|
-
/** Companion recipient metadata copied from the outer `<call>` wrapper. */
|
|
741
|
-
recipient?: Jid | null;
|
|
742
|
-
timestamp: number;
|
|
743
|
-
offline: boolean;
|
|
744
|
-
action: CallAction;
|
|
745
|
-
/** Group snapshot embedded in an initial offer or active-call invitation. */
|
|
746
|
-
group?: GroupCallUpdate | null;
|
|
747
|
-
}
|
|
748
|
-
|
|
749
|
-
/** IQ request type for WhatsApp protocol queries. */
|
|
750
|
-
export type InfoQueryType = "set" | "get";
|
|
751
|
-
|
|
752
|
-
/** Key index information from `<key-index-list>` element. Wire format: ```xml <!-- For add: has signed bytes content --> <key-index-list ts="1769296600">SIGNED_BYTES</key-index-list> <!-- For remove: empty, ts required --> <key-index-list ts="1769296600"/> ``` Required for add/remove operations per WhatsApp Web. */
|
|
753
|
-
export interface KeyIndexInfo {
|
|
754
|
-
/** Timestamp (required for remove per WhatsApp Web) */
|
|
755
|
-
timestamp: number | string;
|
|
756
|
-
/** Signed key index bytes (only present for add) */
|
|
757
|
-
signed_bytes?: Uint8Array | null;
|
|
758
|
-
}
|
|
759
|
-
|
|
760
|
-
/** A label was associated with or removed from a chat on a linked device. `action.labeled == Some(true)` means the label was added to the chat. */
|
|
761
|
-
export interface LabelAssociationUpdate {
|
|
762
|
-
/** The label identifier. */
|
|
763
|
-
label_id: string;
|
|
764
|
-
/** The chat the label was associated with or removed from. */
|
|
765
|
-
chat_jid: Jid;
|
|
766
|
-
timestamp: number;
|
|
767
|
-
action: LabelAssociationAction;
|
|
768
|
-
from_full_sync: boolean;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
/** A label was created, renamed/recolored, or deleted on a linked device. `action.deleted == Some(true)` means the label was removed. */
|
|
772
|
-
export interface LabelEditUpdate {
|
|
773
|
-
/** The label identifier (the index key, not a JID). */
|
|
774
|
-
label_id: string;
|
|
775
|
-
timestamp: number;
|
|
776
|
-
action: LabelEditAction;
|
|
777
|
-
from_full_sync: boolean;
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
/** The source from which a LID-PN mapping was learned. The source is load-bearing, not just provenance: it selects the write policy applied when the pair reaches the cache — see `lid_pn_write_policy` in the `whatsapp-rust` client, which mirrors WhatsApp Web's `createLidPnMappings` `switch (learningSource)`. Directed sources overwrite on any change; observational bulk sources (`Other` and friends, WA Web `"other"`) only seed new LIDs and re-resolve conflicts via a live query; known-stale sources are stamped `created_at = 0` so they never outrank a fresher mapping for the same phone (the PN→LID resolution direction; the LID→PN reverse map always takes the latest write). */
|
|
781
|
-
export type LearningSource = "usync" | "peer_pn_message" | "peer_lid_message" | "recipient_latest_lid" | "migration_sync_latest" | "migration_sync_old" | "blocklist_active" | "blocklist_inactive" | "pairing" | "device_notification" | "other";
|
|
782
|
-
|
|
783
|
-
/** An entry in the LID-PN cache containing the full mapping information. */
|
|
784
|
-
export interface LidPnEntry {
|
|
785
|
-
/** The LID user part (e.g., "100000012345678"). `Arc<str>`: the cache stores each mapping under both directions, so the identifier strings are shared between the entry and the cache keys instead of re-allocated per copy (this cache is unbounded by design). */
|
|
786
|
-
lid: string;
|
|
787
|
-
/** The phone number user part (e.g., "559980000001") */
|
|
788
|
-
phone_number: string;
|
|
789
|
-
/** Unix timestamp when the mapping was first learned */
|
|
790
|
-
created_at: number | string;
|
|
791
|
-
/** The source from which this mapping was learned */
|
|
792
|
-
learning_source: LearningSource;
|
|
793
|
-
}
|
|
794
|
-
|
|
795
|
-
/** Entry representing a LID to Phone Number mapping. */
|
|
796
|
-
export interface LidPnMappingEntry {
|
|
797
|
-
/** The LID user part (e.g., "100000012345678") */
|
|
798
|
-
lid: string;
|
|
799
|
-
/** The phone number user part (e.g., "559980000001") */
|
|
800
|
-
phone_number: string;
|
|
801
|
-
/** Unix timestamp when the mapping was first learned */
|
|
802
|
-
created_at: number | string;
|
|
803
|
-
/** Unix timestamp when the mapping was last updated */
|
|
804
|
-
updated_at: number | string;
|
|
805
|
-
/** The source from which this mapping was learned (e.g., "usync", "peer_pn_message") */
|
|
806
|
-
learning_source: string;
|
|
807
|
-
}
|
|
808
|
-
|
|
809
|
-
export interface LoggedOut {
|
|
810
|
-
on_connect: boolean;
|
|
811
|
-
reason: ConnectFailureReason;
|
|
812
|
-
/** Server-supplied logout copy, when it sent any. Present in practice on [`ConnectFailureReason::AccountLocked`]. */
|
|
813
|
-
logout_message?: LogoutMessage | null;
|
|
814
|
-
/** The whole stanza that caused the logout, when one did. Two shapes reach here, so dispatch on `raw.tag` rather than assuming one: `<failure>` for a server-side refusal (`on_connect` is then true), and `<stream:error>` for a `<conflict>`, a 516 device removal or a 401. `None` when nothing was received at all — a locally initiated logout has no stanza to report. A forced logout is where the server puts data it will never repeat: an account lock carries a one-time `appeal_token` plus `violation_reason` and `vt`, which WA Web ignores (its own appeal flow is native) but which an embedder cannot recover once the stanza is gone. Parsing policy stays with the consumer — `violation_reason` is not a closed set — but the bytes have to survive the dispatch. */
|
|
815
|
-
raw?: any | null;
|
|
816
|
-
}
|
|
817
|
-
|
|
818
|
-
/** Localized text the server wants shown when it forces a logout, from `logout_message_header` / `logout_message_subtext` on `<failure>`. `locale` is what makes the text safe to render: WA Web (`WAWebHandleFailure`) shows the header/subtext only when the locale equals the client's current one, and otherwise falls back to its own generic copy. It travels with the text so a consumer can apply the same rule. */
|
|
819
|
-
export interface LogoutMessage {
|
|
820
|
-
header?: string | null;
|
|
821
|
-
subtext?: string | null;
|
|
822
|
-
/** e.g. `"pt_BR"`. Compare against the consumer's locale before rendering. */
|
|
823
|
-
locale?: string | null;
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
export interface MarkChatAsReadUpdate {
|
|
827
|
-
/** The chat being marked as read or unread. */
|
|
828
|
-
jid: Jid;
|
|
829
|
-
timestamp: number;
|
|
830
|
-
action: MarkChatAsReadAction;
|
|
831
|
-
from_full_sync: boolean;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
/** Member link mode for group invite links. */
|
|
835
|
-
export type MemberLinkMode = "admin_link" | "all_member_link";
|
|
836
|
-
|
|
837
|
-
/** Who can share message history with new members. */
|
|
838
|
-
export type MemberShareHistoryMode = "admin_share" | "all_member_share";
|
|
839
|
-
|
|
840
|
-
/** How a membership request was initiated. Maps to `WAWebRequestMethodType` in WhatsApp Web JS. */
|
|
841
|
-
export type MembershipRequestMethod = "invite_link" | "linked_group_join" | "non_admin_add";
|
|
842
|
-
|
|
843
|
-
/** Payload of [`Event::Messages`]: the decrypted messages of one durable commit, in arrival order. Behaves as a collection of its messages — `for msg in &batch`, `batch.iter()`, `batch.len()` — with `origin` carrying the delivery shape alongside. */
|
|
844
|
-
export interface MessageBatch {
|
|
845
|
-
messages: InboundMessage[];
|
|
846
|
-
origin: BatchOrigin;
|
|
847
|
-
/** Whether an inbound durability hook already committed these messages before this event was dispatched. Orthogonal to [`origin`](Self::origin), which describes delivery shape: a hook commits live batches and drain batches alike. What this answers is whether the consumer's own durable copy already exists, so a materializer that the hook feeds can skip the batch instead of rewriting every row (and re-firing every invalidation) a second time. `false` for the producers that dispatch `Event::Messages` while deliberately bypassing the commit pipeline — newsletters and PDO-recovered messages — because for those the materialization on this event is the only one there is. */
|
|
848
|
-
hook_committed: boolean;
|
|
849
|
-
}
|
|
850
|
-
|
|
851
|
-
export type MessageCategory = "" | "peer" | string;
|
|
852
|
-
|
|
853
|
-
export interface MessageInfo {
|
|
854
|
-
source: MessageSource;
|
|
855
|
-
id: string;
|
|
856
|
-
server_id: number;
|
|
857
|
-
type: string;
|
|
858
|
-
push_name: string;
|
|
859
|
-
timestamp: number;
|
|
860
|
-
category: MessageCategory;
|
|
861
|
-
multicast: boolean;
|
|
862
|
-
media_type: string;
|
|
863
|
-
edit: EditAttribute;
|
|
864
|
-
bot_info?: MsgBotInfo | null;
|
|
865
|
-
meta_info: MsgMetaInfo;
|
|
866
|
-
/** Decoded `<verified_name>` child cert of business senders; the display name is in `.name`. Boxed: most messages carry none. */
|
|
867
|
-
verified_name?: VerifiedName | null;
|
|
868
|
-
device_sent_meta?: DeviceSentMeta | null;
|
|
869
|
-
/** Ephemeral duration in seconds, extracted from `contextInfo.expiration`. */
|
|
870
|
-
ephemeral_expiration?: number | null;
|
|
871
|
-
/** Whether this message was delivered during offline sync. */
|
|
872
|
-
is_offline: boolean;
|
|
873
|
-
/** Set when this message was recovered via PDO rather than normal decryption. Contains the PDO request message ID. */
|
|
874
|
-
unavailable_request_id?: string | null;
|
|
875
|
-
/** Server-store timestamp in microseconds (envelope `sts` attr). Used by WA Web for read-self watermark ordering across companion devices. */
|
|
876
|
-
server_timestamp_us?: number | string | null;
|
|
877
|
-
/** Envelope `verified_level` attr (e.g. "unknown"/"low"/"high"). For business messages this is the server-asserted verification tier; for regular messages it is absent. */
|
|
878
|
-
verified_level?: string | null;
|
|
879
|
-
/** Envelope `verified_name` int attr (business name certificate serial). Separate from the `verified_name` child cert bytes already on this struct. */
|
|
880
|
-
verified_name_serial?: number | string | null;
|
|
881
|
-
/** Envelope `peer_recipient_pn` attr. Present on companion-device self-synced DM stanzas to identify the peer's PN (so the receipt goes to the right routing target). */
|
|
882
|
-
peer_recipient_pn?: Jid | null;
|
|
883
|
-
/** Parent post key when the dispatched message is a decrypted CAG channel comment (`enc_comment_message`). The inner `Message` proto has no slot for the threading link, so it surfaces here. */
|
|
884
|
-
comment_target?: MessageKey | null;
|
|
885
|
-
/** Broadcast-contact-list recipients from `<participants><to jid>` on an incoming broadcast/status stanza. Populated only for broadcasts; used to validate a `deviceSentMessage.phash` (WA Web `validateBclHash`). Empty otherwise. */
|
|
886
|
-
bcl_participants: Jid[];
|
|
887
|
-
}
|
|
888
|
-
|
|
889
|
-
export interface MessageSource {
|
|
890
|
-
chat: Jid;
|
|
891
|
-
sender: Jid;
|
|
892
|
-
is_from_me: boolean;
|
|
893
|
-
is_group: boolean;
|
|
894
|
-
addressing_mode?: AddressingMode | null;
|
|
895
|
-
sender_alt?: Jid | null;
|
|
896
|
-
recipient_alt?: Jid | null;
|
|
897
|
-
broadcast_list_owner?: Jid | null;
|
|
898
|
-
recipient?: Jid | null;
|
|
899
|
-
}
|
|
900
|
-
|
|
901
|
-
/** MEX GraphQL error extensions. */
|
|
902
|
-
export interface MexErrorExtensions {
|
|
903
|
-
error_code?: number | null;
|
|
904
|
-
is_summary?: boolean | null;
|
|
905
|
-
is_retryable?: boolean | null;
|
|
906
|
-
severity?: string | null;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
/** MEX GraphQL error. */
|
|
910
|
-
export interface MexGraphQLError {
|
|
911
|
-
message: string;
|
|
912
|
-
extensions?: MexErrorExtensions | null;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
/** `payload` shape depends on `op_name`. `offline` mirrors the raw string the server sets when replaying backlog (often a timestamp); presence alone signals backlog vs live. */
|
|
916
|
-
export interface MexNotification {
|
|
917
|
-
op_name: string;
|
|
918
|
-
from?: Jid | null;
|
|
919
|
-
stanza_id?: string | null;
|
|
920
|
-
offline?: string | null;
|
|
921
|
-
payload: Value;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
/** MEX GraphQL response. */
|
|
925
|
-
export interface MexResponse {
|
|
926
|
-
data?: Value | null;
|
|
927
|
-
errors?: MexGraphQLError[] | null;
|
|
928
|
-
}
|
|
929
|
-
|
|
930
|
-
/** A call that must NOT ring: surfaced instead of [`IncomingCall`] so a consumer cannot auto-accept it. Currently this is an offer the server replayed from the offline queue on reconnect (the `<call>` carried the `offline` attribute) -- the call is long dead (no relay, not connectable). Mirrors WA Web's `cancel_call` + `missed_call` path for `offerReceivedWhileOffline`. */
|
|
931
|
-
export interface MissedCall {
|
|
932
|
-
from: Jid;
|
|
933
|
-
/** The call id (from the `<offer>` action); distinct from the `<call>` stanza id. */
|
|
934
|
-
call_id: string;
|
|
935
|
-
timestamp: number;
|
|
936
|
-
reason: MissedReason;
|
|
937
|
-
}
|
|
938
|
-
|
|
939
|
-
/** Why a call surfaced as missed rather than ringing. */
|
|
940
|
-
export type MissedReason = "offline" | "remote";
|
|
941
|
-
|
|
942
|
-
export interface MsgBotInfo {
|
|
943
|
-
edit_type?: BotEditType | null;
|
|
944
|
-
edit_target_id?: string | null;
|
|
945
|
-
edit_sender_timestamp_ms?: number | null;
|
|
946
|
-
}
|
|
947
|
-
|
|
948
|
-
export interface MsgMetaInfo {
|
|
949
|
-
target_id?: string | null;
|
|
950
|
-
target_sender?: Jid | null;
|
|
951
|
-
/** `<meta target_chat_jid="…">` — present when the bot reply addresses a chat distinct from the stanza-level `from` (used for msmsg secret lookup; see WA Web `decryptMsmsgBotMessage`). */
|
|
952
|
-
target_chat?: Jid | null;
|
|
953
|
-
deprecated_lid_session?: boolean | null;
|
|
954
|
-
thread_message_id?: string | null;
|
|
955
|
-
thread_message_sender_jid?: Jid | null;
|
|
956
|
-
/** `<meta content_type=...>` attr. Server marks reactions/edits as `"add_on"`; mirrors `WAWebHandleMsgParser` b()'s metadata read. */
|
|
957
|
-
content_type?: string | null;
|
|
958
|
-
/** `<meta appdata=...>` attr. `"default"` is the only observed value. */
|
|
959
|
-
appdata?: string | null;
|
|
960
|
-
/** `<reporting><reporting_tag>` content bytes (16 or 20). Pre-requisite for the server-side report-abuse flow. */
|
|
961
|
-
reporting_tag?: Uint8Array | null;
|
|
962
|
-
/** `<reporting><reporting_token>` content bytes (16). Pre-requisite for the server-side report-abuse flow. */
|
|
963
|
-
reporting_token?: Uint8Array | null;
|
|
964
|
-
/** `v` attr on `<reporting_token>`. WA Web defaults to 1 when missing. */
|
|
965
|
-
reporting_token_version?: number | string | null;
|
|
966
|
-
}
|
|
967
|
-
|
|
968
|
-
/** Message-secret write entry keyed by chat, sender, and message ID. */
|
|
969
|
-
export interface MsgSecretEntry {
|
|
970
|
-
/** Canonical non-AD chat JID. Shared across entries from the same history conversation instead of allocating one identical string per message. */
|
|
971
|
-
chat: string;
|
|
972
|
-
/** Canonical non-AD sender JID. Often aliases `chat` for direct messages. */
|
|
973
|
-
sender: string;
|
|
974
|
-
/** Message identifier. `Arc<str>` keeps entry clones used by buffered persistence cheap without changing the serialized representation. */
|
|
975
|
-
msg_id: string;
|
|
976
|
-
secret: MessageSecret;
|
|
977
|
-
/** Absolute unix-seconds retention deadline. `0` means never expire. Computed by the caller from the parent message's event time plus a per-add-on-kind horizon (see `MsgSecretRetention`). The store prunes rows whose deadline has passed; it does not know the horizon itself. */
|
|
978
|
-
expires_at: number | string;
|
|
979
|
-
/** Parent message event time (unix seconds), or `0` when unknown. Kept so the receive path can enforce the edit-processing window (`editTs < message_ts + window`) the same way WhatsApp Web does. */
|
|
980
|
-
message_ts: number | string;
|
|
981
|
-
}
|
|
982
|
-
|
|
983
|
-
export interface MuteUpdate {
|
|
984
|
-
/** The chat being muted or unmuted. */
|
|
985
|
-
jid: Jid;
|
|
986
|
-
timestamp: number;
|
|
987
|
-
action: MuteAction;
|
|
988
|
-
from_full_sync: boolean;
|
|
989
|
-
}
|
|
990
|
-
|
|
991
|
-
/** Wire codes: 421=StaleGroupAddressingMode, 475=NewChatMessagesCapped, 487=ParsingError, 488=UnrecognizedStanza, 489=UnrecognizedStanzaClass, 490=UnrecognizedStanzaType, 491=InvalidProtobuf, 493=InvalidHostedCompanionStanza, 495=MissingMessageSecret, 496=SignalErrorOldCounter, 499=MessageDeletedOnPeer, 500=UnhandledError, 550=UnsupportedAdminRevoke, 551=UnsupportedLIDGroup, 552=DBOperationFailed */
|
|
992
|
-
export type NackReason = number;
|
|
993
|
-
|
|
994
|
-
/** A newsletter live update notification, typically containing updated reaction counts for one or more messages. */
|
|
995
|
-
export interface NewsletterLiveUpdate {
|
|
996
|
-
/** The newsletter channel this update belongs to. */
|
|
997
|
-
newsletter_jid: Jid;
|
|
998
|
-
messages: NewsletterLiveUpdateMessage[];
|
|
999
|
-
}
|
|
1000
|
-
|
|
1001
|
-
/** A single message entry in a newsletter live update. */
|
|
1002
|
-
export interface NewsletterLiveUpdateMessage {
|
|
1003
|
-
server_id: number | string;
|
|
1004
|
-
reactions: NewsletterLiveUpdateReaction[];
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
/** A reaction count in a newsletter live update. */
|
|
1008
|
-
export interface NewsletterLiveUpdateReaction {
|
|
1009
|
-
code: string;
|
|
1010
|
-
count: number | string;
|
|
1011
|
-
}
|
|
1012
|
-
|
|
1013
|
-
export type NewsletterMessageType = "text" | "media" | "reaction" | "revoke" | "poll_creation" | "poll_vote" | "edit" | string;
|
|
1014
|
-
|
|
1015
|
-
export interface OfflineSyncCompleted {
|
|
1016
|
-
count: number;
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
/** `total` is authoritative; the per-kind counts need not sum to it. */
|
|
1020
|
-
export interface OfflineSyncPreview {
|
|
1021
|
-
total: number;
|
|
1022
|
-
app_data_changes: number;
|
|
1023
|
-
messages: number;
|
|
1024
|
-
notifications: number;
|
|
1025
|
-
receipts: number;
|
|
1026
|
-
calls: number;
|
|
1027
|
-
statuses: number;
|
|
1028
|
-
}
|
|
1029
|
-
|
|
1030
|
-
/** How the server refused a pair-code request, as a matchable status. The five named variants are the complete set WA Web's own response parser accepts (`WASmaxInMdIqMixinErrors.parseIqMixinErrors`, reached from `WASmaxInMdCompanionHelloResponseError`); anything else makes its RPC throw "unknown error". They exist so a consumer can branch on the refusal instead of matching the formatted message, which is not a stable surface. Both stages report through this, though they were read off `companion_hello` and the `companion_finish` parser is narrower — `WASmaxInMdCompanionFinishErrors` admits only `bad-request` and `internal-server-error`, and WA Web shows its generic failure for anything else. A code outside that pair is still classified here rather than discarded: what a consumer does about a refusal follows from the code, which is one namespace across both requests, and answering "nothing was refused" to a refusal we can read would be worse than naming it. The numbers are the `code` attribute, and each is the enum's whole wire form — [`code()`](Self::code) is what `Serialize` emits and what `From<i32>` reads back. WA Web pairs each code with a literal `text` (`429`/`rate-overlimit`, `452`/`feature-not-available`, …) and rejects a response whose two disagree, so construct these through [`from_server`](Self::from_server) rather than from a code alone: it is the only constructor that sees both attributes, and the only one that can decline to classify. WA Web branches on exactly two of them (`DevicePhoneNumberCodeScreen`, on `CompanionHelloError.type.name`): [`RateOverlimit`](Self::RateOverlimit) becomes "too many attempts, try again later" and [`FeatureNotAvailable`](Self::FeatureNotAvailable) becomes "not available to you yet, link with QR code instead". The rest share a generic "try again or link with the QR code". In every case it resets the linking flow and waits for the person to act — it never retries on its own, and never reads the `backoff` hint, so treat that value as the server's advice rather than a schedule WA Web is known to follow. Wire codes: 400=BadRequest, 403=Forbidden, 429=RateOverlimit, 452=FeatureNotAvailable, 500=InternalServerError */
|
|
1031
|
-
export type PairCodeRejection = number;
|
|
1032
|
-
|
|
1033
|
-
export interface PairError {
|
|
1034
|
-
id: Jid;
|
|
1035
|
-
lid: Jid;
|
|
1036
|
-
business_name: string;
|
|
1037
|
-
platform: string;
|
|
1038
|
-
error: string;
|
|
1039
|
-
}
|
|
1040
|
-
|
|
1041
|
-
/** Payload for [`Event::PairPasskeyConfirmation`]. */
|
|
1042
|
-
export interface PairPasskeyConfirmation {
|
|
1043
|
-
code: string;
|
|
1044
|
-
skip_handoff_ux: boolean;
|
|
1045
|
-
}
|
|
1046
|
-
|
|
1047
|
-
/** Payload for [`Event::PairPasskeyError`]. */
|
|
1048
|
-
export interface PairPasskeyError {
|
|
1049
|
-
error: string;
|
|
1050
|
-
continuation: boolean;
|
|
1051
|
-
}
|
|
1052
|
-
|
|
1053
|
-
/** Payload for [`Event::PairPasskeyRequest`]. */
|
|
1054
|
-
export interface PairPasskeyRequest {
|
|
1055
|
-
/** Verbatim `PublicKeyCredentialRequestOptions` JSON from the server. Pass it straight to a WebAuthn `get` (e.g. Android Credential Manager), or parse it with `whatsapp_rust::passkey::parse_request_options`. */
|
|
1056
|
-
request_options_json: string;
|
|
1057
|
-
}
|
|
1058
|
-
|
|
1059
|
-
export interface PairSuccess {
|
|
1060
|
-
id: Jid;
|
|
1061
|
-
lid: Jid;
|
|
1062
|
-
business_name: string;
|
|
1063
|
-
platform: string;
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
/** Generated pair code for phone number linking. User should enter this code on their phone in WhatsApp > Linked Devices. */
|
|
1067
|
-
export interface PairingCode {
|
|
1068
|
-
/** The 8-character pairing code to display. */
|
|
1069
|
-
code: string;
|
|
1070
|
-
/** Approximate validity duration (~180 seconds). */
|
|
1071
|
-
timeout: number;
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
/** A phone-number pair-code flow failed, so no linking will come of it. The counterpart to [`PairingCode`] on the failure path, and the only surface that reports it when pairing is driven by `BotBuilder::with_pair_code` — that request runs in a detached task, so nothing returns its error to the caller. `Client::pair_with_code` dispatches this in addition to returning `Err`, matching how the success path both returns the code and emits [`PairingCode`]. Both of the flow's server round trips report here, and the consumer's move is the same either way — this code is finished, request another or fall back to the QR. The later one arrives after a code was already displayed and entered: the phone answered, but the server refused the key bundle that answer produced. Silence at that stage is not this event, because nothing was refused; it surfaces as [`PairingCodeRefresh`] once the timer runs out. Fires for every failure, including local validation (a phone number that is too short never reaches the server): a consumer waiting on a code needs to learn that it is not coming, whatever the reason. [`rejection`](Self::rejection) is what distinguishes the two — `None` means the request never got an answer from the server. A claim the failed request itself took is released before this fires, so nothing is left holding the flow and `pair_with_code` can be called again. Two failures do **not** arrive here, because for them a code may still be on its way and this event would say the opposite — a consumer acting on it would tear down a code that is about to arrive: - `CodeAlreadyOutstanding` — refused precisely because an earlier code is still live, and the consumer already has it from the [`PairingCode`] that minted it. Retrying is futile until `cancel_pair_code` runs or the window closes. - `Cancelled` — the caller withdrew this request, and a replacement may already own the slot. A superseded request can return this *after* its replacement started, so the event would be uncorrelated with the flow that is actually running. Both follow from something the caller did, so neither is news, and a direct caller still gets the `Err`. Whether to retry at all is the point of the fields: back off on [`PairCodeRejection::is_throttled`](crate::pair_code::PairCodeRejection::is_throttled), stop on [`PairCodeRejection::FeatureNotAvailable`](crate::pair_code::PairCodeRejection::FeatureNotAvailable). */
|
|
1075
|
-
export interface PairingCodeError {
|
|
1076
|
-
/** The server's refusal, when it answered with one. `None` when the failure was local (validation, no connection) or the request went unanswered (timeout) — nothing was refused, so there is no status to report. */
|
|
1077
|
-
rejection?: PairCodeRejection | null;
|
|
1078
|
-
/** How long the server asked the client to wait, from the `backoff` attribute. Usually absent — WA Web does not read it on this path — but when present it is the server naming its own retry delay, which beats any interval the consumer would pick. */
|
|
1079
|
-
backoff?: number | null;
|
|
1080
|
-
/** The failure rendered for logs. Do not branch on it; use [`rejection`](Self::rejection). */
|
|
1081
|
-
error: string;
|
|
1082
|
-
}
|
|
1083
|
-
|
|
1084
|
-
/** The in-progress phone-number pairing code should be replaced. Emitted for the two cases WA Web regenerates on (`Alt/DeviceLinkingApi.js` + `Link/DevicePhoneNumberCodeScreen.react.js`): the server asking for it (`refreshAltLinkingCode` / `forceManualRefresh`, ref-gated against the outstanding flow), and a `companion_finish` that went unanswered for a minute — a primary that could not open the key bundle just goes quiet, so silence is the only signal there is. The outstanding flow is cleared before this fires, so the consumer can call `pair_with_code` straight away. The previous code is no longer valid. */
|
|
1085
|
-
export interface PairingCodeRefresh {
|
|
1086
|
-
/** `true` when the server set `force_manual_refresh` — the code must be re-requested explicitly rather than auto-rotated. */
|
|
1087
|
-
force_manual: boolean;
|
|
1088
|
-
}
|
|
1089
|
-
|
|
1090
|
-
/** A QR code the consumer renders during multi-device pairing. */
|
|
1091
|
-
export interface PairingQrCode {
|
|
1092
|
-
/** The QR payload to render. */
|
|
1093
|
-
code: string;
|
|
1094
|
-
/** How long this code stays valid before the next one rotates in. */
|
|
1095
|
-
timeout: number;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
/** The server's `<pair-device>` refs are used up: there is no QR left to render until the connection is re-established. WA Web's rotation timer (`Handle/PairDevice.js`) reports `UNPAIRED_IDLE` here and stops — it does not close the socket, because an alt-linking (phone-number) flow may still be riding the same connection. */
|
|
1099
|
-
export interface PairingQrCodesExhausted {
|
|
1100
|
-
/** `true` when the client closed the connection itself, which it only does with no pair-code flow outstanding. `false` means the socket was left up and reconnecting is the consumer's call. */
|
|
1101
|
-
disconnected: boolean;
|
|
1102
|
-
}
|
|
1103
|
-
|
|
1104
|
-
/** Participant type (admin level). */
|
|
1105
|
-
export type ParticipantType = "member" | "admin" | "superadmin";
|
|
1106
|
-
|
|
1107
|
-
export interface PictureUpdate {
|
|
1108
|
-
/** The JID whose picture changed (user or group). */
|
|
1109
|
-
jid: Jid;
|
|
1110
|
-
/** The user who made the change. Present for group picture changes (the admin who changed it). `None` for personal picture updates. */
|
|
1111
|
-
author?: Jid | null;
|
|
1112
|
-
timestamp: number;
|
|
1113
|
-
/** Whether the picture was removed (true) or set/updated (false). */
|
|
1114
|
-
removed: boolean;
|
|
1115
|
-
/** The server-assigned picture ID (from `<set id="..."/>`). `None` for deletions. */
|
|
1116
|
-
picture_id?: string | null;
|
|
1117
|
-
}
|
|
1118
|
-
|
|
1119
|
-
export interface PinUpdate {
|
|
1120
|
-
/** The chat being pinned or unpinned. */
|
|
1121
|
-
jid: Jid;
|
|
1122
|
-
timestamp: number;
|
|
1123
|
-
action: PinAction;
|
|
1124
|
-
from_full_sync: boolean;
|
|
1125
|
-
}
|
|
1126
|
-
|
|
1127
|
-
export type PreKeyFetchReason = "identity" | "retry" | string;
|
|
1128
|
-
|
|
1129
|
-
export type Presence = "available" | "unavailable";
|
|
1130
|
-
|
|
1131
|
-
export interface PresenceUpdate {
|
|
1132
|
-
/** The contact whose presence changed. */
|
|
1133
|
-
from: Jid;
|
|
1134
|
-
unavailable: boolean;
|
|
1135
|
-
last_seen?: number | null;
|
|
1136
|
-
}
|
|
1137
|
-
|
|
1138
|
-
export type PrivacyCategory = "last" | "online" | "profile" | "status" | "groupadd" | "readreceipts" | "calladd" | "messages" | "defense" | string;
|
|
1139
|
-
|
|
1140
|
-
export type PrivacySensitiveType = "1";
|
|
1141
|
-
|
|
1142
|
-
export type PrivacyValue = "all" | "contacts" | "none" | "contact_blacklist" | "match_last_seen" | "known" | "off" | "on_standard" | string;
|
|
1143
|
-
|
|
1144
|
-
/** Profile picture type (preview thumbnail or full-size). */
|
|
1145
|
-
export type ProfilePictureType = "preview" | "image";
|
|
1146
|
-
|
|
1147
|
-
export interface PushNameUpdate {
|
|
1148
|
-
/** The contact who changed their push name. */
|
|
1149
|
-
jid: Jid;
|
|
1150
|
-
message: MessageInfo;
|
|
1151
|
-
old_push_name: string;
|
|
1152
|
-
new_push_name: string;
|
|
1153
|
-
}
|
|
1154
|
-
|
|
1155
|
-
export type PushPriority = "high" | "high_force";
|
|
1156
|
-
|
|
1157
|
-
export interface Receipt {
|
|
1158
|
-
source: MessageSource;
|
|
1159
|
-
message_ids: string[];
|
|
1160
|
-
timestamp: number;
|
|
1161
|
-
type: ReceiptType;
|
|
1162
|
-
/** True when the receipt carried the `offline` attribute, i.e. it was drained from the server's offline queue on reconnect rather than delivered live. Mirrors WA Web `incomingMsgReceiptParser` (`offline: maybeAttrString`). */
|
|
1163
|
-
offline: boolean;
|
|
1164
|
-
}
|
|
1165
|
-
|
|
1166
|
-
/** Chat state type as received from incoming stanzas. Aligned with WhatsApp Web's `WAChatState` constants: - `typing` = ACTIVE_CHAT_STATE_TYPE.TYPING - `recording_audio` = ACTIVE_CHAT_STATE_TYPE.RECORDING_AUDIO - `idle` = IDLE_CHAT_STATE_TYPE.IDLE */
|
|
1167
|
-
export type ReceivedChatState = "typing" | "recording_audio" | "idle";
|
|
1168
|
-
|
|
1169
|
-
/** Parsed screen-share state for one participant. */
|
|
1170
|
-
export interface ScreenShare {
|
|
1171
|
-
state: ScreenShareState;
|
|
1172
|
-
version: number;
|
|
1173
|
-
screen_share_id?: number | null;
|
|
1174
|
-
}
|
|
1175
|
-
|
|
1176
|
-
/** Wire state of a screen-share transition. Wire codes: 1=Started, 2=Stopped */
|
|
1177
|
-
export type ScreenShareState = number;
|
|
1178
|
-
|
|
1179
|
-
export interface SelfPushNameUpdated {
|
|
1180
|
-
from_server: boolean;
|
|
1181
|
-
old_name: string;
|
|
1182
|
-
new_name: string;
|
|
1183
|
-
}
|
|
1184
|
-
|
|
1185
|
-
/** Payload of [`Event::ServerAck`]: the server acknowledged (or nacked) an outgoing stanza. Server acks cover every outgoing stanza class — message, receipt, notification, call — so consumers should filter on [`class`](Self::class) before correlating ids. */
|
|
1186
|
-
export interface ServerAck {
|
|
1187
|
-
/** Id of the acked stanza (for a sent message, its message id). */
|
|
1188
|
-
id: string;
|
|
1189
|
-
/** Stanza class the ack refers to (`"message"`, `"receipt"`, `"notification"`, `"call"`, …). `None` when the server omits it. */
|
|
1190
|
-
class?: string | null;
|
|
1191
|
-
/** Chat/entity the ack refers to, when present and parseable. */
|
|
1192
|
-
from?: Jid | null;
|
|
1193
|
-
/** Server timestamp from the ack's `t` attribute, when present. For a message ack this is the authoritative send timestamp (whatsmeow reads the same attribute into `SendResponse.Timestamp`). */
|
|
1194
|
-
timestamp?: number | null;
|
|
1195
|
-
/** Nack code (e.g. `"479"`) when the server rejected the stanza; `None` for a plain ack. */
|
|
1196
|
-
error?: string | null;
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
/** The type of spam flow indicating the source of the report. */
|
|
1200
|
-
export type SpamFlow = "GroupSpamBannerReport" | "GroupInfoReport" | "MessageMenu" | "ContactInfo" | "StatusReport";
|
|
1201
|
-
|
|
1202
|
-
export interface StarUpdate {
|
|
1203
|
-
/** The chat containing the starred or unstarred message. */
|
|
1204
|
-
chat_jid: Jid;
|
|
1205
|
-
/** The participant who sent the message. `Some` for group messages from others, `None` for self-authored or 1-on-1 messages (wire value `"0"`). */
|
|
1206
|
-
participant_jid?: Jid | null;
|
|
1207
|
-
message_id: string;
|
|
1208
|
-
from_me: boolean;
|
|
1209
|
-
timestamp: number;
|
|
1210
|
-
action: StarAction;
|
|
1211
|
-
from_full_sync: boolean;
|
|
1212
|
-
}
|
|
1213
|
-
|
|
1214
|
-
/** Privacy setting sent in the `<meta>` node of the status stanza. Matches WhatsApp Web's `status_setting` attribute. */
|
|
1215
|
-
export type StatusPrivacySetting = "contacts" | "allowlist" | "denylist";
|
|
1216
|
-
|
|
1217
|
-
export interface StreamError {
|
|
1218
|
-
code: string;
|
|
1219
|
-
raw?: any | null;
|
|
1220
|
-
}
|
|
1221
|
-
|
|
1222
|
-
/** Trusted contact privacy token entry. Matches WhatsApp Web's Chat.tcToken / tcTokenTimestamp / tcTokenSenderTimestamp. */
|
|
1223
|
-
export interface TcTokenEntry {
|
|
1224
|
-
/** Raw token bytes received from the server. */
|
|
1225
|
-
token: Uint8Array;
|
|
1226
|
-
/** Unix timestamp (seconds) when the token was received. */
|
|
1227
|
-
token_timestamp: number | string;
|
|
1228
|
-
/** Unix timestamp (seconds) when we last issued our token to this contact. */
|
|
1229
|
-
sender_timestamp?: number | string | null;
|
|
1230
|
-
}
|
|
1231
|
-
|
|
1232
|
-
/** Wire codes: 101=SentToTooManyPeople, 102=BlockedByUsers, 103=CreatedTooManyGroups, 104=SentTooManySameMessage, 106=BroadcastList */
|
|
1233
|
-
export type TempBanReason = number;
|
|
1234
|
-
|
|
1235
|
-
export interface TemporaryBan {
|
|
1236
|
-
code: TempBanReason;
|
|
1237
|
-
/** How long the ban lasts — the wire's `expire` is a duration in seconds, not a deadline (WA Web renders it as "You'll be able to use WhatsApp again in {duration}"). Dispatched only when the server sent an `expire` that fits a `Duration`; a ban stanza missing `code`/`expire`, or carrying one that does not, surfaces as [`Event::ConnectFailure`] instead, the way WA Web rejects it rather than inventing a zero. */
|
|
1238
|
-
expire: number;
|
|
1239
|
-
/** The server's `message` attribute, when present. */
|
|
1240
|
-
message?: string | null;
|
|
1241
|
-
/** Support/appeal link the official UI opens for the ban. */
|
|
1242
|
-
url?: string | null;
|
|
1243
|
-
/** The whole `<failure>` stanza. */
|
|
1244
|
-
raw?: any | null;
|
|
1245
|
-
}
|
|
1246
|
-
|
|
1247
|
-
export type UnavailableType = "unknown" | "view_once" | "hosted" | "bot";
|
|
1248
|
-
|
|
1249
|
-
export interface UndecryptableMessage {
|
|
1250
|
-
info: MessageInfo;
|
|
1251
|
-
is_unavailable: boolean;
|
|
1252
|
-
unavailable_type: UnavailableType;
|
|
1253
|
-
decrypt_fail_mode: DecryptFailMode;
|
|
1254
|
-
}
|
|
1255
|
-
|
|
1256
|
-
export interface UserAboutUpdate {
|
|
1257
|
-
/** The contact whose about text changed. */
|
|
1258
|
-
jid: Jid;
|
|
1259
|
-
status: string;
|
|
1260
|
-
timestamp: number;
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
/** A contact/group/newsletter's status updates were muted/unmuted on a linked device. */
|
|
1264
|
-
export interface UserStatusMuteUpdate {
|
|
1265
|
-
/** The entity whose status was (un)muted. */
|
|
1266
|
-
jid: Jid;
|
|
1267
|
-
/** `true` = status muted, `false` = unmuted. */
|
|
1268
|
-
muted: boolean;
|
|
1269
|
-
timestamp: number;
|
|
1270
|
-
action: UserStatusMuteAction;
|
|
1271
|
-
from_full_sync: boolean;
|
|
1272
|
-
}
|
|
1273
|
-
|
|
1274
|
-
/** Addressing mode used by the contact subprotocol. */
|
|
1275
|
-
export type UsyncAddressingMode = "pn" | "lid";
|
|
1276
|
-
|
|
1277
|
-
export interface UsyncBotCommand {
|
|
1278
|
-
name: string;
|
|
1279
|
-
description: string;
|
|
1280
|
-
}
|
|
1281
|
-
|
|
1282
|
-
export type UsyncBotProfessionalType = "unknown" | "yes" | "no" | string;
|
|
1283
|
-
|
|
1284
|
-
export interface UsyncBotProfileResult {
|
|
1285
|
-
name: string;
|
|
1286
|
-
attributes: string;
|
|
1287
|
-
description: string;
|
|
1288
|
-
category: string;
|
|
1289
|
-
is_default: boolean;
|
|
1290
|
-
prompts: UsyncBotPrompt[];
|
|
1291
|
-
persona_id: string;
|
|
1292
|
-
commands: UsyncBotCommand[];
|
|
1293
|
-
commands_description: string;
|
|
1294
|
-
is_meta_created?: boolean | null;
|
|
1295
|
-
creator_name?: string | null;
|
|
1296
|
-
creator_profile_url?: string | null;
|
|
1297
|
-
posing_as_professional?: UsyncBotProfessionalType | null;
|
|
1298
|
-
}
|
|
1299
|
-
|
|
1300
|
-
export interface UsyncBotPrompt {
|
|
1301
|
-
emoji: string;
|
|
1302
|
-
text: string;
|
|
1303
|
-
}
|
|
1304
|
-
|
|
1305
|
-
export interface UsyncBusinessResult {
|
|
1306
|
-
verified_name?: VerifiedName | null;
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
export interface UsyncContactResult {
|
|
1310
|
-
contact_type: string;
|
|
1311
|
-
username?: string | null;
|
|
1312
|
-
content?: string | null;
|
|
1313
|
-
}
|
|
1314
|
-
|
|
1315
|
-
/** Usync context. */
|
|
1316
|
-
export type UsyncContext = "interactive" | "background" | "message" | "voip";
|
|
1317
|
-
|
|
1318
|
-
export interface UsyncDeviceListResult {
|
|
1319
|
-
hash?: string | null;
|
|
1320
|
-
devices: UsyncDeviceResult[];
|
|
1321
|
-
}
|
|
1322
|
-
|
|
1323
|
-
export interface UsyncDeviceResult {
|
|
1324
|
-
id: number;
|
|
1325
|
-
key_index?: number | null;
|
|
1326
|
-
is_hosted: boolean;
|
|
1327
|
-
}
|
|
1328
|
-
|
|
1329
|
-
/** Per-user cache hints carried by the devices v2 subprotocol. */
|
|
1330
|
-
export interface UsyncDeviceSyncHint {
|
|
1331
|
-
/** Cached device-list hash, if known. */
|
|
1332
|
-
device_hash?: string | null;
|
|
1333
|
-
/** Timestamp associated with the cached hash. */
|
|
1334
|
-
timestamp?: number | string | null;
|
|
1335
|
-
/** Expected timestamp used to detect stale key-index state. */
|
|
1336
|
-
expected_timestamp?: number | string | null;
|
|
1337
|
-
}
|
|
1338
|
-
|
|
1339
|
-
export interface UsyncDevicesResult {
|
|
1340
|
-
device_list?: UsyncDeviceListResult | null;
|
|
1341
|
-
key_index?: UsyncKeyIndexResult | null;
|
|
1342
|
-
}
|
|
1343
|
-
|
|
1344
|
-
export interface UsyncDisappearingModeResult {
|
|
1345
|
-
duration_seconds: number;
|
|
1346
|
-
setting_timestamp: number | string;
|
|
1347
|
-
ephemerality_disabled: boolean;
|
|
1348
|
-
}
|
|
1349
|
-
|
|
1350
|
-
/** Feature names accepted by the USync feature protocol. */
|
|
1351
|
-
export type UsyncFeature = "document" | "encrypt" | "encrypt_blist" | "encrypt_contact" | "encrypt_group_gen2" | "encrypt_image" | "encrypt_location" | "encrypt_url" | "encrypt_v2" | "voip" | "multi_agent";
|
|
1352
|
-
|
|
1353
|
-
export interface UsyncFeatureResult {
|
|
1354
|
-
feature: UsyncFeature;
|
|
1355
|
-
value: string;
|
|
1356
|
-
}
|
|
1357
|
-
|
|
1358
|
-
export interface UsyncKeyIndexResult {
|
|
1359
|
-
timestamp: number | string;
|
|
1360
|
-
signed_key_index_bytes?: Uint8Array | null;
|
|
1361
|
-
expected_timestamp?: number | string | null;
|
|
1362
|
-
}
|
|
1363
|
-
|
|
1364
|
-
/** Usync mode. */
|
|
1365
|
-
export type UsyncMode = "query" | "full" | "delta";
|
|
1366
|
-
|
|
1367
|
-
/** A protocol value or its per-user error. Errors are boxed because they are rare and contain owned strings; this keeps every successful result variant from inheriting their size. */
|
|
1368
|
-
export type UsyncOutcome<T> =
|
|
1369
|
-
| { type: "value"; data: T }
|
|
1370
|
-
| { type: "error"; data: UsyncSubprotocolError };
|
|
1371
|
-
|
|
1372
|
-
/** A known, typed USync subprotocol request. */
|
|
1373
|
-
export type UsyncProtocol =
|
|
1374
|
-
| { type: "contact"; data: { addressing_mode: UsyncAddressingMode } }
|
|
1375
|
-
| { type: "devices" }
|
|
1376
|
-
| { type: "status" }
|
|
1377
|
-
| { type: "text_status" }
|
|
1378
|
-
| { type: "disappearing_mode" }
|
|
1379
|
-
| { type: "business" }
|
|
1380
|
-
| { type: "picture" }
|
|
1381
|
-
| { type: "lid" }
|
|
1382
|
-
| { type: "username" }
|
|
1383
|
-
| { type: "bot" }
|
|
1384
|
-
| { type: "feature"; data: UsyncFeature[] };
|
|
1385
|
-
|
|
1386
|
-
/** Known USync protocol tags from the captured WhatsApp Web client. */
|
|
1387
|
-
export type UsyncProtocolKind = "feature" | "devices" | "contact" | "picture" | "status" | "business" | "disappearing_mode" | "lid" | "bot" | "username" | "text_status";
|
|
1388
|
-
|
|
1389
|
-
/** Sparse per-user result. Large, uncommon payloads are boxed so their layout does not inflate every status/contact/device item in large sync responses. */
|
|
1390
|
-
export type UsyncProtocolResult =
|
|
1391
|
-
| { type: "contact"; data: UsyncOutcome<UsyncContactResult> }
|
|
1392
|
-
| { type: "devices"; data: UsyncOutcome<UsyncDevicesResult> }
|
|
1393
|
-
| { type: "status"; data: UsyncOutcome<UsyncStatusResult> }
|
|
1394
|
-
| { type: "text_status"; data: UsyncOutcome<UsyncTextStatusResult> }
|
|
1395
|
-
| { type: "disappearing_mode"; data: UsyncOutcome<UsyncDisappearingModeResult> }
|
|
1396
|
-
| { type: "business"; data: UsyncOutcome<UsyncBusinessResult> }
|
|
1397
|
-
| { type: "picture"; data: UsyncOutcome<number | string> }
|
|
1398
|
-
| { type: "lid"; data: UsyncOutcome<Jid | null> }
|
|
1399
|
-
| { type: "username"; data: UsyncOutcome<string | null> }
|
|
1400
|
-
| { type: "bot"; data: UsyncOutcome<UsyncBotProfileResult> }
|
|
1401
|
-
| { type: "feature"; data: UsyncOutcome<UsyncFeatureResult[]> };
|
|
1402
|
-
|
|
1403
|
-
/** Result-level state for a single protocol. */
|
|
1404
|
-
export interface UsyncProtocolState {
|
|
1405
|
-
protocol: UsyncProtocolKind;
|
|
1406
|
-
refresh_seconds?: number | null;
|
|
1407
|
-
error?: UsyncSubprotocolError | null;
|
|
1408
|
-
}
|
|
1409
|
-
|
|
1410
|
-
/** A complete typed USync query, validated before it reaches the network. Deserialization always delegates to [`Self::new`], so a serialized input cannot bypass protocol uniqueness or per-user validation. */
|
|
1411
|
-
export interface UsyncQuery {
|
|
1412
|
-
mode: UsyncMode;
|
|
1413
|
-
context: UsyncContext;
|
|
1414
|
-
protocols: UsyncProtocol[];
|
|
1415
|
-
users: UsyncUser[];
|
|
1416
|
-
}
|
|
1417
|
-
|
|
1418
|
-
/** Full neutral response from a typed USync query. Its serialization walks this model by reference; no projection tree is constructed by the core. */
|
|
1419
|
-
export interface UsyncResponse {
|
|
1420
|
-
protocol_states: UsyncProtocolState[];
|
|
1421
|
-
users: UsyncUserResult[];
|
|
1422
|
-
}
|
|
1423
|
-
|
|
1424
|
-
/** About/status payload. WhatsApp Web consumes only `status`, while the optional wire timestamp is retained for callers that need a lossless projection of responses carrying `t`. */
|
|
1425
|
-
export interface UsyncStatusResult {
|
|
1426
|
-
status?: string | null;
|
|
1427
|
-
timestamp?: number | string | null;
|
|
1428
|
-
}
|
|
1429
|
-
|
|
1430
|
-
export interface UsyncSubprotocolError {
|
|
1431
|
-
code?: number | null;
|
|
1432
|
-
text?: string | null;
|
|
1433
|
-
backoff?: number | null;
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
export interface UsyncTextStatusResult {
|
|
1437
|
-
text?: string | null;
|
|
1438
|
-
emoji?: string | null;
|
|
1439
|
-
ephemeral_duration_seconds?: number | null;
|
|
1440
|
-
last_update_time?: string | null;
|
|
1441
|
-
}
|
|
1442
|
-
|
|
1443
|
-
/** A USync user input. Constructors establish an identity and protocol-specific additions use explicit builder methods. Deserialization applies the same phone and JID normalization as those constructors; all invariants are validated when the user becomes part of [`UsyncQuery::new`]. */
|
|
1444
|
-
export interface UsyncUser {
|
|
1445
|
-
id?: Jid | null;
|
|
1446
|
-
pn_jid?: Jid | null;
|
|
1447
|
-
phone?: string | null;
|
|
1448
|
-
known_lid?: Jid | null;
|
|
1449
|
-
device_sync?: UsyncDeviceSyncHint | null;
|
|
1450
|
-
persona_id?: string | null;
|
|
1451
|
-
username?: string | null;
|
|
1452
|
-
username_pin?: string | null;
|
|
1453
|
-
contact_type?: string | null;
|
|
1454
|
-
tc_token?: Uint8Array | null;
|
|
1455
|
-
}
|
|
1456
|
-
|
|
1457
|
-
/** Per-user response. `id` is optional because contact-only results without a JID are accepted by WhatsApp Web. */
|
|
1458
|
-
export interface UsyncUserResult {
|
|
1459
|
-
id?: Jid | null;
|
|
1460
|
-
pn_jid?: Jid | null;
|
|
1461
|
-
protocols: UsyncProtocolResult[];
|
|
1462
|
-
}
|
|
1463
|
-
|
|
1464
|
-
/** Verified name certificate information. */
|
|
1465
|
-
export interface VerifiedName {
|
|
1466
|
-
name?: string | null;
|
|
1467
|
-
serial?: string | null;
|
|
1468
|
-
issuer?: string | null;
|
|
1469
|
-
certificate?: Uint8Array | null;
|
|
1470
|
-
}
|
|
1471
|
-
|
|
1472
|
-
/** In-call `<video state=N>` handshake states (audio→video upgrade, video→audio downgrade). Values verified against WA Web captures relayed by the mock server; unknown future states land in `Unknown` so a new server value degrades to an observable no-op instead of a parse failure. Wire codes: 0=Disabled, 1=Enabled, 2=Paused, 3=UpgradeRequest, 4=UpgradeAccept, 5=UpgradeReject, 6=Stopped, 7=UpgradeRejectByTimeout, 8=UpgradeCancel, 9=UpgradeCancelByTimeout, 10=UnknownPeer, 11=UpgradeRequestV2, 20=Error */
|
|
1473
|
-
export type VideoState = number;
|
|
1474
|
-
|
|
1475
|
-
/** Authoritative waiting-room state for a call-link call. */
|
|
1476
|
-
export interface WaitingRoom {
|
|
1477
|
-
call_id: string;
|
|
1478
|
-
call_creator: Jid;
|
|
1479
|
-
link_token: string;
|
|
1480
|
-
media: CallLinkMedia;
|
|
1481
|
-
enabled: boolean;
|
|
1482
|
-
is_admin: boolean;
|
|
1483
|
-
transaction_id?: number | null;
|
|
1484
|
-
users: WaitingRoomUser[];
|
|
1485
|
-
}
|
|
1486
|
-
|
|
1487
|
-
/** One user in a waiting-room snapshot. */
|
|
1488
|
-
export interface WaitingRoomUser {
|
|
1489
|
-
jid: Jid;
|
|
1490
|
-
pn?: Jid | null;
|
|
1491
|
-
state: string;
|
|
1492
|
-
}
|
|
1493
|
-
|
|
1494
94
|
|
|
1495
95
|
|
|
1496
96
|
export function getWasmAllocationSnapshot(): WasmAllocationSnapshot;
|
|
@@ -3768,9 +2368,9 @@ export interface InitOutput {
|
|
|
3768
2368
|
readonly intounderlyingsource_cancel: (a: number) => void;
|
|
3769
2369
|
readonly intounderlyingsource_pull: (a: number, b: number) => number;
|
|
3770
2370
|
readonly __wasm_bindgen_func_elem_3793: (a: number, b: number, c: number) => void;
|
|
2371
|
+
readonly __wasm_bindgen_func_elem_24617: (a: number, b: number, c: number, d: number) => void;
|
|
3771
2372
|
readonly __wasm_bindgen_func_elem_24619: (a: number, b: number, c: number, d: number) => void;
|
|
3772
|
-
readonly
|
|
3773
|
-
readonly __wasm_bindgen_func_elem_8208: (a: number, b: number, c: number) => void;
|
|
2373
|
+
readonly __wasm_bindgen_func_elem_8209: (a: number, b: number, c: number) => void;
|
|
3774
2374
|
readonly __wasm_bindgen_func_elem_3792: (a: number, b: number, c: number) => void;
|
|
3775
2375
|
readonly __wasm_bindgen_func_elem_3791: (a: number, b: number) => void;
|
|
3776
2376
|
readonly __wbindgen_export: (a: number, b: number) => number;
|