@hiroosy/baileys-lite 0.3.4 → 0.3.6

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 (229) hide show
  1. package/WAProto/index.js +231 -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/socket/messages-recv.js +3 -1
  227. package/src/socket/messages-send.js +25 -10
  228. package/src/socket/socket-core.js +53 -57
  229. package/src/utils/wa-protocol-core.js +3 -9
@@ -0,0 +1,298 @@
1
+ "use strict";
2
+ function BizIdentityInfo(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
+ BizIdentityInfo.prototype.vlevel = null;
9
+ BizIdentityInfo.prototype.vnameCert = null;
10
+ BizIdentityInfo.prototype.signed = null;
11
+ BizIdentityInfo.prototype.revoked = null;
12
+ BizIdentityInfo.prototype.hostStorage = null;
13
+ BizIdentityInfo.prototype.actualActors = null;
14
+ BizIdentityInfo.prototype.privacyModeTs = null;
15
+ BizIdentityInfo.prototype.featureControls = null;
16
+ let $oneOfFields;
17
+ Object.defineProperty(BizIdentityInfo.prototype, "_vlevel", {
18
+ get: $util.oneOfGetter($oneOfFields = ["vlevel"]),
19
+ set: $util.oneOfSetter($oneOfFields)
20
+ });
21
+ Object.defineProperty(BizIdentityInfo.prototype, "_vnameCert", {
22
+ get: $util.oneOfGetter($oneOfFields = ["vnameCert"]),
23
+ set: $util.oneOfSetter($oneOfFields)
24
+ });
25
+ Object.defineProperty(BizIdentityInfo.prototype, "_signed", {
26
+ get: $util.oneOfGetter($oneOfFields = ["signed"]),
27
+ set: $util.oneOfSetter($oneOfFields)
28
+ });
29
+ Object.defineProperty(BizIdentityInfo.prototype, "_revoked", {
30
+ get: $util.oneOfGetter($oneOfFields = ["revoked"]),
31
+ set: $util.oneOfSetter($oneOfFields)
32
+ });
33
+ Object.defineProperty(BizIdentityInfo.prototype, "_hostStorage", {
34
+ get: $util.oneOfGetter($oneOfFields = ["hostStorage"]),
35
+ set: $util.oneOfSetter($oneOfFields)
36
+ });
37
+ Object.defineProperty(BizIdentityInfo.prototype, "_actualActors", {
38
+ get: $util.oneOfGetter($oneOfFields = ["actualActors"]),
39
+ set: $util.oneOfSetter($oneOfFields)
40
+ });
41
+ Object.defineProperty(BizIdentityInfo.prototype, "_privacyModeTs", {
42
+ get: $util.oneOfGetter($oneOfFields = ["privacyModeTs"]),
43
+ set: $util.oneOfSetter($oneOfFields)
44
+ });
45
+ Object.defineProperty(BizIdentityInfo.prototype, "_featureControls", {
46
+ get: $util.oneOfGetter($oneOfFields = ["featureControls"]),
47
+ set: $util.oneOfSetter($oneOfFields)
48
+ });
49
+ BizIdentityInfo.create = function create(properties) {
50
+ return new BizIdentityInfo(properties);
51
+ };
52
+ BizIdentityInfo.encode = function encode(m, w) {
53
+ if (!w)
54
+ w = $Writer.create();
55
+ if (m.vlevel != null && Object.hasOwnProperty.call(m, "vlevel"))
56
+ w.uint32(8).int32(m.vlevel);
57
+ if (m.vnameCert != null && Object.hasOwnProperty.call(m, "vnameCert"))
58
+ $root.proto.VerifiedNameCertificate.encode(m.vnameCert, w.uint32(18).fork()).ldelim();
59
+ if (m.signed != null && Object.hasOwnProperty.call(m, "signed"))
60
+ w.uint32(24).bool(m.signed);
61
+ if (m.revoked != null && Object.hasOwnProperty.call(m, "revoked"))
62
+ w.uint32(32).bool(m.revoked);
63
+ if (m.hostStorage != null && Object.hasOwnProperty.call(m, "hostStorage"))
64
+ w.uint32(40).int32(m.hostStorage);
65
+ if (m.actualActors != null && Object.hasOwnProperty.call(m, "actualActors"))
66
+ w.uint32(48).int32(m.actualActors);
67
+ if (m.privacyModeTs != null && Object.hasOwnProperty.call(m, "privacyModeTs"))
68
+ w.uint32(56).uint64(m.privacyModeTs);
69
+ if (m.featureControls != null && Object.hasOwnProperty.call(m, "featureControls"))
70
+ w.uint32(64).uint64(m.featureControls);
71
+ return w;
72
+ };
73
+ BizIdentityInfo.decode = function decode(r, l, e, n) {
74
+ if (!(r instanceof $Reader))
75
+ r = $Reader.create(r);
76
+ if (n === undefined)
77
+ n = 0;
78
+ if (n > $Reader.recursionLimit)
79
+ throw Error("maximum nesting depth exceeded");
80
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.BizIdentityInfo();
81
+ while (r.pos < c) {
82
+ var t = r.uint32();
83
+ if (t === e)
84
+ break;
85
+ switch (t >>> 3) {
86
+ case 1: {
87
+ m.vlevel = r.int32();
88
+ break;
89
+ }
90
+ case 2: {
91
+ m.vnameCert = $root.proto.VerifiedNameCertificate.decode(r, r.uint32(), undefined, n + 1);
92
+ break;
93
+ }
94
+ case 3: {
95
+ m.signed = r.bool();
96
+ break;
97
+ }
98
+ case 4: {
99
+ m.revoked = r.bool();
100
+ break;
101
+ }
102
+ case 5: {
103
+ m.hostStorage = r.int32();
104
+ break;
105
+ }
106
+ case 6: {
107
+ m.actualActors = r.int32();
108
+ break;
109
+ }
110
+ case 7: {
111
+ m.privacyModeTs = r.uint64();
112
+ break;
113
+ }
114
+ case 8: {
115
+ m.featureControls = r.uint64();
116
+ break;
117
+ }
118
+ default:
119
+ r.skipType(t & 7, n);
120
+ break;
121
+ }
122
+ }
123
+ return m;
124
+ };
125
+ BizIdentityInfo.fromObject = function fromObject(d, n) {
126
+ if (d instanceof $root.proto.BizIdentityInfo)
127
+ return d;
128
+ if (n === undefined)
129
+ n = 0;
130
+ if (n > $util.recursionLimit)
131
+ throw Error("maximum nesting depth exceeded");
132
+ var m = new $root.proto.BizIdentityInfo();
133
+ switch (d.vlevel) {
134
+ default:
135
+ if (typeof d.vlevel === "number") {
136
+ m.vlevel = d.vlevel;
137
+ break;
138
+ }
139
+ break;
140
+ case "UNKNOWN":
141
+ case 0:
142
+ m.vlevel = 0;
143
+ break;
144
+ case "LOW":
145
+ case 1:
146
+ m.vlevel = 1;
147
+ break;
148
+ case "HIGH":
149
+ case 2:
150
+ m.vlevel = 2;
151
+ break;
152
+ }
153
+ if (d.vnameCert != null) {
154
+ if (typeof d.vnameCert !== "object")
155
+ throw TypeError(".proto.BizIdentityInfo.vnameCert: object expected");
156
+ m.vnameCert = $root.proto.VerifiedNameCertificate.fromObject(d.vnameCert, n + 1);
157
+ }
158
+ if (d.signed != null) {
159
+ m.signed = Boolean(d.signed);
160
+ }
161
+ if (d.revoked != null) {
162
+ m.revoked = Boolean(d.revoked);
163
+ }
164
+ switch (d.hostStorage) {
165
+ default:
166
+ if (typeof d.hostStorage === "number") {
167
+ m.hostStorage = d.hostStorage;
168
+ break;
169
+ }
170
+ break;
171
+ case "ON_PREMISE":
172
+ case 0:
173
+ m.hostStorage = 0;
174
+ break;
175
+ case "FACEBOOK":
176
+ case 1:
177
+ m.hostStorage = 1;
178
+ break;
179
+ }
180
+ switch (d.actualActors) {
181
+ default:
182
+ if (typeof d.actualActors === "number") {
183
+ m.actualActors = d.actualActors;
184
+ break;
185
+ }
186
+ break;
187
+ case "SELF":
188
+ case 0:
189
+ m.actualActors = 0;
190
+ break;
191
+ case "BSP":
192
+ case 1:
193
+ m.actualActors = 1;
194
+ break;
195
+ }
196
+ if (d.privacyModeTs != null) {
197
+ if ($util.Long)
198
+ (m.privacyModeTs = $util.Long.fromValue(d.privacyModeTs)).unsigned = true;
199
+ else if (typeof d.privacyModeTs === "string")
200
+ m.privacyModeTs = parseInt(d.privacyModeTs, 10);
201
+ else if (typeof d.privacyModeTs === "number")
202
+ m.privacyModeTs = d.privacyModeTs;
203
+ else if (typeof d.privacyModeTs === "object")
204
+ m.privacyModeTs = new $util.LongBits(d.privacyModeTs.low >>> 0, d.privacyModeTs.high >>> 0).toNumber(true);
205
+ }
206
+ if (d.featureControls != null) {
207
+ if ($util.Long)
208
+ (m.featureControls = $util.Long.fromValue(d.featureControls)).unsigned = true;
209
+ else if (typeof d.featureControls === "string")
210
+ m.featureControls = parseInt(d.featureControls, 10);
211
+ else if (typeof d.featureControls === "number")
212
+ m.featureControls = d.featureControls;
213
+ else if (typeof d.featureControls === "object")
214
+ m.featureControls = new $util.LongBits(d.featureControls.low >>> 0, d.featureControls.high >>> 0).toNumber(true);
215
+ }
216
+ return m;
217
+ };
218
+ BizIdentityInfo.toObject = function toObject(m, o) {
219
+ if (!o)
220
+ o = {};
221
+ var d = {};
222
+ if (m.vlevel != null && m.hasOwnProperty("vlevel")) {
223
+ d.vlevel = o.enums === String ? $root.proto.BizIdentityInfo.VerifiedLevelValue[m.vlevel] === undefined ? m.vlevel : $root.proto.BizIdentityInfo.VerifiedLevelValue[m.vlevel] : m.vlevel;
224
+ if (o.oneofs)
225
+ d._vlevel = "vlevel";
226
+ }
227
+ if (m.vnameCert != null && m.hasOwnProperty("vnameCert")) {
228
+ d.vnameCert = $root.proto.VerifiedNameCertificate.toObject(m.vnameCert, o);
229
+ if (o.oneofs)
230
+ d._vnameCert = "vnameCert";
231
+ }
232
+ if (m.signed != null && m.hasOwnProperty("signed")) {
233
+ d.signed = m.signed;
234
+ if (o.oneofs)
235
+ d._signed = "signed";
236
+ }
237
+ if (m.revoked != null && m.hasOwnProperty("revoked")) {
238
+ d.revoked = m.revoked;
239
+ if (o.oneofs)
240
+ d._revoked = "revoked";
241
+ }
242
+ if (m.hostStorage != null && m.hasOwnProperty("hostStorage")) {
243
+ d.hostStorage = o.enums === String ? $root.proto.BizIdentityInfo.HostStorageType[m.hostStorage] === undefined ? m.hostStorage : $root.proto.BizIdentityInfo.HostStorageType[m.hostStorage] : m.hostStorage;
244
+ if (o.oneofs)
245
+ d._hostStorage = "hostStorage";
246
+ }
247
+ if (m.actualActors != null && m.hasOwnProperty("actualActors")) {
248
+ d.actualActors = o.enums === String ? $root.proto.BizIdentityInfo.ActualActorsType[m.actualActors] === undefined ? m.actualActors : $root.proto.BizIdentityInfo.ActualActorsType[m.actualActors] : m.actualActors;
249
+ if (o.oneofs)
250
+ d._actualActors = "actualActors";
251
+ }
252
+ if (m.privacyModeTs != null && m.hasOwnProperty("privacyModeTs")) {
253
+ if (typeof m.privacyModeTs === "number")
254
+ d.privacyModeTs = o.longs === String ? String(m.privacyModeTs) : m.privacyModeTs;
255
+ else
256
+ d.privacyModeTs = o.longs === String ? longToString(m.privacyModeTs, true) : o.longs === Number ? longToNumber(m.privacyModeTs, true) : m.privacyModeTs;
257
+ if (o.oneofs)
258
+ d._privacyModeTs = "privacyModeTs";
259
+ }
260
+ if (m.featureControls != null && m.hasOwnProperty("featureControls")) {
261
+ if (typeof m.featureControls === "number")
262
+ d.featureControls = o.longs === String ? String(m.featureControls) : m.featureControls;
263
+ else
264
+ d.featureControls = o.longs === String ? longToString(m.featureControls, true) : o.longs === Number ? longToNumber(m.featureControls, true) : m.featureControls;
265
+ if (o.oneofs)
266
+ d._featureControls = "featureControls";
267
+ }
268
+ return d;
269
+ };
270
+ BizIdentityInfo.prototype.toJSON = function toJSON() {
271
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
272
+ };
273
+ BizIdentityInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
274
+ if (typeUrlPrefix === undefined) {
275
+ typeUrlPrefix = "type.googleapis.com";
276
+ }
277
+ return typeUrlPrefix + "/proto.BizIdentityInfo";
278
+ };
279
+ $lazy(BizIdentityInfo, "ActualActorsType", function() {
280
+ const valuesById = {}, values = Object.create(valuesById);
281
+ values[valuesById[0] = "SELF"] = 0;
282
+ values[valuesById[1] = "BSP"] = 1;
283
+ return values;
284
+ });
285
+ $lazy(BizIdentityInfo, "HostStorageType", function() {
286
+ const valuesById = {}, values = Object.create(valuesById);
287
+ values[valuesById[0] = "ON_PREMISE"] = 0;
288
+ values[valuesById[1] = "FACEBOOK"] = 1;
289
+ return values;
290
+ });
291
+ $lazy(BizIdentityInfo, "VerifiedLevelValue", function() {
292
+ const valuesById = {}, values = Object.create(valuesById);
293
+ values[valuesById[0] = "UNKNOWN"] = 0;
294
+ values[valuesById[1] = "LOW"] = 1;
295
+ values[valuesById[2] = "HIGH"] = 2;
296
+ return values;
297
+ });
298
+ return BizIdentityInfo;
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ function BotAgeCollectionMetadata(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
+ BotAgeCollectionMetadata.prototype.ageCollectionEligible = null;
9
+ BotAgeCollectionMetadata.prototype.shouldTriggerAgeCollectionOnClient = null;
10
+ BotAgeCollectionMetadata.prototype.ageCollectionType = null;
11
+ let $oneOfFields;
12
+ Object.defineProperty(BotAgeCollectionMetadata.prototype, "_ageCollectionEligible", {
13
+ get: $util.oneOfGetter($oneOfFields = ["ageCollectionEligible"]),
14
+ set: $util.oneOfSetter($oneOfFields)
15
+ });
16
+ Object.defineProperty(BotAgeCollectionMetadata.prototype, "_shouldTriggerAgeCollectionOnClient", {
17
+ get: $util.oneOfGetter($oneOfFields = ["shouldTriggerAgeCollectionOnClient"]),
18
+ set: $util.oneOfSetter($oneOfFields)
19
+ });
20
+ Object.defineProperty(BotAgeCollectionMetadata.prototype, "_ageCollectionType", {
21
+ get: $util.oneOfGetter($oneOfFields = ["ageCollectionType"]),
22
+ set: $util.oneOfSetter($oneOfFields)
23
+ });
24
+ BotAgeCollectionMetadata.create = function create(properties) {
25
+ return new BotAgeCollectionMetadata(properties);
26
+ };
27
+ BotAgeCollectionMetadata.encode = function encode(m, w) {
28
+ if (!w)
29
+ w = $Writer.create();
30
+ if (m.ageCollectionEligible != null && Object.hasOwnProperty.call(m, "ageCollectionEligible"))
31
+ w.uint32(8).bool(m.ageCollectionEligible);
32
+ if (m.shouldTriggerAgeCollectionOnClient != null && Object.hasOwnProperty.call(m, "shouldTriggerAgeCollectionOnClient"))
33
+ w.uint32(16).bool(m.shouldTriggerAgeCollectionOnClient);
34
+ if (m.ageCollectionType != null && Object.hasOwnProperty.call(m, "ageCollectionType"))
35
+ w.uint32(24).int32(m.ageCollectionType);
36
+ return w;
37
+ };
38
+ BotAgeCollectionMetadata.decode = function decode(r, l, e, n) {
39
+ if (!(r instanceof $Reader))
40
+ r = $Reader.create(r);
41
+ if (n === undefined)
42
+ n = 0;
43
+ if (n > $Reader.recursionLimit)
44
+ throw Error("maximum nesting depth exceeded");
45
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.BotAgeCollectionMetadata();
46
+ while (r.pos < c) {
47
+ var t = r.uint32();
48
+ if (t === e)
49
+ break;
50
+ switch (t >>> 3) {
51
+ case 1: {
52
+ m.ageCollectionEligible = r.bool();
53
+ break;
54
+ }
55
+ case 2: {
56
+ m.shouldTriggerAgeCollectionOnClient = r.bool();
57
+ break;
58
+ }
59
+ case 3: {
60
+ m.ageCollectionType = r.int32();
61
+ break;
62
+ }
63
+ default:
64
+ r.skipType(t & 7, n);
65
+ break;
66
+ }
67
+ }
68
+ return m;
69
+ };
70
+ BotAgeCollectionMetadata.fromObject = function fromObject(d, n) {
71
+ if (d instanceof $root.proto.BotAgeCollectionMetadata)
72
+ return d;
73
+ if (n === undefined)
74
+ n = 0;
75
+ if (n > $util.recursionLimit)
76
+ throw Error("maximum nesting depth exceeded");
77
+ var m = new $root.proto.BotAgeCollectionMetadata();
78
+ if (d.ageCollectionEligible != null) {
79
+ m.ageCollectionEligible = Boolean(d.ageCollectionEligible);
80
+ }
81
+ if (d.shouldTriggerAgeCollectionOnClient != null) {
82
+ m.shouldTriggerAgeCollectionOnClient = Boolean(d.shouldTriggerAgeCollectionOnClient);
83
+ }
84
+ switch (d.ageCollectionType) {
85
+ default:
86
+ if (typeof d.ageCollectionType === "number") {
87
+ m.ageCollectionType = d.ageCollectionType;
88
+ break;
89
+ }
90
+ break;
91
+ case "O18_BINARY":
92
+ case 0:
93
+ m.ageCollectionType = 0;
94
+ break;
95
+ case "WAFFLE":
96
+ case 1:
97
+ m.ageCollectionType = 1;
98
+ break;
99
+ }
100
+ return m;
101
+ };
102
+ BotAgeCollectionMetadata.toObject = function toObject(m, o) {
103
+ if (!o)
104
+ o = {};
105
+ var d = {};
106
+ if (m.ageCollectionEligible != null && m.hasOwnProperty("ageCollectionEligible")) {
107
+ d.ageCollectionEligible = m.ageCollectionEligible;
108
+ if (o.oneofs)
109
+ d._ageCollectionEligible = "ageCollectionEligible";
110
+ }
111
+ if (m.shouldTriggerAgeCollectionOnClient != null && m.hasOwnProperty("shouldTriggerAgeCollectionOnClient")) {
112
+ d.shouldTriggerAgeCollectionOnClient = m.shouldTriggerAgeCollectionOnClient;
113
+ if (o.oneofs)
114
+ d._shouldTriggerAgeCollectionOnClient = "shouldTriggerAgeCollectionOnClient";
115
+ }
116
+ if (m.ageCollectionType != null && m.hasOwnProperty("ageCollectionType")) {
117
+ d.ageCollectionType = o.enums === String ? $root.proto.BotAgeCollectionMetadata.AgeCollectionType[m.ageCollectionType] === undefined ? m.ageCollectionType : $root.proto.BotAgeCollectionMetadata.AgeCollectionType[m.ageCollectionType] : m.ageCollectionType;
118
+ if (o.oneofs)
119
+ d._ageCollectionType = "ageCollectionType";
120
+ }
121
+ return d;
122
+ };
123
+ BotAgeCollectionMetadata.prototype.toJSON = function toJSON() {
124
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
125
+ };
126
+ BotAgeCollectionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
127
+ if (typeUrlPrefix === undefined) {
128
+ typeUrlPrefix = "type.googleapis.com";
129
+ }
130
+ return typeUrlPrefix + "/proto.BotAgeCollectionMetadata";
131
+ };
132
+ $lazy(BotAgeCollectionMetadata, "AgeCollectionType", function() {
133
+ const valuesById = {}, values = Object.create(valuesById);
134
+ values[valuesById[0] = "O18_BINARY"] = 0;
135
+ values[valuesById[1] = "WAFFLE"] = 1;
136
+ return values;
137
+ });
138
+ return BotAgeCollectionMetadata;
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ function BotAgentDeepLinkMetadata(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
+ BotAgentDeepLinkMetadata.prototype.token = null;
9
+ let $oneOfFields;
10
+ Object.defineProperty(BotAgentDeepLinkMetadata.prototype, "_token", {
11
+ get: $util.oneOfGetter($oneOfFields = ["token"]),
12
+ set: $util.oneOfSetter($oneOfFields)
13
+ });
14
+ BotAgentDeepLinkMetadata.create = function create(properties) {
15
+ return new BotAgentDeepLinkMetadata(properties);
16
+ };
17
+ BotAgentDeepLinkMetadata.encode = function encode(m, w) {
18
+ if (!w)
19
+ w = $Writer.create();
20
+ if (m.token != null && Object.hasOwnProperty.call(m, "token"))
21
+ w.uint32(10).string(m.token);
22
+ return w;
23
+ };
24
+ BotAgentDeepLinkMetadata.decode = function decode(r, l, e, n) {
25
+ if (!(r instanceof $Reader))
26
+ r = $Reader.create(r);
27
+ if (n === undefined)
28
+ n = 0;
29
+ if (n > $Reader.recursionLimit)
30
+ throw Error("maximum nesting depth exceeded");
31
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.BotAgentDeepLinkMetadata();
32
+ while (r.pos < c) {
33
+ var t = r.uint32();
34
+ if (t === e)
35
+ break;
36
+ switch (t >>> 3) {
37
+ case 1: {
38
+ m.token = r.string();
39
+ break;
40
+ }
41
+ default:
42
+ r.skipType(t & 7, n);
43
+ break;
44
+ }
45
+ }
46
+ return m;
47
+ };
48
+ BotAgentDeepLinkMetadata.fromObject = function fromObject(d, n) {
49
+ if (d instanceof $root.proto.BotAgentDeepLinkMetadata)
50
+ return d;
51
+ if (n === undefined)
52
+ n = 0;
53
+ if (n > $util.recursionLimit)
54
+ throw Error("maximum nesting depth exceeded");
55
+ var m = new $root.proto.BotAgentDeepLinkMetadata();
56
+ if (d.token != null) {
57
+ m.token = String(d.token);
58
+ }
59
+ return m;
60
+ };
61
+ BotAgentDeepLinkMetadata.toObject = function toObject(m, o) {
62
+ if (!o)
63
+ o = {};
64
+ var d = {};
65
+ if (m.token != null && m.hasOwnProperty("token")) {
66
+ d.token = m.token;
67
+ if (o.oneofs)
68
+ d._token = "token";
69
+ }
70
+ return d;
71
+ };
72
+ BotAgentDeepLinkMetadata.prototype.toJSON = function toJSON() {
73
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
74
+ };
75
+ BotAgentDeepLinkMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
76
+ if (typeUrlPrefix === undefined) {
77
+ typeUrlPrefix = "type.googleapis.com";
78
+ }
79
+ return typeUrlPrefix + "/proto.BotAgentDeepLinkMetadata";
80
+ };
81
+ return BotAgentDeepLinkMetadata;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ function BotAgentMetadata(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
+ BotAgentMetadata.prototype.deepLinkMetadata = null;
9
+ let $oneOfFields;
10
+ Object.defineProperty(BotAgentMetadata.prototype, "_deepLinkMetadata", {
11
+ get: $util.oneOfGetter($oneOfFields = ["deepLinkMetadata"]),
12
+ set: $util.oneOfSetter($oneOfFields)
13
+ });
14
+ BotAgentMetadata.create = function create(properties) {
15
+ return new BotAgentMetadata(properties);
16
+ };
17
+ BotAgentMetadata.encode = function encode(m, w) {
18
+ if (!w)
19
+ w = $Writer.create();
20
+ if (m.deepLinkMetadata != null && Object.hasOwnProperty.call(m, "deepLinkMetadata"))
21
+ $root.proto.BotAgentDeepLinkMetadata.encode(m.deepLinkMetadata, w.uint32(10).fork()).ldelim();
22
+ return w;
23
+ };
24
+ BotAgentMetadata.decode = function decode(r, l, e, n) {
25
+ if (!(r instanceof $Reader))
26
+ r = $Reader.create(r);
27
+ if (n === undefined)
28
+ n = 0;
29
+ if (n > $Reader.recursionLimit)
30
+ throw Error("maximum nesting depth exceeded");
31
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.BotAgentMetadata();
32
+ while (r.pos < c) {
33
+ var t = r.uint32();
34
+ if (t === e)
35
+ break;
36
+ switch (t >>> 3) {
37
+ case 1: {
38
+ m.deepLinkMetadata = $root.proto.BotAgentDeepLinkMetadata.decode(r, r.uint32(), undefined, n + 1);
39
+ break;
40
+ }
41
+ default:
42
+ r.skipType(t & 7, n);
43
+ break;
44
+ }
45
+ }
46
+ return m;
47
+ };
48
+ BotAgentMetadata.fromObject = function fromObject(d, n) {
49
+ if (d instanceof $root.proto.BotAgentMetadata)
50
+ return d;
51
+ if (n === undefined)
52
+ n = 0;
53
+ if (n > $util.recursionLimit)
54
+ throw Error("maximum nesting depth exceeded");
55
+ var m = new $root.proto.BotAgentMetadata();
56
+ if (d.deepLinkMetadata != null) {
57
+ if (typeof d.deepLinkMetadata !== "object")
58
+ throw TypeError(".proto.BotAgentMetadata.deepLinkMetadata: object expected");
59
+ m.deepLinkMetadata = $root.proto.BotAgentDeepLinkMetadata.fromObject(d.deepLinkMetadata, n + 1);
60
+ }
61
+ return m;
62
+ };
63
+ BotAgentMetadata.toObject = function toObject(m, o) {
64
+ if (!o)
65
+ o = {};
66
+ var d = {};
67
+ if (m.deepLinkMetadata != null && m.hasOwnProperty("deepLinkMetadata")) {
68
+ d.deepLinkMetadata = $root.proto.BotAgentDeepLinkMetadata.toObject(m.deepLinkMetadata, o);
69
+ if (o.oneofs)
70
+ d._deepLinkMetadata = "deepLinkMetadata";
71
+ }
72
+ return d;
73
+ };
74
+ BotAgentMetadata.prototype.toJSON = function toJSON() {
75
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
76
+ };
77
+ BotAgentMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
78
+ if (typeUrlPrefix === undefined) {
79
+ typeUrlPrefix = "type.googleapis.com";
80
+ }
81
+ return typeUrlPrefix + "/proto.BotAgentMetadata";
82
+ };
83
+ return BotAgentMetadata;