summaryrefslogtreecommitdiffstats
path: root/vendor/go.mau.fi/whatsmeow/binary/proto/def.proto
blob: 935315853770b3dea8b00f0190c51dcdff9dda96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
syntax = "proto2";
package proto;

message ADVSignedKeyIndexList {
    optional bytes details = 1;
    optional bytes accountSignature = 2;
}

message ADVSignedDeviceIdentity {
    optional bytes details = 1;
    optional bytes accountSignatureKey = 2;
    optional bytes accountSignature = 3;
    optional bytes deviceSignature = 4;
}

message ADVSignedDeviceIdentityHMAC {
    optional bytes details = 1;
    optional bytes hmac = 2;
}

message ADVKeyIndexList {
    optional uint32 rawId = 1;
    optional uint64 timestamp = 2;
    optional uint32 currentIndex = 3;
    repeated uint32 validIndexes = 4 [packed=true];
}

message ADVDeviceIdentity {
    optional uint32 rawId = 1;
    optional uint64 timestamp = 2;
    optional uint32 keyIndex = 3;
}

message CompanionProps {
    optional string os = 1;
    optional AppVersion version = 2;
    enum CompanionPropsPlatformType {
        UNKNOWN = 0;
        CHROME = 1;
        FIREFOX = 2;
        IE = 3;
        OPERA = 4;
        SAFARI = 5;
        EDGE = 6;
        DESKTOP = 7;
        IPAD = 8;
        ANDROID_TABLET = 9;
        OHANA = 10;
        ALOHA = 11;
        CATALINA = 12;
        TCL_TV = 13;
    }
    optional CompanionPropsPlatformType platformType = 3;
    optional bool requireFullSync = 4;
}

message AppVersion {
    optional uint32 primary = 1;
    optional uint32 secondary = 2;
    optional uint32 tertiary = 3;
    optional uint32 quaternary = 4;
    optional uint32 quinary = 5;
}

message ProtocolMessage {
    optional MessageKey key = 1;
    enum ProtocolMessageType {
        REVOKE = 0;
        EPHEMERAL_SETTING = 3;
        EPHEMERAL_SYNC_RESPONSE = 4;
        HISTORY_SYNC_NOTIFICATION = 5;
        APP_STATE_SYNC_KEY_SHARE = 6;
        APP_STATE_SYNC_KEY_REQUEST = 7;
        MSG_FANOUT_BACKFILL_REQUEST = 8;
        INITIAL_SECURITY_NOTIFICATION_SETTING_SYNC = 9;
        APP_STATE_FATAL_EXCEPTION_NOTIFICATION = 10;
    }
    optional ProtocolMessageType type = 2;
    optional uint32 ephemeralExpiration = 4;
    optional int64 ephemeralSettingTimestamp = 5;
    optional HistorySyncNotification historySyncNotification = 6;
    optional AppStateSyncKeyShare appStateSyncKeyShare = 7;
    optional AppStateSyncKeyRequest appStateSyncKeyRequest = 8;
    optional InitialSecurityNotificationSettingSync initialSecurityNotificationSettingSync = 9;
    optional AppStateFatalExceptionNotification appStateFatalExceptionNotification = 10;
    optional DisappearingMode disappearingMode = 11;
}

message ProductMessage {
    optional ProductSnapshot product = 1;
    optional string businessOwnerJid = 2;
    optional CatalogSnapshot catalog = 4;
    optional string body = 5;
    optional string footer = 6;
    optional ContextInfo contextInfo = 17;
}

message ProductSnapshot {
    optional ImageMessage productImage = 1;
    optional string productId = 2;
    optional string title = 3;
    optional string description = 4;
    optional string currencyCode = 5;
    optional int64 priceAmount1000 = 6;
    optional string retailerId = 7;
    optional string url = 8;
    optional uint32 productImageCount = 9;
    optional string firstImageId = 11;
    optional int64 salePriceAmount1000 = 12;
}

message CatalogSnapshot {
    optional ImageMessage catalogImage = 1;
    optional string title = 2;
    optional string description = 3;
}

message PollVoteMessage {
    repeated bytes selectedOptions = 1;
    optional int64 senderTimestampMs = 2;
}

message PollUpdateMessage {
    optional MessageKey pollCreationMessageKey = 1;
    optional PollEncValue vote = 2;
}

message PollEncValue {
    optional bytes encPayload = 1;
    optional bytes encIv = 2;
}

message PollCreationMessage {
    optional bytes encKey = 1;
    optional string name = 2;
    repeated Option options = 3;
    optional uint32 selectableOptionsCount = 4;
    optional ContextInfo contextInfo = 5;
}

message Option {
    optional string optionName = 1;
}

message PaymentInviteMessage {
    enum PaymentInviteMessageServiceType {
        UNKNOWN = 0;
        FBPAY = 1;
        NOVI = 2;
        UPI = 3;
    }
    optional PaymentInviteMessageServiceType serviceType = 1;
    optional int64 expiryTimestamp = 2;
}

message OrderMessage {
    optional string orderId = 1;
    optional bytes thumbnail = 2;
    optional int32 itemCount = 3;
    enum OrderMessageOrderStatus {
        INQUIRY = 1;
    }
    optional OrderMessageOrderStatus status = 4;
    enum OrderMessageOrderSurface {
        CATALOG = 1;
    }
    optional OrderMessageOrderSurface surface = 5;
    optional string message = 6;
    optional string orderTitle = 7;
    optional string sellerJid = 8;
    optional string token = 9;
    optional int64 totalAmount1000 = 10;
    optional string totalCurrencyCode = 11;
    optional ContextInfo contextInfo = 17;
}

message LocationMessage {
    optional double degreesLatitude = 1;
    optional double degreesLongitude = 2;
    optional string name = 3;
    optional string address = 4;
    optional string url = 5;
    optional bool isLive = 6;
    optional uint32 accuracyInMeters = 7;
    optional float speedInMps = 8;
    optional uint32 degreesClockwiseFromMagneticNorth = 9;
    optional string comment = 11;
    optional bytes jpegThumbnail = 16;
    optional ContextInfo contextInfo = 17;
}

message LiveLocationMessage {
    optional double degreesLatitude = 1;
    optional double degreesLongitude = 2;
    optional uint32 accuracyInMeters = 3;
    optional float speedInMps = 4;
    optional uint32 degreesClockwiseFromMagneticNorth = 5;
    optional string caption = 6;
    optional int64 sequenceNumber = 7;
    optional uint32 timeOffset = 8;
    optional bytes jpegThumbnail = 16;
    optional ContextInfo contextInfo = 17;
}

message ListResponseMessage {
    optional string title = 1;
    enum ListResponseMessageListType {
        UNKNOWN = 0;
        SINGLE_SELECT = 1;
    }
    optional ListResponseMessageListType listType = 2;
    optional SingleSelectReply singleSelectReply = 3;
    optional ContextInfo contextInfo = 4;
    optional string description = 5;
}

message SingleSelectReply {
    optional string selectedRowId = 1;
}

message ListMessage {
    optional string title = 1;
    optional string description = 2;
    optional string buttonText = 3;
    enum ListMessageListType {
        UNKNOWN = 0;
        SINGLE_SELECT = 1;
        PRODUCT_LIST = 2;
    }
    optional ListMessageListType listType = 4;
    repeated Section sections = 5;
    optional ProductListInfo productListInfo = 6;
    optional string footerText = 7;
    optional ContextInfo contextInfo = 8;
}

message Section {
    optional string title = 1;
    repeated Row rows = 2;
}

message Row {
    optional string title = 1;
    optional string description = 2;
    optional string rowId = 3;
}

message Product {
    optional string productId = 1;
}

message ProductSection {
    optional string title = 1;
    repeated Product products = 2;
}

message ProductListInfo {
    repeated ProductSection productSections = 1;
    optional ProductListHeaderImage headerImage = 2;
    optional string businessOwnerJid = 3;
}

message ProductListHeaderImage {
    optional string productId = 1;
    optional bytes jpegThumbnail = 2;
}

message InvoiceMessage {
    optional string note = 1;
    optional string token = 2;
    enum InvoiceMessageAttachmentType {
        IMAGE = 0;
        PDF = 1;
    }
    optional InvoiceMessageAttachmentType attachmentType = 3;
    optional string attachmentMimetype = 4;
    optional bytes attachmentMediaKey = 5;
    optional int64 attachmentMediaKeyTimestamp = 6;
    optional bytes attachmentFileSha256 = 7;
    optional bytes attachmentFileEncSha256 = 8;
    optional string attachmentDirectPath = 9;
    optional bytes attachmentJpegThumbnail = 10;
}

message InteractiveResponseMessage {
    optional InteractiveResponseMessageBody body = 1;
    optional ContextInfo contextInfo = 15;
    oneof interactiveResponseMessage {
        NativeFlowResponseMessage nativeFlowResponseMessage = 2;
    }
}

message NativeFlowResponseMessage {
    optional string name = 1;
    optional string paramsJson = 2;
    optional int32 version = 3;
}

// Renamed from Message$InteractiveResponseMessage$Body
message InteractiveResponseMessageBody {
    optional string text = 1;
}

message InteractiveMessage {
    optional Header header = 1;
    optional InteractiveMessageBody body = 2;
    optional Footer footer = 3;
    optional ContextInfo contextInfo = 15;
    oneof interactiveMessage {
        ShopMessage shopStorefrontMessage = 4;
        CollectionMessage collectionMessage = 5;
        NativeFlowMessage nativeFlowMessage = 6;
    }
}

message ShopMessage {
    optional string id = 1;
    enum ShopMessageSurface {
        UNKNOWN_SURFACE = 0;
        FB = 1;
        IG = 2;
        WA = 3;
    }
    optional ShopMessageSurface surface = 2;
    optional int32 messageVersion = 3;
}

message NativeFlowMessage {
    repeated NativeFlowButton buttons = 1;
    optional string messageParamsJson = 2;
    optional int32 messageVersion = 3;
}

message NativeFlowButton {
    optional string name = 1;
    optional string buttonParamsJson = 2;
}

message Header {
    optional string title = 1;
    optional string subtitle = 2;
    optional bool hasMediaAttachment = 5;
    oneof media {
        DocumentMessage documentMessage = 3;
        ImageMessage imageMessage = 4;
        bytes jpegThumbnail = 6;
        VideoMessage videoMessage = 7;
    }
}

message Footer {
    optional string text = 1;
}

message CollectionMessage {
    optional string bizJid = 1;
    optional string id = 2;
    optional int32 messageVersion = 3;
}

// Renamed from Message$InteractiveMessage$Body
message InteractiveMessageBody {
    optional string text = 1;
}

message InitialSecurityNotificationSettingSync {
    optional bool securityNotificationEnabled = 1;
}

message ImageMessage {
    optional string url = 1;
    optional string mimetype = 2;
    optional string caption = 3;
    optional bytes fileSha256 = 4;
    optional uint64 fileLength = 5;
    optional uint32 height = 6;
    optional uint32 width = 7;
    optional bytes mediaKey = 8;
    optional bytes fileEncSha256 = 9;
    repeated InteractiveAnnotation interactiveAnnotations = 10;
    optional string directPath = 11;
    optional int64 mediaKeyTimestamp = 12;
    optional bytes jpegThumbnail = 16;
    optional ContextInfo contextInfo = 17;
    optional bytes firstScanSidecar = 18;
    optional uint32 firstScanLength = 19;
    optional uint32 experimentGroupId = 20;
    optional bytes scansSidecar = 21;
    repeated uint32 scanLengths = 22;
    optional bytes midQualityFileSha256 = 23;
    optional bytes midQualityFileEncSha256 = 24;
    optional bool viewOnce = 25;
    optional string thumbnailDirectPath = 26;
    optional bytes thumbnailSha256 = 27;
    optional bytes thumbnailEncSha256 = 28;
    optional string staticUrl = 29;
}

message HistorySyncNotification {
    optional bytes fileSha256 = 1;
    optional uint64 fileLength = 2;
    optional bytes mediaKey = 3;
    optional bytes fileEncSha256 = 4;
    optional string directPath = 5;
    enum HistorySyncNotificationHistorySyncType {
        INITIAL_BOOTSTRAP = 0;
        INITIAL_STATUS_V3 = 1;
        FULL = 2;
        RECENT = 3;
        PUSH_NAME = 4;
    }
    optional HistorySyncNotificationHistorySyncType syncType = 6;
    optional uint32 chunkOrder = 7;
    optional string originalMessageId = 8;
}

message HighlyStructuredMessage {
    optional string namespace = 1;
    optional string elementName = 2;
    repeated string params = 3;
    optional string fallbackLg = 4;
    optional string fallbackLc = 5;
    repeated HSMLocalizableParameter localizableParams = 6;
    optional string deterministicLg = 7;
    optional string deterministicLc = 8;
    optional TemplateMessage hydratedHsm = 9;
}

message HSMLocalizableParameter {
    optional string default = 1;
    oneof paramOneof {
        HSMCurrency currency = 2;
        HSMDateTime dateTime = 3;
    }
}

message HSMDateTime {
    oneof datetimeOneof {
        HSMDateTimeComponent component = 1;
        HSMDateTimeUnixEpoch unixEpoch = 2;
    }
}

message HSMDateTimeUnixEpoch {
    optional int64 timestamp = 1;
}

message HSMDateTimeComponent {
    enum HSMDateTimeComponentDayOfWeekType {
        MONDAY = 1;
        TUESDAY = 2;
        WEDNESDAY = 3;
        THURSDAY = 4;
        FRIDAY = 5;
        SATURDAY = 6;
        SUNDAY = 7;
    }
    optional HSMDateTimeComponentDayOfWeekType dayOfWeek = 1;
    optional uint32 year = 2;
    optional uint32 month = 3;
    optional uint32 dayOfMonth = 4;
    optional uint32 hour = 5;
    optional uint32 minute = 6;
    enum HSMDateTimeComponentCalendarType {
        GREGORIAN = 1;
        SOLAR_HIJRI = 2;
    }
    optional HSMDateTimeComponentCalendarType calendar = 7;
}

message HSMCurrency {
    optional string currencyCode = 1;
    optional int64 amount1000 = 2;
}

message GroupInviteMessage {
    optional string groupJid = 1;
    optional string inviteCode = 2;
    optional int64 inviteExpiration = 3;
    optional string groupName = 4;
    optional bytes jpegThumbnail = 5;
    optional string caption = 6;
    optional ContextInfo contextInfo = 7;
    enum GroupInviteMessageGroupType {
        DEFAULT = 0;
        PARENT = 1;
    }
    optional GroupInviteMessageGroupType groupType = 8;
}

message FutureProofMessage {
    optional Message message = 1;
}

message ExtendedTextMessage {
    optional string text = 1;
    optional string matchedText = 2;
    optional string canonicalUrl = 4;
    optional string description = 5;
    optional string title = 6;
    optional fixed32 textArgb = 7;
    optional fixed32 backgroundArgb = 8;
    enum ExtendedTextMessageFontType {
        SANS_SERIF = 0;
        SERIF = 1;
        NORICAN_REGULAR = 2;
        BRYNDAN_WRITE = 3;
        BEBASNEUE_REGULAR = 4;
        OSWALD_HEAVY = 5;
    }
    optional ExtendedTextMessageFontType font = 9;
    enum ExtendedTextMessagePreviewType {
        NONE = 0;
        VIDEO = 1;
    }
    optional ExtendedTextMessagePreviewType previewType = 10;
    optional bytes jpegThumbnail = 16;
    optional ContextInfo contextInfo = 17;
    optional bool doNotPlayInline = 18;
    optional string thumbnailDirectPath = 19;
    optional bytes thumbnailSha256 = 20;
    optional bytes thumbnailEncSha256 = 21;
    optional bytes mediaKey = 22;
    optional int64 mediaKeyTimestamp = 23;
    optional uint32 thumbnailHeight = 24;
    optional uint32 thumbnailWidth = 25;
    enum ExtendedTextMessageInviteLinkGroupType {
        DEFAULT = 0;
        PARENT = 1;
    }
    optional ExtendedTextMessageInviteLinkGroupType inviteLinkGroupType = 26;
    optional string inviteLinkParentGroupSubjectV2 = 27;
    optional bytes inviteLinkParentGroupThumbnailV2 = 28;
    optional ExtendedTextMessageInviteLinkGroupType inviteLinkGroupTypeV2 = 29;
}

message DocumentMessage {
    optional string url = 1;
    optional string mimetype = 2;
    optional string title = 3;
    optional bytes fileSha256 = 4;
    optional uint64 fileLength = 5;
    optional uint32 pageCount = 6;
    optional bytes mediaKey = 7;
    optional string fileName = 8;
    optional bytes fileEncSha256 = 9;
    optional string directPath = 10;
    optional int64 mediaKeyTimestamp = 11;
    optional bool contactVcard = 12;
    optional string thumbnailDirectPath = 13;
    optional bytes thumbnailSha256 = 14;
    optional bytes thumbnailEncSha256 = 15;
    optional bytes jpegThumbnail = 16;
    optional ContextInfo contextInfo = 17;
    optional uint32 thumbnailHeight = 18;
    optional uint32 thumbnailWidth = 19;
}

message DeviceSentMessage {
    optional string destinationJid = 1;
    optional Message message = 2;
    optional string phash = 3;
}

message DeclinePaymentRequestMessage {
    optional MessageKey key = 1;
}

message ContactsArrayMessage {
    optional string displayName = 1;
    repeated ContactMessage contacts = 2;
    optional ContextInfo contextInfo = 17;
}

message ContactMessage {
    optional string displayName = 1;
    optional string vcard = 16;
    optional ContextInfo contextInfo = 17;
}

message Chat {
    optional string displayName = 1;
    optional string id = 2;
}

message CancelPaymentRequestMessage {
    optional MessageKey key = 1;
}

message Call {
    optional bytes callKey = 1;
    optional string conversionSource = 2;
    optional bytes conversionData = 3;
    optional uint32 conversionDelaySeconds = 4;
}

message ButtonsResponseMessage {
    optional string selectedButtonId = 1;
    optional ContextInfo contextInfo = 3;
    enum ButtonsResponseMessageType {
        UNKNOWN = 0;
        DISPLAY_TEXT = 1;
    }
    optional ButtonsResponseMessageType type = 4;
    oneof response {
        string selectedDisplayText = 2;
    }
}

message ButtonsMessage {
    optional string contentText = 6;
    optional string footerText = 7;
    optional ContextInfo contextInfo = 8;
    repeated Button buttons = 9;
    enum ButtonsMessageHeaderType {
        UNKNOWN = 0;
        EMPTY = 1;
        TEXT = 2;
        DOCUMENT = 3;
        IMAGE = 4;
        VIDEO = 5;
        LOCATION = 6;
    }
    optional ButtonsMessageHeaderType headerType = 10;
    oneof header {
        string text = 1;
        DocumentMessage documentMessage = 2;
        ImageMessage imageMessage = 3;
        VideoMessage videoMessage = 4;
        LocationMessage locationMessage = 5;
    }
}

message Button {
    optional string buttonId = 1;
    optional ButtonText buttonText = 2;
    enum ButtonType {
        UNKNOWN = 0;
        RESPONSE = 1;
        NATIVE_FLOW = 2;
    }
    optional ButtonType type = 3;
    optional NativeFlowInfo nativeFlowInfo = 4;
}

message NativeFlowInfo {
    optional string name = 1;
    optional string paramsJson = 2;
}

message ButtonText {
    optional string displayText = 1;
}

message AudioMessage {
    optional string url = 1;
    optional string mimetype = 2;
    optional bytes fileSha256 = 3;
    optional uint64 fileLength = 4;
    optional uint32 seconds = 5;
    optional bool ptt = 6;
    optional bytes mediaKey = 7;
    optional bytes fileEncSha256 = 8;
    optional string directPath = 9;
    optional int64 mediaKeyTimestamp = 10;
    optional ContextInfo contextInfo = 17;
    optional bytes streamingSidecar = 18;
    optional bytes waveform = 19;
}

message AppStateSyncKey {
    optional AppStateSyncKeyId keyId = 1;
    optional AppStateSyncKeyData keyData = 2;
}

message AppStateSyncKeyShare {
    repeated AppStateSyncKey keys = 1;
}

message AppStateSyncKeyRequest {
    repeated AppStateSyncKeyId keyIds = 1;
}

message AppStateSyncKeyId {
    optional bytes keyId = 1;
}

message AppStateSyncKeyFingerprint {
    optional uint32 rawId = 1;
    optional uint32 currentIndex = 2;
    repeated uint32 deviceIndexes = 3 [packed=true];
}

message AppStateSyncKeyData {
    optional bytes keyData = 1;
    optional AppStateSyncKeyFingerprint fingerprint = 2;
    optional int64 timestamp = 3;
}

message AppStateFatalExceptionNotification {
    repeated string collectionNames = 1;
    optional int64 timestamp = 2;
}

message Location {
    optional double degreesLatitude = 1;
    optional double degreesLongitude = 2;
    optional string name = 3;
}

message InteractiveAnnotation {
    repeated Point polygonVertices = 1;
    oneof action {
        Location location = 2;
    }
}

message HydratedTemplateButton {
    optional uint32 index = 4;
    oneof hydratedButton {
        HydratedQuickReplyButton quickReplyButton = 1;
        HydratedURLButton urlButton = 2;
        HydratedCallButton callButton = 3;
    }
}

message HydratedURLButton {
    optional string displayText = 1;
    optional string url = 2;
}

message HydratedQuickReplyButton {
    optional string displayText = 1;
    optional string id = 2;
}

message HydratedCallButton {
    optional string displayText = 1;
    optional string phoneNumber = 2;
}

message DisappearingMode {
    enum DisappearingModeInitiator {
        CHANGED_IN_CHAT = 0;
        INITIATED_BY_ME = 1;
        INITIATED_BY_OTHER = 2;
    }
    optional DisappearingModeInitiator initiator = 1;
}

message DeviceListMetadata {
    optional bytes senderKeyHash = 1;
    optional uint64 senderTimestamp = 2;
    repeated uint32 senderKeyIndexes = 3 [packed=true];
    optional bytes recipientKeyHash = 8;
    optional uint64 recipientTimestamp = 9;
    repeated uint32 recipientKeyIndexes = 10 [packed=true];
}

message ContextInfo {
    optional string stanzaId = 1;
    optional string participant = 2;
    optional Message quotedMessage = 3;
    optional string remoteJid = 4;
    repeated string mentionedJid = 15;
    optional string conversionSource = 18;
    optional bytes conversionData = 19;
    optional uint32 conversionDelaySeconds = 20;
    optional uint32 forwardingScore = 21;
    optional bool isForwarded = 22;
    optional AdReplyInfo quotedAd = 23;
    optional MessageKey placeholderKey = 24;
    optional uint32 expiration = 25;
    optional int64 ephemeralSettingTimestamp = 26;
    optional bytes ephemeralSharedSecret = 27;
    optional ExternalAdReplyInfo externalAdReply = 28;
    optional string entryPointConversionSource = 29;
    optional string entryPointConversionApp = 30;
    optional uint32 entryPointConversionDelaySeconds = 31;
    optional DisappearingMode disappearingMode = 32;
    optional ActionLink actionLink = 33;
    optional string groupSubject = 34;
    optional string parentGroupJid = 35;
}

message ExternalAdReplyInfo {
    optional string title = 1;
    optional string body = 2;
    enum ExternalAdReplyInfoMediaType {
        NONE = 0;
        IMAGE = 1;
        VIDEO = 2;
    }
    optional ExternalAdReplyInfoMediaType mediaType = 3;
    optional string thumbnailUrl = 4;
    optional string mediaUrl = 5;
    optional bytes thumbnail = 6;
    optional string sourceType = 7;
    optional string sourceId = 8;
    optional string sourceUrl = 9;
    optional bool containsAutoReply = 10;
    optional bool renderLargerThumbnail = 11;
    optional bool showAdAttribution = 12;
}

message AdReplyInfo {
    optional string advertiserName = 1;
    enum AdReplyInfoMediaType {
        NONE = 0;
        IMAGE = 1;
        VIDEO = 2;
    }
    optional AdReplyInfoMediaType mediaType = 2;
    optional bytes jpegThumbnail = 16;
    optional string caption = 17;
}

message ActionLink {
    optional string url = 1;
    optional string buttonTitle = 2;
}

message TemplateButton {
    optional uint32 index = 4;
    oneof button {
        QuickReplyButton quickReplyButton = 1;
        URLButton urlButton = 2;
        CallButton callButton = 3;
    }
}

message URLButton {
    optional HighlyStructuredMessage displayText = 1;
    optional HighlyStructuredMessage url = 2;
}

message QuickReplyButton {
    optional HighlyStructuredMessage displayText = 1;
    optional string id = 2;
}

message CallButton {
    optional HighlyStructuredMessage displayText = 1;
    optional HighlyStructuredMessage phoneNumber = 2;
}

message Point {
    optional int32 xDeprecated = 1;
    optional int32 yDeprecated = 2;
    optional double x = 3;
    optional double y = 4;
}

message PaymentBackground {
    optional string id = 1;
    optional uint64 fileLength = 2;
    optional uint32 width = 3;
    optional uint32 height = 4;
    optional string mimetype = 5;
    optional fixed32 placeholderArgb = 6;
    optional fixed32 textArgb = 7;
    optional fixed32 subtextArgb = 8;
    optional PBMediaData mediaData = 9;
    enum PaymentBackgroundType {
        UNKNOWN = 0;
        DEFAULT = 1;
    }
    optional PaymentBackgroundType type = 10;
}

// Renamed from PaymentBackground$MediaData
message PBMediaData {
    optional bytes mediaKey = 1;
    optional int64 mediaKeyTimestamp = 2;
    optional bytes fileSha256 = 3;
    optional bytes fileEncSha256 = 4;
    optional string directPath = 5;
}

message Money {
    optional int64 value = 1;
    optional uint32 offset = 2;
    optional string currencyCode = 3;
}

message Message {
    optional string conversation = 1;
    optional SenderKeyDistributionMessage senderKeyDistributionMessage = 2;
    optional ImageMessage imageMessage = 3;
    optional ContactMessage contactMessage = 4;
    optional LocationMessage locationMessage = 5;
    optional ExtendedTextMessage extendedTextMessage = 6;
    optional DocumentMessage documentMessage = 7;
    optional AudioMessage audioMessage = 8;
    optional VideoMessage videoMessage = 9;
    optional Call call = 10;
    optional Chat chat = 11;
    optional ProtocolMessage protocolMessage = 12;
    optional ContactsArrayMessage contactsArrayMessage = 13;
    optional HighlyStructuredMessage highlyStructuredMessage = 14;
    optional SenderKeyDistributionMessage fastRatchetKeySenderKeyDistributionMessage = 15;
    optional SendPaymentMessage sendPaymentMessage = 16;
    optional LiveLocationMessage liveLocationMessage = 18;
    optional RequestPaymentMessage requestPaymentMessage = 22;
    optional DeclinePaymentRequestMessage declinePaymentRequestMessage = 23;
    optional CancelPaymentRequestMessage cancelPaymentRequestMessage = 24;
    optional TemplateMessage templateMessage = 25;
    optional StickerMessage stickerMessage = 26;
    optional GroupInviteMessage groupInviteMessage = 28;
    optional TemplateButtonReplyMessage templateButtonReplyMessage = 29;
    optional ProductMessage productMessage = 30;
    optional DeviceSentMessage deviceSentMessage = 31;
    optional MessageContextInfo messageContextInfo = 35;
    optional ListMessage listMessage = 36;
    optional FutureProofMessage viewOnceMessage = 37;
    optional OrderMessage orderMessage = 38;
    optional ListResponseMessage listResponseMessage = 39;
    optional FutureProofMessage ephemeralMessage = 40;
    optional InvoiceMessage invoiceMessage = 41;
    optional ButtonsMessage buttonsMessage = 42;
    optional ButtonsResponseMessage buttonsResponseMessage = 43;
    optional PaymentInviteMessage paymentInviteMessage = 44;
    optional InteractiveMessage interactiveMessage = 45;
    optional ReactionMessage reactionMessage = 46;
    optional StickerSyncRMRMessage stickerSyncRmrMessage = 47;
    optional InteractiveResponseMessage interactiveResponseMessage = 48;
    optional PollCreationMessage pollCreationMessage = 49;
    optional PollUpdateMessage pollUpdateMessage = 50;
}

message MessageContextInfo {
    optional DeviceListMetadata deviceListMetadata = 1;
    optional int32 deviceListMetadataVersion = 2;
    optional bytes messageSecret = 3;
}

message VideoMessage {
    optional string url = 1;
    optional string mimetype = 2;
    optional bytes fileSha256 = 3;
    optional uint64 fileLength = 4;
    optional uint32 seconds = 5;
    optional bytes mediaKey = 6;
    optional string caption = 7;
    optional bool gifPlayback = 8;
    optional uint32 height = 9;
    optional uint32 width = 10;
    optional bytes fileEncSha256 = 11;
    repeated InteractiveAnnotation interactiveAnnotations = 12;
    optional string directPath = 13;
    optional int64 mediaKeyTimestamp = 14;
    optional bytes jpegThumbnail = 16;
    optional ContextInfo contextInfo = 17;
    optional bytes streamingSidecar = 18;
    enum VideoMessageAttribution {
        NONE = 0;
        GIPHY = 1;
        TENOR = 2;
    }
    optional VideoMessageAttribution gifAttribution = 19;
    optional bool viewOnce = 20;
    optional string thumbnailDirectPath = 21;
    optional bytes thumbnailSha256 = 22;
    optional bytes thumbnailEncSha256 = 23;
    optional string staticUrl = 24;
}

message TemplateMessage {
    optional ContextInfo contextInfo = 3;
    optional HydratedFourRowTemplate hydratedTemplate = 4;
    oneof format {
        FourRowTemplate fourRowTemplate = 1;
        HydratedFourRowTemplate hydratedFourRowTemplate = 2;
    }
}

message HydratedFourRowTemplate {
    optional string hydratedContentText = 6;
    optional string hydratedFooterText = 7;
    repeated HydratedTemplateButton hydratedButtons = 8;
    optional string templateId = 9;
    oneof title {
        DocumentMessage documentMessage = 1;
        string hydratedTitleText = 2;
        ImageMessage imageMessage = 3;
        VideoMessage videoMessage = 4;
        LocationMessage locationMessage = 5;
    }
}

message FourRowTemplate {
    optional HighlyStructuredMessage content = 6;
    optional HighlyStructuredMessage footer = 7;
    repeated TemplateButton buttons = 8;
    oneof title {
        DocumentMessage documentMessage = 1;
        HighlyStructuredMessage highlyStructuredMessage = 2;
        ImageMessage imageMessage = 3;
        VideoMessage videoMessage = 4;
        LocationMessage locationMessage = 5;
    }
}

message TemplateButtonReplyMessage {
    optional string selectedId = 1;
    optional string selectedDisplayText = 2;
    optional ContextInfo contextInfo = 3;
    optional uint32 selectedIndex = 4;
}

message StickerSyncRMRMessage {
    repeated string filehash = 1;
    optional string rmrSource = 2;
    optional int64 requestTimestamp = 3;
}

message StickerMessage {
    optional string url = 1;
    optional bytes fileSha256 = 2;
    optional bytes fileEncSha256 = 3;
    optional bytes mediaKey = 4;
    optional string mimetype = 5;
    optional uint32 height = 6;
    optional uint32 width = 7;
    optional string directPath = 8;
    optional uint64 fileLength = 9;
    optional int64 mediaKeyTimestamp = 10;
    optional uint32 firstFrameLength = 11;
    optional bytes firstFrameSidecar = 12;
    optional bool isAnimated = 13;
    optional bytes pngThumbnail = 16;
    optional ContextInfo contextInfo = 17;
}

message SenderKeyDistributionMessage {
    optional string groupId = 1;
    optional bytes axolotlSenderKeyDistributionMessage = 2;
}

message SendPaymentMessage {
    optional Message noteMessage = 2;
    optional MessageKey requestMessageKey = 3;
    optional PaymentBackground background = 4;
}

message RequestPaymentMessage {
    optional Message noteMessage = 4;
    optional string currencyCodeIso4217 = 1;
    optional uint64 amount1000 = 2;
    optional string requestFrom = 3;
    optional int64 expiryTimestamp = 5;
    optional Money amount = 6;
    optional PaymentBackground background = 7;
}

message ReactionMessage {
    optional MessageKey key = 1;
    optional string text = 2;
    optional string groupingKey = 3;
    optional int64 senderTimestampMs = 4;
}

message EphemeralSetting {
    optional sfixed32 duration = 1;
    optional sfixed64 timestamp = 2;
}

message WallpaperSettings {
    optional string filename = 1;
    optional uint32 opacity = 2;
}

message Pushname {
    optional string id = 1;
    optional string pushname = 2;
}

enum MediaVisibility {
    DEFAULT = 0;
    OFF = 1;
    ON = 2;
}
message HistorySync {
    enum HistorySyncHistorySyncType {
        INITIAL_BOOTSTRAP = 0;
        INITIAL_STATUS_V3 = 1;
        FULL = 2;
        RECENT = 3;
        PUSH_NAME = 4;
    }
    required HistorySyncHistorySyncType syncType = 1;
    repeated Conversation conversations = 2;
    repeated WebMessageInfo statusV3Messages = 3;
    optional uint32 chunkOrder = 5;
    optional uint32 progress = 6;
    repeated Pushname pushnames = 7;
    optional GlobalSettings globalSettings = 8;
    optional bytes threadIdUserSecret = 9;
    optional uint32 threadDsTimeframeOffset = 10;
}

message HistorySyncMsg {
    optional WebMessageInfo message = 1;
    optional uint64 msgOrderId = 2;
}

message GroupParticipant {
    required string userJid = 1;
    enum GroupParticipantRank {
        REGULAR = 0;
        ADMIN = 1;
        SUPERADMIN = 2;
    }
    optional GroupParticipantRank rank = 2;
}

message GlobalSettings {
    optional WallpaperSettings lightThemeWallpaper = 1;
    optional MediaVisibility mediaVisibility = 2;
    optional WallpaperSettings darkThemeWallpaper = 3;
    optional AutoDownloadSettings autoDownloadWiFi = 4;
    optional AutoDownloadSettings autoDownloadCellular = 5;
    optional AutoDownloadSettings autoDownloadRoaming = 6;
    optional bool showIndividualNotificationsPreview = 7;
    optional bool showGroupNotificationsPreview = 8;
    optional int32 disappearingModeDuration = 9;
    optional int64 disappearingModeTimestamp = 10;
}

message Conversation {
    required string id = 1;
    repeated HistorySyncMsg messages = 2;
    optional string newJid = 3;
    optional string oldJid = 4;
    optional uint64 lastMsgTimestamp = 5;
    optional uint32 unreadCount = 6;
    optional bool readOnly = 7;
    optional bool endOfHistoryTransfer = 8;
    optional uint32 ephemeralExpiration = 9;
    optional int64 ephemeralSettingTimestamp = 10;
    enum ConversationEndOfHistoryTransferType {
        COMPLETE_BUT_MORE_MESSAGES_REMAIN_ON_PRIMARY = 0;
        COMPLETE_AND_NO_MORE_MESSAGE_REMAIN_ON_PRIMARY = 1;
    }
    optional ConversationEndOfHistoryTransferType endOfHistoryTransferType = 11;
    optional uint64 conversationTimestamp = 12;
    optional string name = 13;
    optional string pHash = 14;
    optional bool notSpam = 15;
    optional bool archived = 16;
    optional DisappearingMode disappearingMode = 17;
    optional uint32 unreadMentionCount = 18;
    optional bool markedAsUnread = 19;
    repeated GroupParticipant participant = 20;
    optional bytes tcToken = 21;
    optional uint64 tcTokenTimestamp = 22;
    optional bytes contactPrimaryIdentityKey = 23;
    optional uint32 pinned = 24;
    optional uint64 muteEndTime = 25;
    optional WallpaperSettings wallpaper = 26;
    optional MediaVisibility mediaVisibility = 27;
    optional uint64 tcTokenSenderTimestamp = 28;
    optional bool suspended = 29;
}

message AutoDownloadSettings {
    optional bool downloadImages = 1;
    optional bool downloadAudio = 2;
    optional bool downloadVideo = 3;
    optional bool downloadDocuments = 4;
}

message MsgRowOpaqueData {
    optional MsgOpaqueData currentMsg = 1;
    optional MsgOpaqueData quotedMsg = 2;
}

message MsgOpaqueData {
    optional string body = 1;
    optional string caption = 3;
    optional double lng = 5;
    optional bool isLive = 6;
    optional double lat = 7;
    optional int32 paymentAmount1000 = 8;
    optional string paymentNoteMsgBody = 9;
    optional string canonicalUrl = 10;
    optional string matchedText = 11;
    optional string title = 12;
    optional string description = 13;
    optional bytes futureproofBuffer = 14;
    optional string clientUrl = 15;
    optional string loc = 16;
    optional string pollName = 17;
    repeated PollOption pollOptions = 18;
    optional bytes pollEncKey = 19;
    optional uint32 pollSelectableOptionsCount = 20;
}

message PollOption {
    optional string name = 1;
}

message ServerErrorReceipt {
    optional string stanzaId = 1;
}

message MediaRetryNotification {
    optional string stanzaId = 1;
    optional string directPath = 2;
    enum MediaRetryNotificationResultType {
        GENERAL_ERROR = 0;
        SUCCESS = 1;
        NOT_FOUND = 2;
        DECRYPTION_ERROR = 3;
    }
    optional MediaRetryNotificationResultType result = 3;
}

message MessageKey {
    optional string remoteJid = 1;
    optional bool fromMe = 2;
    optional string id = 3;
    optional string participant = 4;
}

// Duplicate type omitted
//message MessageKey {
//    optional string remoteJid = 1;
//    optional bool fromMe = 2;
//    optional string id = 3;
//    optional string participant = 4;
//}

message SyncdVersion {
    optional uint64 version = 1;
}

message SyncdValue {
    optional bytes blob = 1;
}

message SyncdSnapshot {
    optional SyncdVersion version = 1;
    repeated SyncdRecord records = 2;
    optional bytes mac = 3;
    optional KeyId keyId = 4;
}

message SyncdRecord {
    optional SyncdIndex index = 1;
    optional SyncdValue value = 2;
    optional KeyId keyId = 3;
}

message SyncdPatch {
    optional SyncdVersion version = 1;
    repeated SyncdMutation mutations = 2;
    optional ExternalBlobReference externalMutations = 3;
    optional bytes snapshotMac = 4;
    optional bytes patchMac = 5;
    optional KeyId keyId = 6;
    optional ExitCode exitCode = 7;
    optional uint32 deviceIndex = 8;
}

message SyncdMutations {
    repeated SyncdMutation mutations = 1;
}

message SyncdMutation {
    enum SyncdMutationSyncdOperation {
        SET = 0;
        REMOVE = 1;
    }
    optional SyncdMutationSyncdOperation operation = 1;
    optional SyncdRecord record = 2;
}

message SyncdIndex {
    optional bytes blob = 1;
}

message KeyId {
    optional bytes id = 1;
}

message ExternalBlobReference {
    optional bytes mediaKey = 1;
    optional string directPath = 2;
    optional string handle = 3;
    optional uint64 fileSizeBytes = 4;
    optional bytes fileSha256 = 5;
    optional bytes fileEncSha256 = 6;
}

message ExitCode {
    optional uint64 code = 1;
    optional string text = 2;
}

message SyncActionValue {
    optional int64 timestamp = 1;
    optional StarAction starAction = 2;
    optional ContactAction contactAction = 3;
    optional MuteAction muteAction = 4;
    optional PinAction pinAction = 5;
    optional SecurityNotificationSetting securityNotificationSetting = 6;
    optional PushNameSetting pushNameSetting = 7;
    optional QuickReplyAction quickReplyAction = 8;
    optional RecentStickerWeightsAction recentStickerWeightsAction = 9;
    optional RecentStickerMetadata recentStickerMetadata = 10;
    optional RecentEmojiWeightsAction recentEmojiWeightsAction = 11;
    optional LabelEditAction labelEditAction = 14;
    optional LabelAssociationAction labelAssociationAction = 15;
    optional LocaleSetting localeSetting = 16;
    optional ArchiveChatAction archiveChatAction = 17;
    optional DeleteMessageForMeAction deleteMessageForMeAction = 18;
    optional KeyExpiration keyExpiration = 19;
    optional MarkChatAsReadAction markChatAsReadAction = 20;
    optional ClearChatAction clearChatAction = 21;
    optional DeleteChatAction deleteChatAction = 22;
    optional UnarchiveChatsSetting unarchiveChatsSetting = 23;
    optional PrimaryFeature primaryFeature = 24;
    optional FavoriteStickerAction favoriteStickerAction = 25;
    optional AndroidUnsupportedActions androidUnsupportedActions = 26;
    optional AgentAction agentAction = 27;
    optional SubscriptionAction subscriptionAction = 28;
    optional UserStatusMuteAction userStatusMuteAction = 29;
    optional TimeFormatAction timeFormatAction = 30;
}

message UserStatusMuteAction {
    optional bool muted = 1;
}

message UnarchiveChatsSetting {
    optional bool unarchiveChats = 1;
}

message TimeFormatAction {
    optional bool isTwentyFourHourFormatEnabled = 1;
}

message SyncActionMessage {
    optional MessageKey key = 1;
    optional int64 timestamp = 2;
}

message SyncActionMessageRange {
    optional int64 lastMessageTimestamp = 1;
    optional int64 lastSystemMessageTimestamp = 2;
    repeated SyncActionMessage messages = 3;
}

message SubscriptionAction {
    optional bool isDeactivated = 1;
    optional bool isAutoRenewing = 2;
    optional int64 expirationDate = 3;
}

message StarAction {
    optional bool starred = 1;
}

message SecurityNotificationSetting {
    optional bool showNotification = 1;
}

message RecentStickerWeightsAction {
    repeated RecentStickerWeight weights = 1;
}

message RecentStickerMetadata {
    optional string directPath = 1;
    optional string encFilehash = 2;
    optional string mediaKey = 3;
    optional string stanzaId = 4;
    optional string chatJid = 5;
    optional string participant = 6;
    optional bool isSentByMe = 7;
}

message RecentEmojiWeightsAction {
    repeated RecentEmojiWeight weights = 1;
}

message QuickReplyAction {
    optional string shortcut = 1;
    optional string message = 2;
    repeated string keywords = 3;
    optional int32 count = 4;
    optional bool deleted = 5;
}

message PushNameSetting {
    optional string name = 1;
}

message PrimaryFeature {
    repeated string flags = 1;
}

message PinAction {
    optional bool pinned = 1;
}

message MuteAction {
    optional bool muted = 1;
    optional int64 muteEndTimestamp = 2;
}

message MarkChatAsReadAction {
    optional bool read = 1;
    optional SyncActionMessageRange messageRange = 2;
}

message LocaleSetting {
    optional string locale = 1;
}

message LabelEditAction {
    optional string name = 1;
    optional int32 color = 2;
    optional int32 predefinedId = 3;
    optional bool deleted = 4;
}

message LabelAssociationAction {
    optional bool labeled = 1;
}

message KeyExpiration {
    optional int32 expiredKeyEpoch = 1;
}

message FavoriteStickerAction {
    optional string directPath = 1;
    optional string lastUploadTimestamp = 2;
    optional string handle = 3;
    optional string encFilehash = 4;
    optional string stickerHashWithoutMeta = 5;
    optional string mediaKey = 6;
    optional int64 mediaKeyTimestamp = 7;
    optional bool isFavorite = 8;
}

message DeleteMessageForMeAction {
    optional bool deleteMedia = 1;
    optional int64 messageTimestamp = 2;
}

message DeleteChatAction {
    optional SyncActionMessageRange messageRange = 1;
}

message ContactAction {
    optional string fullName = 1;
    optional string firstName = 2;
}

message ClearChatAction {
    optional SyncActionMessageRange messageRange = 1;
}

message ArchiveChatAction {
    optional bool archived = 1;
    optional SyncActionMessageRange messageRange = 2;
}

message AndroidUnsupportedActions {
    optional bool allowed = 1;
}

message AgentAction {
    optional string name = 1;
    optional int32 deviceID = 2;
    optional bool isDeleted = 3;
}

message SyncActionData {
    optional bytes index = 1;
    optional SyncActionValue value = 2;
    optional bytes padding = 3;
    optional int32 version = 4;
}

message RecentStickerWeight {
    optional string filehash = 1;
    optional float weight = 2;
}

message RecentEmojiWeight {
    optional string emoji = 1;
    optional float weight = 2;
}

message VerifiedNameCertificate {
    optional bytes details = 1;
    optional bytes signature = 2;
    optional bytes serverSignature = 3;
}

// Renamed from VerifiedNameCertificate$Details
message VerifiedNameDetails {
    optional uint64 serial = 1;
    optional string issuer = 2;
    optional string verifiedName = 4;
    repeated LocalizedName localizedNames = 8;
    optional uint64 issueTime = 10;
}

message LocalizedName {
    optional string lg = 1;
    optional string lc = 2;
    optional string verifiedName = 3;
}

message BizIdentityInfo {
    enum BizIdentityInfoVerifiedLevelValue {
        UNKNOWN = 0;
        LOW = 1;
        HIGH = 2;
    }
    optional BizIdentityInfoVerifiedLevelValue vlevel = 1;
    optional VerifiedNameCertificate vnameCert = 2;
    optional bool signed = 3;
    optional bool revoked = 4;
    enum BizIdentityInfoHostStorageType {
        ON_PREMISE = 0;
        FACEBOOK = 1;
    }
    optional BizIdentityInfoHostStorageType hostStorage = 5;
    enum BizIdentityInfoActualActorsType {
        SELF = 0;
        BSP = 1;
    }
    optional BizIdentityInfoActualActorsType actualActors = 6;
    optional uint64 privacyModeTs = 7;
    optional uint64 featureControls = 8;
}

message BizAccountPayload {
    optional VerifiedNameCertificate vnameCert = 1;
    optional bytes bizAcctLinkInfo = 2;
}

message BizAccountLinkInfo {
    optional uint64 whatsappBizAcctFbid = 1;
    optional string whatsappAcctNumber = 2;
    optional uint64 issueTime = 3;
    enum BizAccountLinkInfoHostStorageType {
        ON_PREMISE = 0;
        FACEBOOK = 1;
    }
    optional BizAccountLinkInfoHostStorageType hostStorage = 4;
    enum BizAccountLinkInfoAccountType {
        ENTERPRISE = 0;
    }
    optional BizAccountLinkInfoAccountType accountType = 5;
}

message NoiseCertificate {
    optional bytes details = 1;
    optional bytes signature = 2;
}

// Renamed from NoiseCertificate$Details
message NoiseCertificateDetails {
    optional uint32 serial = 1;
    optional string issuer = 2;
    optional uint64 expires = 3;
    optional string subject = 4;
    optional bytes key = 5;
}

message HandshakeMessage {
    optional ClientHello clientHello = 2;
    optional ServerHello serverHello = 3;
    optional ClientFinish clientFinish = 4;
}

message ServerHello {
    optional bytes ephemeral = 1;
    optional bytes static = 2;
    optional bytes payload = 3;
}

message ClientHello {
    optional bytes ephemeral = 1;
    optional bytes static = 2;
    optional bytes payload = 3;
}

message ClientFinish {
    optional bytes static = 1;
    optional bytes payload = 2;
}

message ClientPayload {
    optional uint64 username = 1;
    optional bool passive = 3;
    optional UserAgent userAgent = 5;
    optional WebInfo webInfo = 6;
    optional string pushName = 7;
    optional sfixed32 sessionId = 9;
    optional bool shortConnect = 10;
    enum ClientPayloadConnectType {
        CELLULAR_UNKNOWN = 0;
        WIFI_UNKNOWN = 1;
        CELLULAR_EDGE = 100;
        CELLULAR_IDEN = 101;
        CELLULAR_UMTS = 102;
        CELLULAR_EVDO = 103;
        CELLULAR_GPRS = 104;
        CELLULAR_HSDPA = 105;
        CELLULAR_HSUPA = 106;
        CELLULAR_HSPA = 107;
        CELLULAR_CDMA = 108;
        CELLULAR_1XRTT = 109;
        CELLULAR_EHRPD = 110;
        CELLULAR_LTE = 111;
        CELLULAR_HSPAP = 112;
    }
    optional ClientPayloadConnectType connectType = 12;
    enum ClientPayloadConnectReason {
        PUSH = 0;
        USER_ACTIVATED = 1;
        SCHEDULED = 2;
        ERROR_RECONNECT = 3;
        NETWORK_SWITCH = 4;
        PING_RECONNECT = 5;
    }
    optional ClientPayloadConnectReason connectReason = 13;
    repeated int32 shards = 14;
    optional DNSSource dnsSource = 15;
    optional uint32 connectAttemptCount = 16;
    optional uint32 device = 18;
    optional DevicePairingRegistrationData devicePairingData = 19;
    enum ClientPayloadProduct {
        WHATSAPP = 0;
        MESSENGER = 1;
    }
    optional ClientPayloadProduct product = 20;
    optional bytes fbCat = 21;
    optional bytes fbUserAgent = 22;
    optional bool oc = 23;
    optional int32 lc = 24;
    enum ClientPayloadIOSAppExtension {
        SHARE_EXTENSION = 0;
        SERVICE_EXTENSION = 1;
        INTENTS_EXTENSION = 2;
    }
    optional ClientPayloadIOSAppExtension iosAppExtension = 30;
    optional uint64 fbAppId = 31;
    optional bytes fbDeviceId = 32;
    optional bool pull = 33;
}

message WebInfo {
    optional string refToken = 1;
    optional string version = 2;
    optional WebdPayload webdPayload = 3;
    enum WebInfoWebSubPlatform {
        WEB_BROWSER = 0;
        APP_STORE = 1;
        WIN_STORE = 2;
        DARWIN = 3;
        WIN32 = 4;
    }
    optional WebInfoWebSubPlatform webSubPlatform = 4;
}

message WebdPayload {
    optional bool usesParticipantInKey = 1;
    optional bool supportsStarredMessages = 2;
    optional bool supportsDocumentMessages = 3;
    optional bool supportsUrlMessages = 4;
    optional bool supportsMediaRetry = 5;
    optional bool supportsE2EImage = 6;
    optional bool supportsE2EVideo = 7;
    optional bool supportsE2EAudio = 8;
    optional bool supportsE2EDocument = 9;
    optional string documentTypes = 10;
    optional bytes features = 11;
}

message UserAgent {
    enum UserAgentPlatform {
        ANDROID = 0;
        IOS = 1;
        WINDOWS_PHONE = 2;
        BLACKBERRY = 3;
        BLACKBERRYX = 4;
        S40 = 5;
        S60 = 6;
        PYTHON_CLIENT = 7;
        TIZEN = 8;
        ENTERPRISE = 9;
        SMB_ANDROID = 10;
        KAIOS = 11;
        SMB_IOS = 12;
        WINDOWS = 13;
        WEB = 14;
        PORTAL = 15;
        GREEN_ANDROID = 16;
        GREEN_IPHONE = 17;
        BLUE_ANDROID = 18;
        BLUE_IPHONE = 19;
        FBLITE_ANDROID = 20;
        MLITE_ANDROID = 21;
        IGLITE_ANDROID = 22;
        PAGE = 23;
        MACOS = 24;
        OCULUS_MSG = 25;
        OCULUS_CALL = 26;
        MILAN = 27;
        CAPI = 28;
    }
    optional UserAgentPlatform platform = 1;
    optional AppVersion appVersion = 2;
    optional string mcc = 3;
    optional string mnc = 4;
    optional string osVersion = 5;
    optional string manufacturer = 6;
    optional string device = 7;
    optional string osBuildNumber = 8;
    optional string phoneId = 9;
    enum UserAgentReleaseChannel {
        RELEASE = 0;
        BETA = 1;
        ALPHA = 2;
        DEBUG = 3;
    }
    optional UserAgentReleaseChannel releaseChannel = 10;
    optional string localeLanguageIso6391 = 11;
    optional string localeCountryIso31661Alpha2 = 12;
    optional string deviceBoard = 13;
}

// Duplicate type omitted
//message AppVersion {
//    optional uint32 primary = 1;
//    optional uint32 secondary = 2;
//    optional uint32 tertiary = 3;
//    optional uint32 quaternary = 4;
//    optional uint32 quinary = 5;
//}

message DevicePairingRegistrationData {
    optional bytes eRegid = 1;
    optional bytes eKeytype = 2;
    optional bytes eIdent = 3;
    optional bytes eSkeyId = 4;
    optional bytes eSkeyVal = 5;
    optional bytes eSkeySig = 6;
    optional bytes buildHash = 7;
    optional bytes deviceProps = 8;
}

message DNSSource {
    enum DNSSourceDNSResolutionMethod {
        SYSTEM = 0;
        GOOGLE = 1;
        HARDCODED = 2;
        OVERRIDE = 3;
        FALLBACK = 4;
    }
    optional DNSSourceDNSResolutionMethod dnsMethod = 15;
    optional bool appCached = 16;
}

message WebNotificationsInfo {
    optional uint64 timestamp = 2;
    optional uint32 unreadChats = 3;
    optional uint32 notifyMessageCount = 4;
    repeated WebMessageInfo notifyMessages = 5;
}

message WebMessageInfo {
    required MessageKey key = 1;
    optional Message message = 2;
    optional uint64 messageTimestamp = 3;
    enum WebMessageInfoStatus {
        ERROR = 0;
        PENDING = 1;
        SERVER_ACK = 2;
        DELIVERY_ACK = 3;
        READ = 4;
        PLAYED = 5;
    }
    optional WebMessageInfoStatus status = 4;
    optional string participant = 5;
    optional uint64 messageC2STimestamp = 6;
    optional bool ignore = 16;
    optional bool starred = 17;
    optional bool broadcast = 18;
    optional string pushName = 19;
    optional bytes mediaCiphertextSha256 = 20;
    optional bool multicast = 21;
    optional bool urlText = 22;
    optional bool urlNumber = 23;
    enum WebMessageInfoStubType {
        UNKNOWN = 0;
        REVOKE = 1;
        CIPHERTEXT = 2;
        FUTUREPROOF = 3;
        NON_VERIFIED_TRANSITION = 4;
        UNVERIFIED_TRANSITION = 5;
        VERIFIED_TRANSITION = 6;
        VERIFIED_LOW_UNKNOWN = 7;
        VERIFIED_HIGH = 8;
        VERIFIED_INITIAL_UNKNOWN = 9;
        VERIFIED_INITIAL_LOW = 10;
        VERIFIED_INITIAL_HIGH = 11;
        VERIFIED_TRANSITION_ANY_TO_NONE = 12;
        VERIFIED_TRANSITION_ANY_TO_HIGH = 13;
        VERIFIED_TRANSITION_HIGH_TO_LOW = 14;
        VERIFIED_TRANSITION_HIGH_TO_UNKNOWN = 15;
        VERIFIED_TRANSITION_UNKNOWN_TO_LOW = 16;
        VERIFIED_TRANSITION_LOW_TO_UNKNOWN = 17;
        VERIFIED_TRANSITION_NONE_TO_LOW = 18;
        VERIFIED_TRANSITION_NONE_TO_UNKNOWN = 19;
        GROUP_CREATE = 20;
        GROUP_CHANGE_SUBJECT = 21;
        GROUP_CHANGE_ICON = 22;
        GROUP_CHANGE_INVITE_LINK = 23;
        GROUP_CHANGE_DESCRIPTION = 24;
        GROUP_CHANGE_RESTRICT = 25;
        GROUP_CHANGE_ANNOUNCE = 26;
        GROUP_PARTICIPANT_ADD = 27;
        GROUP_PARTICIPANT_REMOVE = 28;
        GROUP_PARTICIPANT_PROMOTE = 29;
        GROUP_PARTICIPANT_DEMOTE = 30;
        GROUP_PARTICIPANT_INVITE = 31;
        GROUP_PARTICIPANT_LEAVE = 32;
        GROUP_PARTICIPANT_CHANGE_NUMBER = 33;
        BROADCAST_CREATE = 34;
        BROADCAST_ADD = 35;
        BROADCAST_REMOVE = 36;
        GENERIC_NOTIFICATION = 37;
        E2E_IDENTITY_CHANGED = 38;
        E2E_ENCRYPTED = 39;
        CALL_MISSED_VOICE = 40;
        CALL_MISSED_VIDEO = 41;
        INDIVIDUAL_CHANGE_NUMBER = 42;
        GROUP_DELETE = 43;
        GROUP_ANNOUNCE_MODE_MESSAGE_BOUNCE = 44;
        CALL_MISSED_GROUP_VOICE = 45;
        CALL_MISSED_GROUP_VIDEO = 46;
        PAYMENT_CIPHERTEXT = 47;
        PAYMENT_FUTUREPROOF = 48;
        PAYMENT_TRANSACTION_STATUS_UPDATE_FAILED = 49;
        PAYMENT_TRANSACTION_STATUS_UPDATE_REFUNDED = 50;
        PAYMENT_TRANSACTION_STATUS_UPDATE_REFUND_FAILED = 51;
        PAYMENT_TRANSACTION_STATUS_RECEIVER_PENDING_SETUP = 52;
        PAYMENT_TRANSACTION_STATUS_RECEIVER_SUCCESS_AFTER_HICCUP = 53;
        PAYMENT_ACTION_ACCOUNT_SETUP_REMINDER = 54;
        PAYMENT_ACTION_SEND_PAYMENT_REMINDER = 55;
        PAYMENT_ACTION_SEND_PAYMENT_INVITATION = 56;
        PAYMENT_ACTION_REQUEST_DECLINED = 57;
        PAYMENT_ACTION_REQUEST_EXPIRED = 58;
        PAYMENT_ACTION_REQUEST_CANCELLED = 59;
        BIZ_VERIFIED_TRANSITION_TOP_TO_BOTTOM = 60;
        BIZ_VERIFIED_TRANSITION_BOTTOM_TO_TOP = 61;
        BIZ_INTRO_TOP = 62;
        BIZ_INTRO_BOTTOM = 63;
        BIZ_NAME_CHANGE = 64;
        BIZ_MOVE_TO_CONSUMER_APP = 65;
        BIZ_TWO_TIER_MIGRATION_TOP = 66;
        BIZ_TWO_TIER_MIGRATION_BOTTOM = 67;
        OVERSIZED = 68;
        GROUP_CHANGE_NO_FREQUENTLY_FORWARDED = 69;
        GROUP_V4_ADD_INVITE_SENT = 70;
        GROUP_PARTICIPANT_ADD_REQUEST_JOIN = 71;
        CHANGE_EPHEMERAL_SETTING = 72;
        E2E_DEVICE_CHANGED = 73;
        VIEWED_ONCE = 74;
        E2E_ENCRYPTED_NOW = 75;
        BLUE_MSG_BSP_FB_TO_BSP_PREMISE = 76;
        BLUE_MSG_BSP_FB_TO_SELF_FB = 77;
        BLUE_MSG_BSP_FB_TO_SELF_PREMISE = 78;
        BLUE_MSG_BSP_FB_UNVERIFIED = 79;
        BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 80;
        BLUE_MSG_BSP_FB_VERIFIED = 81;
        BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 82;
        BLUE_MSG_BSP_PREMISE_TO_SELF_PREMISE = 83;
        BLUE_MSG_BSP_PREMISE_UNVERIFIED = 84;
        BLUE_MSG_BSP_PREMISE_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 85;
        BLUE_MSG_BSP_PREMISE_VERIFIED = 86;
        BLUE_MSG_BSP_PREMISE_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 87;
        BLUE_MSG_CONSUMER_TO_BSP_FB_UNVERIFIED = 88;
        BLUE_MSG_CONSUMER_TO_BSP_PREMISE_UNVERIFIED = 89;
        BLUE_MSG_CONSUMER_TO_SELF_FB_UNVERIFIED = 90;
        BLUE_MSG_CONSUMER_TO_SELF_PREMISE_UNVERIFIED = 91;
        BLUE_MSG_SELF_FB_TO_BSP_PREMISE = 92;
        BLUE_MSG_SELF_FB_TO_SELF_PREMISE = 93;
        BLUE_MSG_SELF_FB_UNVERIFIED = 94;
        BLUE_MSG_SELF_FB_UNVERIFIED_TO_SELF_PREMISE_VERIFIED = 95;
        BLUE_MSG_SELF_FB_VERIFIED = 96;
        BLUE_MSG_SELF_FB_VERIFIED_TO_SELF_PREMISE_UNVERIFIED = 97;
        BLUE_MSG_SELF_PREMISE_TO_BSP_PREMISE = 98;
        BLUE_MSG_SELF_PREMISE_UNVERIFIED = 99;
        BLUE_MSG_SELF_PREMISE_VERIFIED = 100;
        BLUE_MSG_TO_BSP_FB = 101;
        BLUE_MSG_TO_CONSUMER = 102;
        BLUE_MSG_TO_SELF_FB = 103;
        BLUE_MSG_UNVERIFIED_TO_BSP_FB_VERIFIED = 104;
        BLUE_MSG_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 105;
        BLUE_MSG_UNVERIFIED_TO_SELF_FB_VERIFIED = 106;
        BLUE_MSG_UNVERIFIED_TO_VERIFIED = 107;
        BLUE_MSG_VERIFIED_TO_BSP_FB_UNVERIFIED = 108;
        BLUE_MSG_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 109;
        BLUE_MSG_VERIFIED_TO_SELF_FB_UNVERIFIED = 110;
        BLUE_MSG_VERIFIED_TO_UNVERIFIED = 111;
        BLUE_MSG_BSP_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 112;
        BLUE_MSG_BSP_FB_UNVERIFIED_TO_SELF_FB_VERIFIED = 113;
        BLUE_MSG_BSP_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 114;
        BLUE_MSG_BSP_FB_VERIFIED_TO_SELF_FB_UNVERIFIED = 115;
        BLUE_MSG_SELF_FB_UNVERIFIED_TO_BSP_PREMISE_VERIFIED = 116;
        BLUE_MSG_SELF_FB_VERIFIED_TO_BSP_PREMISE_UNVERIFIED = 117;
        E2E_IDENTITY_UNAVAILABLE = 118;
        GROUP_CREATING = 119;
        GROUP_CREATE_FAILED = 120;
        GROUP_BOUNCED = 121;
        BLOCK_CONTACT = 122;
        EPHEMERAL_SETTING_NOT_APPLIED = 123;
        SYNC_FAILED = 124;
        SYNCING = 125;
        BIZ_PRIVACY_MODE_INIT_FB = 126;
        BIZ_PRIVACY_MODE_INIT_BSP = 127;
        BIZ_PRIVACY_MODE_TO_FB = 128;
        BIZ_PRIVACY_MODE_TO_BSP = 129;
        DISAPPEARING_MODE = 130;
        E2E_DEVICE_FETCH_FAILED = 131;
        ADMIN_REVOKE = 132;
        GROUP_INVITE_LINK_GROWTH_LOCKED = 133;
        COMMUNITY_LINK_PARENT_GROUP = 134;
        COMMUNITY_LINK_SIBLING_GROUP = 135;
        COMMUNITY_LINK_SUB_GROUP = 136;
        COMMUNITY_UNLINK_PARENT_GROUP = 137;
        COMMUNITY_UNLINK_SIBLING_GROUP = 138;
        COMMUNITY_UNLINK_SUB_GROUP = 139;
        GROUP_PARTICIPANT_ACCEPT = 140;
        GROUP_PARTICIPANT_LINKED_GROUP_JOIN = 141;
        COMMUNITY_CREATE = 142;
    }
    optional WebMessageInfoStubType messageStubType = 24;
    optional bool clearMedia = 25;
    repeated string messageStubParameters = 26;
    optional uint32 duration = 27;
    repeated string labels = 28;
    optional PaymentInfo paymentInfo = 29;
    optional LiveLocationMessage finalLiveLocation = 30;
    optional PaymentInfo quotedPaymentInfo = 31;
    optional uint64 ephemeralStartTimestamp = 32;
    optional uint32 ephemeralDuration = 33;
    optional bool ephemeralOffToOn = 34;
    optional bool ephemeralOutOfSync = 35;
    enum WebMessageInfoBizPrivacyStatus {
        E2EE = 0;
        FB = 2;
        BSP = 1;
        BSP_AND_FB = 3;
    }
    optional WebMessageInfoBizPrivacyStatus bizPrivacyStatus = 36;
    optional string verifiedBizName = 37;
    optional MediaData mediaData = 38;
    optional PhotoChange photoChange = 39;
    repeated UserReceipt userReceipt = 40;
    repeated Reaction reactions = 41;
    optional MediaData quotedStickerData = 42;
    optional bytes futureproofData = 43;
    optional StatusPSA statusPsa = 44;
    repeated PollUpdate pollUpdates = 45;
    optional PollAdditionalMetadata pollAdditionalMetadata = 46;
    optional string agentId = 47;
    optional bool statusAlreadyViewed = 48;
    optional bytes messageSecret = 49;
}

message WebFeatures {
    enum WebFeaturesFlag {
        NOT_STARTED = 0;
        FORCE_UPGRADE = 1;
        DEVELOPMENT = 2;
        PRODUCTION = 3;
    }
    optional WebFeaturesFlag labelsDisplay = 1;
    optional WebFeaturesFlag voipIndividualOutgoing = 2;
    optional WebFeaturesFlag groupsV3 = 3;
    optional WebFeaturesFlag groupsV3Create = 4;
    optional WebFeaturesFlag changeNumberV2 = 5;
    optional WebFeaturesFlag queryStatusV3Thumbnail = 6;
    optional WebFeaturesFlag liveLocations = 7;
    optional WebFeaturesFlag queryVname = 8;
    optional WebFeaturesFlag voipIndividualIncoming = 9;
    optional WebFeaturesFlag quickRepliesQuery = 10;
    optional WebFeaturesFlag payments = 11;
    optional WebFeaturesFlag stickerPackQuery = 12;
    optional WebFeaturesFlag liveLocationsFinal = 13;
    optional WebFeaturesFlag labelsEdit = 14;
    optional WebFeaturesFlag mediaUpload = 15;
    optional WebFeaturesFlag mediaUploadRichQuickReplies = 18;
    optional WebFeaturesFlag vnameV2 = 19;
    optional WebFeaturesFlag videoPlaybackUrl = 20;
    optional WebFeaturesFlag statusRanking = 21;
    optional WebFeaturesFlag voipIndividualVideo = 22;
    optional WebFeaturesFlag thirdPartyStickers = 23;
    optional WebFeaturesFlag frequentlyForwardedSetting = 24;
    optional WebFeaturesFlag groupsV4JoinPermission = 25;
    optional WebFeaturesFlag recentStickers = 26;
    optional WebFeaturesFlag catalog = 27;
    optional WebFeaturesFlag starredStickers = 28;
    optional WebFeaturesFlag voipGroupCall = 29;
    optional WebFeaturesFlag templateMessage = 30;
    optional WebFeaturesFlag templateMessageInteractivity = 31;
    optional WebFeaturesFlag ephemeralMessages = 32;
    optional WebFeaturesFlag e2ENotificationSync = 33;
    optional WebFeaturesFlag recentStickersV2 = 34;
    optional WebFeaturesFlag recentStickersV3 = 36;
    optional WebFeaturesFlag userNotice = 37;
    optional WebFeaturesFlag support = 39;
    optional WebFeaturesFlag groupUiiCleanup = 40;
    optional WebFeaturesFlag groupDogfoodingInternalOnly = 41;
    optional WebFeaturesFlag settingsSync = 42;
    optional WebFeaturesFlag archiveV2 = 43;
    optional WebFeaturesFlag ephemeralAllowGroupMembers = 44;
    optional WebFeaturesFlag ephemeral24HDuration = 45;
    optional WebFeaturesFlag mdForceUpgrade = 46;
    optional WebFeaturesFlag disappearingMode = 47;
    optional WebFeaturesFlag externalMdOptInAvailable = 48;
    optional WebFeaturesFlag noDeleteMessageTimeLimit = 49;
}

message UserReceipt {
    required string userJid = 1;
    optional int64 receiptTimestamp = 2;
    optional int64 readTimestamp = 3;
    optional int64 playedTimestamp = 4;
    repeated string pendingDeviceJid = 5;
    repeated string deliveredDeviceJid = 6;
}

message StatusPSA {
    required uint64 campaignId = 44;
    optional uint64 campaignExpirationTimestamp = 45;
}

message Reaction {
    optional MessageKey key = 1;
    optional string text = 2;
    optional string groupingKey = 3;
    optional int64 senderTimestampMs = 4;
    optional bool unread = 5;
}

message PollUpdate {
    optional MessageKey pollUpdateMessageKey = 1;
    optional PollVoteMessage vote = 2;
}

message PollAdditionalMetadata {
    optional bool pollInvalidated = 1;
}

message PhotoChange {
    optional bytes oldPhoto = 1;
    optional bytes newPhoto = 2;
    optional uint32 newPhotoId = 3;
}

message PaymentInfo {
    enum PaymentInfoCurrency {
        UNKNOWN_CURRENCY = 0;
        INR = 1;
    }
    optional PaymentInfoCurrency currencyDeprecated = 1;
    optional uint64 amount1000 = 2;
    optional string receiverJid = 3;
    enum PaymentInfoStatus {
        UNKNOWN_STATUS = 0;
        PROCESSING = 1;
        SENT = 2;
        NEED_TO_ACCEPT = 3;
        COMPLETE = 4;
        COULD_NOT_COMPLETE = 5;
        REFUNDED = 6;
        EXPIRED = 7;
        REJECTED = 8;
        CANCELLED = 9;
        WAITING_FOR_PAYER = 10;
        WAITING = 11;
    }
    optional PaymentInfoStatus status = 4;
    optional uint64 transactionTimestamp = 5;
    optional MessageKey requestMessageKey = 6;
    optional uint64 expiryTimestamp = 7;
    optional bool futureproofed = 8;
    optional string currency = 9;
    enum PaymentInfoTxnStatus {
        UNKNOWN = 0;
        PENDING_SETUP = 1;
        PENDING_RECEIVER_SETUP = 2;
        INIT = 3;
        SUCCESS = 4;
        COMPLETED = 5;
        FAILED = 6;
        FAILED_RISK = 7;
        FAILED_PROCESSING = 8;
        FAILED_RECEIVER_PROCESSING = 9;
        FAILED_DA = 10;
        FAILED_DA_FINAL = 11;
        REFUNDED_TXN = 12;
        REFUND_FAILED = 13;
        REFUND_FAILED_PROCESSING = 14;
        REFUND_FAILED_DA = 15;
        EXPIRED_TXN = 16;
        AUTH_CANCELED = 17;
        AUTH_CANCEL_FAILED_PROCESSING = 18;
        AUTH_CANCEL_FAILED = 19;
        COLLECT_INIT = 20;
        COLLECT_SUCCESS = 21;
        COLLECT_FAILED = 22;
        COLLECT_FAILED_RISK = 23;
        COLLECT_REJECTED = 24;
        COLLECT_EXPIRED = 25;
        COLLECT_CANCELED = 26;
        COLLECT_CANCELLING = 27;
        IN_REVIEW = 28;
        REVERSAL_SUCCESS = 29;
        REVERSAL_PENDING = 30;
        REFUND_PENDING = 31;
    }
    optional PaymentInfoTxnStatus txnStatus = 10;
    optional bool useNoviFiatFormat = 11;
    optional Money primaryAmount = 12;
    optional Money exchangeAmount = 13;
}

message NotificationMessageInfo {
    optional MessageKey key = 1;
    optional Message message = 2;
    optional uint64 messageTimestamp = 3;
    optional string participant = 4;
}

message MediaData {
    optional string localPath = 1;
}