wuzapi 1.0.1 → 1.2.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.
@@ -0,0 +1,799 @@
1
+ export interface ContextInfo {
2
+ stanzaId?: string;
3
+ participant?: string;
4
+ quotedMessage?: Message;
5
+ remoteJid?: string;
6
+ mentionedJid?: string[];
7
+ conversionSource?: string;
8
+ conversionData?: string;
9
+ conversionDelaySeconds?: number;
10
+ forwardingScore?: number;
11
+ isForwarded?: boolean;
12
+ quotedAd?: AdReplyInfo;
13
+ placeholderKey?: MessageKey;
14
+ expiration?: number;
15
+ ephemeralSettingTimestamp?: number;
16
+ ephemeralSharedSecret?: string;
17
+ externalAdReply?: ExternalAdReplyInfo;
18
+ entryPointConversionSource?: string;
19
+ entryPointConversionApp?: string;
20
+ entryPointConversionDelaySeconds?: number;
21
+ disappearingMode?: DisappearingMode;
22
+ actionLink?: ActionLink;
23
+ groupSubject?: string;
24
+ parentGroupJid?: string;
25
+ trustBannerType?: string;
26
+ trustBannerAction?: number;
27
+ isSampled?: boolean;
28
+ utm?: UTMInfo;
29
+ }
30
+ export interface MessageKey {
31
+ remoteJid?: string;
32
+ fromMe?: boolean;
33
+ id?: string;
34
+ participant?: string;
35
+ }
36
+ export interface DisappearingMode {
37
+ initiator?: DisappearingModeInitiator;
38
+ trigger?: DisappearingModeTrigger;
39
+ initiatorDeviceJid?: string;
40
+ }
41
+ export declare enum DisappearingModeInitiator {
42
+ CHANGED_IN_CHAT = 0,
43
+ INITIATED_BY_ME = 1,
44
+ INITIATED_BY_OTHER = 2
45
+ }
46
+ export declare enum DisappearingModeTrigger {
47
+ UNKNOWN = 0,
48
+ CHAT_SETTING = 1,
49
+ ACCOUNT_SETTING = 2,
50
+ BULK_CHANGE = 3
51
+ }
52
+ export interface AdReplyInfo {
53
+ advertiserName?: string;
54
+ mediaType?: MediaType;
55
+ jpegThumbnail?: Uint8Array;
56
+ caption?: string;
57
+ }
58
+ export interface ExternalAdReplyInfo {
59
+ title?: string;
60
+ body?: string;
61
+ mediaType?: MediaType;
62
+ thumbnailUrl?: string;
63
+ mediaUrl?: string;
64
+ thumbnail?: Uint8Array;
65
+ sourceType?: string;
66
+ sourceId?: string;
67
+ sourceUrl?: string;
68
+ containsAutoReply?: boolean;
69
+ renderLargerThumbnail?: boolean;
70
+ showAdAttribution?: boolean;
71
+ ctwaClid?: string;
72
+ ref?: string;
73
+ }
74
+ export interface ActionLink {
75
+ url?: string;
76
+ buttonTitle?: string;
77
+ }
78
+ export interface UTMInfo {
79
+ utmSource?: string;
80
+ utmCampaign?: string;
81
+ }
82
+ export declare enum MediaType {
83
+ UNKNOWN = 0,
84
+ IMAGE = 1,
85
+ VIDEO = 2,
86
+ AUDIO = 3,
87
+ DOCUMENT = 4,
88
+ STICKER = 5
89
+ }
90
+ export interface InteractiveAnnotation {
91
+ polygonVertices?: Point[];
92
+ location?: Location;
93
+ }
94
+ export interface Point {
95
+ xDeprecated?: number;
96
+ yDeprecated?: number;
97
+ x?: number;
98
+ y?: number;
99
+ }
100
+ export interface LocationMessage {
101
+ degreesLatitude?: number;
102
+ degreesLongitude?: number;
103
+ name?: string;
104
+ address?: string;
105
+ url?: string;
106
+ isLiveLocation?: boolean;
107
+ accuracyInMeters?: number;
108
+ speedInMps?: number;
109
+ degreesClockwiseFromMagneticNorth?: number;
110
+ comment?: string;
111
+ jpegThumbnail?: Uint8Array;
112
+ contextInfo?: ContextInfo;
113
+ }
114
+ export interface LiveLocationMessage {
115
+ degreesLatitude?: number;
116
+ degreesLongitude?: number;
117
+ accuracyInMeters?: number;
118
+ speedInMps?: number;
119
+ degreesClockwiseFromMagneticNorth?: number;
120
+ caption?: string;
121
+ sequenceNumber?: number;
122
+ timeOffset?: number;
123
+ jpegThumbnail?: Uint8Array;
124
+ contextInfo?: ContextInfo;
125
+ }
126
+ export interface Location {
127
+ degreesLatitude?: number;
128
+ degreesLongitude?: number;
129
+ name?: string;
130
+ }
131
+ export interface ImageMessage {
132
+ url?: string;
133
+ mimetype?: string;
134
+ caption?: string;
135
+ fileSha256?: Uint8Array;
136
+ fileLength?: number;
137
+ height?: number;
138
+ width?: number;
139
+ mediaKey?: Uint8Array;
140
+ fileEncSha256?: Uint8Array;
141
+ interactiveAnnotations?: InteractiveAnnotation[];
142
+ directPath?: string;
143
+ mediaKeyTimestamp?: number;
144
+ jpegThumbnail?: Uint8Array;
145
+ contextInfo?: ContextInfo;
146
+ firstScanSidecar?: Uint8Array;
147
+ firstScanLength?: number;
148
+ experimentGroupId?: number;
149
+ scansSidecar?: Uint8Array;
150
+ scanLengths?: number[];
151
+ midQualityFileSha256?: Uint8Array;
152
+ midQualityFileEncSha256?: Uint8Array;
153
+ viewOnce?: boolean;
154
+ thumbnailDirectPath?: string;
155
+ thumbnailSha256?: Uint8Array;
156
+ thumbnailEncSha256?: Uint8Array;
157
+ staticUrl?: string;
158
+ annotations?: InteractiveAnnotation[];
159
+ originalFileName?: string;
160
+ }
161
+ export interface VideoMessage {
162
+ url?: string;
163
+ mimetype?: string;
164
+ fileSha256?: Uint8Array;
165
+ fileLength?: number;
166
+ seconds?: number;
167
+ mediaKey?: Uint8Array;
168
+ caption?: string;
169
+ gifPlayback?: boolean;
170
+ height?: number;
171
+ width?: number;
172
+ fileEncSha256?: Uint8Array;
173
+ interactiveAnnotations?: InteractiveAnnotation[];
174
+ directPath?: string;
175
+ mediaKeyTimestamp?: number;
176
+ jpegThumbnail?: Uint8Array;
177
+ contextInfo?: ContextInfo;
178
+ streamingSidecar?: Uint8Array;
179
+ gifAttribution?: VideoAttribution;
180
+ viewOnce?: boolean;
181
+ thumbnailDirectPath?: string;
182
+ thumbnailSha256?: Uint8Array;
183
+ thumbnailEncSha256?: Uint8Array;
184
+ staticUrl?: string;
185
+ annotations?: InteractiveAnnotation[];
186
+ accessibilityLabel?: string;
187
+ processedVideos?: ProcessedVideo[];
188
+ externalShareFullVideoDurationInSeconds?: number;
189
+ motionPhotoPresentationOffsetMS?: number;
190
+ metadataUrl?: string;
191
+ videoSourceType?: VideoSourceType;
192
+ }
193
+ export declare enum VideoAttribution {
194
+ NONE = 0,
195
+ GIPHY = 1,
196
+ TENOR = 2,
197
+ KLIPY = 3
198
+ }
199
+ export declare enum VideoSourceType {
200
+ USER_VIDEO = 0,
201
+ AI_GENERATED = 1
202
+ }
203
+ export interface ProcessedVideo {
204
+ url?: string;
205
+ fileLength?: number;
206
+ fileSha256?: Uint8Array;
207
+ fileEncSha256?: Uint8Array;
208
+ }
209
+ export interface AudioMessage {
210
+ url?: string;
211
+ mimetype?: string;
212
+ fileSha256?: Uint8Array;
213
+ fileLength?: number;
214
+ seconds?: number;
215
+ ptt?: boolean;
216
+ mediaKey?: Uint8Array;
217
+ fileEncSha256?: Uint8Array;
218
+ directPath?: string;
219
+ mediaKeyTimestamp?: number;
220
+ contextInfo?: ContextInfo;
221
+ streamingSidecar?: Uint8Array;
222
+ waveform?: Uint8Array;
223
+ backgroundArgb?: number;
224
+ viewOnce?: boolean;
225
+ }
226
+ export interface DocumentMessage {
227
+ url?: string;
228
+ mimetype?: string;
229
+ title?: string;
230
+ fileSha256?: Uint8Array;
231
+ fileLength?: number;
232
+ pageCount?: number;
233
+ mediaKey?: Uint8Array;
234
+ fileName?: string;
235
+ fileEncSha256?: Uint8Array;
236
+ directPath?: string;
237
+ mediaKeyTimestamp?: number;
238
+ contactVcard?: boolean;
239
+ thumbnailDirectPath?: string;
240
+ thumbnailSha256?: Uint8Array;
241
+ thumbnailEncSha256?: Uint8Array;
242
+ jpegThumbnail?: Uint8Array;
243
+ contextInfo?: ContextInfo;
244
+ thumbnailHeight?: number;
245
+ thumbnailWidth?: number;
246
+ caption?: string;
247
+ }
248
+ export interface StickerMessage {
249
+ url?: string;
250
+ fileSha256?: Uint8Array;
251
+ fileEncSha256?: Uint8Array;
252
+ mediaKey?: Uint8Array;
253
+ mimetype?: string;
254
+ height?: number;
255
+ width?: number;
256
+ directPath?: string;
257
+ fileLength?: number;
258
+ mediaKeyTimestamp?: number;
259
+ firstFrameLength?: number;
260
+ firstFrameSidecar?: Uint8Array;
261
+ isAnimated?: boolean;
262
+ pngThumbnail?: Uint8Array;
263
+ contextInfo?: ContextInfo;
264
+ stickerSentTs?: number;
265
+ isAvatar?: boolean;
266
+ isAiSticker?: boolean;
267
+ isLottie?: boolean;
268
+ }
269
+ export interface ContactMessage {
270
+ displayName?: string;
271
+ vcard?: string;
272
+ contextInfo?: ContextInfo;
273
+ }
274
+ export interface ContactsArrayMessage {
275
+ displayName?: string;
276
+ contacts?: ContactMessage[];
277
+ contextInfo?: ContextInfo;
278
+ }
279
+ export interface ExtendedTextMessage {
280
+ text?: string;
281
+ matchedText?: string;
282
+ canonicalUrl?: string;
283
+ description?: string;
284
+ title?: string;
285
+ textArgb?: number;
286
+ backgroundArgb?: number;
287
+ font?: ExtendedTextMessageFontType;
288
+ previewType?: ExtendedTextMessagePreviewType;
289
+ jpegThumbnail?: Uint8Array;
290
+ contextInfo?: ContextInfo;
291
+ doNotPlayInline?: boolean;
292
+ thumbnailDirectPath?: string;
293
+ thumbnailSha256?: Uint8Array;
294
+ thumbnailEncSha256?: Uint8Array;
295
+ mediaKey?: Uint8Array;
296
+ mediaKeyTimestamp?: number;
297
+ thumbnailHeight?: number;
298
+ thumbnailWidth?: number;
299
+ inviteLinkGroupType?: ExtendedTextMessageInviteLinkGroupType;
300
+ inviteLinkParentGroupSubject?: string;
301
+ inviteLinkParentGroupThumbnailJpeg?: Uint8Array;
302
+ inviteLinkGroupTypeV2?: InviteLinkGroupType;
303
+ viewOnce?: boolean;
304
+ }
305
+ export declare enum ExtendedTextMessageFontType {
306
+ SANS_SERIF = 0,
307
+ SERIF = 1,
308
+ NORICAN_REGULAR = 2,
309
+ BRYNDAN_WRITE = 3,
310
+ BEBASNEUE_REGULAR = 4,
311
+ OSWALD_HEAVY = 5
312
+ }
313
+ export declare enum ExtendedTextMessagePreviewType {
314
+ NONE = 0,
315
+ VIDEO = 1,
316
+ PLACEHOLDER = 4,
317
+ IMAGE = 5
318
+ }
319
+ export declare enum ExtendedTextMessageInviteLinkGroupType {
320
+ DEFAULT = 0,
321
+ PARENT = 1,
322
+ SUB = 2,
323
+ DEFAULT_SUB = 3
324
+ }
325
+ export declare enum InviteLinkGroupType {
326
+ DEFAULT = 0,
327
+ PARENT = 1,
328
+ SUB = 2,
329
+ DEFAULT_SUB = 3
330
+ }
331
+ export interface ButtonsMessage {
332
+ contentText?: string;
333
+ footerText?: string;
334
+ contextInfo?: ContextInfo;
335
+ buttons?: Button[];
336
+ headerType?: ButtonsMessageHeaderType;
337
+ text?: string;
338
+ documentMessage?: DocumentMessage;
339
+ imageMessage?: ImageMessage;
340
+ videoMessage?: VideoMessage;
341
+ locationMessage?: LocationMessage;
342
+ }
343
+ export interface Button {
344
+ buttonId?: string;
345
+ buttonText?: ButtonText;
346
+ type?: ButtonType;
347
+ nativeFlowInfo?: NativeFlowInfo;
348
+ }
349
+ export interface ButtonText {
350
+ displayText?: string;
351
+ }
352
+ export declare enum ButtonType {
353
+ UNKNOWN = 0,
354
+ RESPONSE = 1,
355
+ NATIVE_FLOW = 2
356
+ }
357
+ export interface NativeFlowInfo {
358
+ name?: string;
359
+ paramsJson?: string;
360
+ }
361
+ export declare enum ButtonsMessageHeaderType {
362
+ UNKNOWN = 0,
363
+ EMPTY = 1,
364
+ TEXT = 2,
365
+ DOCUMENT = 3,
366
+ IMAGE = 4,
367
+ VIDEO = 5,
368
+ LOCATION = 6
369
+ }
370
+ export interface ListMessage {
371
+ title?: string;
372
+ description?: string;
373
+ buttonText?: string;
374
+ listType?: ListMessageListType;
375
+ sections?: Section[];
376
+ productListInfo?: ProductListInfo;
377
+ footerText?: string;
378
+ contextInfo?: ContextInfo;
379
+ }
380
+ export interface Section {
381
+ title?: string;
382
+ rows?: Row[];
383
+ }
384
+ export interface Row {
385
+ title?: string;
386
+ description?: string;
387
+ rowId?: string;
388
+ }
389
+ export interface ProductListInfo {
390
+ productSections?: ProductSection[];
391
+ headerImage?: ImageMessage;
392
+ businessOwnerJid?: string;
393
+ }
394
+ export interface ProductSection {
395
+ title?: string;
396
+ products?: ProductListItem[];
397
+ }
398
+ export interface ProductListItem {
399
+ productId?: string;
400
+ }
401
+ export declare enum ListMessageListType {
402
+ UNKNOWN = 0,
403
+ SINGLE_SELECT = 1,
404
+ PRODUCT_LIST = 2
405
+ }
406
+ export interface TemplateMessage {
407
+ contextInfo?: ContextInfo;
408
+ hydratedTemplate?: HydratedFourRowTemplate;
409
+ templateId?: string;
410
+ documentMessage?: DocumentMessage;
411
+ imageMessage?: ImageMessage;
412
+ videoMessage?: VideoMessage;
413
+ locationMessage?: LocationMessage;
414
+ }
415
+ export interface HydratedFourRowTemplate {
416
+ documentMessage?: DocumentMessage;
417
+ imageMessage?: ImageMessage;
418
+ videoMessage?: VideoMessage;
419
+ locationMessage?: LocationMessage;
420
+ title?: string;
421
+ hydratedContentText?: string;
422
+ hydratedFooterText?: string;
423
+ hydratedButtons?: HydratedTemplateButton[];
424
+ templateId?: string;
425
+ mask?: string;
426
+ }
427
+ export interface HydratedTemplateButton {
428
+ index?: number;
429
+ quickReplyButton?: HydratedQuickReplyButton;
430
+ urlButton?: HydratedURLButton;
431
+ callButton?: HydratedCallButton;
432
+ }
433
+ export interface HydratedQuickReplyButton {
434
+ displayText?: string;
435
+ id?: string;
436
+ }
437
+ export interface HydratedURLButton {
438
+ displayText?: string;
439
+ url?: string;
440
+ }
441
+ export interface HydratedCallButton {
442
+ displayText?: string;
443
+ phoneNumber?: string;
444
+ }
445
+ export interface ButtonsResponseMessage {
446
+ selectedButtonId?: string;
447
+ contextInfo?: ContextInfo;
448
+ type?: ButtonsResponseMessageType;
449
+ selectedDisplayText?: string;
450
+ }
451
+ export declare enum ButtonsResponseMessageType {
452
+ UNKNOWN = 0,
453
+ DISPLAY_TEXT = 1
454
+ }
455
+ export interface ListResponseMessage {
456
+ title?: string;
457
+ listType?: ListResponseMessageListType;
458
+ singleSelectReply?: SingleSelectReply;
459
+ contextInfo?: ContextInfo;
460
+ description?: string;
461
+ }
462
+ export interface SingleSelectReply {
463
+ selectedRowId?: string;
464
+ }
465
+ export declare enum ListResponseMessageListType {
466
+ UNKNOWN = 0,
467
+ SINGLE_SELECT = 1
468
+ }
469
+ export interface SendPaymentMessage {
470
+ noteMessage?: Message;
471
+ requestMessageKey?: MessageKey;
472
+ background?: PaymentBackground;
473
+ }
474
+ export interface PaymentBackground {
475
+ id?: string;
476
+ fileEncSha256?: Uint8Array;
477
+ directPath?: string;
478
+ mediaKey?: Uint8Array;
479
+ type?: PaymentBackgroundType;
480
+ mediaKeyTimestamp?: number;
481
+ }
482
+ export declare enum PaymentBackgroundType {
483
+ UNKNOWN = 0,
484
+ DEFAULT = 1
485
+ }
486
+ export interface RequestPaymentMessage {
487
+ noteMessage?: Message;
488
+ currencyCodeIso4217?: string;
489
+ amount1000?: number;
490
+ requestFrom?: string;
491
+ expiryTimestamp?: number;
492
+ background?: PaymentBackground;
493
+ }
494
+ export interface DeclinePaymentRequestMessage {
495
+ key?: MessageKey;
496
+ }
497
+ export interface CancelPaymentRequestMessage {
498
+ key?: MessageKey;
499
+ }
500
+ export interface GroupInviteMessage {
501
+ groupJid?: string;
502
+ inviteCode?: string;
503
+ inviteExpiration?: number;
504
+ groupName?: string;
505
+ jpegThumbnail?: Uint8Array;
506
+ caption?: string;
507
+ contextInfo?: ContextInfo;
508
+ }
509
+ export interface PollCreationMessage {
510
+ name?: string;
511
+ options?: PollOption[];
512
+ selectableOptionsCount?: number;
513
+ contextInfo?: ContextInfo;
514
+ }
515
+ export interface PollOption {
516
+ optionName?: string;
517
+ }
518
+ export interface PollUpdateMessage {
519
+ pollCreationMessageKey?: MessageKey;
520
+ vote?: PollEncValue;
521
+ metadata?: PollUpdateMetadata;
522
+ senderTimestampMs?: number;
523
+ }
524
+ export interface PollEncValue {
525
+ encPayload?: Uint8Array;
526
+ encIv?: Uint8Array;
527
+ }
528
+ export interface PollUpdateMetadata {
529
+ }
530
+ export interface Chat {
531
+ displayName?: string;
532
+ id?: string;
533
+ }
534
+ export interface Call {
535
+ callKey?: Uint8Array;
536
+ conversionSource?: string;
537
+ conversionData?: Uint8Array;
538
+ conversionDelaySeconds?: number;
539
+ }
540
+ export interface Message {
541
+ conversation?: string;
542
+ extendedTextMessage?: ExtendedTextMessage;
543
+ imageMessage?: ImageMessage;
544
+ videoMessage?: VideoMessage;
545
+ audioMessage?: AudioMessage;
546
+ documentMessage?: DocumentMessage;
547
+ stickerMessage?: StickerMessage;
548
+ locationMessage?: LocationMessage;
549
+ liveLocationMessage?: LiveLocationMessage;
550
+ contactMessage?: ContactMessage;
551
+ contactsArrayMessage?: ContactsArrayMessage;
552
+ buttonsMessage?: ButtonsMessage;
553
+ listMessage?: ListMessage;
554
+ templateMessage?: TemplateMessage;
555
+ buttonsResponseMessage?: ButtonsResponseMessage;
556
+ listResponseMessage?: ListResponseMessage;
557
+ sendPaymentMessage?: SendPaymentMessage;
558
+ requestPaymentMessage?: RequestPaymentMessage;
559
+ declinePaymentRequestMessage?: DeclinePaymentRequestMessage;
560
+ cancelPaymentRequestMessage?: CancelPaymentRequestMessage;
561
+ groupInviteMessage?: GroupInviteMessage;
562
+ pollCreationMessage?: PollCreationMessage;
563
+ pollUpdateMessage?: PollUpdateMessage;
564
+ protocolMessage?: ProtocolMessage;
565
+ ephemeralMessage?: EphemeralMessage;
566
+ viewOnceMessage?: ViewOnceMessage;
567
+ reactionMessage?: ReactionMessage;
568
+ stickerSyncRmrMessage?: StickerSyncRmrMessage;
569
+ call?: Call;
570
+ chat?: Chat;
571
+ messageContextInfo?: MessageContextInfo;
572
+ }
573
+ export interface ProtocolMessage {
574
+ key?: MessageKey;
575
+ type?: ProtocolMessageType;
576
+ ephemeralExpiration?: number;
577
+ ephemeralSettingTimestamp?: number;
578
+ historySyncNotification?: HistorySyncNotification;
579
+ appStateSyncKeyShare?: AppStateSyncKeyShare;
580
+ appStateSyncKeyRequest?: AppStateSyncKeyRequest;
581
+ initialSecurityNotificationSettingSync?: InitialSecurityNotificationSettingSync;
582
+ appStateFatalExceptionNotification?: AppStateFatalExceptionNotification;
583
+ disappearingMode?: DisappearingMode;
584
+ editedMessage?: Message;
585
+ timestampMs?: number;
586
+ peerDataOperationRequestMessage?: PeerDataOperationRequestMessage;
587
+ peerDataOperationRequestResponseMessage?: PeerDataOperationRequestResponseMessage;
588
+ }
589
+ export declare enum ProtocolMessageType {
590
+ REVOKE = 0,
591
+ EPHEMERAL_SETTING = 3,
592
+ EPHEMERAL_SYNC_RESPONSE = 4,
593
+ HISTORY_SYNC_NOTIFICATION = 5,
594
+ APP_STATE_SYNC_KEY_SHARE = 6,
595
+ APP_STATE_SYNC_KEY_REQUEST = 7,
596
+ MSG_FANOUT_BACKFILL_REQUEST = 8,
597
+ INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9,
598
+ APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10,
599
+ SHARE_PHONE_NUMBER = 11,
600
+ MESSAGE_EDIT = 14,
601
+ PEER_DATA_OPERATION_REQUEST_MESSAGE = 16,
602
+ PEER_DATA_OPERATION_REQUEST_RESPONSE_MESSAGE = 17
603
+ }
604
+ export interface EphemeralMessage {
605
+ message?: Message;
606
+ }
607
+ export interface ViewOnceMessage {
608
+ message?: Message;
609
+ }
610
+ export interface ReactionMessage {
611
+ key?: MessageKey;
612
+ text?: string;
613
+ groupingKey?: string;
614
+ senderTimestampMs?: number;
615
+ unread?: boolean;
616
+ }
617
+ export interface StickerSyncRmrMessage {
618
+ filehash?: string[];
619
+ rmrSource?: string;
620
+ requestTimestamp?: number;
621
+ }
622
+ export interface MessageContextInfo {
623
+ deviceListMetadata?: DeviceListMetadata;
624
+ deviceListMetadataVersion?: number;
625
+ messageSecret?: Uint8Array;
626
+ paddingBytes?: Uint8Array;
627
+ messageAddOnDurationInSecs?: number;
628
+ botMessageInvoker?: BotMessageInvoker;
629
+ botResponseCorrelationId?: string;
630
+ botPluginType?: BotPluginType;
631
+ botPluginReferenceIndex?: number;
632
+ botPluginSearchProvider?: BotPluginSearchProvider;
633
+ botPluginSearchUrl?: string;
634
+ botPluginMaybeParentPluginType?: BotPluginType;
635
+ botReelPluginThumbnailCdnUrl?: string;
636
+ expiredBotResponseCorrelationId?: string;
637
+ }
638
+ export interface DeviceListMetadata {
639
+ senderKeyHash?: Uint8Array;
640
+ senderTimestamp?: number;
641
+ senderKeyIndexes?: number[];
642
+ recipientKeyHash?: Uint8Array;
643
+ recipientTimestamp?: number;
644
+ recipientKeyIndexes?: number[];
645
+ }
646
+ export interface BotMessageInvoker {
647
+ }
648
+ export declare enum BotPluginType {
649
+ REELS = 0,
650
+ SEARCH = 1
651
+ }
652
+ export declare enum BotPluginSearchProvider {
653
+ BING = 0,
654
+ GOOGLE = 1
655
+ }
656
+ export interface HistorySyncNotification {
657
+ fileSha256?: Uint8Array;
658
+ fileLength?: number;
659
+ mediaKey?: Uint8Array;
660
+ fileEncSha256?: Uint8Array;
661
+ directPath?: string;
662
+ syncType?: HistorySyncNotificationHistorySyncType;
663
+ chunkOrder?: number;
664
+ originalMessageId?: string;
665
+ progress?: number;
666
+ oldestMsgInChunkTimestampSec?: number;
667
+ initialHistBootstrapInlinePayload?: Uint8Array;
668
+ peerDataRequestSessionId?: string;
669
+ }
670
+ export declare enum HistorySyncNotificationHistorySyncType {
671
+ INITIAL_BOOTSTRAP = 0,
672
+ INITIAL_STATUS_V3 = 1,
673
+ FULL = 2,
674
+ RECENT = 3,
675
+ PUSH_NAME = 4,
676
+ NON_BLOCKING_DATA = 5,
677
+ ON_DEMAND = 6
678
+ }
679
+ export interface AppStateSyncKeyShare {
680
+ keys?: AppStateSyncKey[];
681
+ }
682
+ export interface AppStateSyncKey {
683
+ keyId?: AppStateSyncKeyId;
684
+ keyData?: AppStateSyncKeyData;
685
+ }
686
+ export interface AppStateSyncKeyId {
687
+ keyId?: Uint8Array;
688
+ }
689
+ export interface AppStateSyncKeyData {
690
+ keyData?: Uint8Array;
691
+ fingerprint?: AppStateSyncKeyFingerprint;
692
+ timestamp?: number;
693
+ }
694
+ export interface AppStateSyncKeyFingerprint {
695
+ rawId?: number;
696
+ currentIndex?: number;
697
+ deviceIndexes?: number[];
698
+ }
699
+ export interface AppStateSyncKeyRequest {
700
+ keyIds?: AppStateSyncKeyId[];
701
+ }
702
+ export interface InitialSecurityNotificationSettingSync {
703
+ securityNotificationEnabled?: boolean;
704
+ }
705
+ export interface AppStateFatalExceptionNotification {
706
+ collectionNames?: string[];
707
+ timestamp?: number;
708
+ }
709
+ export interface PeerDataOperationRequestMessage {
710
+ peerDataOperationRequestType?: PeerDataOperationRequestType;
711
+ requestId?: string;
712
+ }
713
+ export interface PeerDataOperationRequestResponseMessage {
714
+ peerDataOperationResult?: PeerDataOperationRequestResponseMessagePeerDataOperationResult;
715
+ stanzaId?: string;
716
+ }
717
+ export declare enum PeerDataOperationRequestType {
718
+ UPLOAD_STICKER = 0,
719
+ SEND_RECENT_STICKER_BOOTSTRAP = 1,
720
+ GENERATE_LINK_PREVIEW = 2
721
+ }
722
+ export declare enum PeerDataOperationRequestResponseMessagePeerDataOperationResult {
723
+ SUCCESS = 0,
724
+ NOT_AUTHORIZED = 1,
725
+ NOT_FOUND = 2,
726
+ THROTTLED = 3,
727
+ UNKNOWN_ERROR = 4
728
+ }
729
+ export type MessageContent = {
730
+ type: "text";
731
+ content: string;
732
+ } | {
733
+ type: "extendedText";
734
+ content: ExtendedTextMessage;
735
+ } | {
736
+ type: "image";
737
+ content: ImageMessage;
738
+ } | {
739
+ type: "video";
740
+ content: VideoMessage;
741
+ } | {
742
+ type: "audio";
743
+ content: AudioMessage;
744
+ } | {
745
+ type: "document";
746
+ content: DocumentMessage;
747
+ } | {
748
+ type: "sticker";
749
+ content: StickerMessage;
750
+ } | {
751
+ type: "location";
752
+ content: LocationMessage;
753
+ } | {
754
+ type: "liveLocation";
755
+ content: LiveLocationMessage;
756
+ } | {
757
+ type: "contact";
758
+ content: ContactMessage;
759
+ } | {
760
+ type: "contactsArray";
761
+ content: ContactsArrayMessage;
762
+ } | {
763
+ type: "buttons";
764
+ content: ButtonsMessage;
765
+ } | {
766
+ type: "list";
767
+ content: ListMessage;
768
+ } | {
769
+ type: "template";
770
+ content: TemplateMessage;
771
+ } | {
772
+ type: "buttonsResponse";
773
+ content: ButtonsResponseMessage;
774
+ } | {
775
+ type: "listResponse";
776
+ content: ListResponseMessage;
777
+ } | {
778
+ type: "groupInvite";
779
+ content: GroupInviteMessage;
780
+ } | {
781
+ type: "poll";
782
+ content: PollCreationMessage;
783
+ } | {
784
+ type: "pollUpdate";
785
+ content: PollUpdateMessage;
786
+ } | {
787
+ type: "reaction";
788
+ content: ReactionMessage;
789
+ } | {
790
+ type: "protocol";
791
+ content: ProtocolMessage;
792
+ } | {
793
+ type: "ephemeral";
794
+ content: EphemeralMessage;
795
+ } | {
796
+ type: "viewOnce";
797
+ content: ViewOnceMessage;
798
+ };
799
+ export declare function getMessageContent(message: Message): MessageContent | null;