1syntax = "proto2";
2package proto;
3
4message PaymentMoney {
5    optional int64 value = 1;
6    optional uint32 offset = 2;
7    optional string currencyCode = 3;
8}
9
10message HydratedQuickReplyButton {
11    optional string displayText = 1;
12    optional string id = 2;
13}
14
15message HydratedURLButton {
16    optional string displayText = 1;
17    optional string url = 2;
18}
19
20message HydratedCallButton {
21    optional string displayText = 1;
22    optional string phoneNumber = 2;
23}
24
25message HydratedTemplateButton {
26    optional uint32 index = 4;
27    oneof hydratedButton {
28        HydratedQuickReplyButton quickReplyButton = 1;
29        HydratedURLButton urlButton = 2;
30        HydratedCallButton callButton = 3;
31    }
32}
33
34message QuickReplyButton {
35    optional HighlyStructuredMessage displayText = 1;
36    optional string id = 2;
37}
38
39message URLButton {
40    optional HighlyStructuredMessage displayText = 1;
41    optional HighlyStructuredMessage url = 2;
42}
43
44message CallButton {
45    optional HighlyStructuredMessage displayText = 1;
46    optional HighlyStructuredMessage phoneNumber = 2;
47}
48
49message TemplateButton {
50    optional uint32 index = 4;
51    oneof button {
52        QuickReplyButton quickReplyButton = 1;
53        URLButton urlButton = 2;
54        CallButton callButton = 3;
55    }
56}
57
58message Location {
59    optional double degreesLatitude = 1;
60    optional double degreesLongitude = 2;
61    optional string name = 3;
62}
63
64message Point {
65    optional int32 xDeprecated = 1;
66    optional int32 yDeprecated = 2;
67    optional double x = 3;
68    optional double y = 4;
69}
70
71message InteractiveAnnotation {
72    repeated Point polygonVertices = 1;
73    oneof action {
74        Location location = 2;
75    }
76}
77
78message DeviceListMetadata {
79    optional bytes senderKeyHash = 1;
80    optional uint64 senderTimestamp = 2;
81    optional bytes recipientKeyHash = 8;
82    optional uint64 recipientTimestamp = 9;
83}
84
85message MessageContextInfo {
86    optional DeviceListMetadata deviceListMetadata = 1;
87}
88
89message AdReplyInfo {
90    optional string advertiserName = 1;
91    enum AdReplyInfoMediaType {
92        NONE = 0;
93        IMAGE = 1;
94        VIDEO = 2;
95    }
96    optional AdReplyInfoMediaType mediaType = 2;
97    optional bytes jpegThumbnail = 16;
98    optional string caption = 17;
99}
100
101message ExternalAdReplyInfo {
102    optional string title = 1;
103    optional string body = 2;
104    enum ExternalAdReplyInfoMediaType {
105        NONE = 0;
106        IMAGE = 1;
107        VIDEO = 2;
108    }
109    optional ExternalAdReplyInfoMediaType mediaType = 3;
110    optional string thumbnailUrl = 4;
111    optional string mediaUrl = 5;
112    optional bytes thumbnail = 6;
113    optional string sourceType = 7;
114    optional string sourceId = 8;
115    optional string sourceUrl = 9;
116}
117
118message ContextInfo {
119    optional string stanzaId = 1;
120    optional string participant = 2;
121    optional Message quotedMessage = 3;
122    optional string remoteJid = 4;
123    repeated string mentionedJid = 15;
124    optional string conversionSource = 18;
125    optional bytes conversionData = 19;
126    optional uint32 conversionDelaySeconds = 20;
127    optional uint32 forwardingScore = 21;
128    optional bool isForwarded = 22;
129    optional AdReplyInfo quotedAd = 23;
130    optional MessageKey placeholderKey = 24;
131    optional uint32 expiration = 25;
132    optional int64 ephemeralSettingTimestamp = 26;
133    optional bytes ephemeralSharedSecret = 27;
134    optional ExternalAdReplyInfo externalAdReply = 28;
135}
136
137message SenderKeyDistributionMessage {
138    optional string groupId = 1;
139    optional bytes axolotlSenderKeyDistributionMessage = 2;
140}
141
142message ImageMessage {
143    optional string url = 1;
144    optional string mimetype = 2;
145    optional string caption = 3;
146    optional bytes fileSha256 = 4;
147    optional uint64 fileLength = 5;
148    optional uint32 height = 6;
149    optional uint32 width = 7;
150    optional bytes mediaKey = 8;
151    optional bytes fileEncSha256 = 9;
152    repeated InteractiveAnnotation interactiveAnnotations = 10;
153    optional string directPath = 11;
154    optional int64 mediaKeyTimestamp = 12;
155    optional bytes jpegThumbnail = 16;
156    optional ContextInfo contextInfo = 17;
157    optional bytes firstScanSidecar = 18;
158    optional uint32 firstScanLength = 19;
159    optional uint32 experimentGroupId = 20;
160    optional bytes scansSidecar = 21;
161    repeated uint32 scanLengths = 22;
162    optional bytes midQualityFileSha256 = 23;
163    optional bytes midQualityFileEncSha256 = 24;
164    optional bool viewOnce = 25;
165    optional string thumbnailDirectPath = 26;
166    optional bytes thumbnailSha256 = 27;
167    optional bytes thumbnailEncSha256 = 28;
168}
169
170message InvoiceMessage {
171    optional string note = 1;
172    optional string token = 2;
173    enum InvoiceMessageAttachmentType {
174        IMAGE = 0;
175        PDF = 1;
176    }
177    optional InvoiceMessageAttachmentType attachmentType = 3;
178    optional string attachmentMimetype = 4;
179    optional bytes attachmentMediaKey = 5;
180    optional int64 attachmentMediaKeyTimestamp = 6;
181    optional bytes attachmentFileSha256 = 7;
182    optional bytes attachmentFileEncSha256 = 8;
183    optional string attachmentDirectPath = 9;
184    optional bytes attachmentJpegThumbnail = 10;
185}
186
187message ContactMessage {
188    optional string displayName = 1;
189    optional string vcard = 16;
190    optional ContextInfo contextInfo = 17;
191}
192
193message LocationMessage {
194    optional double degreesLatitude = 1;
195    optional double degreesLongitude = 2;
196    optional string name = 3;
197    optional string address = 4;
198    optional string url = 5;
199    optional bool isLive = 6;
200    optional uint32 accuracyInMeters = 7;
201    optional float speedInMps = 8;
202    optional uint32 degreesClockwiseFromMagneticNorth = 9;
203    optional string comment = 11;
204    optional bytes jpegThumbnail = 16;
205    optional ContextInfo contextInfo = 17;
206}
207
208message ExtendedTextMessage {
209    optional string text = 1;
210    optional string matchedText = 2;
211    optional string canonicalUrl = 4;
212    optional string description = 5;
213    optional string title = 6;
214    optional fixed32 textArgb = 7;
215    optional fixed32 backgroundArgb = 8;
216    enum ExtendedTextMessageFontType {
217        SANS_SERIF = 0;
218        SERIF = 1;
219        NORICAN_REGULAR = 2;
220        BRYNDAN_WRITE = 3;
221        BEBASNEUE_REGULAR = 4;
222        OSWALD_HEAVY = 5;
223    }
224    optional ExtendedTextMessageFontType font = 9;
225    enum ExtendedTextMessagePreviewType {
226        NONE = 0;
227        VIDEO = 1;
228    }
229    optional ExtendedTextMessagePreviewType previewType = 10;
230    optional bytes jpegThumbnail = 16;
231    optional ContextInfo contextInfo = 17;
232    optional bool doNotPlayInline = 18;
233}
234
235message DocumentMessage {
236    optional string url = 1;
237    optional string mimetype = 2;
238    optional string title = 3;
239    optional bytes fileSha256 = 4;
240    optional uint64 fileLength = 5;
241    optional uint32 pageCount = 6;
242    optional bytes mediaKey = 7;
243    optional string fileName = 8;
244    optional bytes fileEncSha256 = 9;
245    optional string directPath = 10;
246    optional int64 mediaKeyTimestamp = 11;
247    optional bool contactVcard = 12;
248    optional string thumbnailDirectPath = 13;
249    optional bytes thumbnailSha256 = 14;
250    optional bytes thumbnailEncSha256 = 15;
251    optional bytes jpegThumbnail = 16;
252    optional ContextInfo contextInfo = 17;
253    optional uint32 thumbnailHeight = 18;
254    optional uint32 thumbnailWidth = 19;
255}
256
257message AudioMessage {
258    optional string url = 1;
259    optional string mimetype = 2;
260    optional bytes fileSha256 = 3;
261    optional uint64 fileLength = 4;
262    optional uint32 seconds = 5;
263    optional bool ptt = 6;
264    optional bytes mediaKey = 7;
265    optional bytes fileEncSha256 = 8;
266    optional string directPath = 9;
267    optional int64 mediaKeyTimestamp = 10;
268    optional ContextInfo contextInfo = 17;
269    optional bytes streamingSidecar = 18;
270}
271
272message VideoMessage {
273    optional string url = 1;
274    optional string mimetype = 2;
275    optional bytes fileSha256 = 3;
276    optional uint64 fileLength = 4;
277    optional uint32 seconds = 5;
278    optional bytes mediaKey = 6;
279    optional string caption = 7;
280    optional bool gifPlayback = 8;
281    optional uint32 height = 9;
282    optional uint32 width = 10;
283    optional bytes fileEncSha256 = 11;
284    repeated InteractiveAnnotation interactiveAnnotations = 12;
285    optional string directPath = 13;
286    optional int64 mediaKeyTimestamp = 14;
287    optional bytes jpegThumbnail = 16;
288    optional ContextInfo contextInfo = 17;
289    optional bytes streamingSidecar = 18;
290    enum VideoMessageAttribution {
291        NONE = 0;
292        GIPHY = 1;
293        TENOR = 2;
294    }
295    optional VideoMessageAttribution gifAttribution = 19;
296    optional bool viewOnce = 20;
297    optional string thumbnailDirectPath = 21;
298    optional bytes thumbnailSha256 = 22;
299    optional bytes thumbnailEncSha256 = 23;
300}
301
302message Call {
303    optional bytes callKey = 1;
304}
305
306message Chat {
307    optional string displayName = 1;
308    optional string id = 2;
309}
310
311message ProtocolMessage {
312    optional MessageKey key = 1;
313    enum ProtocolMessageType {
314        REVOKE = 0;
315        EPHEMERAL_SETTING = 3;
316        EPHEMERAL_SYNC_RESPONSE = 4;
317        HISTORY_SYNC_NOTIFICATION = 5;
318        APP_STATE_SYNC_KEY_SHARE = 6;
319        APP_STATE_SYNC_KEY_REQUEST = 7;
320        MSG_FANOUT_BACKFILL_REQUEST = 8;
321        INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9;
322        APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10;
323    }
324    optional ProtocolMessageType type = 2;
325    optional uint32 ephemeralExpiration = 4;
326    optional int64 ephemeralSettingTimestamp = 5;
327    optional HistorySyncNotification historySyncNotification = 6;
328    optional AppStateSyncKeyShare appStateSyncKeyShare = 7;
329    optional AppStateSyncKeyRequest appStateSyncKeyRequest = 8;
330    optional InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9;
331    optional AppStateFatalExceptionNotification appStateFatalExceptionNotification = 10;
332}
333
334message HistorySyncNotification {
335    optional bytes fileSha256 = 1;
336    optional uint64 fileLength = 2;
337    optional bytes mediaKey = 3;
338    optional bytes fileEncSha256 = 4;
339    optional string directPath = 5;
340    enum HistorySyncNotificationHistorySyncType {
341        INITIAL_BOOTSTRAP = 0;
342        INITIAL_STATUS_V3 = 1;
343        FULL = 2;
344        RECENT = 3;
345        PUSH_NAME = 4;
346    }
347    optional HistorySyncNotificationHistorySyncType syncType = 6;
348    optional uint32 chunkOrder = 7;
349    optional string originalMessageId = 8;
350}
351
352message AppStateSyncKey {
353    optional AppStateSyncKeyId keyId = 1;
354    optional AppStateSyncKeyData keyData = 2;
355}
356
357message AppStateSyncKeyId {
358    optional bytes keyId = 1;
359}
360
361message AppStateSyncKeyFingerprint {
362    optional uint32 rawId = 1;
363    optional uint32 currentIndex = 2;
364    repeated uint32 deviceIndexes = 3 [packed=true];
365}
366
367message AppStateSyncKeyData {
368    optional bytes keyData = 1;
369    optional AppStateSyncKeyFingerprint fingerprint = 2;
370    optional int64 timestamp = 3;
371}
372
373message AppStateSyncKeyShare {
374    repeated AppStateSyncKey keys = 1;
375}
376
377message AppStateSyncKeyRequest {
378    repeated AppStateSyncKeyId keyIds = 1;
379}
380
381message AppStateFatalExceptionNotification {
382    repeated string collectionNames = 1;
383    optional int64 timestamp = 2;
384}
385
386message InitialSecurityNotificationSettingSync {
387    optional bool securityNotificationEnabled = 1;
388}
389
390message ContactsArrayMessage {
391    optional string displayName = 1;
392    repeated ContactMessage contacts = 2;
393    optional ContextInfo contextInfo = 17;
394}
395
396message HSMCurrency {
397    optional string currencyCode = 1;
398    optional int64 amount1000 = 2;
399}
400
401message HSMDateTimeComponent {
402    enum HSMDateTimeComponentDayOfWeekType {
403        MONDAY = 1;
404        TUESDAY = 2;
405        WEDNESDAY = 3;
406        THURSDAY = 4;
407        FRIDAY = 5;
408        SATURDAY = 6;
409        SUNDAY = 7;
410    }
411    optional HSMDateTimeComponentDayOfWeekType dayOfWeek = 1;
412    optional uint32 year = 2;
413    optional uint32 month = 3;
414    optional uint32 dayOfMonth = 4;
415    optional uint32 hour = 5;
416    optional uint32 minute = 6;
417    enum HSMDateTimeComponentCalendarType {
418        GREGORIAN = 1;
419        SOLAR_HIJRI = 2;
420    }
421    optional HSMDateTimeComponentCalendarType calendar = 7;
422}
423
424message HSMDateTimeUnixEpoch {
425    optional int64 timestamp = 1;
426}
427
428message HSMDateTime {
429    oneof datetimeOneof {
430        HSMDateTimeComponent component = 1;
431        HSMDateTimeUnixEpoch unixEpoch = 2;
432    }
433}
434
435message HSMLocalizableParameter {
436    optional string default = 1;
437    oneof paramOneof {
438        HSMCurrency currency = 2;
439        HSMDateTime dateTime = 3;
440    }
441}
442
443message HighlyStructuredMessage {
444    optional string namespace = 1;
445    optional string elementName = 2;
446    repeated string params = 3;
447    optional string fallbackLg = 4;
448    optional string fallbackLc = 5;
449    repeated HSMLocalizableParameter localizableParams = 6;
450    optional string deterministicLg = 7;
451    optional string deterministicLc = 8;
452    optional TemplateMessage hydratedHsm = 9;
453}
454
455message SendPaymentMessage {
456    optional Message noteMessage = 2;
457    optional MessageKey requestMessageKey = 3;
458}
459
460message RequestPaymentMessage {
461    optional Message noteMessage = 4;
462    optional string currencyCodeIso4217 = 1;
463    optional uint64 amount1000 = 2;
464    optional string requestFrom = 3;
465    optional int64 expiryTimestamp = 5;
466    optional PaymentMoney amount = 6;
467}
468
469message DeclinePaymentRequestMessage {
470    optional MessageKey key = 1;
471}
472
473message CancelPaymentRequestMessage {
474    optional MessageKey key = 1;
475}
476
477message LiveLocationMessage {
478    optional double degreesLatitude = 1;
479    optional double degreesLongitude = 2;
480    optional uint32 accuracyInMeters = 3;
481    optional float speedInMps = 4;
482    optional uint32 degreesClockwiseFromMagneticNorth = 5;
483    optional string caption = 6;
484    optional int64 sequenceNumber = 7;
485    optional uint32 timeOffset = 8;
486    optional bytes jpegThumbnail = 16;
487    optional ContextInfo contextInfo = 17;
488}
489
490message StickerMessage {
491    optional string url = 1;
492    optional bytes fileSha256 = 2;
493    optional bytes fileEncSha256 = 3;
494    optional bytes mediaKey = 4;
495    optional string mimetype = 5;
496    optional uint32 height = 6;
497    optional uint32 width = 7;
498    optional string directPath = 8;
499    optional uint64 fileLength = 9;
500    optional int64 mediaKeyTimestamp = 10;
501    optional uint32 firstFrameLength = 11;
502    optional bytes firstFrameSidecar = 12;
503    optional bool isAnimated = 13;
504    optional bytes pngThumbnail = 16;
505    optional ContextInfo contextInfo = 17;
506}
507
508message FourRowTemplate {
509    optional HighlyStructuredMessage content = 6;
510    optional HighlyStructuredMessage footer = 7;
511    repeated TemplateButton buttons = 8;
512    oneof title {
513        DocumentMessage documentMessage = 1;
514        HighlyStructuredMessage highlyStructuredMessage = 2;
515        ImageMessage imageMessage = 3;
516        VideoMessage videoMessage = 4;
517        LocationMessage locationMessage = 5;
518    }
519}
520
521message HydratedFourRowTemplate {
522    optional string hydratedContentText = 6;
523    optional string hydratedFooterText = 7;
524    repeated HydratedTemplateButton hydratedButtons = 8;
525    optional string templateId = 9;
526    oneof title {
527        DocumentMessage documentMessage = 1;
528        string hydratedTitleText = 2;
529        ImageMessage imageMessage = 3;
530        VideoMessage videoMessage = 4;
531        LocationMessage locationMessage = 5;
532    }
533}
534
535message TemplateMessage {
536    optional ContextInfo contextInfo = 3;
537    optional HydratedFourRowTemplate hydratedTemplate = 4;
538    oneof format {
539        FourRowTemplate fourRowTemplate = 1;
540        HydratedFourRowTemplate hydratedFourRowTemplate = 2;
541    }
542}
543
544message TemplateButtonReplyMessage {
545    optional string selectedId = 1;
546    optional string selectedDisplayText = 2;
547    optional ContextInfo contextInfo = 3;
548    optional uint32 selectedIndex = 4;
549}
550
551message CatalogSnapshot {
552    optional ImageMessage catalogImage = 1;
553    optional string title = 2;
554    optional string description = 3;
555}
556
557message ProductSnapshot {
558    optional ImageMessage productImage = 1;
559    optional string productId = 2;
560    optional string title = 3;
561    optional string description = 4;
562    optional string currencyCode = 5;
563    optional int64 priceAmount1000 = 6;
564    optional string retailerId = 7;
565    optional string url = 8;
566    optional uint32 productImageCount = 9;
567    optional string firstImageId = 11;
568}
569
570message ProductMessage {
571    optional ProductSnapshot product = 1;
572    optional string businessOwnerJid = 2;
573    optional CatalogSnapshot catalog = 4;
574    optional ContextInfo contextInfo = 17;
575}
576
577message OrderMessage {
578    optional string orderId = 1;
579    optional bytes thumbnail = 2;
580    optional int32 itemCount = 3;
581    enum OrderMessageOrderStatus {
582        INQUIRY = 1;
583    }
584    optional OrderMessageOrderStatus status = 4;
585    enum OrderMessageOrderSurface {
586        CATALOG = 1;
587    }
588    optional OrderMessageOrderSurface surface = 5;
589    optional string message = 6;
590    optional string orderTitle = 7;
591    optional string sellerJid = 8;
592    optional string token = 9;
593    optional int64 totalAmount1000 = 10;
594    optional string totalCurrencyCode = 11;
595    optional ContextInfo contextInfo = 17;
596}
597
598message Row {
599    optional string title = 1;
600    optional string description = 2;
601    optional string rowId = 3;
602}
603
604message Section {
605    optional string title = 1;
606    repeated Row rows = 2;
607}
608
609message ListMessage {
610    optional string title = 1;
611    optional string description = 2;
612    optional string buttonText = 3;
613    enum ListMessageListType {
614        UNKNOWN = 0;
615        SINGLE_SELECT = 1;
616    }
617    optional ListMessageListType listType = 4;
618    repeated Section sections = 5;
619}
620
621message SingleSelectReply {
622    optional string selectedRowId = 1;
623}
624
625message ListResponseMessage {
626    optional string title = 1;
627    enum ListResponseMessageListType {
628        UNKNOWN = 0;
629        SINGLE_SELECT = 1;
630    }
631    optional ListResponseMessageListType listType = 2;
632    optional SingleSelectReply singleSelectReply = 3;
633    optional ContextInfo contextInfo = 4;
634    optional string description = 5;
635}
636
637message GroupInviteMessage {
638    optional string groupJid = 1;
639    optional string inviteCode = 2;
640    optional int64 inviteExpiration = 3;
641    optional string groupName = 4;
642    optional bytes jpegThumbnail = 5;
643    optional string caption = 6;
644    optional ContextInfo contextInfo = 7;
645}
646
647message EphemeralSetting {
648    optional string chatJid = 1;
649    optional uint32 ephemeralExpiration = 2;
650    optional int64 ephemeralSettingTimestamp = 3;
651}
652
653message DeviceSentMessage {
654    optional string destinationJid = 1;
655    optional Message message = 2;
656    optional string phash = 3;
657    repeated EphemeralSetting broadcastEphemeralSettings = 4;
658}
659
660message FutureProofMessage {
661    optional Message message = 1;
662}
663
664message ButtonText {
665    optional string displayText = 1;
666}
667
668message Button {
669    optional string buttonId = 1;
670    optional ButtonText buttonText = 2;
671    enum ButtonType {
672        UNKNOWN = 0;
673        RESPONSE = 1;
674    }
675    optional ButtonType type = 3;
676}
677
678message ButtonsMessage {
679    optional string contentText = 6;
680    optional string footerText = 7;
681    optional ContextInfo contextInfo = 8;
682    repeated Button buttons = 9;
683    enum ButtonsMessageHeaderType {
684        UNKNOWN = 0;
685        EMPTY = 1;
686        TEXT = 2;
687        DOCUMENT = 3;
688        IMAGE = 4;
689        VIDEO = 5;
690        LOCATION = 6;
691    }
692    optional ButtonsMessageHeaderType headerType = 10;
693    oneof header {
694        string text = 1;
695        DocumentMessage documentMessage = 2;
696        ImageMessage imageMessage = 3;
697        VideoMessage videoMessage = 4;
698        LocationMessage locationMessage = 5;
699    }
700}
701
702message ButtonsResponseMessage {
703    optional string selectedButtonId = 1;
704    optional ContextInfo contextInfo = 3;
705    enum ButtonsResponseMessageType {
706        UNKNOWN = 0;
707        DISPLAY_TEXT = 1;
708    }
709    optional ButtonsResponseMessageType type = 4;
710    oneof response {
711        string selectedDisplayText = 2;
712    }
713}
714
715message Message {
716    optional string conversation = 1;
717    optional SenderKeyDistributionMessage senderKeyDistributionMessage = 2;
718    optional ImageMessage imageMessage = 3;
719    optional ContactMessage contactMessage = 4;
720    optional LocationMessage locationMessage = 5;
721    optional ExtendedTextMessage extendedTextMessage = 6;
722    optional DocumentMessage documentMessage = 7;
723    optional AudioMessage audioMessage = 8;
724    optional VideoMessage videoMessage = 9;
725    optional Call call = 10;
726    optional Chat chat = 11;
727    optional ProtocolMessage protocolMessage = 12;
728    optional ContactsArrayMessage contactsArrayMessage = 13;
729    optional HighlyStructuredMessage highlyStructuredMessage = 14;
730    optional SenderKeyDistributionMessage fastRatchetKeySenderKeyDistributionMessage = 15;
731    optional SendPaymentMessage sendPaymentMessage = 16;
732    optional LiveLocationMessage liveLocationMessage = 18;
733    optional RequestPaymentMessage requestPaymentMessage = 22;
734    optional DeclinePaymentRequestMessage declinePaymentRequestMessage = 23;
735    optional CancelPaymentRequestMessage cancelPaymentRequestMessage = 24;
736    optional TemplateMessage templateMessage = 25;
737    optional StickerMessage stickerMessage = 26;
738    optional GroupInviteMessage groupInviteMessage = 28;
739    optional TemplateButtonReplyMessage templateButtonReplyMessage = 29;
740    optional ProductMessage productMessage = 30;
741    optional DeviceSentMessage deviceSentMessage = 31;
742    optional MessageContextInfo messageContextInfo = 35;
743    optional ListMessage listMessage = 36;
744    optional FutureProofMessage viewOnceMessage = 37;
745    optional OrderMessage orderMessage = 38;
746    optional ListResponseMessage listResponseMessage = 39;
747    optional FutureProofMessage ephemeralMessage = 40;
748    optional InvoiceMessage invoiceMessage = 41;
749    optional ButtonsMessage buttonsMessage = 42;
750    optional ButtonsResponseMessage buttonsResponseMessage = 43;
751}
752
753message MessageKey {
754    optional string remoteJid = 1;
755    optional bool fromMe = 2;
756    optional string id = 3;
757    optional string participant = 4;
758}
759
760message WebFeatures {
761    enum WebFeaturesFlag {
762        NOT_STARTED = 0;
763        FORCE_UPGRADE = 1;
764        DEVELOPMENT = 2;
765        PRODUCTION = 3;
766    }
767    optional WebFeaturesFlag labelsDisplay = 1;
768    optional WebFeaturesFlag voipIndividualOutgoing = 2;
769    optional WebFeaturesFlag groupsV3 = 3;
770    optional WebFeaturesFlag groupsV3Create = 4;
771    optional WebFeaturesFlag changeNumberV2 = 5;
772    optional WebFeaturesFlag queryStatusV3Thumbnail = 6;
773    optional WebFeaturesFlag liveLocations = 7;
774    optional WebFeaturesFlag queryVname = 8;
775    optional WebFeaturesFlag voipIndividualIncoming = 9;
776    optional WebFeaturesFlag quickRepliesQuery = 10;
777    optional WebFeaturesFlag payments = 11;
778    optional WebFeaturesFlag stickerPackQuery = 12;
779    optional WebFeaturesFlag liveLocationsFinal = 13;
780    optional WebFeaturesFlag labelsEdit = 14;
781    optional WebFeaturesFlag mediaUpload = 15;
782    optional WebFeaturesFlag mediaUploadRichQuickReplies = 18;
783    optional WebFeaturesFlag vnameV2 = 19;
784    optional WebFeaturesFlag videoPlaybackUrl = 20;
785    optional WebFeaturesFlag statusRanking = 21;
786    optional WebFeaturesFlag voipIndividualVideo = 22;
787    optional WebFeaturesFlag thirdPartyStickers = 23;
788    optional WebFeaturesFlag frequentlyForwardedSetting = 24;
789    optional WebFeaturesFlag groupsV4JoinPermission = 25;
790    optional WebFeaturesFlag recentStickers = 26;
791    optional WebFeaturesFlag catalog = 27;
792    optional WebFeaturesFlag starredStickers = 28;
793    optional WebFeaturesFlag voipGroupCall = 29;
794    optional WebFeaturesFlag templateMessage = 30;
795    optional WebFeaturesFlag templateMessageInteractivity = 31;
796    optional WebFeaturesFlag ephemeralMessages = 32;
797    optional WebFeaturesFlag e2ENotificationSync = 33;
798    optional WebFeaturesFlag recentStickersV2 = 34;
799    optional WebFeaturesFlag syncdRelease1 = 35;
800    optional WebFeaturesFlag recentStickersV3 = 36;
801    optional WebFeaturesFlag userNotice = 37;
802    optional WebFeaturesFlag syncdRelease11 = 38;
803    optional WebFeaturesFlag support = 39;
804    optional WebFeaturesFlag groupUiiCleanup = 40;
805    optional WebFeaturesFlag groupDogfoodingInternalOnly = 41;
806    optional WebFeaturesFlag settingsSync = 42;
807}
808
809message NotificationMessageInfo {
810    optional MessageKey key = 1;
811    optional Message message = 2;
812    optional uint64 messageTimestamp = 3;
813    optional string participant = 4;
814}
815
816message WebNotificationsInfo {
817    optional uint64 timestamp = 2;
818    optional uint32 unreadChats = 3;
819    optional uint32 notifyMessageCount = 4;
820    repeated WebMessageInfo notifyMessages = 5;
821}
822
823message PaymentInfo {
824    enum PaymentInfoCurrency {
825        UNKNOWN_CURRENCY = 0;
826        INR = 1;
827    }
828    optional PaymentInfoCurrency currencyDeprecated = 1;
829    optional uint64 amount1000 = 2;
830    optional string receiverJid = 3;
831    enum PaymentInfoStatus {
832        UNKNOWN_STATUS = 0;
833        PROCESSING = 1;
834        SENT = 2;
835        NEED_TO_ACCEPT = 3;
836        COMPLETE = 4;
837        COULD_NOT_COMPLETE = 5;
838        REFUNDED = 6;
839        EXPIRED = 7;
840        REJECTED = 8;
841        CANCELLED = 9;
842        WAITING_FOR_PAYER = 10;
843        WAITING = 11;
844    }
845    optional PaymentInfoStatus status = 4;
846    optional uint64 transactionTimestamp = 5;
847    optional MessageKey requestMessageKey = 6;
848    optional uint64 expiryTimestamp = 7;
849    optional bool futureproofed = 8;
850    optional string currency = 9;
851    enum PaymentInfoTxnStatus {
852        UNKNOWN = 0;
853        PENDING_SETUP = 1;
854        PENDING_RECEIVER_SETUP = 2;
855        INIT = 3;
856        SUCCESS = 4;
857        COMPLETED = 5;
858        FAILED = 6;
859        FAILED_RISK = 7;
860        FAILED_PROCESSING = 8;
861        FAILED_RECEIVER_PROCESSING = 9;
862        FAILED_DA = 10;
863        FAILED_DA_FINAL = 11;
864        REFUNDED_TXN = 12;
865        REFUND_FAILED = 13;
866        REFUND_FAILED_PROCESSING = 14;
867        REFUND_FAILED_DA = 15;
868        EXPIRED_TXN = 16;
869        AUTH_CANCELED = 17;
870        AUTH_CANCEL_FAILED_PROCESSING = 18;
871        AUTH_CANCEL_FAILED = 19;
872        COLLECT_INIT = 20;
873        COLLECT_SUCCESS = 21;
874        COLLECT_FAILED = 22;
875        COLLECT_FAILED_RISK = 23;
876        COLLECT_REJECTED = 24;
877        COLLECT_EXPIRED = 25;
878        COLLECT_CANCELED = 26;
879        COLLECT_CANCELLING = 27;
880    }
881    optional PaymentInfoTxnStatus txnStatus = 10;
882    optional bool useNoviFiatFormat = 11;
883    optional PaymentMoney primaryAmount = 12;
884    optional PaymentMoney exchangeAmount = 13;
885}
886
887message WebMessageInfo {
888    required MessageKey key = 1;
889    optional Message message = 2;
890    optional uint64 messageTimestamp = 3;
891    enum WebMessageInfoStatus {
892        ERROR = 0;
893        PENDING = 1;
894        SERVER_ACK = 2;
895        DELIVERY_ACK = 3;
896        READ = 4;
897        PLAYED = 5;
898    }
899    optional WebMessageInfoStatus status = 4;
900    optional string participant = 5;
901    optional bool ignore = 16;
902    optional bool starred = 17;
903    optional bool broadcast = 18;
904    optional string pushName = 19;
905    optional bytes mediaCiphertextSha256 = 20;
906    optional bool multicast = 21;
907    optional bool urlText = 22;
908    optional bool urlNumber = 23;
909    enum WebMessageInfoStubType {
910        UNKNOWN = 0;
911        REVOKE = 1;
912        CIPHERTEXT = 2;
913        FUTUREPROOF = 3;
914        NON_VERIFIED_TRANSITION = 4;
915        UNVERIFIED_TRANSITION = 5;
916        VERIFIED_TRANSITION = 6;
917        VERIFIED_LOW_UNKNOWN = 7;
918        VERIFIED_HIGH = 8;
919        VERIFIED_INITIAL_UNKNOWN = 9;
920        VERIFIED_INITIAL_LOW = 10;
921        VERIFIED_INITIAL_HIGH = 11;
922        VERIFIED_TRANSITION_ANY_TO_NONE = 12;
923        VERIFIED_TRANSITION_ANY_TO_HIGH = 13;
924        VERIFIED_TRANSITION_HIGH_TO_LOW = 14;
925        VERIFIED_TRANSITION_HIGH_TO_UNKNOWN = 15;
926        VERIFIED_TRANSITION_UNKNOWN_TO_LOW = 16;
927        VERIFIED_TRANSITION_LOW_TO_UNKNOWN = 17;
928        VERIFIED_TRANSITION_NONE_TO_LOW = 18;
929        VERIFIED_TRANSITION_NONE_TO_UNKNOWN = 19;
930        GROUP_CREATE = 20;
931        GROUP_CHANGE_SUBJECT = 21;
932        GROUP_CHANGE_ICON = 22;
933        GROUP_CHANGE_INVITE_LINK = 23;
934        GROUP_CHANGE_DESCRIPTION = 24;
935        GROUP_CHANGE_RESTRICT = 25;
936        GROUP_CHANGE_ANNOUNCE = 26;
937        GROUP_PARTICIPANT_ADD = 27;
938        GROUP_PARTICIPANT_REMOVE = 28;
939        GROUP_PARTICIPANT_PROMOTE = 29;
940        GROUP_PARTICIPANT_DEMOTE = 30;
941        GROUP_PARTICIPANT_INVITE = 31;
942        GROUP_PARTICIPANT_LEAVE = 32;
943        GROUP_PARTICIPANT_CHANGE_NUMBER = 33;
944        BROADCAST_CREATE = 34;
945        BROADCAST_ADD = 35;
946        BROADCAST_REMOVE = 36;
947        GENERIC_NOTIFICATION = 37;
948        E2E_IDENTITY_CHANGED = 38;
949        E2E_ENCRYPTED = 39;
950        CALL_MISSED_VOICE = 40;
951        CALL_MISSED_VIDEO = 41;
952        INDIVIDUAL_CHANGE_NUMBER = 42;
953        GROUP_DELETE = 43;
954        GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE = 44;
955        CALL_MISSED_GROUP_VOICE = 45;
956        CALL_MISSED_GROUP_VIDEO = 46;
957        PAYMENT_CIPHERTEXT = 47;
958        PAYMENT_FUTUREPROOF = 48;
959        PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED = 49;
960        PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED = 50;
961        PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED = 51;
962        PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP = 52;
963        PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP = 53;
964        PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER = 54;
965        PAYMENT_ACTION_SEND_PAYMENT_REMINDER = 55;
966        PAYMENT_ACTION_SEND_PAYMENT_INVITATION = 56;
967        PAYMENT_ACTION_REQUEST_DECLINED = 57;
968        PAYMENT_ACTION_REQUEST_EXPIRED = 58;
969        PAYMENT_ACTION_REQUEST_CANCELLED = 59;
970        BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM = 60;
971        BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP = 61;
972        BIZ_INTRO_TOP = 62;
973        BIZ_INTRO_BOTTOM = 63;
974        BIZ_NAME_CHANGE = 64;
975        BIZ_MOVE_TO_CONSUMER_APP = 65;
976        BIZ_TWO_TIER_MIGRATION_TOP = 66;
977        BIZ_TWO_TIER_MIGRATION_BOTTOM = 67;
978        OVERSIZED = 68;
979        GROUP_CHANGE_NO_FREQUENTLY_FORWARDED = 69;
980        GROUP_V4_ADD_INVITE_SENT = 70;
981        GROUP_PARTICIPANT_ADD_REQUEST_JOIN = 71;
982        CHANGE_EPHEMERAL_SETTING = 72;
983        E2E_DEVICE_CHANGED = 73;
984        VIEWED_ONCE = 74;
985        E2E_ENCRYPTED_NOW = 75;
986        BLUE_MSG_BSP_FB_TO_BSP_PREMISE = 76;
987        BLUE_MSG_BSP_FB_TO_SELF_FB = 77;
988        BLUE_MSG_BSP_FB_TO_SELF_PREMISE = 78;
989        BLUE_MSG_BSP_FB_UNVERIFIED = 79;
990        BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 80;
991        BLUE_MSG_BSP_FB_VERIFIED = 81;
992        BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 82;
993        BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE = 83;
994        BLUE_MSG_BSP_PREMISE_UNVERIFIED = 84;
995        BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 85;
996        BLUE_MSG_BSP_PREMISE_VERIFIED = 86;
997        BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 87;
998        BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED = 88;
999        BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED = 89;
1000        BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED = 90;
1001        BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED = 91;
1002        BLUE_MSG_SELF_FB_TO_BSP_PREMISE = 92;
1003        BLUE_MSG_SELF_FB_TO_SELF_PREMISE = 93;
1004        BLUE_MSG_SELF_FB_UNVERIFIED = 94;
1005        BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 95;
1006        BLUE_MSG_SELF_FB_VERIFIED = 96;
1007        BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 97;
1008        BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE = 98;
1009        BLUE_MSG_SELF_PREMISE_UNVERIFIED = 99;
1010        BLUE_MSG_SELF_PREMISE_VERIFIED = 100;
1011        BLUE_MSG_TO_BSP_FB = 101;
1012        BLUE_MSG_TO_CONSUMER = 102;
1013        BLUE_MSG_TO_SELF_FB = 103;
1014        BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED = 104;
1015        BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 105;
1016        BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED = 106;
1017        BLUE_MSG_UNVERIFIED_TO_VERIFIED = 107;
1018        BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED = 108;
1019        BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 109;
1020        BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED = 110;
1021        BLUE_MSG_VERIFIED_TO_UNVERIFIED = 111;
1022        BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 112;
1023        BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED = 113;
1024        BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 114;
1025        BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED = 115;
1026        BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 116;
1027        BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 117;
1028        E2E_IDENTITY_UNAVAILABLE = 118;
1029    }
1030    optional WebMessageInfoStubType messageStubType = 24;
1031    optional bool clearMedia = 25;
1032    repeated string messageStubParameters = 26;
1033    optional uint32 duration = 27;
1034    repeated string labels = 28;
1035    optional PaymentInfo paymentInfo = 29;
1036    optional LiveLocationMessage finalLiveLocation = 30;
1037    optional PaymentInfo quotedPaymentInfo = 31;
1038    optional uint64 ephemeralStartTimestamp = 32;
1039    optional uint32 ephemeralDuration = 33;
1040    optional bool ephemeralOffToOn = 34;
1041    optional bool ephemeralOutOfSync = 35;
1042    enum WebMessageInfoBizPrivacyStatus {
1043        E2EE = 0;
1044        FB = 2;
1045        BSP = 1;
1046        BSP_AND_FB = 3;
1047    }
1048    optional WebMessageInfoBizPrivacyStatus bizPrivacyStatus = 36;
1049    optional string verifiedBizName = 37;
1050}