@hiroosy/baileys-lite 0.3.4 → 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 (225) 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
@@ -0,0 +1,176 @@
1
+ "use strict";
2
+ function NotificationSettings(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
+ NotificationSettings.prototype.messageVibrate = null;
9
+ NotificationSettings.prototype.messagePopup = null;
10
+ NotificationSettings.prototype.messageLight = null;
11
+ NotificationSettings.prototype.lowPriorityNotifications = null;
12
+ NotificationSettings.prototype.reactionsMuted = null;
13
+ NotificationSettings.prototype.callVibrate = null;
14
+ let $oneOfFields;
15
+ Object.defineProperty(NotificationSettings.prototype, "_messageVibrate", {
16
+ get: $util.oneOfGetter($oneOfFields = ["messageVibrate"]),
17
+ set: $util.oneOfSetter($oneOfFields)
18
+ });
19
+ Object.defineProperty(NotificationSettings.prototype, "_messagePopup", {
20
+ get: $util.oneOfGetter($oneOfFields = ["messagePopup"]),
21
+ set: $util.oneOfSetter($oneOfFields)
22
+ });
23
+ Object.defineProperty(NotificationSettings.prototype, "_messageLight", {
24
+ get: $util.oneOfGetter($oneOfFields = ["messageLight"]),
25
+ set: $util.oneOfSetter($oneOfFields)
26
+ });
27
+ Object.defineProperty(NotificationSettings.prototype, "_lowPriorityNotifications", {
28
+ get: $util.oneOfGetter($oneOfFields = ["lowPriorityNotifications"]),
29
+ set: $util.oneOfSetter($oneOfFields)
30
+ });
31
+ Object.defineProperty(NotificationSettings.prototype, "_reactionsMuted", {
32
+ get: $util.oneOfGetter($oneOfFields = ["reactionsMuted"]),
33
+ set: $util.oneOfSetter($oneOfFields)
34
+ });
35
+ Object.defineProperty(NotificationSettings.prototype, "_callVibrate", {
36
+ get: $util.oneOfGetter($oneOfFields = ["callVibrate"]),
37
+ set: $util.oneOfSetter($oneOfFields)
38
+ });
39
+ NotificationSettings.create = function create(properties) {
40
+ return new NotificationSettings(properties);
41
+ };
42
+ NotificationSettings.encode = function encode(m, w) {
43
+ if (!w)
44
+ w = $Writer.create();
45
+ if (m.messageVibrate != null && Object.hasOwnProperty.call(m, "messageVibrate"))
46
+ w.uint32(10).string(m.messageVibrate);
47
+ if (m.messagePopup != null && Object.hasOwnProperty.call(m, "messagePopup"))
48
+ w.uint32(18).string(m.messagePopup);
49
+ if (m.messageLight != null && Object.hasOwnProperty.call(m, "messageLight"))
50
+ w.uint32(26).string(m.messageLight);
51
+ if (m.lowPriorityNotifications != null && Object.hasOwnProperty.call(m, "lowPriorityNotifications"))
52
+ w.uint32(32).bool(m.lowPriorityNotifications);
53
+ if (m.reactionsMuted != null && Object.hasOwnProperty.call(m, "reactionsMuted"))
54
+ w.uint32(40).bool(m.reactionsMuted);
55
+ if (m.callVibrate != null && Object.hasOwnProperty.call(m, "callVibrate"))
56
+ w.uint32(50).string(m.callVibrate);
57
+ return w;
58
+ };
59
+ NotificationSettings.decode = function decode(r, l, e, n) {
60
+ if (!(r instanceof $Reader))
61
+ r = $Reader.create(r);
62
+ if (n === undefined)
63
+ n = 0;
64
+ if (n > $Reader.recursionLimit)
65
+ throw Error("maximum nesting depth exceeded");
66
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.NotificationSettings();
67
+ while (r.pos < c) {
68
+ var t = r.uint32();
69
+ if (t === e)
70
+ break;
71
+ switch (t >>> 3) {
72
+ case 1: {
73
+ m.messageVibrate = r.string();
74
+ break;
75
+ }
76
+ case 2: {
77
+ m.messagePopup = r.string();
78
+ break;
79
+ }
80
+ case 3: {
81
+ m.messageLight = r.string();
82
+ break;
83
+ }
84
+ case 4: {
85
+ m.lowPriorityNotifications = r.bool();
86
+ break;
87
+ }
88
+ case 5: {
89
+ m.reactionsMuted = r.bool();
90
+ break;
91
+ }
92
+ case 6: {
93
+ m.callVibrate = r.string();
94
+ break;
95
+ }
96
+ default:
97
+ r.skipType(t & 7, n);
98
+ break;
99
+ }
100
+ }
101
+ return m;
102
+ };
103
+ NotificationSettings.fromObject = function fromObject(d, n) {
104
+ if (d instanceof $root.proto.NotificationSettings)
105
+ return d;
106
+ if (n === undefined)
107
+ n = 0;
108
+ if (n > $util.recursionLimit)
109
+ throw Error("maximum nesting depth exceeded");
110
+ var m = new $root.proto.NotificationSettings();
111
+ if (d.messageVibrate != null) {
112
+ m.messageVibrate = String(d.messageVibrate);
113
+ }
114
+ if (d.messagePopup != null) {
115
+ m.messagePopup = String(d.messagePopup);
116
+ }
117
+ if (d.messageLight != null) {
118
+ m.messageLight = String(d.messageLight);
119
+ }
120
+ if (d.lowPriorityNotifications != null) {
121
+ m.lowPriorityNotifications = Boolean(d.lowPriorityNotifications);
122
+ }
123
+ if (d.reactionsMuted != null) {
124
+ m.reactionsMuted = Boolean(d.reactionsMuted);
125
+ }
126
+ if (d.callVibrate != null) {
127
+ m.callVibrate = String(d.callVibrate);
128
+ }
129
+ return m;
130
+ };
131
+ NotificationSettings.toObject = function toObject(m, o) {
132
+ if (!o)
133
+ o = {};
134
+ var d = {};
135
+ if (m.messageVibrate != null && m.hasOwnProperty("messageVibrate")) {
136
+ d.messageVibrate = m.messageVibrate;
137
+ if (o.oneofs)
138
+ d._messageVibrate = "messageVibrate";
139
+ }
140
+ if (m.messagePopup != null && m.hasOwnProperty("messagePopup")) {
141
+ d.messagePopup = m.messagePopup;
142
+ if (o.oneofs)
143
+ d._messagePopup = "messagePopup";
144
+ }
145
+ if (m.messageLight != null && m.hasOwnProperty("messageLight")) {
146
+ d.messageLight = m.messageLight;
147
+ if (o.oneofs)
148
+ d._messageLight = "messageLight";
149
+ }
150
+ if (m.lowPriorityNotifications != null && m.hasOwnProperty("lowPriorityNotifications")) {
151
+ d.lowPriorityNotifications = m.lowPriorityNotifications;
152
+ if (o.oneofs)
153
+ d._lowPriorityNotifications = "lowPriorityNotifications";
154
+ }
155
+ if (m.reactionsMuted != null && m.hasOwnProperty("reactionsMuted")) {
156
+ d.reactionsMuted = m.reactionsMuted;
157
+ if (o.oneofs)
158
+ d._reactionsMuted = "reactionsMuted";
159
+ }
160
+ if (m.callVibrate != null && m.hasOwnProperty("callVibrate")) {
161
+ d.callVibrate = m.callVibrate;
162
+ if (o.oneofs)
163
+ d._callVibrate = "callVibrate";
164
+ }
165
+ return d;
166
+ };
167
+ NotificationSettings.prototype.toJSON = function toJSON() {
168
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
169
+ };
170
+ NotificationSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
171
+ if (typeUrlPrefix === undefined) {
172
+ typeUrlPrefix = "type.googleapis.com";
173
+ }
174
+ return typeUrlPrefix + "/proto.NotificationSettings";
175
+ };
176
+ return NotificationSettings;
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ function PairingRequest(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
+ PairingRequest.prototype.companionPublicKey = null;
9
+ PairingRequest.prototype.companionIdentityKey = null;
10
+ PairingRequest.prototype.advSecret = null;
11
+ let $oneOfFields;
12
+ Object.defineProperty(PairingRequest.prototype, "_companionPublicKey", {
13
+ get: $util.oneOfGetter($oneOfFields = ["companionPublicKey"]),
14
+ set: $util.oneOfSetter($oneOfFields)
15
+ });
16
+ Object.defineProperty(PairingRequest.prototype, "_companionIdentityKey", {
17
+ get: $util.oneOfGetter($oneOfFields = ["companionIdentityKey"]),
18
+ set: $util.oneOfSetter($oneOfFields)
19
+ });
20
+ Object.defineProperty(PairingRequest.prototype, "_advSecret", {
21
+ get: $util.oneOfGetter($oneOfFields = ["advSecret"]),
22
+ set: $util.oneOfSetter($oneOfFields)
23
+ });
24
+ PairingRequest.create = function create(properties) {
25
+ return new PairingRequest(properties);
26
+ };
27
+ PairingRequest.encode = function encode(m, w) {
28
+ if (!w)
29
+ w = $Writer.create();
30
+ if (m.companionPublicKey != null && Object.hasOwnProperty.call(m, "companionPublicKey"))
31
+ w.uint32(10).bytes(m.companionPublicKey);
32
+ if (m.companionIdentityKey != null && Object.hasOwnProperty.call(m, "companionIdentityKey"))
33
+ w.uint32(18).bytes(m.companionIdentityKey);
34
+ if (m.advSecret != null && Object.hasOwnProperty.call(m, "advSecret"))
35
+ w.uint32(26).bytes(m.advSecret);
36
+ return w;
37
+ };
38
+ PairingRequest.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.PairingRequest();
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.companionPublicKey = r.bytes();
53
+ break;
54
+ }
55
+ case 2: {
56
+ m.companionIdentityKey = r.bytes();
57
+ break;
58
+ }
59
+ case 3: {
60
+ m.advSecret = r.bytes();
61
+ break;
62
+ }
63
+ default:
64
+ r.skipType(t & 7, n);
65
+ break;
66
+ }
67
+ }
68
+ return m;
69
+ };
70
+ PairingRequest.fromObject = function fromObject(d, n) {
71
+ if (d instanceof $root.proto.PairingRequest)
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.PairingRequest();
78
+ if (d.companionPublicKey != null) {
79
+ if (typeof d.companionPublicKey === "string")
80
+ $util.base64.decode(d.companionPublicKey, m.companionPublicKey = $util.newBuffer($util.base64.length(d.companionPublicKey)), 0);
81
+ else if (d.companionPublicKey.length >= 0)
82
+ m.companionPublicKey = d.companionPublicKey;
83
+ }
84
+ if (d.companionIdentityKey != null) {
85
+ if (typeof d.companionIdentityKey === "string")
86
+ $util.base64.decode(d.companionIdentityKey, m.companionIdentityKey = $util.newBuffer($util.base64.length(d.companionIdentityKey)), 0);
87
+ else if (d.companionIdentityKey.length >= 0)
88
+ m.companionIdentityKey = d.companionIdentityKey;
89
+ }
90
+ if (d.advSecret != null) {
91
+ if (typeof d.advSecret === "string")
92
+ $util.base64.decode(d.advSecret, m.advSecret = $util.newBuffer($util.base64.length(d.advSecret)), 0);
93
+ else if (d.advSecret.length >= 0)
94
+ m.advSecret = d.advSecret;
95
+ }
96
+ return m;
97
+ };
98
+ PairingRequest.toObject = function toObject(m, o) {
99
+ if (!o)
100
+ o = {};
101
+ var d = {};
102
+ if (m.companionPublicKey != null && m.hasOwnProperty("companionPublicKey")) {
103
+ d.companionPublicKey = o.bytes === String ? $util.base64.encode(m.companionPublicKey, 0, m.companionPublicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.companionPublicKey) : m.companionPublicKey;
104
+ if (o.oneofs)
105
+ d._companionPublicKey = "companionPublicKey";
106
+ }
107
+ if (m.companionIdentityKey != null && m.hasOwnProperty("companionIdentityKey")) {
108
+ d.companionIdentityKey = o.bytes === String ? $util.base64.encode(m.companionIdentityKey, 0, m.companionIdentityKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.companionIdentityKey) : m.companionIdentityKey;
109
+ if (o.oneofs)
110
+ d._companionIdentityKey = "companionIdentityKey";
111
+ }
112
+ if (m.advSecret != null && m.hasOwnProperty("advSecret")) {
113
+ d.advSecret = o.bytes === String ? $util.base64.encode(m.advSecret, 0, m.advSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.advSecret) : m.advSecret;
114
+ if (o.oneofs)
115
+ d._advSecret = "advSecret";
116
+ }
117
+ return d;
118
+ };
119
+ PairingRequest.prototype.toJSON = function toJSON() {
120
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
121
+ };
122
+ PairingRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
123
+ if (typeUrlPrefix === undefined) {
124
+ typeUrlPrefix = "type.googleapis.com";
125
+ }
126
+ return typeUrlPrefix + "/proto.PairingRequest";
127
+ };
128
+ return PairingRequest;
@@ -0,0 +1,148 @@
1
+ "use strict";
2
+ function PastParticipant(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
+ PastParticipant.prototype.userJid = null;
9
+ PastParticipant.prototype.leaveReason = null;
10
+ PastParticipant.prototype.leaveTs = null;
11
+ let $oneOfFields;
12
+ Object.defineProperty(PastParticipant.prototype, "_userJid", {
13
+ get: $util.oneOfGetter($oneOfFields = ["userJid"]),
14
+ set: $util.oneOfSetter($oneOfFields)
15
+ });
16
+ Object.defineProperty(PastParticipant.prototype, "_leaveReason", {
17
+ get: $util.oneOfGetter($oneOfFields = ["leaveReason"]),
18
+ set: $util.oneOfSetter($oneOfFields)
19
+ });
20
+ Object.defineProperty(PastParticipant.prototype, "_leaveTs", {
21
+ get: $util.oneOfGetter($oneOfFields = ["leaveTs"]),
22
+ set: $util.oneOfSetter($oneOfFields)
23
+ });
24
+ PastParticipant.create = function create(properties) {
25
+ return new PastParticipant(properties);
26
+ };
27
+ PastParticipant.encode = function encode(m, w) {
28
+ if (!w)
29
+ w = $Writer.create();
30
+ if (m.userJid != null && Object.hasOwnProperty.call(m, "userJid"))
31
+ w.uint32(10).string(m.userJid);
32
+ if (m.leaveReason != null && Object.hasOwnProperty.call(m, "leaveReason"))
33
+ w.uint32(16).int32(m.leaveReason);
34
+ if (m.leaveTs != null && Object.hasOwnProperty.call(m, "leaveTs"))
35
+ w.uint32(24).uint64(m.leaveTs);
36
+ return w;
37
+ };
38
+ PastParticipant.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.PastParticipant();
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.userJid = r.string();
53
+ break;
54
+ }
55
+ case 2: {
56
+ m.leaveReason = r.int32();
57
+ break;
58
+ }
59
+ case 3: {
60
+ m.leaveTs = r.uint64();
61
+ break;
62
+ }
63
+ default:
64
+ r.skipType(t & 7, n);
65
+ break;
66
+ }
67
+ }
68
+ return m;
69
+ };
70
+ PastParticipant.fromObject = function fromObject(d, n) {
71
+ if (d instanceof $root.proto.PastParticipant)
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.PastParticipant();
78
+ if (d.userJid != null) {
79
+ m.userJid = String(d.userJid);
80
+ }
81
+ switch (d.leaveReason) {
82
+ default:
83
+ if (typeof d.leaveReason === "number") {
84
+ m.leaveReason = d.leaveReason;
85
+ break;
86
+ }
87
+ break;
88
+ case "LEFT":
89
+ case 0:
90
+ m.leaveReason = 0;
91
+ break;
92
+ case "REMOVED":
93
+ case 1:
94
+ m.leaveReason = 1;
95
+ break;
96
+ }
97
+ if (d.leaveTs != null) {
98
+ if ($util.Long)
99
+ (m.leaveTs = $util.Long.fromValue(d.leaveTs)).unsigned = true;
100
+ else if (typeof d.leaveTs === "string")
101
+ m.leaveTs = parseInt(d.leaveTs, 10);
102
+ else if (typeof d.leaveTs === "number")
103
+ m.leaveTs = d.leaveTs;
104
+ else if (typeof d.leaveTs === "object")
105
+ m.leaveTs = new $util.LongBits(d.leaveTs.low >>> 0, d.leaveTs.high >>> 0).toNumber(true);
106
+ }
107
+ return m;
108
+ };
109
+ PastParticipant.toObject = function toObject(m, o) {
110
+ if (!o)
111
+ o = {};
112
+ var d = {};
113
+ if (m.userJid != null && m.hasOwnProperty("userJid")) {
114
+ d.userJid = m.userJid;
115
+ if (o.oneofs)
116
+ d._userJid = "userJid";
117
+ }
118
+ if (m.leaveReason != null && m.hasOwnProperty("leaveReason")) {
119
+ d.leaveReason = o.enums === String ? $root.proto.PastParticipant.LeaveReason[m.leaveReason] === undefined ? m.leaveReason : $root.proto.PastParticipant.LeaveReason[m.leaveReason] : m.leaveReason;
120
+ if (o.oneofs)
121
+ d._leaveReason = "leaveReason";
122
+ }
123
+ if (m.leaveTs != null && m.hasOwnProperty("leaveTs")) {
124
+ if (typeof m.leaveTs === "number")
125
+ d.leaveTs = o.longs === String ? String(m.leaveTs) : m.leaveTs;
126
+ else
127
+ d.leaveTs = o.longs === String ? longToString(m.leaveTs, true) : o.longs === Number ? longToNumber(m.leaveTs, true) : m.leaveTs;
128
+ if (o.oneofs)
129
+ d._leaveTs = "leaveTs";
130
+ }
131
+ return d;
132
+ };
133
+ PastParticipant.prototype.toJSON = function toJSON() {
134
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
135
+ };
136
+ PastParticipant.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
137
+ if (typeUrlPrefix === undefined) {
138
+ typeUrlPrefix = "type.googleapis.com";
139
+ }
140
+ return typeUrlPrefix + "/proto.PastParticipant";
141
+ };
142
+ $lazy(PastParticipant, "LeaveReason", function() {
143
+ const valuesById = {}, values = Object.create(valuesById);
144
+ values[valuesById[0] = "LEFT"] = 0;
145
+ values[valuesById[1] = "REMOVED"] = 1;
146
+ return values;
147
+ });
148
+ return PastParticipant;
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ function PastParticipants(p) {
3
+ this.pastParticipants = [];
4
+ if (p)
5
+ for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
6
+ if (p[ks[i]] != null && ks[i] !== "__proto__")
7
+ this[ks[i]] = p[ks[i]];
8
+ }
9
+ PastParticipants.prototype.groupJid = null;
10
+ PastParticipants.prototype.pastParticipants = $util.emptyArray;
11
+ let $oneOfFields;
12
+ Object.defineProperty(PastParticipants.prototype, "_groupJid", {
13
+ get: $util.oneOfGetter($oneOfFields = ["groupJid"]),
14
+ set: $util.oneOfSetter($oneOfFields)
15
+ });
16
+ PastParticipants.create = function create(properties) {
17
+ return new PastParticipants(properties);
18
+ };
19
+ PastParticipants.encode = function encode(m, w) {
20
+ if (!w)
21
+ w = $Writer.create();
22
+ if (m.groupJid != null && Object.hasOwnProperty.call(m, "groupJid"))
23
+ w.uint32(10).string(m.groupJid);
24
+ if (m.pastParticipants != null && m.pastParticipants.length) {
25
+ for (var i = 0; i < m.pastParticipants.length; ++i)
26
+ $root.proto.PastParticipant.encode(m.pastParticipants[i], w.uint32(18).fork()).ldelim();
27
+ }
28
+ return w;
29
+ };
30
+ PastParticipants.decode = function decode(r, l, e, n) {
31
+ if (!(r instanceof $Reader))
32
+ r = $Reader.create(r);
33
+ if (n === undefined)
34
+ n = 0;
35
+ if (n > $Reader.recursionLimit)
36
+ throw Error("maximum nesting depth exceeded");
37
+ var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.PastParticipants();
38
+ while (r.pos < c) {
39
+ var t = r.uint32();
40
+ if (t === e)
41
+ break;
42
+ switch (t >>> 3) {
43
+ case 1: {
44
+ m.groupJid = r.string();
45
+ break;
46
+ }
47
+ case 2: {
48
+ if (!(m.pastParticipants && m.pastParticipants.length))
49
+ m.pastParticipants = [];
50
+ m.pastParticipants.push($root.proto.PastParticipant.decode(r, r.uint32(), undefined, n + 1));
51
+ break;
52
+ }
53
+ default:
54
+ r.skipType(t & 7, n);
55
+ break;
56
+ }
57
+ }
58
+ return m;
59
+ };
60
+ PastParticipants.fromObject = function fromObject(d, n) {
61
+ if (d instanceof $root.proto.PastParticipants)
62
+ return d;
63
+ if (n === undefined)
64
+ n = 0;
65
+ if (n > $util.recursionLimit)
66
+ throw Error("maximum nesting depth exceeded");
67
+ var m = new $root.proto.PastParticipants();
68
+ if (d.groupJid != null) {
69
+ m.groupJid = String(d.groupJid);
70
+ }
71
+ if (d.pastParticipants) {
72
+ if (!Array.isArray(d.pastParticipants))
73
+ throw TypeError(".proto.PastParticipants.pastParticipants: array expected");
74
+ m.pastParticipants = [];
75
+ for (var i = 0; i < d.pastParticipants.length; ++i) {
76
+ if (typeof d.pastParticipants[i] !== "object")
77
+ throw TypeError(".proto.PastParticipants.pastParticipants: object expected");
78
+ m.pastParticipants[i] = $root.proto.PastParticipant.fromObject(d.pastParticipants[i], n + 1);
79
+ }
80
+ }
81
+ return m;
82
+ };
83
+ PastParticipants.toObject = function toObject(m, o) {
84
+ if (!o)
85
+ o = {};
86
+ var d = {};
87
+ if (o.arrays || o.defaults) {
88
+ d.pastParticipants = [];
89
+ }
90
+ if (m.groupJid != null && m.hasOwnProperty("groupJid")) {
91
+ d.groupJid = m.groupJid;
92
+ if (o.oneofs)
93
+ d._groupJid = "groupJid";
94
+ }
95
+ if (m.pastParticipants && m.pastParticipants.length) {
96
+ d.pastParticipants = [];
97
+ for (var j = 0; j < m.pastParticipants.length; ++j) {
98
+ d.pastParticipants[j] = $root.proto.PastParticipant.toObject(m.pastParticipants[j], o);
99
+ }
100
+ }
101
+ return d;
102
+ };
103
+ PastParticipants.prototype.toJSON = function toJSON() {
104
+ return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
105
+ };
106
+ PastParticipants.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
107
+ if (typeUrlPrefix === undefined) {
108
+ typeUrlPrefix = "type.googleapis.com";
109
+ }
110
+ return typeUrlPrefix + "/proto.PastParticipants";
111
+ };
112
+ return PastParticipants;