@oxidezap/whatsapp-rust-bridge 0.6.5 → 0.7.0

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.
@@ -129,6 +129,18 @@ export type BlocklistAction = "block" | "unblock";
129
129
 
130
130
  export type BotEditType = "first" | "inner" | "last";
131
131
 
132
+ /** Shape version of a bot-list response, carried in `<bot v="...">`. The two versions differ only in which fields are populated, so one parser reads both; this records which shape actually arrived. */
133
+ export type BotListVersion = "2" | "3" | string;
134
+
135
+ /** How a section should be laid out. Present only in `v="3"` responses. */
136
+ export type BotSectionDisplayType = "hidden" | "hscroll" | "hscroll_icebreakers" | "hscroll_large" | "hscroll_small" | "listview" | string;
137
+
138
+ /** What a section groups. WhatsApp Web reads bots out of *every* section regardless of type — the type only drives how the section is presented. */
139
+ export type BotSectionType = "all" | "category" | "featured" | string;
140
+
141
+ /** Colour scheme a `<theme>` block applies to. */
142
+ export type BotThemeMode = "dark" | "light" | string;
143
+
132
144
  export type BusinessHourMode = "open_24h" | "specific_hours" | "appointment_only" | string;
133
145
 
134
146
  /** Parsed `<notification type="business">` stanza. */
@@ -251,6 +263,15 @@ export interface CallLinkPreview {
251
263
  is_admin: boolean;
252
264
  }
253
265
 
266
+ /** Meta Verified subscription state, which is what lifts the cap permanently. */
267
+ export type CappingMvStatus = "NOT_ELIGIBLE" | "NOT_ACTIVE" | "ACTIVE" | "ACTIVE_UPGRADE_AVAILABLE" | string;
268
+
269
+ /** Eligibility for the one-time extension that lifts the cap for a cycle. */
270
+ export type CappingOteStatus = "NOT_ELIGIBLE" | "ELIGIBLE" | "ACTIVE_IN_CURRENT_CYCLE" | "EXHAUSTED" | string;
271
+
272
+ /** Where the account stands against the cap. */
273
+ export type CappingStatus = "NONE" | "FIRST_WARNING" | "SECOND_WARNING" | "CAPPED" | string;
274
+
254
275
  /** Identifies a specific message within a chat. */
255
276
  export interface ChatMessageId {
256
277
  chat: Jid;
@@ -311,6 +332,14 @@ export interface ContactNumberChanged {
311
332
  timestamp: number;
312
333
  }
313
334
 
335
+ /** A saved contact was deleted on a linked device. Carries no action payload: the mutation is a syncd `Remove`, and WA Web's `WAWebContactSync` ignores the value on that branch and simply drops the contact from the address book. */
336
+ export interface ContactRemoved {
337
+ /** The contact that is no longer saved. */
338
+ jid: Jid;
339
+ timestamp: number;
340
+ from_full_sync: boolean;
341
+ }
342
+
314
343
  /** Server requests a full contact re-sync. Emitted from `<notification type="contacts"><sync after="..."/>`. */
315
344
  export interface ContactSyncRequested {
316
345
  after?: number | null;
@@ -336,6 +365,16 @@ export type DayOfWeek = "sun" | "mon" | "tue" | "wed" | "thu" | "fri" | "sat" |
336
365
 
337
366
  export type DecryptFailMode = "show" | "hide";
338
367
 
368
+ /** Payload of [`Event::DecryptedPayload`]: what Signal produced for one `<enc>`, before this build tried to make sense of it. The client decodes a plaintext into [`wa::Message`] and dispatches that. A payload it cannot decode — a field this build predates, a message type it does not model — is logged and dropped, and with it goes something that cost a real decryption and advanced the ratchet. Nothing can ask for it back: the ratchet has moved on, so the same ciphertext will never decrypt again. This event is that payload, handed over before decoding is attempted. It arrives whether or not the decode goes on to succeed. Reasons to want it: recording traffic for faithful replay (re-encoding a decoded `Message` does not reproduce the original bytes), decoding with a newer protobuf than this build carries, and looking at a payload that failed to decode instead of only reading that it did. Gated by `Client::acquire_decrypted_payload_forwarding()`: nothing is emitted, and nothing is cloned, while no consumer holds a lease. */
369
+ export interface DecryptedPayload {
370
+ /** Which message this came from. */
371
+ info: MessageInfo;
372
+ /** Which `<enc>` of the stanza produced these bytes, counting from zero in the order the client enumerates them. That order is the stanza's direct `<enc>` children first, then the ones under `<participants><to>` addressed to this device — the fan-out shape, where a single stanza carries a copy per device and only ours is ours to decrypt. It is *not* a child index: a consumer resolving this back to a node has to walk the same two groups in the same order. */
373
+ enc_index: number;
374
+ /** The `type` attribute the `<enc>` carried: `msg`, `pkmsg`, `skmsg`, … */
375
+ enc_type: string;
376
+ }
377
+
339
378
  export interface DeleteChatUpdate {
340
379
  /** The chat being deleted. */
341
380
  jid: Jid;
@@ -500,6 +539,15 @@ export interface DirtyState {
500
539
 
501
540
  export type DirtyType = "account_sync" | "groups" | "syncd_app_state" | "newsletter_metadata" | string;
502
541
 
542
+ /** The account-wide "disable link previews" privacy setting changed on a linked device (`setting_disableLinkPreviews`). */
543
+ export interface DisableLinkPreviewsUpdate {
544
+ /** `true` when link previews are now disabled. Only emitted when the wire carried the flag; WA Web treats an absent one as a malformed mutation. */
545
+ previews_disabled: boolean;
546
+ timestamp: number;
547
+ action: PrivacySettingDisableLinkPreviewsAction;
548
+ from_full_sync: boolean;
549
+ }
550
+
503
551
  export type DisallowedListAction = "add" | "remove";
504
552
 
505
553
  /** A contact's default disappearing messages setting changed. Sent by the server as `<notification type="disappearing_mode">`. WA Web: `WAWebHandleDisappearingModeNotification` → `WAWebUpdateDisappearingModeForContact`. */
@@ -886,6 +934,19 @@ export interface MessageInfo {
886
934
  bcl_participants: Jid[];
887
935
  }
888
936
 
937
+ /** A label was associated with or removed from a single message on a linked device (`label_message`). `action.labeled == Some(true)` means the label was added. */
938
+ export interface MessageLabelAssociationUpdate {
939
+ /** The label identifier. */
940
+ label_id: string;
941
+ /** The chat holding the labelled message. */
942
+ chat_jid: Jid;
943
+ /** The labelled message's id. */
944
+ message_id: string;
945
+ timestamp: number;
946
+ action: LabelAssociationAction;
947
+ from_full_sync: boolean;
948
+ }
949
+
889
950
  export interface MessageSource {
890
951
  chat: Jid;
891
952
  sender: Jid;
@@ -1141,6 +1202,9 @@ export type PrivacySensitiveType = "1";
1141
1202
 
1142
1203
  export type PrivacyValue = "all" | "contacts" | "none" | "contact_blacklist" | "match_last_seen" | "known" | "off" | "on_standard" | string;
1143
1204
 
1205
+ /** Whether a product can currently be bought. The wire values are the GraphQL enum names; WhatsApp Web maps anything it does not recognise to "unknown" rather than failing the whole catalog. */
1206
+ export type ProductAvailability = "IN_STOCK" | "OUT_OF_STOCK" | "AVAILABLE_FOR_ANOTHER_POSTCODE" | string;
1207
+
1144
1208
  /** Profile picture type (preview thumbnail or full-size). */
1145
1209
  export type ProfilePictureType = "preview" | "image";
1146
1210
 
@@ -1154,6 +1218,15 @@ export interface PushNameUpdate {
1154
1218
 
1155
1219
  export type PushPriority = "high" | "high_force";
1156
1220
 
1221
+ /** A quick reply was created, edited, or deleted on a linked device. Deletion is the same mutation with `action.deleted == Some(true)`, not a syncd `Remove`, so a consumer must check that flag rather than assume the event always describes a live quick reply. */
1222
+ export interface QuickReplyUpdate {
1223
+ /** The quick reply's identifier (the index key, not a JID). */
1224
+ id: string;
1225
+ timestamp: number;
1226
+ action: QuickReplyAction;
1227
+ from_full_sync: boolean;
1228
+ }
1229
+
1157
1230
  export interface Receipt {
1158
1231
  source: MessageSource;
1159
1232
  message_ids: string[];
@@ -1790,6 +1863,79 @@ interface WasmWhatsAppClient {
1790
1863
  }
1791
1864
 
1792
1865
 
1866
+ /**
1867
+ * A catalog product. Only `id` is guaranteed; the server omits rather than
1868
+ * blanks, so an absent name is absent, not `\"\"`.
1869
+ */
1870
+ export interface ProductResult {
1871
+ id: string;
1872
+ retailerId?: string;
1873
+ name?: string;
1874
+ description?: string;
1875
+ url?: string;
1876
+ /**
1877
+ * The link-shimmed form of `url`, carried alongside it rather than
1878
+ * instead. Which to open is a consumer\'s call.
1879
+ */
1880
+ shimmedUrl?: string;
1881
+ price?: PriceResult;
1882
+ salePrice?: SalePriceResult;
1883
+ isHidden?: boolean;
1884
+ isSanctioned?: boolean;
1885
+ maxAvailable?: number;
1886
+ availability?: string;
1887
+ reviewStatus?: string;
1888
+ canAppeal?: boolean;
1889
+ belongsTo?: boolean;
1890
+ images: ProductImageResult[];
1891
+ videos: ProductVideoResult[];
1892
+ complianceCategory?: string;
1893
+ countryCodeOrigin?: string;
1894
+ importerName?: string;
1895
+ importerAddress?: ImporterAddressResult;
1896
+ }
1897
+
1898
+ /**
1899
+ * A delta on the account\'s own business profile.
1900
+ *
1901
+ * Absent means \"leave alone\"; an empty value means \"clear\" (`\"\"` for text,
1902
+ * `[]` for `websites`). The core rejects a delta with nothing set.
1903
+ */
1904
+ export interface BusinessProfileUpdateInput {
1905
+ address?: string | undefined;
1906
+ latitude?: number | undefined;
1907
+ longitude?: number | undefined;
1908
+ description?: string | undefined;
1909
+ email?: string | undefined;
1910
+ /**
1911
+ * At most two URLs. `[]` clears the list.
1912
+ */
1913
+ websites?: string[] | undefined;
1914
+ /**
1915
+ * Category *ids* from the directory, not names.
1916
+ */
1917
+ categories?: string[] | undefined;
1918
+ businessHours?: BusinessHoursUpdateInput | undefined;
1919
+ }
1920
+
1921
+ /**
1922
+ * A line item on an order: a snapshot, so the price is what was quoted when
1923
+ * the order was placed.
1924
+ */
1925
+ export interface OrderProductResult {
1926
+ id?: string;
1927
+ name?: string;
1928
+ price?: PriceResult;
1929
+ quantity?: number;
1930
+ images: ProductImageResult[];
1931
+ /**
1932
+ * Empty for a product with no variants. Without it a variant order cannot
1933
+ * be fulfilled: id, name and price are shared across one listing\'s
1934
+ * variants.
1935
+ */
1936
+ variantProperties: VariantPropertyResult[];
1937
+ }
1938
+
1793
1939
  /**
1794
1940
  * A message key for `readMessages`.
1795
1941
  */
@@ -1799,6 +1945,24 @@ export interface ReadMessageKey {
1799
1945
  participant?: string;
1800
1946
  }
1801
1947
 
1948
+ /**
1949
+ * A named group of products within a catalog.
1950
+ */
1951
+ export interface CollectionResult {
1952
+ id?: string;
1953
+ name?: string;
1954
+ /**
1955
+ * A prefix, and it says so only by its length: the collections query
1956
+ * carries no per-collection cursor, so `products.length === itemLimit`
1957
+ * means more may exist.
1958
+ */
1959
+ products: ProductResult[];
1960
+ reviewStatus?: string;
1961
+ canAppeal?: boolean;
1962
+ rejectReason?: string;
1963
+ commerceUrl?: string;
1964
+ }
1965
+
1802
1966
  /**
1803
1967
  * A participant change result from `groupParticipantsUpdate`.
1804
1968
  */
@@ -1811,6 +1975,54 @@ export interface ParticipantChangeResult {
1811
1975
  addRequest?: ParticipantAddRequestResult;
1812
1976
  }
1813
1977
 
1978
+ /**
1979
+ * A postal address, as sent for a product\'s importer of record.
1980
+ */
1981
+ export interface ImporterAddressResult {
1982
+ street1?: string;
1983
+ street2?: string;
1984
+ city?: string;
1985
+ region?: string;
1986
+ postalCode?: string;
1987
+ countryCode?: string;
1988
+ }
1989
+
1990
+ /**
1991
+ * A price, in thousandths of the currency\'s main unit.
1992
+ *
1993
+ * WhatsApp scales money by 1000, not 100, and the protobuf field is an
1994
+ * `int64`. `amount1000` therefore crosses as a **string**: a `number` is exact
1995
+ * only below 2^53, and a large order would be silently wrong rather than
1996
+ * rejected. Dividing by 1000 for display is the consumer\'s decision.
1997
+ */
1998
+ export interface PriceResult {
1999
+ /**
2000
+ * Thousandths of one currency unit: `\"1990\"` is 1.99 in `currency`.
2001
+ */
2002
+ amount1000: string;
2003
+ /**
2004
+ * ISO 4217 code. Absent when the server sends a price without one.
2005
+ */
2006
+ currency?: string;
2007
+ }
2008
+
2009
+ /**
2010
+ * A reaction tally on a newsletter message.
2011
+ */
2012
+ export interface NewsletterReactionCountResult {
2013
+ code: string;
2014
+ count: number;
2015
+ }
2016
+
2017
+ /**
2018
+ * A sale price and the window it applies to.
2019
+ */
2020
+ export interface SalePriceResult {
2021
+ price: PriceResult;
2022
+ startDate?: string;
2023
+ endDate?: string;
2024
+ }
2025
+
1814
2026
  /**
1815
2027
  * A single entry from `fetchBlocklist`.
1816
2028
  */
@@ -1894,6 +2106,16 @@ export interface CoreSpanAllocationSnapshot {
1894
2106
  linearGrowthEvents: number;
1895
2107
  }
1896
2108
 
2109
+ /**
2110
+ * An admin\'s published profile on a newsletter.
2111
+ */
2112
+ export interface NewsletterAdminProfileResult {
2113
+ id?: string;
2114
+ name: string;
2115
+ pictureId?: string;
2116
+ pictureDirectPath?: string;
2117
+ }
2118
+
1897
2119
  /**
1898
2120
  * Block/unblock action.
1899
2121
  */
@@ -2108,6 +2330,25 @@ export interface AllocationEventSnapshot {
2108
2330
  historyConversations: number;
2109
2331
  }
2110
2332
 
2333
+ /**
2334
+ * One bot in the directory.
2335
+ */
2336
+ export interface BotListEntryResult {
2337
+ jid: string;
2338
+ personaId: string;
2339
+ cardTitle?: string;
2340
+ count?: number;
2341
+ themes: BotThemeResult[];
2342
+ }
2343
+
2344
+ /**
2345
+ * One dimension of a chosen product variant, e.g. `Size` / `Large`.
2346
+ */
2347
+ export interface VariantPropertyResult {
2348
+ name?: string;
2349
+ value?: string;
2350
+ }
2351
+
2111
2352
  /**
2112
2353
  * One failed parent/subgroup relationship mutation.
2113
2354
  */
@@ -2116,6 +2357,22 @@ export interface CommunityLinkFailureResult {
2116
2357
  error: number;
2117
2358
  }
2118
2359
 
2360
+ /**
2361
+ * One follower of a newsletter, from `newsletterFollowers`.
2362
+ */
2363
+ export interface NewsletterFollowerResult {
2364
+ jid: string;
2365
+ /**
2366
+ * Withheld by the server when the follower\'s privacy settings hide it.
2367
+ */
2368
+ phoneJid?: string;
2369
+ displayName?: string;
2370
+ username?: string;
2371
+ role?: string;
2372
+ followTime?: number;
2373
+ adminProfile?: NewsletterAdminProfileResult;
2374
+ }
2375
+
2119
2376
  /**
2120
2377
  * One linked-identifier to phone-number mapping supplied by the host.
2121
2378
  */
@@ -2124,6 +2381,94 @@ export interface LidPnMappingInput {
2124
2381
  pn: string;
2125
2382
  }
2126
2383
 
2384
+ /**
2385
+ * One message from `newsletterMessages`.
2386
+ *
2387
+ * `serverId` is the pagination cursor and the key `newsletterReactMessage`
2388
+ * uses; `messageId` is what edit and revoke key on. They are different ids and
2389
+ * both cross as strings, since a `serverId` is a u64.
2390
+ */
2391
+ export interface NewsletterMessageResult {
2392
+ messageId: string;
2393
+ serverId: string;
2394
+ timestamp: number;
2395
+ messageType: string;
2396
+ isSender: boolean;
2397
+ /**
2398
+ * The decoded protobuf, re-encoded. Absent when the stanza carried none.
2399
+ */
2400
+ message?: Uint8Array;
2401
+ reactions: NewsletterReactionCountResult[];
2402
+ }
2403
+
2404
+ /**
2405
+ * One opening range for a day of the week.
2406
+ */
2407
+ export interface BusinessHoursConfigInput {
2408
+ /**
2409
+ * `mon`, `tue`, … as the wire spells them.
2410
+ */
2411
+ dayOfWeek: string;
2412
+ /**
2413
+ * `open_24h`, `specific_hours` or `appointment_only`.
2414
+ */
2415
+ mode: string;
2416
+ /**
2417
+ * Minutes past local midnight. Required by `specific_hours` and rejected
2418
+ * for the other modes, by the core.
2419
+ */
2420
+ openTime: number | undefined;
2421
+ closeTime: number | undefined;
2422
+ }
2423
+
2424
+ /**
2425
+ * One page of a business catalog.
2426
+ */
2427
+ export interface CatalogResult {
2428
+ products: ProductResult[];
2429
+ /**
2430
+ * Feed back as `after` for the next page; absent on the last one.
2431
+ */
2432
+ afterCursor?: string;
2433
+ /**
2434
+ * Carried by the response, though the catalog query takes only `after`.
2435
+ */
2436
+ beforeCursor?: string;
2437
+ }
2438
+
2439
+ /**
2440
+ * One page of a business\'s collections.
2441
+ *
2442
+ * Forward cursor only — the collections paging object has no `before`, and
2443
+ * the asymmetry with the catalog is the wire\'s, not an oversight.
2444
+ */
2445
+ export interface CollectionsResult {
2446
+ collections: CollectionResult[];
2447
+ afterCursor?: string;
2448
+ }
2449
+
2450
+ /**
2451
+ * One section of the bot directory.
2452
+ */
2453
+ export interface BotListSectionResult {
2454
+ name?: string;
2455
+ sectionType: string;
2456
+ displayType?: string;
2457
+ bots: BotListEntryResult[];
2458
+ }
2459
+
2460
+ /**
2461
+ * Opening hours for `updateBusinessProfile`.
2462
+ */
2463
+ export interface BusinessHoursUpdateInput {
2464
+ /**
2465
+ * IANA zone name, e.g. `America/Araguaina`.
2466
+ */
2467
+ timezone?: string | undefined;
2468
+ note?: string | undefined;
2469
+ config?: BusinessHoursConfigInput[];
2470
+ }
2471
+
2127
2472
  /**
2128
2473
  * Optional Noise-payload overrides applied on top of every preset.
2129
2474
  * Leaving any field `None` preserves wacore\'s default, which matches
@@ -2136,6 +2481,48 @@ export interface ClientProfileOverrides {
2136
2481
  passiveLogin?: boolean | undefined;
2137
2482
  }
2138
2483
 
2484
+ /**
2485
+ * Options for `getCatalog`. Omitted fields take the core\'s own defaults; no
2486
+ * second default is applied here.
2487
+ */
2488
+ export interface CatalogOptionsInput {
2489
+ limit?: number | undefined;
2490
+ /**
2491
+ * Cursor from a previous page\'s `afterCursor`.
2492
+ */
2493
+ after?: string | undefined;
2494
+ imageWidth?: number | undefined;
2495
+ imageHeight?: number | undefined;
2496
+ allowShopSource?: boolean | undefined;
2497
+ }
2498
+
2499
+ /**
2500
+ * Options for `getCollections`.
2501
+ *
2502
+ * No `before`: the collections query has no backward cursor, so one accepted
2503
+ * here would go nowhere.
2504
+ */
2505
+ export interface CollectionOptionsInput {
2506
+ collectionLimit?: number | undefined;
2507
+ /**
2508
+ * Products returned inline per collection.
2509
+ */
2510
+ itemLimit?: number | undefined;
2511
+ after?: string | undefined;
2512
+ imageWidth?: number | undefined;
2513
+ imageHeight?: number | undefined;
2514
+ }
2515
+
2516
+ /**
2517
+ * Per-mode colours for a bot\'s card.
2518
+ */
2519
+ export interface BotThemeResult {
2520
+ mode: string;
2521
+ background?: string;
2522
+ primaryText?: string;
2523
+ secondaryText?: string;
2524
+ }
2525
+
2139
2526
  /**
2140
2527
  * Picture type for profile picture URL.
2141
2528
  */
@@ -2190,6 +2577,25 @@ export interface EncryptMediaResult {
2190
2577
  fileLength: number;
2191
2578
  }
2192
2579
 
2580
+ /**
2581
+ * Result from `fetchNewChatMessageCappingInfo`.
2582
+ *
2583
+ * Every field is optional because the server omits the ones that do not apply
2584
+ * to an account\'s tier. `remainingQuota` is the core\'s own derivation, present
2585
+ * only when both quota fields are.
2586
+ */
2587
+ export interface NewChatMessageCappingResult {
2588
+ cappingStatus?: string;
2589
+ oteStatus?: string;
2590
+ mvStatus?: string;
2591
+ totalQuota?: number;
2592
+ usedQuota?: number;
2593
+ cycleStartTimestamp?: number;
2594
+ cycleEndTimestamp?: number;
2595
+ serverSentTimestamp?: number;
2596
+ remainingQuota?: number;
2597
+ }
2598
+
2193
2599
  /**
2194
2600
  * Result from `fetchStatus`.
2195
2601
  */
@@ -2198,6 +2604,20 @@ export interface FetchStatusResult {
2198
2604
  status?: string;
2199
2605
  }
2200
2606
 
2607
+ /**
2608
+ * Result from `getBotList`.
2609
+ *
2610
+ * Sections arrive as the server grouped them. The core keeps every section
2611
+ * because a bot can be carried by a `category` or `featured` section and by no
2612
+ * other, so flattening is a consumer\'s decision, not the bridge\'s.
2613
+ */
2614
+ export interface BotListResult {
2615
+ version: string;
2616
+ bhash?: string;
2617
+ defaultBot?: BotDefaultResult;
2618
+ sections: BotListSectionResult[];
2619
+ }
2620
+
2201
2621
  /**
2202
2622
  * Result from `getBusinessProfile`.
2203
2623
  */
@@ -2327,6 +2747,18 @@ export interface MemoryDiagnosticsResult {
2327
2747
  resourceEstimatedBytes: number;
2328
2748
  }
2329
2749
 
2750
+ /**
2751
+ * Result from `getOrder`.
2752
+ */
2753
+ export interface OrderResult {
2754
+ products: OrderProductResult[];
2755
+ priceDetails?: OrderPriceDetailsResult;
2756
+ /**
2757
+ * Unix seconds, as sent.
2758
+ */
2759
+ creationTimestamp?: number;
2760
+ }
2761
+
2330
2762
  /**
2331
2763
  * Result from `groupRequestParticipantsList`.
2332
2764
  */
@@ -2361,6 +2793,19 @@ export interface IsOnWhatsAppResult {
2361
2793
  verifiedName?: string;
2362
2794
  }
2363
2795
 
2796
+ /**
2797
+ * Result from `newsletterAdminInfo`.
2798
+ *
2799
+ * `adminCount` has no query of its own — it rides along with the admin
2800
+ * profile. Absent means the server withheld it (it answers only admins and
2801
+ * owners), never zero.
2802
+ */
2803
+ export interface NewsletterAdminInfoResult {
2804
+ adminCount?: number;
2805
+ adminProfile?: NewsletterAdminProfileResult;
2806
+ adminProfilesEnabled?: boolean;
2807
+ }
2808
+
2364
2809
  /**
2365
2810
  * Result from `profilePictureUrl`.
2366
2811
  */
@@ -2446,6 +2891,32 @@ export interface SignalSignedPreKeyInput {
2446
2891
  signature: Uint8Array;
2447
2892
  }
2448
2893
 
2894
+ /**
2895
+ * The bot the server marks as the one to offer by default.
2896
+ */
2897
+ export interface BotDefaultResult {
2898
+ jid: string;
2899
+ personaId: string;
2900
+ }
2901
+
2902
+ /**
2903
+ * The receipt a `biz-cover-photo` upload returns.
2904
+ */
2905
+ export interface CoverPhotoUploadInput {
2906
+ /**
2907
+ * `fbid` from the upload response.
2908
+ */
2909
+ id: string;
2910
+ /**
2911
+ * `meta_hmac` from the upload response.
2912
+ */
2913
+ token: string;
2914
+ /**
2915
+ * `ts` from the upload response, as a string: it is an i64.
2916
+ */
2917
+ timestamp: string;
2918
+ }
2919
+
2449
2920
  export interface AllocationBucketSnapshot {
2450
2921
  allocatedBytes: number;
2451
2922
  allocations: number;
@@ -2590,6 +3061,12 @@ export interface LegacySessionV1 {
2590
3061
  pendingPreKey: LegacySessionPendingPreKeyV1 | undefined;
2591
3062
  }
2592
3063
 
3064
+ export interface OrderPriceDetailsResult {
3065
+ currency?: string;
3066
+ subtotal?: PriceResult;
3067
+ total?: PriceResult;
3068
+ }
3069
+
2593
3070
  export interface PendingKeyExchangeComponents {
2594
3071
  sequence: number | undefined;
2595
3072
  localBaseKey: Uint8Array | undefined;
@@ -2608,6 +3085,18 @@ export interface PendingPreKeyComponents {
2608
3085
  kyberCiphertext: Uint8Array | undefined;
2609
3086
  }
2610
3087
 
3088
+ export interface ProductImageResult {
3089
+ id?: string;
3090
+ requestImageUrl?: string;
3091
+ originalImageUrl?: string;
3092
+ }
3093
+
3094
+ export interface ProductVideoResult {
3095
+ id?: string;
3096
+ originalVideoUrl?: string;
3097
+ thumbnailUrl?: string;
3098
+ }
3099
+
2611
3100
  export interface ReceiverSessionChainComponents {
2612
3101
  senderRatchetKey: Uint8Array | undefined;
2613
3102
  chainKey: SessionChainKeyComponents | undefined;
@@ -2854,10 +3343,21 @@ export class WasmWhatsAppClient {
2854
3343
  * Confirm an inbound stanza through the core-owned acknowledgement path.
2855
3344
  */
2856
3345
  acknowledgeStanza(stanza_js: BinaryNode): Promise<void>;
3346
+ /**
3347
+ * Associate a label with a chat.
3348
+ */
3349
+ addChatLabel(label_id: string, chat_jid: string): Promise<void>;
2857
3350
  /**
2858
3351
  * Add linked-identifier mappings through one durable core batch.
2859
3352
  */
2860
3353
  addLidPnMappings(mappings: LidPnMappingInput[]): Promise<number>;
3354
+ /**
3355
+ * Associate a label with a single message.
3356
+ *
3357
+ * Keyed by the message as well as the chat, under a different action than
3358
+ * the chat association. One message per call, mirroring the wire.
3359
+ */
3360
+ addMessageLabel(label_id: string, chat_jid: string, message_id: string): Promise<void>;
2861
3361
  /**
2862
3362
  * Archive or unarchive a chat.
2863
3363
  */
@@ -2865,8 +3365,18 @@ export class WasmWhatsAppClient {
2865
3365
  /**
2866
3366
  * Ensure E2E Signal sessions exist for the given JIDs.
2867
3367
  * Returns true after sessions are established.
3368
+ *
3369
+ * `force` has no effect — the core exposes no such switch.
2868
3370
  */
2869
3371
  assertSessions(jids: string[], _force: boolean): Promise<boolean>;
3372
+ /**
3373
+ * Acknowledge a server dirty bit so the server stops re-announcing it.
3374
+ *
3375
+ * `dirtyType` is the wire string (`account_sync`, `groups`,
3376
+ * `syncd_app_state`, `newsletter_metadata`); an unrecognized one is
3377
+ * forwarded as-is, matching the core's fallback.
3378
+ */
3379
+ cleanDirtyBits(dirty_type: string, timestamp?: number | null): Promise<void>;
2870
3380
  /**
2871
3381
  * Clear a chat's messages while keeping the chat (WA Web's clearChat), via an
2872
3382
  * app-state mutation. `delete_starred` also removes starred messages and
@@ -2882,6 +3392,11 @@ export class WasmWhatsAppClient {
2882
3392
  communityParticipantsUpdate(jid: string, participants: string[], action: GroupParticipantAction): Promise<ParticipantChangeResult[]>;
2883
3393
  /**
2884
3394
  * Connect to WhatsApp servers (single connection, no auto-reconnect).
3395
+ *
3396
+ * Resolves once the handshake is done, then a background task reads the
3397
+ * connection until it ends. The core hands `connect()` back a `Connection`
3398
+ * that decodes nothing until it is driven, so without that reader no event
3399
+ * would ever fire and every request would time out.
2885
3400
  */
2886
3401
  connect(): Promise<void>;
2887
3402
  /**
@@ -2902,10 +3417,18 @@ export class WasmWhatsAppClient {
2902
3417
  * creation, creator, participants, …).
2903
3418
  */
2904
3419
  createGroup(subject: string, participants: string[]): Promise<GroupMetadataResult>;
3420
+ /**
3421
+ * Create or rename a label. App state is an upsert keyed by `labelId`, so
3422
+ * this both creates a label and edits an existing one. `color` is a
3423
+ * WhatsApp color index.
3424
+ */
3425
+ createLabel(label_id: string, name: string, color: number): Promise<void>;
2905
3426
  /**
2906
3427
  * Create encrypted participant `<to>` nodes for recipient JIDs.
2907
3428
  * Returns `{ nodes: [...], shouldIncludeDeviceIdentity: boolean }`.
2908
3429
  * Use `encodeProto('Message', obj)` on the JS side to produce the bytes.
3430
+ *
3431
+ * `extraAttrs` has no effect — the core sets the node attributes itself.
2909
3432
  */
2910
3433
  createParticipantNodesBytes(jids: string[], bytes: Uint8Array, _extra_attrs: any): Promise<any>;
2911
3434
  /**
@@ -2922,10 +3445,18 @@ export class WasmWhatsAppClient {
2922
3445
  * Delete a chat via app state mutation.
2923
3446
  */
2924
3447
  deleteChat(jid: string): Promise<void>;
3448
+ /**
3449
+ * Delete a label.
3450
+ */
3451
+ deleteLabel(label_id: string): Promise<void>;
2925
3452
  /**
2926
3453
  * Delete a message for self (not for everyone).
2927
3454
  */
2928
3455
  deleteMessageForMe(jid: string, message_id: string, from_me: boolean): Promise<void>;
3456
+ /**
3457
+ * Delete a quick reply.
3458
+ */
3459
+ deleteQuickReply(id: string): Promise<void>;
2929
3460
  /**
2930
3461
  * Disconnect the client and flush pending state to storage.
2931
3462
  */
@@ -2940,8 +3471,13 @@ export class WasmWhatsAppClient {
2940
3471
  /**
2941
3472
  * Download, decrypt, and return a Web ReadableStream of decrypted chunks.
2942
3473
  *
2943
- * Same as `downloadMedia` but returns a `ReadableStream` instead of buffering
2944
- * the entire file. In Node.js, consume with `Readable.fromWeb(stream)`.
3474
+ * Same as `downloadMedia`, delivered in 64 KB chunks. Neither side is
3475
+ * bounded by that: the core has no streaming download, so
3476
+ * `download_from_params` still resolves the whole plaintext into one
3477
+ * `Vec<u8>` before chunking starts, and on the JS side only the queued
3478
+ * chunks are bounded — a consumer that keeps them, to rebuild the file,
3479
+ * ends up holding all of it. In Node.js, consume with
3480
+ * `Readable.fromWeb(stream)`.
2945
3481
  */
2946
3482
  downloadMediaStream(direct_path: string, media_key: Uint8Array, file_sha256: Uint8Array, file_enc_sha256: Uint8Array, file_length: number, media_type: MediaType): ReadableStream;
2947
3483
  /**
@@ -2969,6 +3505,10 @@ export class WasmWhatsAppClient {
2969
3505
  * Results will arrive as history_sync events.
2970
3506
  */
2971
3507
  fetchMessageHistory(count: number, chat_jid: string, oldest_msg_id: string, oldest_msg_from_me: boolean, oldest_msg_timestamp_ms: number): Promise<string>;
3508
+ /**
3509
+ * Fetch how many new chats this account may still start this cycle.
3510
+ */
3511
+ fetchNewChatMessageCappingInfo(): Promise<NewChatMessageCappingResult>;
2972
3512
  /**
2973
3513
  * Fetch all privacy settings.
2974
3514
  */
@@ -3000,10 +3540,29 @@ export class WasmWhatsAppClient {
3000
3540
  * Exposes the persisted account identity to credential consumers.
3001
3541
  */
3002
3542
  getAccount(): Promise<any>;
3543
+ /**
3544
+ * Fetch the bot directory the server offers this account.
3545
+ *
3546
+ * There is no server push for it, so a caller that wants fresh data calls
3547
+ * this again.
3548
+ */
3549
+ getBotList(): Promise<BotListResult>;
3003
3550
  /**
3004
3551
  * Get business profile information for a JID.
3005
3552
  */
3006
3553
  getBusinessProfile(jid: string): Promise<BusinessProfileResult | undefined>;
3554
+ /**
3555
+ * Fetch one page of a business's product catalog.
3556
+ *
3557
+ * Paginate by feeding `afterCursor` back through `options.after` until it
3558
+ * comes back absent.
3559
+ */
3560
+ getCatalog(jid: string, options?: CatalogOptionsInput | null): Promise<CatalogResult>;
3561
+ /**
3562
+ * Fetch one page of a business's product collections, each with its first
3563
+ * products inline.
3564
+ */
3565
+ getCollections(jid: string, options?: CollectionOptionsInput | null): Promise<CollectionsResult>;
3007
3566
  /**
3008
3567
  * Fetch subgroups of a parent group.
3009
3568
  */
@@ -3034,13 +3593,21 @@ export class WasmWhatsAppClient {
3034
3593
  /**
3035
3594
  * Get media connection info (auth token + upload hosts).
3036
3595
  *
3037
- * Returns `{ auth: string, ttl: number, hosts: [{hostname: string, maxContentLengthBytes: number}] }`.
3596
+ * Returns `{ auth: string, ttl: number, hosts: [{hostname: string}] }`.
3597
+ * The core's `hosts` carry nothing but the hostname, so neither does this.
3038
3598
  */
3039
3599
  getMediaConn(force: boolean): Promise<MediaConnResult>;
3040
3600
  /**
3041
3601
  * Returns a snapshot of internal memory diagnostics (cache sizes, session counts, etc.).
3042
3602
  */
3043
3603
  getMemoryDiagnostics(): Promise<MemoryDiagnosticsResult>;
3604
+ /**
3605
+ * Look up an order's line items and totals.
3606
+ *
3607
+ * Both `orderId` and `token` come from the order message itself; the token
3608
+ * is a per-order capability, so an order cannot be read without it.
3609
+ */
3610
+ getOrder(jid: string, order_id: string, token: string): Promise<OrderResult>;
3044
3611
  /**
3045
3612
  * Get the current push name.
3046
3613
  */
@@ -3048,6 +3615,9 @@ export class WasmWhatsAppClient {
3048
3615
  /**
3049
3616
  * Get the list of known devices for the given user JIDs via usync query.
3050
3617
  * Returns an array of JID strings (one per device).
3618
+ *
3619
+ * `useCache` and `ignoreZeroDevices` have no effect — the core's device
3620
+ * query takes neither.
3051
3621
  */
3052
3622
  getUSyncDevices(jids: string[], _use_cache: boolean, _ignore_zero_devices: boolean): Promise<any>;
3053
3623
  /**
@@ -3179,18 +3749,78 @@ export class WasmWhatsAppClient {
3179
3749
  * Pass a positive timestamp (ms) to mute until that time, or null/undefined to unmute.
3180
3750
  */
3181
3751
  muteChat(jid: string, mute_until?: number | null): Promise<void>;
3752
+ /**
3753
+ * Fetch a newsletter's admin-side information, including its admin count.
3754
+ */
3755
+ newsletterAdminInfo(jid: string): Promise<NewsletterAdminInfoResult>;
3756
+ /**
3757
+ * Mute or unmute a newsletter's admin-activity notifications
3758
+ * (`MUTE_ADMIN_ACTIVITY`). Only meaningful for owners and admins.
3759
+ */
3760
+ newsletterAdminMute(jid: string, muted: boolean): Promise<void>;
3761
+ /**
3762
+ * Transfer a newsletter's ownership. Owner-only.
3763
+ *
3764
+ * `user` may be a LID or a phone-number JID; the core resolves the latter
3765
+ * to its LID, the only form the server addresses admins by.
3766
+ */
3767
+ newsletterChangeOwner(jid: string, user: string): Promise<void>;
3182
3768
  /**
3183
3769
  * Create a new newsletter (channel).
3184
3770
  */
3185
3771
  newsletterCreate(name: string, description?: string | null): Promise<NewsletterMetadataResult>;
3772
+ /**
3773
+ * Delete a newsletter. Owner-only.
3774
+ */
3775
+ newsletterDelete(jid: string): Promise<void>;
3776
+ /**
3777
+ * Demote a newsletter admin back to subscriber. Owner-only.
3778
+ */
3779
+ newsletterDemoteAdmin(jid: string, user: string): Promise<void>;
3780
+ /**
3781
+ * Edit a newsletter message. `messageId` is the message's own id, not its
3782
+ * `serverId` — reactions key on the latter, edit and revoke on the former.
3783
+ */
3784
+ newsletterEditMessage(jid: string, message_id: string, message: Uint8Array): Promise<void>;
3785
+ /**
3786
+ * Mute or unmute a newsletter's follower-activity notifications
3787
+ * (`MUTE_FOLLOWER_ACTIVITY`) — what a subscriber toggles.
3788
+ */
3789
+ newsletterFollowerMute(jid: string, muted: boolean): Promise<void>;
3790
+ /**
3791
+ * Fetch up to `count` followers of a newsletter.
3792
+ *
3793
+ * One page, no cursor: the core's query takes a count and the real client
3794
+ * does not paginate this list.
3795
+ */
3796
+ newsletterFollowers(jid: string, count: number): Promise<NewsletterFollowerResult[]>;
3797
+ /**
3798
+ * List every newsletter this account is subscribed to.
3799
+ */
3800
+ newsletterList(): Promise<NewsletterMetadataResult[]>;
3801
+ /**
3802
+ * Fetch up to `count` messages from a newsletter's history.
3803
+ *
3804
+ * `before` is a `serverId` from a previous page, as a string because it is
3805
+ * a u64. Omit it for the newest page.
3806
+ */
3807
+ newsletterMessages(jid: string, count: number, before?: string | null): Promise<NewsletterMessageResult[]>;
3186
3808
  /**
3187
3809
  * Fetch metadata for a newsletter by JID.
3188
3810
  */
3189
3811
  newsletterMetadata(jid: string): Promise<NewsletterMetadataResult>;
3812
+ /**
3813
+ * Fetch a newsletter's metadata by its invite code.
3814
+ */
3815
+ newsletterMetadataByInvite(invite_code: string): Promise<NewsletterMetadataResult>;
3190
3816
  /**
3191
3817
  * Mute or unmute a newsletter's follower-activity notifications — the channel
3192
3818
  * mute a subscriber toggles (WA Web `MUTE_FOLLOWER_ACTIVITY`). `muted = true`
3193
- * silences them. The separate owner-only admin-activity mute is not exposed.
3819
+ * silences them.
3820
+ *
3821
+ * The name does not say which of the core's two mutes this is;
3822
+ * `newsletterFollowerMute` is the explicit spelling and does the same
3823
+ * thing. Kept so existing callers keep working.
3194
3824
  */
3195
3825
  newsletterMute(jid: string, muted: boolean): Promise<void>;
3196
3826
  /**
@@ -3201,14 +3831,38 @@ export class WasmWhatsAppClient {
3201
3831
  * to remove a reaction.
3202
3832
  */
3203
3833
  newsletterReactMessage(jid: string, server_id: string, reaction?: string | null): Promise<void>;
3834
+ /**
3835
+ * Remove a newsletter's picture. Returns the refreshed metadata.
3836
+ */
3837
+ newsletterRemovePicture(jid: string): Promise<NewsletterMetadataResult>;
3838
+ /**
3839
+ * Revoke (delete) a newsletter message. `messageId` is the message's own
3840
+ * id, not its `serverId`.
3841
+ */
3842
+ newsletterRevokeMessage(jid: string, message_id: string): Promise<void>;
3843
+ /**
3844
+ * Replace a newsletter's picture with the given JPEG bytes. Returns the
3845
+ * refreshed metadata.
3846
+ */
3847
+ newsletterSetPicture(jid: string, jpeg: Uint8Array): Promise<NewsletterMetadataResult>;
3204
3848
  /**
3205
3849
  * Subscribe (join) a newsletter.
3206
3850
  */
3207
3851
  newsletterSubscribe(jid: string): Promise<NewsletterMetadataResult>;
3852
+ /**
3853
+ * Subscribe to a newsletter's live updates. Returns the subscription
3854
+ * duration in seconds, as the server set it.
3855
+ */
3856
+ newsletterSubscribeLiveUpdates(jid: string): Promise<number>;
3208
3857
  /**
3209
3858
  * Unsubscribe (leave) a newsletter.
3210
3859
  */
3211
3860
  newsletterUnsubscribe(jid: string): Promise<void>;
3861
+ /**
3862
+ * Update a newsletter's name and/or description. Returns the refreshed
3863
+ * metadata.
3864
+ */
3865
+ newsletterUpdate(jid: string, name?: string | null, description?: string | null): Promise<NewsletterMetadataResult>;
3212
3866
  /**
3213
3867
  * Pin or unpin a chat.
3214
3868
  */
@@ -3275,10 +3929,31 @@ export class WasmWhatsAppClient {
3275
3929
  * encryption and reserved-node validation remain owned by the core.
3276
3930
  */
3277
3931
  relayMessageBytesWithOptions(jid: string, bytes: Uint8Array, message_id: string | null | undefined, extra_nodes: BinaryNode[], refresh_group_metadata: boolean, refresh_devices: boolean): Promise<string>;
3932
+ /**
3933
+ * Remove the business profile's cover photo, by the `fbid` it was set with.
3934
+ */
3935
+ removeBusinessCoverPhoto(id: string): Promise<void>;
3936
+ /**
3937
+ * Remove a label association from a chat.
3938
+ */
3939
+ removeChatLabel(label_id: string, chat_jid: string): Promise<void>;
3940
+ /**
3941
+ * Remove a contact from the address book on every linked device.
3942
+ *
3943
+ * Separate from `saveContact` rather than `saveContact(null)`: this is the
3944
+ * one contact mutation the core sends as a syncd `Remove`, and a `Set`
3945
+ * carrying an empty action would be applied as a rename to the empty
3946
+ * string. `jid` must be a bare phone-number JID.
3947
+ */
3948
+ removeContact(jid: string): Promise<void>;
3278
3949
  /**
3279
3950
  * Remove a group's profile picture.
3280
3951
  */
3281
3952
  removeGroupProfilePicture(group_jid: string): Promise<ProfilePictureResult>;
3953
+ /**
3954
+ * Remove a label association from a single message.
3955
+ */
3956
+ removeMessageLabel(label_id: string, chat_jid: string, message_id: string): Promise<void>;
3282
3957
  /**
3283
3958
  * Remove the profile picture for the logged-in user.
3284
3959
  */
@@ -3390,6 +4065,16 @@ export class WasmWhatsAppClient {
3390
4065
  * to reconnect after an unexpected disconnection.
3391
4066
  */
3392
4067
  setAutoReconnect(enabled: boolean): void;
4068
+ /**
4069
+ * Point the business profile at an already-uploaded cover photo.
4070
+ *
4071
+ * Takes the `biz-cover-photo` upload receipt, not image bytes. **No
4072
+ * consumer can produce that receipt today**: the core's upload pipeline
4073
+ * requires `url` + `direct_path`, and the cover-photo endpoint returns
4074
+ * `fbid`/`meta_hmac`/`ts` instead, so the upload leg does not exist. The
4075
+ * protocol side is complete, and this is here for when it does.
4076
+ */
4077
+ setBusinessCoverPhoto(upload: CoverPhotoUploadInput): Promise<void>;
3393
4078
  /**
3394
4079
  * Override the noise-handshake `ClientPayload` profile (UserAgent
3395
4080
  * platform/device/os_version/manufacturer + `web_info` presence).
@@ -3433,15 +4118,35 @@ export class WasmWhatsAppClient {
3433
4118
  * core device state and adds no bridge-specific protocol behavior.
3434
4119
  */
3435
4120
  setInitialPushName(name: string): Promise<void>;
4121
+ /**
4122
+ * Turn outgoing link previews off or on for the whole account.
4123
+ *
4124
+ * The account's stored preference, replicated to the linked devices. It
4125
+ * does not stop this client from attaching a preview it was explicitly
4126
+ * asked to send.
4127
+ */
4128
+ setLinkPreviewsDisabled(disabled: boolean): Promise<void>;
3436
4129
  /**
3437
4130
  * Set the user's push name (display name).
3438
4131
  */
3439
4132
  setPushName(name: string): Promise<void>;
4133
+ /**
4134
+ * Create or edit a quick reply. App state is an upsert keyed by `id`.
4135
+ *
4136
+ * `shortcut` is the `/`-typed trigger and `message` the expanded text;
4137
+ * `keywords` are extra search terms and `count` the usage tally (`0` for a
4138
+ * new one).
4139
+ */
4140
+ setQuickReply(id: string, shortcut: string, message: string, keywords: string[], count: number): Promise<void>;
3440
4141
  /**
3441
4142
  * Enable or disable raw node forwarding. When enabled, a `raw_node` event
3442
4143
  * is emitted for every decoded stanza before internal dispatch.
3443
4144
  */
3444
4145
  setRawNodeForwarding(enabled: boolean): void;
4146
+ /**
4147
+ * Mute or unmute a contact's status updates.
4148
+ */
4149
+ setUserStatusMute(jid: string, muted: boolean): Promise<void>;
3445
4150
  /**
3446
4151
  * Decrypt a group (sender-key) message.
3447
4152
  */
@@ -3461,6 +4166,8 @@ export class WasmWhatsAppClient {
3461
4166
  /**
3462
4167
  * Encrypt plaintext for a group (sender key).
3463
4168
  * Returns `{ senderKeyDistributionMessage: Uint8Array, ciphertext: Uint8Array }`.
4169
+ *
4170
+ * `meId` has no effect — the core reads the sender from the store.
3464
4171
  */
3465
4172
  signalEncryptGroupMessage(group_jid: string, data: Uint8Array, _me_id: string): Promise<any>;
3466
4173
  /**
@@ -3508,6 +4215,13 @@ export class WasmWhatsAppClient {
3508
4215
  * Block or unblock a contact.
3509
4216
  */
3510
4217
  updateBlockStatus(jid: string, action: BlockAction): Promise<void>;
4218
+ /**
4219
+ * Apply a delta to the account's own business profile.
4220
+ *
4221
+ * Omitted fields are left untouched; an empty value clears one. The core
4222
+ * rejects a delta with nothing set.
4223
+ */
4224
+ updateBusinessProfile(update: BusinessProfileUpdateInput): Promise<void>;
3511
4225
  /**
3512
4226
  * Set default disappearing messages duration (seconds). 0 to disable.
3513
4227
  */
@@ -3554,6 +4268,21 @@ export class WasmWhatsAppClient {
3554
4268
  * Vote on a poll. Returns message ID.
3555
4269
  */
3556
4270
  votePoll(chat_jid: string, poll_msg_id: string, poll_creator_jid: string, message_secret: Uint8Array, option_names: string[]): Promise<string>;
4271
+ /**
4272
+ * Wait until the client is connected and logged in, or the timeout elapses.
4273
+ *
4274
+ * Stricter than `waitForSocket`: the core resolves this only once the
4275
+ * connection is fully ready. Rejects with `kind === 'timeout'` on expiry.
4276
+ */
4277
+ waitForConnected(timeout_ms: number): Promise<void>;
4278
+ /**
4279
+ * Wait until the socket is connected, or the timeout elapses.
4280
+ *
4281
+ * Resolves as soon as the socket is up — login may still be pending. The
4282
+ * core rejects on expiry rather than reporting it, so this rejects with
4283
+ * `kind === 'timeout'`.
4284
+ */
4285
+ waitForSocket(timeout_ms: number): Promise<void>;
3557
4286
  }
3558
4287
 
3559
4288
  /**
@@ -3665,9 +4394,12 @@ export interface InitOutput {
3665
4394
  readonly updateLogger: (a: number) => void;
3666
4395
  readonly verifySignature: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => void;
3667
4396
  readonly wasmwhatsappclient_acknowledgeStanza: (a: number, b: number) => number;
3668
- readonly wasmwhatsappclient_addLidPnMappings: (a: number, b: number, c: number) => number;
4397
+ readonly wasmwhatsappclient_addChatLabel: (a: number, b: number, c: number, d: number, e: number) => number;
4398
+ readonly wasmwhatsappclient_addLidPnMappings: (a: number, b: number) => number;
4399
+ readonly wasmwhatsappclient_addMessageLabel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3669
4400
  readonly wasmwhatsappclient_archiveChat: (a: number, b: number, c: number, d: number) => number;
3670
4401
  readonly wasmwhatsappclient_assertSessions: (a: number, b: number, c: number, d: number) => number;
4402
+ readonly wasmwhatsappclient_cleanDirtyBits: (a: number, b: number, c: number, d: number, e: number) => number;
3671
4403
  readonly wasmwhatsappclient_clearChat: (a: number, b: number, c: number, d: number, e: number) => number;
3672
4404
  readonly wasmwhatsappclient_communityFetchAllParticipating: (a: number) => number;
3673
4405
  readonly wasmwhatsappclient_communityParticipantsUpdate: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
@@ -3675,11 +4407,14 @@ export interface InitOutput {
3675
4407
  readonly wasmwhatsappclient_createCommunity: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
3676
4408
  readonly wasmwhatsappclient_createCommunitySubgroup: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3677
4409
  readonly wasmwhatsappclient_createGroup: (a: number, b: number, c: number, d: number, e: number) => number;
4410
+ readonly wasmwhatsappclient_createLabel: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
3678
4411
  readonly wasmwhatsappclient_createParticipantNodesBytes: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
3679
4412
  readonly wasmwhatsappclient_createPoll: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
3680
4413
  readonly wasmwhatsappclient_deactivateCommunity: (a: number, b: number, c: number) => number;
3681
4414
  readonly wasmwhatsappclient_deleteChat: (a: number, b: number, c: number) => number;
4415
+ readonly wasmwhatsappclient_deleteLabel: (a: number, b: number, c: number) => number;
3682
4416
  readonly wasmwhatsappclient_deleteMessageForMe: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
4417
+ readonly wasmwhatsappclient_deleteQuickReply: (a: number, b: number, c: number) => number;
3683
4418
  readonly wasmwhatsappclient_disconnect: (a: number) => number;
3684
4419
  readonly wasmwhatsappclient_downloadMedia: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number;
3685
4420
  readonly wasmwhatsappclient_downloadMediaStream: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
@@ -3688,12 +4423,16 @@ export interface InitOutput {
3688
4423
  readonly wasmwhatsappclient_ensurePreKeys: (a: number) => number;
3689
4424
  readonly wasmwhatsappclient_fetchBlocklist: (a: number) => number;
3690
4425
  readonly wasmwhatsappclient_fetchMessageHistory: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => number;
4426
+ readonly wasmwhatsappclient_fetchNewChatMessageCappingInfo: (a: number) => number;
3691
4427
  readonly wasmwhatsappclient_fetchPrivacySettings: (a: number) => number;
3692
4428
  readonly wasmwhatsappclient_fetchReachoutTimelock: (a: number) => number;
3693
4429
  readonly wasmwhatsappclient_fetchStatus: (a: number, b: number, c: number) => number;
3694
4430
  readonly wasmwhatsappclient_fetchUserInfo: (a: number, b: number, c: number) => number;
3695
4431
  readonly wasmwhatsappclient_getAccount: (a: number) => number;
4432
+ readonly wasmwhatsappclient_getBotList: (a: number) => number;
3696
4433
  readonly wasmwhatsappclient_getBusinessProfile: (a: number, b: number, c: number) => number;
4434
+ readonly wasmwhatsappclient_getCatalog: (a: number, b: number, c: number, d: number) => number;
4435
+ readonly wasmwhatsappclient_getCollections: (a: number, b: number, c: number, d: number) => number;
3697
4436
  readonly wasmwhatsappclient_getCommunitySubgroups: (a: number, b: number, c: number) => number;
3698
4437
  readonly wasmwhatsappclient_getCoreAllocationSnapshot: (a: number) => number;
3699
4438
  readonly wasmwhatsappclient_getGroupMetadata: (a: number, b: number, c: number) => number;
@@ -3701,6 +4440,7 @@ export interface InitOutput {
3701
4440
  readonly wasmwhatsappclient_getLid: (a: number) => number;
3702
4441
  readonly wasmwhatsappclient_getMediaConn: (a: number, b: number) => number;
3703
4442
  readonly wasmwhatsappclient_getMemoryDiagnostics: (a: number) => number;
4443
+ readonly wasmwhatsappclient_getOrder: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3704
4444
  readonly wasmwhatsappclient_getPushName: (a: number) => number;
3705
4445
  readonly wasmwhatsappclient_getUSyncDevices: (a: number, b: number, c: number, d: number, e: number) => number;
3706
4446
  readonly wasmwhatsappclient_groupAcceptInvite: (a: number, b: number, c: number) => number;
@@ -3727,28 +4467,48 @@ export interface InitOutput {
3727
4467
  readonly wasmwhatsappclient_linkCommunitySubgroups: (a: number, b: number, c: number, d: number, e: number) => number;
3728
4468
  readonly wasmwhatsappclient_logout: (a: number) => number;
3729
4469
  readonly wasmwhatsappclient_markChatAsRead: (a: number, b: number, c: number, d: number) => number;
3730
- readonly wasmwhatsappclient_markPlayed: (a: number, b: number, c: number) => number;
4470
+ readonly wasmwhatsappclient_markPlayed: (a: number, b: number) => number;
3731
4471
  readonly wasmwhatsappclient_muteChat: (a: number, b: number, c: number, d: number, e: number) => number;
4472
+ readonly wasmwhatsappclient_newsletterAdminInfo: (a: number, b: number, c: number) => number;
4473
+ readonly wasmwhatsappclient_newsletterAdminMute: (a: number, b: number, c: number, d: number) => number;
4474
+ readonly wasmwhatsappclient_newsletterChangeOwner: (a: number, b: number, c: number, d: number, e: number) => number;
3732
4475
  readonly wasmwhatsappclient_newsletterCreate: (a: number, b: number, c: number, d: number, e: number) => number;
4476
+ readonly wasmwhatsappclient_newsletterDelete: (a: number, b: number, c: number) => number;
4477
+ readonly wasmwhatsappclient_newsletterDemoteAdmin: (a: number, b: number, c: number, d: number, e: number) => number;
4478
+ readonly wasmwhatsappclient_newsletterEditMessage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
4479
+ readonly wasmwhatsappclient_newsletterFollowerMute: (a: number, b: number, c: number, d: number) => number;
4480
+ readonly wasmwhatsappclient_newsletterFollowers: (a: number, b: number, c: number, d: number) => number;
4481
+ readonly wasmwhatsappclient_newsletterList: (a: number) => number;
4482
+ readonly wasmwhatsappclient_newsletterMessages: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
3733
4483
  readonly wasmwhatsappclient_newsletterMetadata: (a: number, b: number, c: number) => number;
4484
+ readonly wasmwhatsappclient_newsletterMetadataByInvite: (a: number, b: number, c: number) => number;
3734
4485
  readonly wasmwhatsappclient_newsletterMute: (a: number, b: number, c: number, d: number) => number;
3735
4486
  readonly wasmwhatsappclient_newsletterReactMessage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
4487
+ readonly wasmwhatsappclient_newsletterRemovePicture: (a: number, b: number, c: number) => number;
4488
+ readonly wasmwhatsappclient_newsletterRevokeMessage: (a: number, b: number, c: number, d: number, e: number) => number;
4489
+ readonly wasmwhatsappclient_newsletterSetPicture: (a: number, b: number, c: number, d: number, e: number) => number;
3736
4490
  readonly wasmwhatsappclient_newsletterSubscribe: (a: number, b: number, c: number) => number;
4491
+ readonly wasmwhatsappclient_newsletterSubscribeLiveUpdates: (a: number, b: number, c: number) => number;
3737
4492
  readonly wasmwhatsappclient_newsletterUnsubscribe: (a: number, b: number, c: number) => number;
4493
+ readonly wasmwhatsappclient_newsletterUpdate: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3738
4494
  readonly wasmwhatsappclient_pinChat: (a: number, b: number, c: number, d: number) => number;
3739
4495
  readonly wasmwhatsappclient_pnForLid: (a: number, b: number, c: number) => number;
3740
4496
  readonly wasmwhatsappclient_presenceSubscribe: (a: number, b: number, c: number) => number;
3741
4497
  readonly wasmwhatsappclient_profilePictureUrl: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
3742
4498
  readonly wasmwhatsappclient_queryNode: (a: number, b: number, c: number, d: number) => number;
3743
4499
  readonly wasmwhatsappclient_queryUsync: (a: number, b: number) => number;
3744
- readonly wasmwhatsappclient_readMessages: (a: number, b: number, c: number) => number;
4500
+ readonly wasmwhatsappclient_readMessages: (a: number, b: number) => number;
3745
4501
  readonly wasmwhatsappclient_reconnect: (a: number) => number;
3746
4502
  readonly wasmwhatsappclient_refreshPreKeys: (a: number, b: number) => number;
3747
4503
  readonly wasmwhatsappclient_rejectCall: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3748
4504
  readonly wasmwhatsappclient_rejectStanza: (a: number, b: number, c: number, d: number) => number;
3749
4505
  readonly wasmwhatsappclient_relayMessageBytes: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3750
4506
  readonly wasmwhatsappclient_relayMessageBytesWithOptions: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
4507
+ readonly wasmwhatsappclient_removeBusinessCoverPhoto: (a: number, b: number, c: number) => number;
4508
+ readonly wasmwhatsappclient_removeChatLabel: (a: number, b: number, c: number, d: number, e: number) => number;
4509
+ readonly wasmwhatsappclient_removeContact: (a: number, b: number, c: number) => number;
3751
4510
  readonly wasmwhatsappclient_removeGroupProfilePicture: (a: number, b: number, c: number) => number;
4511
+ readonly wasmwhatsappclient_removeMessageLabel: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3752
4512
  readonly wasmwhatsappclient_removeProfilePicture: (a: number) => number;
3753
4513
  readonly wasmwhatsappclient_requestMediaReupload: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
3754
4514
  readonly wasmwhatsappclient_requestMessageRetry: (a: number, b: number, c: number) => number;
@@ -3768,12 +4528,16 @@ export interface InitOutput {
3768
4528
  readonly wasmwhatsappclient_sendStatusMessageBytes: (a: number, b: number, c: number, d: number, e: number) => number;
3769
4529
  readonly wasmwhatsappclient_sendStatusMessageBytesWithOptions: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number) => number;
3770
4530
  readonly wasmwhatsappclient_setAutoReconnect: (a: number, b: number) => void;
4531
+ readonly wasmwhatsappclient_setBusinessCoverPhoto: (a: number, b: number) => number;
3771
4532
  readonly wasmwhatsappclient_setClientProfile: (a: number, b: number) => number;
3772
4533
  readonly wasmwhatsappclient_setDeviceProps: (a: number, b: number) => number;
3773
4534
  readonly wasmwhatsappclient_setGroupProfilePicture: (a: number, b: number, c: number, d: number, e: number) => number;
3774
4535
  readonly wasmwhatsappclient_setInitialPushName: (a: number, b: number, c: number) => number;
4536
+ readonly wasmwhatsappclient_setLinkPreviewsDisabled: (a: number, b: number) => number;
3775
4537
  readonly wasmwhatsappclient_setPushName: (a: number, b: number, c: number) => number;
4538
+ readonly wasmwhatsappclient_setQuickReply: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number) => number;
3776
4539
  readonly wasmwhatsappclient_setRawNodeForwarding: (a: number, b: number) => void;
4540
+ readonly wasmwhatsappclient_setUserStatusMute: (a: number, b: number, c: number, d: number) => number;
3777
4541
  readonly wasmwhatsappclient_signalDecryptGroupMessage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3778
4542
  readonly wasmwhatsappclient_signalDecryptMessage: (a: number, b: number, c: number, d: number, e: number, f: number, g: number) => number;
3779
4543
  readonly wasmwhatsappclient_signalDeleteSenderKey: (a: number, b: number, c: number, d: number, e: number) => number;
@@ -3790,6 +4554,7 @@ export interface InitOutput {
3790
4554
  readonly wasmwhatsappclient_starMessage: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
3791
4555
  readonly wasmwhatsappclient_unlinkCommunitySubgroups: (a: number, b: number, c: number, d: number, e: number, f: number) => number;
3792
4556
  readonly wasmwhatsappclient_updateBlockStatus: (a: number, b: number, c: number, d: number) => number;
4557
+ readonly wasmwhatsappclient_updateBusinessProfile: (a: number, b: number) => number;
3793
4558
  readonly wasmwhatsappclient_updateDefaultDisappearingMode: (a: number, b: number) => number;
3794
4559
  readonly wasmwhatsappclient_updateMemberLabel: (a: number, b: number, c: number, d: number, e: number) => number;
3795
4560
  readonly wasmwhatsappclient_updatePrivacySetting: (a: number, b: number, c: number, d: number, e: number) => number;
@@ -3799,6 +4564,8 @@ export interface InitOutput {
3799
4564
  readonly wasmwhatsappclient_uploadMedia: (a: number, b: number, c: number, d: number) => number;
3800
4565
  readonly wasmwhatsappclient_validateKeyBundle: (a: number) => number;
3801
4566
  readonly wasmwhatsappclient_votePoll: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number) => number;
4567
+ readonly wasmwhatsappclient_waitForConnected: (a: number, b: number) => number;
4568
+ readonly wasmwhatsappclient_waitForSocket: (a: number, b: number) => number;
3802
4569
  readonly getWasmMemoryBytes: () => number;
3803
4570
  readonly __wbg_intounderlyingbytesource_free: (a: number, b: number) => void;
3804
4571
  readonly __wbg_intounderlyingsink_free: (a: number, b: number) => void;
@@ -3813,12 +4580,12 @@ export interface InitOutput {
3813
4580
  readonly intounderlyingsink_write: (a: number, b: number) => number;
3814
4581
  readonly intounderlyingsource_cancel: (a: number) => void;
3815
4582
  readonly intounderlyingsource_pull: (a: number, b: number) => number;
3816
- readonly __wasm_bindgen_func_elem_3812: (a: number, b: number, c: number) => void;
3817
- readonly __wasm_bindgen_func_elem_24668: (a: number, b: number, c: number, d: number) => void;
3818
- readonly __wasm_bindgen_func_elem_24670: (a: number, b: number, c: number, d: number) => void;
3819
- readonly __wasm_bindgen_func_elem_8238: (a: number, b: number, c: number) => void;
3820
- readonly __wasm_bindgen_func_elem_3811: (a: number, b: number, c: number) => void;
3821
- readonly __wasm_bindgen_func_elem_3810: (a: number, b: number) => void;
4583
+ readonly __wasm_bindgen_func_elem_4243: (a: number, b: number, c: number) => void;
4584
+ readonly __wasm_bindgen_func_elem_25775: (a: number, b: number, c: number, d: number) => void;
4585
+ readonly __wasm_bindgen_func_elem_25777: (a: number, b: number, c: number, d: number) => void;
4586
+ readonly __wasm_bindgen_func_elem_9064: (a: number, b: number, c: number) => void;
4587
+ readonly __wasm_bindgen_func_elem_4242: (a: number, b: number, c: number) => void;
4588
+ readonly __wasm_bindgen_func_elem_4241: (a: number, b: number) => void;
3822
4589
  readonly __wbindgen_export: (a: number, b: number) => number;
3823
4590
  readonly __wbindgen_export2: (a: number, b: number, c: number, d: number) => number;
3824
4591
  readonly __wbindgen_export3: (a: number) => void;