@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,102 @@
1
+ "use strict";
2
+ function AISubscriptionUpsellMetadata(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
+ AISubscriptionUpsellMetadata.prototype.requestType = null;
9
+ let $oneOfFields;
10
+ Object.defineProperty(AISubscriptionUpsellMetadata.prototype, "_requestType", {
11
+ get: $util.oneOfGetter($oneOfFields = ["requestType"]),
12
+ set: $util.oneOfSetter($oneOfFields)
13
+ });
14
+ AISubscriptionUpsellMetadata.create = function create(properties) {
15
+ return new AISubscriptionUpsellMetadata(properties);
16
+ };
17
+ AISubscriptionUpsellMetadata.encode = function encode(m, w) {
18
+ if (!w)
19
+ w = $Writer.create();
20
+ if (m.requestType != null && Object.hasOwnProperty.call(m, "requestType"))
21
+ w.uint32(8).int32(m.requestType);
22
+ return w;
23
+ };
24
+ AISubscriptionUpsellMetadata.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.AISubscriptionUpsellMetadata();
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.requestType = r.int32();
39
+ break;
40
+ }
41
+ default:
42
+ r.skipType(t & 7, n);
43
+ break;
44
+ }
45
+ }
46
+ return m;
47
+ };
48
+ AISubscriptionUpsellMetadata.fromObject = function fromObject(d, n) {
49
+ if (d instanceof $root.proto.AISubscriptionUpsellMetadata)
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.AISubscriptionUpsellMetadata();
56
+ switch (d.requestType) {
57
+ default:
58
+ if (typeof d.requestType === "number") {
59
+ m.requestType = d.requestType;
60
+ break;
61
+ }
62
+ break;
63
+ case "UNSPECIFIED":
64
+ case 0:
65
+ m.requestType = 0;
66
+ break;
67
+ case "THINK_HARD":
68
+ case 1:
69
+ m.requestType = 1;
70
+ break;
71
+ case "IMAGE_GEN":
72
+ case 2:
73
+ m.requestType = 2;
74
+ break;
75
+ case "VIDEO_GEN":
76
+ case 3:
77
+ m.requestType = 3;
78
+ break;
79
+ }
80
+ return m;
81
+ };
82
+ AISubscriptionUpsellMetadata.toObject = function toObject(m, o) {
83
+ if (!o)
84
+ o = {};
85
+ var d = {};
86
+ if (m.requestType != null && m.hasOwnProperty("requestType")) {
87
+ d.requestType = o.enums === String ? $root.proto.AISubscriptionRequestType[m.requestType] === undefined ? m.requestType : $root.proto.AISubscriptionRequestType[m.requestType] : m.requestType;
88
+ if (o.oneofs)
89
+ d._requestType = "requestType";
90
+ }
91
+ return d;
92
+ };
93
+ AISubscriptionUpsellMetadata.prototype.toJSON = function toJSON() {
94
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
95
+ };
96
+ AISubscriptionUpsellMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
97
+ if (typeUrlPrefix === undefined) {
98
+ typeUrlPrefix = "type.googleapis.com";
99
+ }
100
+ return typeUrlPrefix + "/proto.AISubscriptionUpsellMetadata";
101
+ };
102
+ return AISubscriptionUpsellMetadata;
@@ -0,0 +1,316 @@
1
+ "use strict";
2
+ function AIThreadInfo(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
+ AIThreadInfo.prototype.serverInfo = null;
9
+ AIThreadInfo.prototype.clientInfo = null;
10
+ let $oneOfFields;
11
+ Object.defineProperty(AIThreadInfo.prototype, "_serverInfo", {
12
+ get: $util.oneOfGetter($oneOfFields = ["serverInfo"]),
13
+ set: $util.oneOfSetter($oneOfFields)
14
+ });
15
+ Object.defineProperty(AIThreadInfo.prototype, "_clientInfo", {
16
+ get: $util.oneOfGetter($oneOfFields = ["clientInfo"]),
17
+ set: $util.oneOfSetter($oneOfFields)
18
+ });
19
+ AIThreadInfo.create = function create(properties) {
20
+ return new AIThreadInfo(properties);
21
+ };
22
+ AIThreadInfo.encode = function encode(m, w) {
23
+ if (!w)
24
+ w = $Writer.create();
25
+ if (m.serverInfo != null && Object.hasOwnProperty.call(m, "serverInfo"))
26
+ $root.proto.AIThreadInfo.AIThreadServerInfo.encode(m.serverInfo, w.uint32(10).fork()).ldelim();
27
+ if (m.clientInfo != null && Object.hasOwnProperty.call(m, "clientInfo"))
28
+ $root.proto.AIThreadInfo.AIThreadClientInfo.encode(m.clientInfo, w.uint32(18).fork()).ldelim();
29
+ return w;
30
+ };
31
+ AIThreadInfo.decode = function decode(r, l, e, n) {
32
+ if (!(r instanceof $Reader))
33
+ r = $Reader.create(r);
34
+ if (n === undefined)
35
+ n = 0;
36
+ if (n > $Reader.recursionLimit)
37
+ throw Error("maximum nesting depth exceeded");
38
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIThreadInfo();
39
+ while (r.pos < c) {
40
+ var t = r.uint32();
41
+ if (t === e)
42
+ break;
43
+ switch (t >>> 3) {
44
+ case 1: {
45
+ m.serverInfo = $root.proto.AIThreadInfo.AIThreadServerInfo.decode(r, r.uint32(), undefined, n + 1);
46
+ break;
47
+ }
48
+ case 2: {
49
+ m.clientInfo = $root.proto.AIThreadInfo.AIThreadClientInfo.decode(r, r.uint32(), undefined, n + 1);
50
+ break;
51
+ }
52
+ default:
53
+ r.skipType(t & 7, n);
54
+ break;
55
+ }
56
+ }
57
+ return m;
58
+ };
59
+ AIThreadInfo.fromObject = function fromObject(d, n) {
60
+ if (d instanceof $root.proto.AIThreadInfo)
61
+ return d;
62
+ if (n === undefined)
63
+ n = 0;
64
+ if (n > $util.recursionLimit)
65
+ throw Error("maximum nesting depth exceeded");
66
+ var m = new $root.proto.AIThreadInfo();
67
+ if (d.serverInfo != null) {
68
+ if (typeof d.serverInfo !== "object")
69
+ throw TypeError(".proto.AIThreadInfo.serverInfo: object expected");
70
+ m.serverInfo = $root.proto.AIThreadInfo.AIThreadServerInfo.fromObject(d.serverInfo, n + 1);
71
+ }
72
+ if (d.clientInfo != null) {
73
+ if (typeof d.clientInfo !== "object")
74
+ throw TypeError(".proto.AIThreadInfo.clientInfo: object expected");
75
+ m.clientInfo = $root.proto.AIThreadInfo.AIThreadClientInfo.fromObject(d.clientInfo, n + 1);
76
+ }
77
+ return m;
78
+ };
79
+ AIThreadInfo.toObject = function toObject(m, o) {
80
+ if (!o)
81
+ o = {};
82
+ var d = {};
83
+ if (m.serverInfo != null && m.hasOwnProperty("serverInfo")) {
84
+ d.serverInfo = $root.proto.AIThreadInfo.AIThreadServerInfo.toObject(m.serverInfo, o);
85
+ if (o.oneofs)
86
+ d._serverInfo = "serverInfo";
87
+ }
88
+ if (m.clientInfo != null && m.hasOwnProperty("clientInfo")) {
89
+ d.clientInfo = $root.proto.AIThreadInfo.AIThreadClientInfo.toObject(m.clientInfo, o);
90
+ if (o.oneofs)
91
+ d._clientInfo = "clientInfo";
92
+ }
93
+ return d;
94
+ };
95
+ AIThreadInfo.prototype.toJSON = function toJSON() {
96
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
97
+ };
98
+ AIThreadInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
99
+ if (typeUrlPrefix === undefined) {
100
+ typeUrlPrefix = "type.googleapis.com";
101
+ }
102
+ return typeUrlPrefix + "/proto.AIThreadInfo";
103
+ };
104
+ $lazy(AIThreadInfo, "AIThreadClientInfo", function() {
105
+ function AIThreadClientInfo(p) {
106
+ if (p)
107
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
108
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
109
+ this[ks[i]] = p[ks[i]];
110
+ }
111
+ AIThreadClientInfo.prototype.type = null;
112
+ AIThreadClientInfo.prototype.sourceChatJid = null;
113
+ let $oneOfFields;
114
+ Object.defineProperty(AIThreadClientInfo.prototype, "_type", {
115
+ get: $util.oneOfGetter($oneOfFields = ["type"]),
116
+ set: $util.oneOfSetter($oneOfFields)
117
+ });
118
+ Object.defineProperty(AIThreadClientInfo.prototype, "_sourceChatJid", {
119
+ get: $util.oneOfGetter($oneOfFields = ["sourceChatJid"]),
120
+ set: $util.oneOfSetter($oneOfFields)
121
+ });
122
+ AIThreadClientInfo.create = function create(properties) {
123
+ return new AIThreadClientInfo(properties);
124
+ };
125
+ AIThreadClientInfo.encode = function encode(m, w) {
126
+ if (!w)
127
+ w = $Writer.create();
128
+ if (m.type != null && Object.hasOwnProperty.call(m, "type"))
129
+ w.uint32(8).int32(m.type);
130
+ if (m.sourceChatJid != null && Object.hasOwnProperty.call(m, "sourceChatJid"))
131
+ w.uint32(18).string(m.sourceChatJid);
132
+ return w;
133
+ };
134
+ AIThreadClientInfo.decode = function decode(r, l, e, n) {
135
+ if (!(r instanceof $Reader))
136
+ r = $Reader.create(r);
137
+ if (n === undefined)
138
+ n = 0;
139
+ if (n > $Reader.recursionLimit)
140
+ throw Error("maximum nesting depth exceeded");
141
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIThreadInfo.AIThreadClientInfo();
142
+ while (r.pos < c) {
143
+ var t = r.uint32();
144
+ if (t === e)
145
+ break;
146
+ switch (t >>> 3) {
147
+ case 1: {
148
+ m.type = r.int32();
149
+ break;
150
+ }
151
+ case 2: {
152
+ m.sourceChatJid = r.string();
153
+ break;
154
+ }
155
+ default:
156
+ r.skipType(t & 7, n);
157
+ break;
158
+ }
159
+ }
160
+ return m;
161
+ };
162
+ AIThreadClientInfo.fromObject = function fromObject(d, n) {
163
+ if (d instanceof $root.proto.AIThreadInfo.AIThreadClientInfo)
164
+ return d;
165
+ if (n === undefined)
166
+ n = 0;
167
+ if (n > $util.recursionLimit)
168
+ throw Error("maximum nesting depth exceeded");
169
+ var m = new $root.proto.AIThreadInfo.AIThreadClientInfo();
170
+ switch (d.type) {
171
+ default:
172
+ if (typeof d.type === "number") {
173
+ m.type = d.type;
174
+ break;
175
+ }
176
+ break;
177
+ case "UNKNOWN":
178
+ case 0:
179
+ m.type = 0;
180
+ break;
181
+ case "DEFAULT":
182
+ case 1:
183
+ m.type = 1;
184
+ break;
185
+ case "INCOGNITO":
186
+ case 2:
187
+ m.type = 2;
188
+ break;
189
+ case "SIDE_CHAT":
190
+ case 3:
191
+ m.type = 3;
192
+ break;
193
+ }
194
+ if (d.sourceChatJid != null) {
195
+ m.sourceChatJid = String(d.sourceChatJid);
196
+ }
197
+ return m;
198
+ };
199
+ AIThreadClientInfo.toObject = function toObject(m, o) {
200
+ if (!o)
201
+ o = {};
202
+ var d = {};
203
+ if (m.type != null && m.hasOwnProperty("type")) {
204
+ d.type = o.enums === String ? $root.proto.AIThreadInfo.AIThreadClientInfo.AIThreadType[m.type] === undefined ? m.type : $root.proto.AIThreadInfo.AIThreadClientInfo.AIThreadType[m.type] : m.type;
205
+ if (o.oneofs)
206
+ d._type = "type";
207
+ }
208
+ if (m.sourceChatJid != null && m.hasOwnProperty("sourceChatJid")) {
209
+ d.sourceChatJid = m.sourceChatJid;
210
+ if (o.oneofs)
211
+ d._sourceChatJid = "sourceChatJid";
212
+ }
213
+ return d;
214
+ };
215
+ AIThreadClientInfo.prototype.toJSON = function toJSON() {
216
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
217
+ };
218
+ AIThreadClientInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
219
+ if (typeUrlPrefix === undefined) {
220
+ typeUrlPrefix = "type.googleapis.com";
221
+ }
222
+ return typeUrlPrefix + "/proto.AIThreadInfo.AIThreadClientInfo";
223
+ };
224
+ $lazy(AIThreadClientInfo, "AIThreadType", function() {
225
+ const valuesById = {}, values = Object.create(valuesById);
226
+ values[valuesById[0] = "UNKNOWN"] = 0;
227
+ values[valuesById[1] = "DEFAULT"] = 1;
228
+ values[valuesById[2] = "INCOGNITO"] = 2;
229
+ values[valuesById[3] = "SIDE_CHAT"] = 3;
230
+ return values;
231
+ });
232
+ return AIThreadClientInfo;
233
+ });
234
+ $lazy(AIThreadInfo, "AIThreadServerInfo", function() {
235
+ function AIThreadServerInfo(p) {
236
+ if (p)
237
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
238
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
239
+ this[ks[i]] = p[ks[i]];
240
+ }
241
+ AIThreadServerInfo.prototype.title = null;
242
+ let $oneOfFields;
243
+ Object.defineProperty(AIThreadServerInfo.prototype, "_title", {
244
+ get: $util.oneOfGetter($oneOfFields = ["title"]),
245
+ set: $util.oneOfSetter($oneOfFields)
246
+ });
247
+ AIThreadServerInfo.create = function create(properties) {
248
+ return new AIThreadServerInfo(properties);
249
+ };
250
+ AIThreadServerInfo.encode = function encode(m, w) {
251
+ if (!w)
252
+ w = $Writer.create();
253
+ if (m.title != null && Object.hasOwnProperty.call(m, "title"))
254
+ w.uint32(10).string(m.title);
255
+ return w;
256
+ };
257
+ AIThreadServerInfo.decode = function decode(r, l, e, n) {
258
+ if (!(r instanceof $Reader))
259
+ r = $Reader.create(r);
260
+ if (n === undefined)
261
+ n = 0;
262
+ if (n > $Reader.recursionLimit)
263
+ throw Error("maximum nesting depth exceeded");
264
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.AIThreadInfo.AIThreadServerInfo();
265
+ while (r.pos < c) {
266
+ var t = r.uint32();
267
+ if (t === e)
268
+ break;
269
+ switch (t >>> 3) {
270
+ case 1: {
271
+ m.title = r.string();
272
+ break;
273
+ }
274
+ default:
275
+ r.skipType(t & 7, n);
276
+ break;
277
+ }
278
+ }
279
+ return m;
280
+ };
281
+ AIThreadServerInfo.fromObject = function fromObject(d, n) {
282
+ if (d instanceof $root.proto.AIThreadInfo.AIThreadServerInfo)
283
+ return d;
284
+ if (n === undefined)
285
+ n = 0;
286
+ if (n > $util.recursionLimit)
287
+ throw Error("maximum nesting depth exceeded");
288
+ var m = new $root.proto.AIThreadInfo.AIThreadServerInfo();
289
+ if (d.title != null) {
290
+ m.title = String(d.title);
291
+ }
292
+ return m;
293
+ };
294
+ AIThreadServerInfo.toObject = function toObject(m, o) {
295
+ if (!o)
296
+ o = {};
297
+ var d = {};
298
+ if (m.title != null && m.hasOwnProperty("title")) {
299
+ d.title = m.title;
300
+ if (o.oneofs)
301
+ d._title = "title";
302
+ }
303
+ return d;
304
+ };
305
+ AIThreadServerInfo.prototype.toJSON = function toJSON() {
306
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
307
+ };
308
+ AIThreadServerInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
309
+ if (typeUrlPrefix === undefined) {
310
+ typeUrlPrefix = "type.googleapis.com";
311
+ }
312
+ return typeUrlPrefix + "/proto.AIThreadInfo.AIThreadServerInfo";
313
+ };
314
+ return AIThreadServerInfo;
315
+ });
316
+ return AIThreadInfo;
@@ -0,0 +1,138 @@
1
+ "use strict";
2
+ function Account(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
+ Account.prototype.lid = null;
9
+ Account.prototype.username = null;
10
+ Account.prototype.countryCode = null;
11
+ Account.prototype.isUsernameDeleted = null;
12
+ let $oneOfFields;
13
+ Object.defineProperty(Account.prototype, "_lid", {
14
+ get: $util.oneOfGetter($oneOfFields = ["lid"]),
15
+ set: $util.oneOfSetter($oneOfFields)
16
+ });
17
+ Object.defineProperty(Account.prototype, "_username", {
18
+ get: $util.oneOfGetter($oneOfFields = ["username"]),
19
+ set: $util.oneOfSetter($oneOfFields)
20
+ });
21
+ Object.defineProperty(Account.prototype, "_countryCode", {
22
+ get: $util.oneOfGetter($oneOfFields = ["countryCode"]),
23
+ set: $util.oneOfSetter($oneOfFields)
24
+ });
25
+ Object.defineProperty(Account.prototype, "_isUsernameDeleted", {
26
+ get: $util.oneOfGetter($oneOfFields = ["isUsernameDeleted"]),
27
+ set: $util.oneOfSetter($oneOfFields)
28
+ });
29
+ Account.create = function create(properties) {
30
+ return new Account(properties);
31
+ };
32
+ Account.encode = function encode(m, w) {
33
+ if (!w)
34
+ w = $Writer.create();
35
+ if (m.lid != null && Object.hasOwnProperty.call(m, "lid"))
36
+ w.uint32(10).string(m.lid);
37
+ if (m.username != null && Object.hasOwnProperty.call(m, "username"))
38
+ w.uint32(18).string(m.username);
39
+ if (m.countryCode != null && Object.hasOwnProperty.call(m, "countryCode"))
40
+ w.uint32(26).string(m.countryCode);
41
+ if (m.isUsernameDeleted != null && Object.hasOwnProperty.call(m, "isUsernameDeleted"))
42
+ w.uint32(32).bool(m.isUsernameDeleted);
43
+ return w;
44
+ };
45
+ Account.decode = function decode(r, l, e, n) {
46
+ if (!(r instanceof $Reader))
47
+ r = $Reader.create(r);
48
+ if (n === undefined)
49
+ n = 0;
50
+ if (n > $Reader.recursionLimit)
51
+ throw Error("maximum nesting depth exceeded");
52
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.Account();
53
+ while (r.pos < c) {
54
+ var t = r.uint32();
55
+ if (t === e)
56
+ break;
57
+ switch (t >>> 3) {
58
+ case 1: {
59
+ m.lid = r.string();
60
+ break;
61
+ }
62
+ case 2: {
63
+ m.username = r.string();
64
+ break;
65
+ }
66
+ case 3: {
67
+ m.countryCode = r.string();
68
+ break;
69
+ }
70
+ case 4: {
71
+ m.isUsernameDeleted = r.bool();
72
+ break;
73
+ }
74
+ default:
75
+ r.skipType(t & 7, n);
76
+ break;
77
+ }
78
+ }
79
+ return m;
80
+ };
81
+ Account.fromObject = function fromObject(d, n) {
82
+ if (d instanceof $root.proto.Account)
83
+ return d;
84
+ if (n === undefined)
85
+ n = 0;
86
+ if (n > $util.recursionLimit)
87
+ throw Error("maximum nesting depth exceeded");
88
+ var m = new $root.proto.Account();
89
+ if (d.lid != null) {
90
+ m.lid = String(d.lid);
91
+ }
92
+ if (d.username != null) {
93
+ m.username = String(d.username);
94
+ }
95
+ if (d.countryCode != null) {
96
+ m.countryCode = String(d.countryCode);
97
+ }
98
+ if (d.isUsernameDeleted != null) {
99
+ m.isUsernameDeleted = Boolean(d.isUsernameDeleted);
100
+ }
101
+ return m;
102
+ };
103
+ Account.toObject = function toObject(m, o) {
104
+ if (!o)
105
+ o = {};
106
+ var d = {};
107
+ if (m.lid != null && m.hasOwnProperty("lid")) {
108
+ d.lid = m.lid;
109
+ if (o.oneofs)
110
+ d._lid = "lid";
111
+ }
112
+ if (m.username != null && m.hasOwnProperty("username")) {
113
+ d.username = m.username;
114
+ if (o.oneofs)
115
+ d._username = "username";
116
+ }
117
+ if (m.countryCode != null && m.hasOwnProperty("countryCode")) {
118
+ d.countryCode = m.countryCode;
119
+ if (o.oneofs)
120
+ d._countryCode = "countryCode";
121
+ }
122
+ if (m.isUsernameDeleted != null && m.hasOwnProperty("isUsernameDeleted")) {
123
+ d.isUsernameDeleted = m.isUsernameDeleted;
124
+ if (o.oneofs)
125
+ d._isUsernameDeleted = "isUsernameDeleted";
126
+ }
127
+ return d;
128
+ };
129
+ Account.prototype.toJSON = function toJSON() {
130
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
131
+ };
132
+ Account.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
133
+ if (typeUrlPrefix === undefined) {
134
+ typeUrlPrefix = "type.googleapis.com";
135
+ }
136
+ return typeUrlPrefix + "/proto.Account";
137
+ };
138
+ return Account;
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ function ActionLink(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
+ ActionLink.prototype.url = null;
9
+ ActionLink.prototype.buttonTitle = null;
10
+ let $oneOfFields;
11
+ Object.defineProperty(ActionLink.prototype, "_url", {
12
+ get: $util.oneOfGetter($oneOfFields = ["url"]),
13
+ set: $util.oneOfSetter($oneOfFields)
14
+ });
15
+ Object.defineProperty(ActionLink.prototype, "_buttonTitle", {
16
+ get: $util.oneOfGetter($oneOfFields = ["buttonTitle"]),
17
+ set: $util.oneOfSetter($oneOfFields)
18
+ });
19
+ ActionLink.create = function create(properties) {
20
+ return new ActionLink(properties);
21
+ };
22
+ ActionLink.encode = function encode(m, w) {
23
+ if (!w)
24
+ w = $Writer.create();
25
+ if (m.url != null && Object.hasOwnProperty.call(m, "url"))
26
+ w.uint32(10).string(m.url);
27
+ if (m.buttonTitle != null && Object.hasOwnProperty.call(m, "buttonTitle"))
28
+ w.uint32(18).string(m.buttonTitle);
29
+ return w;
30
+ };
31
+ ActionLink.decode = function decode(r, l, e, n) {
32
+ if (!(r instanceof $Reader))
33
+ r = $Reader.create(r);
34
+ if (n === undefined)
35
+ n = 0;
36
+ if (n > $Reader.recursionLimit)
37
+ throw Error("maximum nesting depth exceeded");
38
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ActionLink();
39
+ while (r.pos < c) {
40
+ var t = r.uint32();
41
+ if (t === e)
42
+ break;
43
+ switch (t >>> 3) {
44
+ case 1: {
45
+ m.url = r.string();
46
+ break;
47
+ }
48
+ case 2: {
49
+ m.buttonTitle = r.string();
50
+ break;
51
+ }
52
+ default:
53
+ r.skipType(t & 7, n);
54
+ break;
55
+ }
56
+ }
57
+ return m;
58
+ };
59
+ ActionLink.fromObject = function fromObject(d, n) {
60
+ if (d instanceof $root.proto.ActionLink)
61
+ return d;
62
+ if (n === undefined)
63
+ n = 0;
64
+ if (n > $util.recursionLimit)
65
+ throw Error("maximum nesting depth exceeded");
66
+ var m = new $root.proto.ActionLink();
67
+ if (d.url != null) {
68
+ m.url = String(d.url);
69
+ }
70
+ if (d.buttonTitle != null) {
71
+ m.buttonTitle = String(d.buttonTitle);
72
+ }
73
+ return m;
74
+ };
75
+ ActionLink.toObject = function toObject(m, o) {
76
+ if (!o)
77
+ o = {};
78
+ var d = {};
79
+ if (m.url != null && m.hasOwnProperty("url")) {
80
+ d.url = m.url;
81
+ if (o.oneofs)
82
+ d._url = "url";
83
+ }
84
+ if (m.buttonTitle != null && m.hasOwnProperty("buttonTitle")) {
85
+ d.buttonTitle = m.buttonTitle;
86
+ if (o.oneofs)
87
+ d._buttonTitle = "buttonTitle";
88
+ }
89
+ return d;
90
+ };
91
+ ActionLink.prototype.toJSON = function toJSON() {
92
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
93
+ };
94
+ ActionLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
95
+ if (typeUrlPrefix === undefined) {
96
+ typeUrlPrefix = "type.googleapis.com";
97
+ }
98
+ return typeUrlPrefix + "/proto.ActionLink";
99
+ };
100
+ return ActionLink;