@hiroosy/baileys-lite 0.3.3 → 0.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (242) hide show
  1. package/WAProto/index.js +247 -113252
  2. package/WAProto/parts/ADVDeviceIdentity.part +201 -0
  3. package/WAProto/parts/ADVEncryptionType.part +6 -0
  4. package/WAProto/parts/ADVKeyIndexList.part +201 -0
  5. package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
  6. package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
  7. package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
  8. package/WAProto/parts/AIHomeState.part +405 -0
  9. package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
  10. package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
  11. package/WAProto/parts/AIMetadataOperation.part +83 -0
  12. package/WAProto/parts/AIQueryFanout.part +133 -0
  13. package/WAProto/parts/AIRegenerateMetadata.part +112 -0
  14. package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
  15. package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
  16. package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
  17. package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
  18. package/WAProto/parts/AIRichResponseImageURL.part +119 -0
  19. package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
  20. package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
  21. package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
  22. package/WAProto/parts/AIRichResponseMessage.part +167 -0
  23. package/WAProto/parts/AIRichResponseMessageType.part +5 -0
  24. package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
  25. package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
  26. package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
  27. package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
  28. package/WAProto/parts/AISubscriptionRequestType.part +7 -0
  29. package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
  30. package/WAProto/parts/AIThreadInfo.part +316 -0
  31. package/WAProto/parts/Account.part +138 -0
  32. package/WAProto/parts/ActionLink.part +100 -0
  33. package/WAProto/parts/AutoDownloadSettings.part +138 -0
  34. package/WAProto/parts/AvatarUserSettings.part +100 -0
  35. package/WAProto/parts/BizAccountLinkInfo.part +210 -0
  36. package/WAProto/parts/BizAccountPayload.part +105 -0
  37. package/WAProto/parts/BizIdentityInfo.part +298 -0
  38. package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
  39. package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
  40. package/WAProto/parts/BotAgentMetadata.part +83 -0
  41. package/WAProto/parts/BotCapabilityMetadata.part +437 -0
  42. package/WAProto/parts/BotCommandMetadata.part +119 -0
  43. package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
  44. package/WAProto/parts/BotFeedbackMessage.part +1366 -0
  45. package/WAProto/parts/BotGroupMetadata.part +92 -0
  46. package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
  47. package/WAProto/parts/BotImagineMetadata.part +134 -0
  48. package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
  49. package/WAProto/parts/BotLinkedAccount.part +95 -0
  50. package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
  51. package/WAProto/parts/BotMediaMetadata.part +229 -0
  52. package/WAProto/parts/BotMemoryFact.part +100 -0
  53. package/WAProto/parts/BotMemoryMetadata.part +141 -0
  54. package/WAProto/parts/BotMemuMetadata.part +92 -0
  55. package/WAProto/parts/BotMessageOrigin.part +95 -0
  56. package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
  57. package/WAProto/parts/BotMessageSharingInfo.part +297 -0
  58. package/WAProto/parts/BotMetadata.part +934 -0
  59. package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
  60. package/WAProto/parts/BotMetricsMetadata.part +341 -0
  61. package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
  62. package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
  63. package/WAProto/parts/BotModelMetadata.part +167 -0
  64. package/WAProto/parts/BotPluginMetadata.part +379 -0
  65. package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
  66. package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
  67. package/WAProto/parts/BotPromptSuggestion.part +100 -0
  68. package/WAProto/parts/BotPromptSuggestions.part +92 -0
  69. package/WAProto/parts/BotPttPromptMetadata.part +81 -0
  70. package/WAProto/parts/BotQuotaMetadata.part +241 -0
  71. package/WAProto/parts/BotReminderMetadata.part +232 -0
  72. package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
  73. package/WAProto/parts/BotRenderingMetadata.part +203 -0
  74. package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
  75. package/WAProto/parts/BotSessionMetadata.part +137 -0
  76. package/WAProto/parts/BotSessionSource.part +11 -0
  77. package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
  78. package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
  79. package/WAProto/parts/BotSourcesMetadata.part +322 -0
  80. package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
  81. package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
  82. package/WAProto/parts/CallLogRecord.part +646 -0
  83. package/WAProto/parts/CertChain.part +392 -0
  84. package/WAProto/parts/ChatLockSettings.part +102 -0
  85. package/WAProto/parts/ChatRowOpaqueData.part +712 -0
  86. package/WAProto/parts/Citation.part +119 -0
  87. package/WAProto/parts/ClientPairingProps.part +160 -0
  88. package/WAProto/parts/ClientPayload.part +2892 -0
  89. package/WAProto/parts/CollectionName.part +9 -0
  90. package/WAProto/parts/CommentMetadata.part +102 -0
  91. package/WAProto/parts/CompanionCommitment.part +84 -0
  92. package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
  93. package/WAProto/parts/Config.part +136 -0
  94. package/WAProto/parts/ContextInfo.part +4137 -0
  95. package/WAProto/parts/Conversation.part +1472 -0
  96. package/WAProto/parts/DeviceCapabilities.part +670 -0
  97. package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
  98. package/WAProto/parts/DeviceListMetadata.part +306 -0
  99. package/WAProto/parts/DeviceProps.part +982 -0
  100. package/WAProto/parts/DisappearingMode.part +206 -0
  101. package/WAProto/parts/EmbeddedContent.part +100 -0
  102. package/WAProto/parts/EmbeddedMessage.part +102 -0
  103. package/WAProto/parts/EmbeddedMusic.part +370 -0
  104. package/WAProto/parts/EncryptedPairingRequest.part +106 -0
  105. package/WAProto/parts/EphemeralSetting.part +110 -0
  106. package/WAProto/parts/EventAdditionalMetadata.part +81 -0
  107. package/WAProto/parts/EventResponse.part +152 -0
  108. package/WAProto/parts/ExitCode.part +110 -0
  109. package/WAProto/parts/ExternalBlobReference.part +195 -0
  110. package/WAProto/parts/Field.part +193 -0
  111. package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
  112. package/WAProto/parts/GlobalSettings.part +497 -0
  113. package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
  114. package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
  115. package/WAProto/parts/GroupMention.part +100 -0
  116. package/WAProto/parts/GroupParticipant.part +142 -0
  117. package/WAProto/parts/GroupRootKeyShare.part +92 -0
  118. package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
  119. package/WAProto/parts/HandshakeMessage.part +815 -0
  120. package/WAProto/parts/HatchMetadataSync.part +132 -0
  121. package/WAProto/parts/HistorySync.part +605 -0
  122. package/WAProto/parts/HistorySyncMsg.part +112 -0
  123. package/WAProto/parts/HydratedTemplateButton.part +501 -0
  124. package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
  125. package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
  126. package/WAProto/parts/InlineContact.part +157 -0
  127. package/WAProto/parts/InteractiveAnnotation.part +246 -0
  128. package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
  129. package/WAProto/parts/KeepInChat.part +225 -0
  130. package/WAProto/parts/KeepType.part +6 -0
  131. package/WAProto/parts/KeyExchangeMessage.part +169 -0
  132. package/WAProto/parts/KeyId.part +84 -0
  133. package/WAProto/parts/LIDMigrationMapping.part +149 -0
  134. package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
  135. package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
  136. package/WAProto/parts/LegacyMessage.part +104 -0
  137. package/WAProto/parts/LimitSharing.part +177 -0
  138. package/WAProto/parts/LocalizedName.part +119 -0
  139. package/WAProto/parts/Location.part +119 -0
  140. package/WAProto/parts/MediaData.part +81 -0
  141. package/WAProto/parts/MediaDomainInfo.part +120 -0
  142. package/WAProto/parts/MediaKeyDomain.part +6 -0
  143. package/WAProto/parts/MediaNotifyMessage.part +132 -0
  144. package/WAProto/parts/MediaRetryNotification.part +170 -0
  145. package/WAProto/parts/MediaVisibility.part +6 -0
  146. package/WAProto/parts/MemberLabel.part +110 -0
  147. package/WAProto/parts/Message.part +32376 -0
  148. package/WAProto/parts/MessageAddOn.part +305 -0
  149. package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
  150. package/WAProto/parts/MessageAssociation.part +235 -0
  151. package/WAProto/parts/MessageContextInfo.part +451 -0
  152. package/WAProto/parts/MessageKey.part +138 -0
  153. package/WAProto/parts/MessageSecretMessage.part +125 -0
  154. package/WAProto/parts/Money.part +129 -0
  155. package/WAProto/parts/MsgOpaqueData.part +1732 -0
  156. package/WAProto/parts/MsgRowOpaqueData.part +104 -0
  157. package/WAProto/parts/MutationProps.part +89 -0
  158. package/WAProto/parts/NoiseCertificate.part +277 -0
  159. package/WAProto/parts/NotificationMessageInfo.part +152 -0
  160. package/WAProto/parts/NotificationSettings.part +176 -0
  161. package/WAProto/parts/PairingRequest.part +128 -0
  162. package/WAProto/parts/PastParticipant.part +148 -0
  163. package/WAProto/parts/PastParticipants.part +112 -0
  164. package/WAProto/parts/PatchDebugData.part +358 -0
  165. package/WAProto/parts/PaymentBackground.part +460 -0
  166. package/WAProto/parts/PaymentInfo.part +602 -0
  167. package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
  168. package/WAProto/parts/PhotoChange.part +125 -0
  169. package/WAProto/parts/PinInChat.part +205 -0
  170. package/WAProto/parts/Point.part +138 -0
  171. package/WAProto/parts/PollAdditionalMetadata.part +216 -0
  172. package/WAProto/parts/PollEncValue.part +106 -0
  173. package/WAProto/parts/PollUpdate.part +202 -0
  174. package/WAProto/parts/PreKeyRecordStructure.part +125 -0
  175. package/WAProto/parts/PreKeySignalMessage.part +185 -0
  176. package/WAProto/parts/PremiumMessageInfo.part +81 -0
  177. package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
  178. package/WAProto/parts/PrivacySystemMessage.part +6 -0
  179. package/WAProto/parts/ProcessedVideo.part +266 -0
  180. package/WAProto/parts/ProloguePayload.part +105 -0
  181. package/WAProto/parts/Pushname.part +100 -0
  182. package/WAProto/parts/QuarantinedMessage.part +103 -0
  183. package/WAProto/parts/Reaction.part +169 -0
  184. package/WAProto/parts/RecentEmojiWeight.part +100 -0
  185. package/WAProto/parts/RecordStructure.part +114 -0
  186. package/WAProto/parts/Reportable.part +138 -0
  187. package/WAProto/parts/ReportingTokenInfo.part +84 -0
  188. package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
  189. package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
  190. package/WAProto/parts/SenderKeyMessage.part +122 -0
  191. package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
  192. package/WAProto/parts/SenderKeyStateStructure.part +469 -0
  193. package/WAProto/parts/ServerErrorReceipt.part +81 -0
  194. package/WAProto/parts/SessionStructure.part +1087 -0
  195. package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
  196. package/WAProto/parts/SessionTransparencyType.part +5 -0
  197. package/WAProto/parts/SignalMessage.part +144 -0
  198. package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
  199. package/WAProto/parts/StatusAttribution.part +1235 -0
  200. package/WAProto/parts/StatusMentionMessage.part +83 -0
  201. package/WAProto/parts/StatusPSA.part +121 -0
  202. package/WAProto/parts/StickerMetadata.part +357 -0
  203. package/WAProto/parts/SyncActionData.part +146 -0
  204. package/WAProto/parts/SyncActionValue.part +12959 -0
  205. package/WAProto/parts/SyncdIndex.part +84 -0
  206. package/WAProto/parts/SyncdMutation.part +121 -0
  207. package/WAProto/parts/SyncdMutations.part +92 -0
  208. package/WAProto/parts/SyncdPatch.part +262 -0
  209. package/WAProto/parts/SyncdRecord.part +125 -0
  210. package/WAProto/parts/SyncdSnapshot.part +157 -0
  211. package/WAProto/parts/SyncdValue.part +84 -0
  212. package/WAProto/parts/SyncdVersion.part +91 -0
  213. package/WAProto/parts/TapLinkAction.part +100 -0
  214. package/WAProto/parts/TemplateButton.part +449 -0
  215. package/WAProto/parts/ThreadID.part +126 -0
  216. package/WAProto/parts/UrlTrackingMap.part +231 -0
  217. package/WAProto/parts/UserPassword.part +399 -0
  218. package/WAProto/parts/UserReceipt.part +221 -0
  219. package/WAProto/parts/VerifiedNameCertificate.part +318 -0
  220. package/WAProto/parts/WallpaperSettings.part +119 -0
  221. package/WAProto/parts/WebFeatures.part +1870 -0
  222. package/WAProto/parts/WebLinkRenderConfig.part +5 -0
  223. package/WAProto/parts/WebMessageInfo.part +2851 -0
  224. package/WAProto/parts/WebNotificationsInfo.part +160 -0
  225. package/package.json +1 -1
  226. package/src/binary/wa-binary.js +4 -2
  227. package/src/defaults.js +2 -1
  228. package/src/foundation/cache.js +99 -24
  229. package/src/foundation/memory.js +103 -0
  230. package/src/signal/libsignal.js +1 -8
  231. package/src/signal/signal-repository.js +6 -4
  232. package/src/socket/chats.js +2 -0
  233. package/src/socket/messages-recv.js +5 -3
  234. package/src/socket/messages-send.js +2 -2
  235. package/src/socket/socket-core.js +3 -0
  236. package/src/utils/auth-state-core.js +2 -1
  237. package/src/utils/chat-sync.js +4 -0
  238. package/src/utils/media.js +13 -8
  239. package/src/utils/message-processing.js +22 -6
  240. package/src/utils/wa-protocol-core.js +6 -5
  241. package/src/wam/wam-constants.js +22 -22851
  242. package/src/wam/wam-data.json +1 -0
@@ -0,0 +1,982 @@
1
+ "use strict";
2
+ function DeviceProps(p) {
3
+ if (p)
4
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
5
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
6
+ this[ks[i]] = p[ks[i]];
7
+ }
8
+ DeviceProps.prototype.os = null;
9
+ DeviceProps.prototype.version = null;
10
+ DeviceProps.prototype.platformType = null;
11
+ DeviceProps.prototype.requireFullSync = null;
12
+ DeviceProps.prototype.historySyncConfig = null;
13
+ let $oneOfFields;
14
+ Object.defineProperty(DeviceProps.prototype, "_os", {
15
+ get: $util.oneOfGetter($oneOfFields = ["os"]),
16
+ set: $util.oneOfSetter($oneOfFields)
17
+ });
18
+ Object.defineProperty(DeviceProps.prototype, "_version", {
19
+ get: $util.oneOfGetter($oneOfFields = ["version"]),
20
+ set: $util.oneOfSetter($oneOfFields)
21
+ });
22
+ Object.defineProperty(DeviceProps.prototype, "_platformType", {
23
+ get: $util.oneOfGetter($oneOfFields = ["platformType"]),
24
+ set: $util.oneOfSetter($oneOfFields)
25
+ });
26
+ Object.defineProperty(DeviceProps.prototype, "_requireFullSync", {
27
+ get: $util.oneOfGetter($oneOfFields = ["requireFullSync"]),
28
+ set: $util.oneOfSetter($oneOfFields)
29
+ });
30
+ Object.defineProperty(DeviceProps.prototype, "_historySyncConfig", {
31
+ get: $util.oneOfGetter($oneOfFields = ["historySyncConfig"]),
32
+ set: $util.oneOfSetter($oneOfFields)
33
+ });
34
+ DeviceProps.create = function create(properties) {
35
+ return new DeviceProps(properties);
36
+ };
37
+ DeviceProps.encode = function encode(m, w) {
38
+ if (!w)
39
+ w = $Writer.create();
40
+ if (m.os != null && Object.hasOwnProperty.call(m, "os"))
41
+ w.uint32(10).string(m.os);
42
+ if (m.version != null && Object.hasOwnProperty.call(m, "version"))
43
+ $root.proto.DeviceProps.AppVersion.encode(m.version, w.uint32(18).fork()).ldelim();
44
+ if (m.platformType != null && Object.hasOwnProperty.call(m, "platformType"))
45
+ w.uint32(24).int32(m.platformType);
46
+ if (m.requireFullSync != null && Object.hasOwnProperty.call(m, "requireFullSync"))
47
+ w.uint32(32).bool(m.requireFullSync);
48
+ if (m.historySyncConfig != null && Object.hasOwnProperty.call(m, "historySyncConfig"))
49
+ $root.proto.DeviceProps.HistorySyncConfig.encode(m.historySyncConfig, w.uint32(42).fork()).ldelim();
50
+ return w;
51
+ };
52
+ DeviceProps.decode = function decode(r, l, e, n) {
53
+ if (!(r instanceof $Reader))
54
+ r = $Reader.create(r);
55
+ if (n === undefined)
56
+ n = 0;
57
+ if (n > $Reader.recursionLimit)
58
+ throw Error("maximum nesting depth exceeded");
59
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.DeviceProps();
60
+ while (r.pos < c) {
61
+ var t = r.uint32();
62
+ if (t === e)
63
+ break;
64
+ switch (t >>> 3) {
65
+ case 1: {
66
+ m.os = r.string();
67
+ break;
68
+ }
69
+ case 2: {
70
+ m.version = $root.proto.DeviceProps.AppVersion.decode(r, r.uint32(), undefined, n + 1);
71
+ break;
72
+ }
73
+ case 3: {
74
+ m.platformType = r.int32();
75
+ break;
76
+ }
77
+ case 4: {
78
+ m.requireFullSync = r.bool();
79
+ break;
80
+ }
81
+ case 5: {
82
+ m.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.decode(r, r.uint32(), undefined, n + 1);
83
+ break;
84
+ }
85
+ default:
86
+ r.skipType(t & 7, n);
87
+ break;
88
+ }
89
+ }
90
+ return m;
91
+ };
92
+ DeviceProps.fromObject = function fromObject(d, n) {
93
+ if (d instanceof $root.proto.DeviceProps)
94
+ return d;
95
+ if (n === undefined)
96
+ n = 0;
97
+ if (n > $util.recursionLimit)
98
+ throw Error("maximum nesting depth exceeded");
99
+ var m = new $root.proto.DeviceProps();
100
+ if (d.os != null) {
101
+ m.os = String(d.os);
102
+ }
103
+ if (d.version != null) {
104
+ if (typeof d.version !== "object")
105
+ throw TypeError(".proto.DeviceProps.version: object expected");
106
+ m.version = $root.proto.DeviceProps.AppVersion.fromObject(d.version, n + 1);
107
+ }
108
+ switch (d.platformType) {
109
+ default:
110
+ if (typeof d.platformType === "number") {
111
+ m.platformType = d.platformType;
112
+ break;
113
+ }
114
+ break;
115
+ case "UNKNOWN":
116
+ case 0:
117
+ m.platformType = 0;
118
+ break;
119
+ case "CHROME":
120
+ case 1:
121
+ m.platformType = 1;
122
+ break;
123
+ case "FIREFOX":
124
+ case 2:
125
+ m.platformType = 2;
126
+ break;
127
+ case "IE":
128
+ case 3:
129
+ m.platformType = 3;
130
+ break;
131
+ case "OPERA":
132
+ case 4:
133
+ m.platformType = 4;
134
+ break;
135
+ case "SAFARI":
136
+ case 5:
137
+ m.platformType = 5;
138
+ break;
139
+ case "EDGE":
140
+ case 6:
141
+ m.platformType = 6;
142
+ break;
143
+ case "DESKTOP":
144
+ case 7:
145
+ m.platformType = 7;
146
+ break;
147
+ case "IPAD":
148
+ case 8:
149
+ m.platformType = 8;
150
+ break;
151
+ case "ANDROID_TABLET":
152
+ case 9:
153
+ m.platformType = 9;
154
+ break;
155
+ case "OHANA":
156
+ case 10:
157
+ m.platformType = 10;
158
+ break;
159
+ case "ALOHA":
160
+ case 11:
161
+ m.platformType = 11;
162
+ break;
163
+ case "CATALINA":
164
+ case 12:
165
+ m.platformType = 12;
166
+ break;
167
+ case "TCL_TV":
168
+ case 13:
169
+ m.platformType = 13;
170
+ break;
171
+ case "IOS_PHONE":
172
+ case 14:
173
+ m.platformType = 14;
174
+ break;
175
+ case "IOS_CATALYST":
176
+ case 15:
177
+ m.platformType = 15;
178
+ break;
179
+ case "ANDROID_PHONE":
180
+ case 16:
181
+ m.platformType = 16;
182
+ break;
183
+ case "ANDROID_AMBIGUOUS":
184
+ case 17:
185
+ m.platformType = 17;
186
+ break;
187
+ case "WEAR_OS":
188
+ case 18:
189
+ m.platformType = 18;
190
+ break;
191
+ case "AR_WRIST":
192
+ case 19:
193
+ m.platformType = 19;
194
+ break;
195
+ case "AR_DEVICE":
196
+ case 20:
197
+ m.platformType = 20;
198
+ break;
199
+ case "UWP":
200
+ case 21:
201
+ m.platformType = 21;
202
+ break;
203
+ case "VR":
204
+ case 22:
205
+ m.platformType = 22;
206
+ break;
207
+ case "CLOUD_API":
208
+ case 23:
209
+ m.platformType = 23;
210
+ break;
211
+ case "SMARTGLASSES":
212
+ case 24:
213
+ m.platformType = 24;
214
+ break;
215
+ }
216
+ if (d.requireFullSync != null) {
217
+ m.requireFullSync = Boolean(d.requireFullSync);
218
+ }
219
+ if (d.historySyncConfig != null) {
220
+ if (typeof d.historySyncConfig !== "object")
221
+ throw TypeError(".proto.DeviceProps.historySyncConfig: object expected");
222
+ m.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.fromObject(d.historySyncConfig, n + 1);
223
+ }
224
+ return m;
225
+ };
226
+ DeviceProps.toObject = function toObject(m, o) {
227
+ if (!o)
228
+ o = {};
229
+ var d = {};
230
+ if (m.os != null && m.hasOwnProperty("os")) {
231
+ d.os = m.os;
232
+ if (o.oneofs)
233
+ d._os = "os";
234
+ }
235
+ if (m.version != null && m.hasOwnProperty("version")) {
236
+ d.version = $root.proto.DeviceProps.AppVersion.toObject(m.version, o);
237
+ if (o.oneofs)
238
+ d._version = "version";
239
+ }
240
+ if (m.platformType != null && m.hasOwnProperty("platformType")) {
241
+ d.platformType = o.enums === String ? $root.proto.DeviceProps.PlatformType[m.platformType] === undefined ? m.platformType : $root.proto.DeviceProps.PlatformType[m.platformType] : m.platformType;
242
+ if (o.oneofs)
243
+ d._platformType = "platformType";
244
+ }
245
+ if (m.requireFullSync != null && m.hasOwnProperty("requireFullSync")) {
246
+ d.requireFullSync = m.requireFullSync;
247
+ if (o.oneofs)
248
+ d._requireFullSync = "requireFullSync";
249
+ }
250
+ if (m.historySyncConfig != null && m.hasOwnProperty("historySyncConfig")) {
251
+ d.historySyncConfig = $root.proto.DeviceProps.HistorySyncConfig.toObject(m.historySyncConfig, o);
252
+ if (o.oneofs)
253
+ d._historySyncConfig = "historySyncConfig";
254
+ }
255
+ return d;
256
+ };
257
+ DeviceProps.prototype.toJSON = function toJSON() {
258
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
259
+ };
260
+ DeviceProps.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
261
+ if (typeUrlPrefix === undefined) {
262
+ typeUrlPrefix = "type.googleapis.com";
263
+ }
264
+ return typeUrlPrefix + "/proto.DeviceProps";
265
+ };
266
+ $lazy(DeviceProps, "AppVersion", function() {
267
+ function AppVersion(p) {
268
+ if (p)
269
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
270
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
271
+ this[ks[i]] = p[ks[i]];
272
+ }
273
+ AppVersion.prototype.primary = null;
274
+ AppVersion.prototype.secondary = null;
275
+ AppVersion.prototype.tertiary = null;
276
+ AppVersion.prototype.quaternary = null;
277
+ AppVersion.prototype.quinary = null;
278
+ let $oneOfFields;
279
+ Object.defineProperty(AppVersion.prototype, "_primary", {
280
+ get: $util.oneOfGetter($oneOfFields = ["primary"]),
281
+ set: $util.oneOfSetter($oneOfFields)
282
+ });
283
+ Object.defineProperty(AppVersion.prototype, "_secondary", {
284
+ get: $util.oneOfGetter($oneOfFields = ["secondary"]),
285
+ set: $util.oneOfSetter($oneOfFields)
286
+ });
287
+ Object.defineProperty(AppVersion.prototype, "_tertiary", {
288
+ get: $util.oneOfGetter($oneOfFields = ["tertiary"]),
289
+ set: $util.oneOfSetter($oneOfFields)
290
+ });
291
+ Object.defineProperty(AppVersion.prototype, "_quaternary", {
292
+ get: $util.oneOfGetter($oneOfFields = ["quaternary"]),
293
+ set: $util.oneOfSetter($oneOfFields)
294
+ });
295
+ Object.defineProperty(AppVersion.prototype, "_quinary", {
296
+ get: $util.oneOfGetter($oneOfFields = ["quinary"]),
297
+ set: $util.oneOfSetter($oneOfFields)
298
+ });
299
+ AppVersion.create = function create(properties) {
300
+ return new AppVersion(properties);
301
+ };
302
+ AppVersion.encode = function encode(m, w) {
303
+ if (!w)
304
+ w = $Writer.create();
305
+ if (m.primary != null && Object.hasOwnProperty.call(m, "primary"))
306
+ w.uint32(8).uint32(m.primary);
307
+ if (m.secondary != null && Object.hasOwnProperty.call(m, "secondary"))
308
+ w.uint32(16).uint32(m.secondary);
309
+ if (m.tertiary != null && Object.hasOwnProperty.call(m, "tertiary"))
310
+ w.uint32(24).uint32(m.tertiary);
311
+ if (m.quaternary != null && Object.hasOwnProperty.call(m, "quaternary"))
312
+ w.uint32(32).uint32(m.quaternary);
313
+ if (m.quinary != null && Object.hasOwnProperty.call(m, "quinary"))
314
+ w.uint32(40).uint32(m.quinary);
315
+ return w;
316
+ };
317
+ AppVersion.decode = function decode(r, l, e, n) {
318
+ if (!(r instanceof $Reader))
319
+ r = $Reader.create(r);
320
+ if (n === undefined)
321
+ n = 0;
322
+ if (n > $Reader.recursionLimit)
323
+ throw Error("maximum nesting depth exceeded");
324
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.DeviceProps.AppVersion();
325
+ while (r.pos < c) {
326
+ var t = r.uint32();
327
+ if (t === e)
328
+ break;
329
+ switch (t >>> 3) {
330
+ case 1: {
331
+ m.primary = r.uint32();
332
+ break;
333
+ }
334
+ case 2: {
335
+ m.secondary = r.uint32();
336
+ break;
337
+ }
338
+ case 3: {
339
+ m.tertiary = r.uint32();
340
+ break;
341
+ }
342
+ case 4: {
343
+ m.quaternary = r.uint32();
344
+ break;
345
+ }
346
+ case 5: {
347
+ m.quinary = r.uint32();
348
+ break;
349
+ }
350
+ default:
351
+ r.skipType(t & 7, n);
352
+ break;
353
+ }
354
+ }
355
+ return m;
356
+ };
357
+ AppVersion.fromObject = function fromObject(d, n) {
358
+ if (d instanceof $root.proto.DeviceProps.AppVersion)
359
+ return d;
360
+ if (n === undefined)
361
+ n = 0;
362
+ if (n > $util.recursionLimit)
363
+ throw Error("maximum nesting depth exceeded");
364
+ var m = new $root.proto.DeviceProps.AppVersion();
365
+ if (d.primary != null) {
366
+ m.primary = d.primary >>> 0;
367
+ }
368
+ if (d.secondary != null) {
369
+ m.secondary = d.secondary >>> 0;
370
+ }
371
+ if (d.tertiary != null) {
372
+ m.tertiary = d.tertiary >>> 0;
373
+ }
374
+ if (d.quaternary != null) {
375
+ m.quaternary = d.quaternary >>> 0;
376
+ }
377
+ if (d.quinary != null) {
378
+ m.quinary = d.quinary >>> 0;
379
+ }
380
+ return m;
381
+ };
382
+ AppVersion.toObject = function toObject(m, o) {
383
+ if (!o)
384
+ o = {};
385
+ var d = {};
386
+ if (m.primary != null && m.hasOwnProperty("primary")) {
387
+ d.primary = m.primary;
388
+ if (o.oneofs)
389
+ d._primary = "primary";
390
+ }
391
+ if (m.secondary != null && m.hasOwnProperty("secondary")) {
392
+ d.secondary = m.secondary;
393
+ if (o.oneofs)
394
+ d._secondary = "secondary";
395
+ }
396
+ if (m.tertiary != null && m.hasOwnProperty("tertiary")) {
397
+ d.tertiary = m.tertiary;
398
+ if (o.oneofs)
399
+ d._tertiary = "tertiary";
400
+ }
401
+ if (m.quaternary != null && m.hasOwnProperty("quaternary")) {
402
+ d.quaternary = m.quaternary;
403
+ if (o.oneofs)
404
+ d._quaternary = "quaternary";
405
+ }
406
+ if (m.quinary != null && m.hasOwnProperty("quinary")) {
407
+ d.quinary = m.quinary;
408
+ if (o.oneofs)
409
+ d._quinary = "quinary";
410
+ }
411
+ return d;
412
+ };
413
+ AppVersion.prototype.toJSON = function toJSON() {
414
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
415
+ };
416
+ AppVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
417
+ if (typeUrlPrefix === undefined) {
418
+ typeUrlPrefix = "type.googleapis.com";
419
+ }
420
+ return typeUrlPrefix + "/proto.DeviceProps.AppVersion";
421
+ };
422
+ return AppVersion;
423
+ });
424
+ $lazy(DeviceProps, "HistorySyncConfig", function() {
425
+ function HistorySyncConfig(p) {
426
+ this.supportedBotChannelFbids = [];
427
+ if (p)
428
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
429
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
430
+ this[ks[i]] = p[ks[i]];
431
+ }
432
+ HistorySyncConfig.prototype.fullSyncDaysLimit = null;
433
+ HistorySyncConfig.prototype.fullSyncSizeMbLimit = null;
434
+ HistorySyncConfig.prototype.storageQuotaMb = null;
435
+ HistorySyncConfig.prototype.inlineInitialPayloadInE2EeMsg = null;
436
+ HistorySyncConfig.prototype.recentSyncDaysLimit = null;
437
+ HistorySyncConfig.prototype.supportCallLogHistory = null;
438
+ HistorySyncConfig.prototype.supportBotUserAgentChatHistory = null;
439
+ HistorySyncConfig.prototype.supportCagReactionsAndPolls = null;
440
+ HistorySyncConfig.prototype.supportBizHostedMsg = null;
441
+ HistorySyncConfig.prototype.supportRecentSyncChunkMessageCountTuning = null;
442
+ HistorySyncConfig.prototype.supportHostedGroupMsg = null;
443
+ HistorySyncConfig.prototype.supportFbidBotChatHistory = null;
444
+ HistorySyncConfig.prototype.supportAddOnHistorySyncMigration = null;
445
+ HistorySyncConfig.prototype.supportMessageAssociation = null;
446
+ HistorySyncConfig.prototype.supportGroupHistory = null;
447
+ HistorySyncConfig.prototype.onDemandReady = null;
448
+ HistorySyncConfig.prototype.supportGuestChat = null;
449
+ HistorySyncConfig.prototype.completeOnDemandReady = null;
450
+ HistorySyncConfig.prototype.thumbnailSyncDaysLimit = null;
451
+ HistorySyncConfig.prototype.initialSyncMaxMessagesPerChat = null;
452
+ HistorySyncConfig.prototype.supportManusHistory = null;
453
+ HistorySyncConfig.prototype.supportHatchHistory = null;
454
+ HistorySyncConfig.prototype.supportedBotChannelFbids = $util.emptyArray;
455
+ HistorySyncConfig.prototype.supportInlineContacts = null;
456
+ let $oneOfFields;
457
+ Object.defineProperty(HistorySyncConfig.prototype, "_fullSyncDaysLimit", {
458
+ get: $util.oneOfGetter($oneOfFields = ["fullSyncDaysLimit"]),
459
+ set: $util.oneOfSetter($oneOfFields)
460
+ });
461
+ Object.defineProperty(HistorySyncConfig.prototype, "_fullSyncSizeMbLimit", {
462
+ get: $util.oneOfGetter($oneOfFields = ["fullSyncSizeMbLimit"]),
463
+ set: $util.oneOfSetter($oneOfFields)
464
+ });
465
+ Object.defineProperty(HistorySyncConfig.prototype, "_storageQuotaMb", {
466
+ get: $util.oneOfGetter($oneOfFields = ["storageQuotaMb"]),
467
+ set: $util.oneOfSetter($oneOfFields)
468
+ });
469
+ Object.defineProperty(HistorySyncConfig.prototype, "_inlineInitialPayloadInE2EeMsg", {
470
+ get: $util.oneOfGetter($oneOfFields = ["inlineInitialPayloadInE2EeMsg"]),
471
+ set: $util.oneOfSetter($oneOfFields)
472
+ });
473
+ Object.defineProperty(HistorySyncConfig.prototype, "_recentSyncDaysLimit", {
474
+ get: $util.oneOfGetter($oneOfFields = ["recentSyncDaysLimit"]),
475
+ set: $util.oneOfSetter($oneOfFields)
476
+ });
477
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportCallLogHistory", {
478
+ get: $util.oneOfGetter($oneOfFields = ["supportCallLogHistory"]),
479
+ set: $util.oneOfSetter($oneOfFields)
480
+ });
481
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportBotUserAgentChatHistory", {
482
+ get: $util.oneOfGetter($oneOfFields = ["supportBotUserAgentChatHistory"]),
483
+ set: $util.oneOfSetter($oneOfFields)
484
+ });
485
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportCagReactionsAndPolls", {
486
+ get: $util.oneOfGetter($oneOfFields = ["supportCagReactionsAndPolls"]),
487
+ set: $util.oneOfSetter($oneOfFields)
488
+ });
489
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportBizHostedMsg", {
490
+ get: $util.oneOfGetter($oneOfFields = ["supportBizHostedMsg"]),
491
+ set: $util.oneOfSetter($oneOfFields)
492
+ });
493
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportRecentSyncChunkMessageCountTuning", {
494
+ get: $util.oneOfGetter($oneOfFields = ["supportRecentSyncChunkMessageCountTuning"]),
495
+ set: $util.oneOfSetter($oneOfFields)
496
+ });
497
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportHostedGroupMsg", {
498
+ get: $util.oneOfGetter($oneOfFields = ["supportHostedGroupMsg"]),
499
+ set: $util.oneOfSetter($oneOfFields)
500
+ });
501
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportFbidBotChatHistory", {
502
+ get: $util.oneOfGetter($oneOfFields = ["supportFbidBotChatHistory"]),
503
+ set: $util.oneOfSetter($oneOfFields)
504
+ });
505
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportAddOnHistorySyncMigration", {
506
+ get: $util.oneOfGetter($oneOfFields = ["supportAddOnHistorySyncMigration"]),
507
+ set: $util.oneOfSetter($oneOfFields)
508
+ });
509
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportMessageAssociation", {
510
+ get: $util.oneOfGetter($oneOfFields = ["supportMessageAssociation"]),
511
+ set: $util.oneOfSetter($oneOfFields)
512
+ });
513
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportGroupHistory", {
514
+ get: $util.oneOfGetter($oneOfFields = ["supportGroupHistory"]),
515
+ set: $util.oneOfSetter($oneOfFields)
516
+ });
517
+ Object.defineProperty(HistorySyncConfig.prototype, "_onDemandReady", {
518
+ get: $util.oneOfGetter($oneOfFields = ["onDemandReady"]),
519
+ set: $util.oneOfSetter($oneOfFields)
520
+ });
521
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportGuestChat", {
522
+ get: $util.oneOfGetter($oneOfFields = ["supportGuestChat"]),
523
+ set: $util.oneOfSetter($oneOfFields)
524
+ });
525
+ Object.defineProperty(HistorySyncConfig.prototype, "_completeOnDemandReady", {
526
+ get: $util.oneOfGetter($oneOfFields = ["completeOnDemandReady"]),
527
+ set: $util.oneOfSetter($oneOfFields)
528
+ });
529
+ Object.defineProperty(HistorySyncConfig.prototype, "_thumbnailSyncDaysLimit", {
530
+ get: $util.oneOfGetter($oneOfFields = ["thumbnailSyncDaysLimit"]),
531
+ set: $util.oneOfSetter($oneOfFields)
532
+ });
533
+ Object.defineProperty(HistorySyncConfig.prototype, "_initialSyncMaxMessagesPerChat", {
534
+ get: $util.oneOfGetter($oneOfFields = ["initialSyncMaxMessagesPerChat"]),
535
+ set: $util.oneOfSetter($oneOfFields)
536
+ });
537
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportManusHistory", {
538
+ get: $util.oneOfGetter($oneOfFields = ["supportManusHistory"]),
539
+ set: $util.oneOfSetter($oneOfFields)
540
+ });
541
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportHatchHistory", {
542
+ get: $util.oneOfGetter($oneOfFields = ["supportHatchHistory"]),
543
+ set: $util.oneOfSetter($oneOfFields)
544
+ });
545
+ Object.defineProperty(HistorySyncConfig.prototype, "_supportInlineContacts", {
546
+ get: $util.oneOfGetter($oneOfFields = ["supportInlineContacts"]),
547
+ set: $util.oneOfSetter($oneOfFields)
548
+ });
549
+ HistorySyncConfig.create = function create(properties) {
550
+ return new HistorySyncConfig(properties);
551
+ };
552
+ HistorySyncConfig.encode = function encode(m, w) {
553
+ if (!w)
554
+ w = $Writer.create();
555
+ if (m.fullSyncDaysLimit != null && Object.hasOwnProperty.call(m, "fullSyncDaysLimit"))
556
+ w.uint32(8).uint32(m.fullSyncDaysLimit);
557
+ if (m.fullSyncSizeMbLimit != null && Object.hasOwnProperty.call(m, "fullSyncSizeMbLimit"))
558
+ w.uint32(16).uint32(m.fullSyncSizeMbLimit);
559
+ if (m.storageQuotaMb != null && Object.hasOwnProperty.call(m, "storageQuotaMb"))
560
+ w.uint32(24).uint32(m.storageQuotaMb);
561
+ if (m.inlineInitialPayloadInE2EeMsg != null && Object.hasOwnProperty.call(m, "inlineInitialPayloadInE2EeMsg"))
562
+ w.uint32(32).bool(m.inlineInitialPayloadInE2EeMsg);
563
+ if (m.recentSyncDaysLimit != null && Object.hasOwnProperty.call(m, "recentSyncDaysLimit"))
564
+ w.uint32(40).uint32(m.recentSyncDaysLimit);
565
+ if (m.supportCallLogHistory != null && Object.hasOwnProperty.call(m, "supportCallLogHistory"))
566
+ w.uint32(48).bool(m.supportCallLogHistory);
567
+ if (m.supportBotUserAgentChatHistory != null && Object.hasOwnProperty.call(m, "supportBotUserAgentChatHistory"))
568
+ w.uint32(56).bool(m.supportBotUserAgentChatHistory);
569
+ if (m.supportCagReactionsAndPolls != null && Object.hasOwnProperty.call(m, "supportCagReactionsAndPolls"))
570
+ w.uint32(64).bool(m.supportCagReactionsAndPolls);
571
+ if (m.supportBizHostedMsg != null && Object.hasOwnProperty.call(m, "supportBizHostedMsg"))
572
+ w.uint32(72).bool(m.supportBizHostedMsg);
573
+ if (m.supportRecentSyncChunkMessageCountTuning != null && Object.hasOwnProperty.call(m, "supportRecentSyncChunkMessageCountTuning"))
574
+ w.uint32(80).bool(m.supportRecentSyncChunkMessageCountTuning);
575
+ if (m.supportHostedGroupMsg != null && Object.hasOwnProperty.call(m, "supportHostedGroupMsg"))
576
+ w.uint32(88).bool(m.supportHostedGroupMsg);
577
+ if (m.supportFbidBotChatHistory != null && Object.hasOwnProperty.call(m, "supportFbidBotChatHistory"))
578
+ w.uint32(96).bool(m.supportFbidBotChatHistory);
579
+ if (m.supportAddOnHistorySyncMigration != null && Object.hasOwnProperty.call(m, "supportAddOnHistorySyncMigration"))
580
+ w.uint32(104).bool(m.supportAddOnHistorySyncMigration);
581
+ if (m.supportMessageAssociation != null && Object.hasOwnProperty.call(m, "supportMessageAssociation"))
582
+ w.uint32(112).bool(m.supportMessageAssociation);
583
+ if (m.supportGroupHistory != null && Object.hasOwnProperty.call(m, "supportGroupHistory"))
584
+ w.uint32(120).bool(m.supportGroupHistory);
585
+ if (m.onDemandReady != null && Object.hasOwnProperty.call(m, "onDemandReady"))
586
+ w.uint32(128).bool(m.onDemandReady);
587
+ if (m.supportGuestChat != null && Object.hasOwnProperty.call(m, "supportGuestChat"))
588
+ w.uint32(136).bool(m.supportGuestChat);
589
+ if (m.completeOnDemandReady != null && Object.hasOwnProperty.call(m, "completeOnDemandReady"))
590
+ w.uint32(144).bool(m.completeOnDemandReady);
591
+ if (m.thumbnailSyncDaysLimit != null && Object.hasOwnProperty.call(m, "thumbnailSyncDaysLimit"))
592
+ w.uint32(152).uint32(m.thumbnailSyncDaysLimit);
593
+ if (m.initialSyncMaxMessagesPerChat != null && Object.hasOwnProperty.call(m, "initialSyncMaxMessagesPerChat"))
594
+ w.uint32(160).uint32(m.initialSyncMaxMessagesPerChat);
595
+ if (m.supportManusHistory != null && Object.hasOwnProperty.call(m, "supportManusHistory"))
596
+ w.uint32(168).bool(m.supportManusHistory);
597
+ if (m.supportHatchHistory != null && Object.hasOwnProperty.call(m, "supportHatchHistory"))
598
+ w.uint32(176).bool(m.supportHatchHistory);
599
+ if (m.supportedBotChannelFbids != null && m.supportedBotChannelFbids.length) {
600
+ for (var i = 0; i < m.supportedBotChannelFbids.length; ++i)
601
+ w.uint32(186).string(m.supportedBotChannelFbids[i]);
602
+ }
603
+ if (m.supportInlineContacts != null && Object.hasOwnProperty.call(m, "supportInlineContacts"))
604
+ w.uint32(192).bool(m.supportInlineContacts);
605
+ return w;
606
+ };
607
+ HistorySyncConfig.decode = function decode(r, l, e, n) {
608
+ if (!(r instanceof $Reader))
609
+ r = $Reader.create(r);
610
+ if (n === undefined)
611
+ n = 0;
612
+ if (n > $Reader.recursionLimit)
613
+ throw Error("maximum nesting depth exceeded");
614
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.DeviceProps.HistorySyncConfig();
615
+ while (r.pos < c) {
616
+ var t = r.uint32();
617
+ if (t === e)
618
+ break;
619
+ switch (t >>> 3) {
620
+ case 1: {
621
+ m.fullSyncDaysLimit = r.uint32();
622
+ break;
623
+ }
624
+ case 2: {
625
+ m.fullSyncSizeMbLimit = r.uint32();
626
+ break;
627
+ }
628
+ case 3: {
629
+ m.storageQuotaMb = r.uint32();
630
+ break;
631
+ }
632
+ case 4: {
633
+ m.inlineInitialPayloadInE2EeMsg = r.bool();
634
+ break;
635
+ }
636
+ case 5: {
637
+ m.recentSyncDaysLimit = r.uint32();
638
+ break;
639
+ }
640
+ case 6: {
641
+ m.supportCallLogHistory = r.bool();
642
+ break;
643
+ }
644
+ case 7: {
645
+ m.supportBotUserAgentChatHistory = r.bool();
646
+ break;
647
+ }
648
+ case 8: {
649
+ m.supportCagReactionsAndPolls = r.bool();
650
+ break;
651
+ }
652
+ case 9: {
653
+ m.supportBizHostedMsg = r.bool();
654
+ break;
655
+ }
656
+ case 10: {
657
+ m.supportRecentSyncChunkMessageCountTuning = r.bool();
658
+ break;
659
+ }
660
+ case 11: {
661
+ m.supportHostedGroupMsg = r.bool();
662
+ break;
663
+ }
664
+ case 12: {
665
+ m.supportFbidBotChatHistory = r.bool();
666
+ break;
667
+ }
668
+ case 13: {
669
+ m.supportAddOnHistorySyncMigration = r.bool();
670
+ break;
671
+ }
672
+ case 14: {
673
+ m.supportMessageAssociation = r.bool();
674
+ break;
675
+ }
676
+ case 15: {
677
+ m.supportGroupHistory = r.bool();
678
+ break;
679
+ }
680
+ case 16: {
681
+ m.onDemandReady = r.bool();
682
+ break;
683
+ }
684
+ case 17: {
685
+ m.supportGuestChat = r.bool();
686
+ break;
687
+ }
688
+ case 18: {
689
+ m.completeOnDemandReady = r.bool();
690
+ break;
691
+ }
692
+ case 19: {
693
+ m.thumbnailSyncDaysLimit = r.uint32();
694
+ break;
695
+ }
696
+ case 20: {
697
+ m.initialSyncMaxMessagesPerChat = r.uint32();
698
+ break;
699
+ }
700
+ case 21: {
701
+ m.supportManusHistory = r.bool();
702
+ break;
703
+ }
704
+ case 22: {
705
+ m.supportHatchHistory = r.bool();
706
+ break;
707
+ }
708
+ case 23: {
709
+ if (!(m.supportedBotChannelFbids && m.supportedBotChannelFbids.length))
710
+ m.supportedBotChannelFbids = [];
711
+ m.supportedBotChannelFbids.push(r.string());
712
+ break;
713
+ }
714
+ case 24: {
715
+ m.supportInlineContacts = r.bool();
716
+ break;
717
+ }
718
+ default:
719
+ r.skipType(t & 7, n);
720
+ break;
721
+ }
722
+ }
723
+ return m;
724
+ };
725
+ HistorySyncConfig.fromObject = function fromObject(d, n) {
726
+ if (d instanceof $root.proto.DeviceProps.HistorySyncConfig)
727
+ return d;
728
+ if (n === undefined)
729
+ n = 0;
730
+ if (n > $util.recursionLimit)
731
+ throw Error("maximum nesting depth exceeded");
732
+ var m = new $root.proto.DeviceProps.HistorySyncConfig();
733
+ if (d.fullSyncDaysLimit != null) {
734
+ m.fullSyncDaysLimit = d.fullSyncDaysLimit >>> 0;
735
+ }
736
+ if (d.fullSyncSizeMbLimit != null) {
737
+ m.fullSyncSizeMbLimit = d.fullSyncSizeMbLimit >>> 0;
738
+ }
739
+ if (d.storageQuotaMb != null) {
740
+ m.storageQuotaMb = d.storageQuotaMb >>> 0;
741
+ }
742
+ if (d.inlineInitialPayloadInE2EeMsg != null) {
743
+ m.inlineInitialPayloadInE2EeMsg = Boolean(d.inlineInitialPayloadInE2EeMsg);
744
+ }
745
+ if (d.recentSyncDaysLimit != null) {
746
+ m.recentSyncDaysLimit = d.recentSyncDaysLimit >>> 0;
747
+ }
748
+ if (d.supportCallLogHistory != null) {
749
+ m.supportCallLogHistory = Boolean(d.supportCallLogHistory);
750
+ }
751
+ if (d.supportBotUserAgentChatHistory != null) {
752
+ m.supportBotUserAgentChatHistory = Boolean(d.supportBotUserAgentChatHistory);
753
+ }
754
+ if (d.supportCagReactionsAndPolls != null) {
755
+ m.supportCagReactionsAndPolls = Boolean(d.supportCagReactionsAndPolls);
756
+ }
757
+ if (d.supportBizHostedMsg != null) {
758
+ m.supportBizHostedMsg = Boolean(d.supportBizHostedMsg);
759
+ }
760
+ if (d.supportRecentSyncChunkMessageCountTuning != null) {
761
+ m.supportRecentSyncChunkMessageCountTuning = Boolean(d.supportRecentSyncChunkMessageCountTuning);
762
+ }
763
+ if (d.supportHostedGroupMsg != null) {
764
+ m.supportHostedGroupMsg = Boolean(d.supportHostedGroupMsg);
765
+ }
766
+ if (d.supportFbidBotChatHistory != null) {
767
+ m.supportFbidBotChatHistory = Boolean(d.supportFbidBotChatHistory);
768
+ }
769
+ if (d.supportAddOnHistorySyncMigration != null) {
770
+ m.supportAddOnHistorySyncMigration = Boolean(d.supportAddOnHistorySyncMigration);
771
+ }
772
+ if (d.supportMessageAssociation != null) {
773
+ m.supportMessageAssociation = Boolean(d.supportMessageAssociation);
774
+ }
775
+ if (d.supportGroupHistory != null) {
776
+ m.supportGroupHistory = Boolean(d.supportGroupHistory);
777
+ }
778
+ if (d.onDemandReady != null) {
779
+ m.onDemandReady = Boolean(d.onDemandReady);
780
+ }
781
+ if (d.supportGuestChat != null) {
782
+ m.supportGuestChat = Boolean(d.supportGuestChat);
783
+ }
784
+ if (d.completeOnDemandReady != null) {
785
+ m.completeOnDemandReady = Boolean(d.completeOnDemandReady);
786
+ }
787
+ if (d.thumbnailSyncDaysLimit != null) {
788
+ m.thumbnailSyncDaysLimit = d.thumbnailSyncDaysLimit >>> 0;
789
+ }
790
+ if (d.initialSyncMaxMessagesPerChat != null) {
791
+ m.initialSyncMaxMessagesPerChat = d.initialSyncMaxMessagesPerChat >>> 0;
792
+ }
793
+ if (d.supportManusHistory != null) {
794
+ m.supportManusHistory = Boolean(d.supportManusHistory);
795
+ }
796
+ if (d.supportHatchHistory != null) {
797
+ m.supportHatchHistory = Boolean(d.supportHatchHistory);
798
+ }
799
+ if (d.supportedBotChannelFbids) {
800
+ if (!Array.isArray(d.supportedBotChannelFbids))
801
+ throw TypeError(".proto.DeviceProps.HistorySyncConfig.supportedBotChannelFbids: array expected");
802
+ m.supportedBotChannelFbids = [];
803
+ for (var i = 0; i < d.supportedBotChannelFbids.length; ++i) {
804
+ m.supportedBotChannelFbids[i] = String(d.supportedBotChannelFbids[i]);
805
+ }
806
+ }
807
+ if (d.supportInlineContacts != null) {
808
+ m.supportInlineContacts = Boolean(d.supportInlineContacts);
809
+ }
810
+ return m;
811
+ };
812
+ HistorySyncConfig.toObject = function toObject(m, o) {
813
+ if (!o)
814
+ o = {};
815
+ var d = {};
816
+ if (o.arrays || o.defaults) {
817
+ d.supportedBotChannelFbids = [];
818
+ }
819
+ if (m.fullSyncDaysLimit != null && m.hasOwnProperty("fullSyncDaysLimit")) {
820
+ d.fullSyncDaysLimit = m.fullSyncDaysLimit;
821
+ if (o.oneofs)
822
+ d._fullSyncDaysLimit = "fullSyncDaysLimit";
823
+ }
824
+ if (m.fullSyncSizeMbLimit != null && m.hasOwnProperty("fullSyncSizeMbLimit")) {
825
+ d.fullSyncSizeMbLimit = m.fullSyncSizeMbLimit;
826
+ if (o.oneofs)
827
+ d._fullSyncSizeMbLimit = "fullSyncSizeMbLimit";
828
+ }
829
+ if (m.storageQuotaMb != null && m.hasOwnProperty("storageQuotaMb")) {
830
+ d.storageQuotaMb = m.storageQuotaMb;
831
+ if (o.oneofs)
832
+ d._storageQuotaMb = "storageQuotaMb";
833
+ }
834
+ if (m.inlineInitialPayloadInE2EeMsg != null && m.hasOwnProperty("inlineInitialPayloadInE2EeMsg")) {
835
+ d.inlineInitialPayloadInE2EeMsg = m.inlineInitialPayloadInE2EeMsg;
836
+ if (o.oneofs)
837
+ d._inlineInitialPayloadInE2EeMsg = "inlineInitialPayloadInE2EeMsg";
838
+ }
839
+ if (m.recentSyncDaysLimit != null && m.hasOwnProperty("recentSyncDaysLimit")) {
840
+ d.recentSyncDaysLimit = m.recentSyncDaysLimit;
841
+ if (o.oneofs)
842
+ d._recentSyncDaysLimit = "recentSyncDaysLimit";
843
+ }
844
+ if (m.supportCallLogHistory != null && m.hasOwnProperty("supportCallLogHistory")) {
845
+ d.supportCallLogHistory = m.supportCallLogHistory;
846
+ if (o.oneofs)
847
+ d._supportCallLogHistory = "supportCallLogHistory";
848
+ }
849
+ if (m.supportBotUserAgentChatHistory != null && m.hasOwnProperty("supportBotUserAgentChatHistory")) {
850
+ d.supportBotUserAgentChatHistory = m.supportBotUserAgentChatHistory;
851
+ if (o.oneofs)
852
+ d._supportBotUserAgentChatHistory = "supportBotUserAgentChatHistory";
853
+ }
854
+ if (m.supportCagReactionsAndPolls != null && m.hasOwnProperty("supportCagReactionsAndPolls")) {
855
+ d.supportCagReactionsAndPolls = m.supportCagReactionsAndPolls;
856
+ if (o.oneofs)
857
+ d._supportCagReactionsAndPolls = "supportCagReactionsAndPolls";
858
+ }
859
+ if (m.supportBizHostedMsg != null && m.hasOwnProperty("supportBizHostedMsg")) {
860
+ d.supportBizHostedMsg = m.supportBizHostedMsg;
861
+ if (o.oneofs)
862
+ d._supportBizHostedMsg = "supportBizHostedMsg";
863
+ }
864
+ if (m.supportRecentSyncChunkMessageCountTuning != null && m.hasOwnProperty("supportRecentSyncChunkMessageCountTuning")) {
865
+ d.supportRecentSyncChunkMessageCountTuning = m.supportRecentSyncChunkMessageCountTuning;
866
+ if (o.oneofs)
867
+ d._supportRecentSyncChunkMessageCountTuning = "supportRecentSyncChunkMessageCountTuning";
868
+ }
869
+ if (m.supportHostedGroupMsg != null && m.hasOwnProperty("supportHostedGroupMsg")) {
870
+ d.supportHostedGroupMsg = m.supportHostedGroupMsg;
871
+ if (o.oneofs)
872
+ d._supportHostedGroupMsg = "supportHostedGroupMsg";
873
+ }
874
+ if (m.supportFbidBotChatHistory != null && m.hasOwnProperty("supportFbidBotChatHistory")) {
875
+ d.supportFbidBotChatHistory = m.supportFbidBotChatHistory;
876
+ if (o.oneofs)
877
+ d._supportFbidBotChatHistory = "supportFbidBotChatHistory";
878
+ }
879
+ if (m.supportAddOnHistorySyncMigration != null && m.hasOwnProperty("supportAddOnHistorySyncMigration")) {
880
+ d.supportAddOnHistorySyncMigration = m.supportAddOnHistorySyncMigration;
881
+ if (o.oneofs)
882
+ d._supportAddOnHistorySyncMigration = "supportAddOnHistorySyncMigration";
883
+ }
884
+ if (m.supportMessageAssociation != null && m.hasOwnProperty("supportMessageAssociation")) {
885
+ d.supportMessageAssociation = m.supportMessageAssociation;
886
+ if (o.oneofs)
887
+ d._supportMessageAssociation = "supportMessageAssociation";
888
+ }
889
+ if (m.supportGroupHistory != null && m.hasOwnProperty("supportGroupHistory")) {
890
+ d.supportGroupHistory = m.supportGroupHistory;
891
+ if (o.oneofs)
892
+ d._supportGroupHistory = "supportGroupHistory";
893
+ }
894
+ if (m.onDemandReady != null && m.hasOwnProperty("onDemandReady")) {
895
+ d.onDemandReady = m.onDemandReady;
896
+ if (o.oneofs)
897
+ d._onDemandReady = "onDemandReady";
898
+ }
899
+ if (m.supportGuestChat != null && m.hasOwnProperty("supportGuestChat")) {
900
+ d.supportGuestChat = m.supportGuestChat;
901
+ if (o.oneofs)
902
+ d._supportGuestChat = "supportGuestChat";
903
+ }
904
+ if (m.completeOnDemandReady != null && m.hasOwnProperty("completeOnDemandReady")) {
905
+ d.completeOnDemandReady = m.completeOnDemandReady;
906
+ if (o.oneofs)
907
+ d._completeOnDemandReady = "completeOnDemandReady";
908
+ }
909
+ if (m.thumbnailSyncDaysLimit != null && m.hasOwnProperty("thumbnailSyncDaysLimit")) {
910
+ d.thumbnailSyncDaysLimit = m.thumbnailSyncDaysLimit;
911
+ if (o.oneofs)
912
+ d._thumbnailSyncDaysLimit = "thumbnailSyncDaysLimit";
913
+ }
914
+ if (m.initialSyncMaxMessagesPerChat != null && m.hasOwnProperty("initialSyncMaxMessagesPerChat")) {
915
+ d.initialSyncMaxMessagesPerChat = m.initialSyncMaxMessagesPerChat;
916
+ if (o.oneofs)
917
+ d._initialSyncMaxMessagesPerChat = "initialSyncMaxMessagesPerChat";
918
+ }
919
+ if (m.supportManusHistory != null && m.hasOwnProperty("supportManusHistory")) {
920
+ d.supportManusHistory = m.supportManusHistory;
921
+ if (o.oneofs)
922
+ d._supportManusHistory = "supportManusHistory";
923
+ }
924
+ if (m.supportHatchHistory != null && m.hasOwnProperty("supportHatchHistory")) {
925
+ d.supportHatchHistory = m.supportHatchHistory;
926
+ if (o.oneofs)
927
+ d._supportHatchHistory = "supportHatchHistory";
928
+ }
929
+ if (m.supportedBotChannelFbids && m.supportedBotChannelFbids.length) {
930
+ d.supportedBotChannelFbids = [];
931
+ for (var j = 0; j < m.supportedBotChannelFbids.length; ++j) {
932
+ d.supportedBotChannelFbids[j] = m.supportedBotChannelFbids[j];
933
+ }
934
+ }
935
+ if (m.supportInlineContacts != null && m.hasOwnProperty("supportInlineContacts")) {
936
+ d.supportInlineContacts = m.supportInlineContacts;
937
+ if (o.oneofs)
938
+ d._supportInlineContacts = "supportInlineContacts";
939
+ }
940
+ return d;
941
+ };
942
+ HistorySyncConfig.prototype.toJSON = function toJSON() {
943
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
944
+ };
945
+ HistorySyncConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
946
+ if (typeUrlPrefix === undefined) {
947
+ typeUrlPrefix = "type.googleapis.com";
948
+ }
949
+ return typeUrlPrefix + "/proto.DeviceProps.HistorySyncConfig";
950
+ };
951
+ return HistorySyncConfig;
952
+ });
953
+ $lazy(DeviceProps, "PlatformType", function() {
954
+ const valuesById = {}, values = Object.create(valuesById);
955
+ values[valuesById[0] = "UNKNOWN"] = 0;
956
+ values[valuesById[1] = "CHROME"] = 1;
957
+ values[valuesById[2] = "FIREFOX"] = 2;
958
+ values[valuesById[3] = "IE"] = 3;
959
+ values[valuesById[4] = "OPERA"] = 4;
960
+ values[valuesById[5] = "SAFARI"] = 5;
961
+ values[valuesById[6] = "EDGE"] = 6;
962
+ values[valuesById[7] = "DESKTOP"] = 7;
963
+ values[valuesById[8] = "IPAD"] = 8;
964
+ values[valuesById[9] = "ANDROID_TABLET"] = 9;
965
+ values[valuesById[10] = "OHANA"] = 10;
966
+ values[valuesById[11] = "ALOHA"] = 11;
967
+ values[valuesById[12] = "CATALINA"] = 12;
968
+ values[valuesById[13] = "TCL_TV"] = 13;
969
+ values[valuesById[14] = "IOS_PHONE"] = 14;
970
+ values[valuesById[15] = "IOS_CATALYST"] = 15;
971
+ values[valuesById[16] = "ANDROID_PHONE"] = 16;
972
+ values[valuesById[17] = "ANDROID_AMBIGUOUS"] = 17;
973
+ values[valuesById[18] = "WEAR_OS"] = 18;
974
+ values[valuesById[19] = "AR_WRIST"] = 19;
975
+ values[valuesById[20] = "AR_DEVICE"] = 20;
976
+ values[valuesById[21] = "UWP"] = 21;
977
+ values[valuesById[22] = "VR"] = 22;
978
+ values[valuesById[23] = "CLOUD_API"] = 23;
979
+ values[valuesById[24] = "SMARTGLASSES"] = 24;
980
+ return values;
981
+ });
982
+ return DeviceProps;