@aseppxyzz12/baileys 1.1.8
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.
- package/LICENSE +25 -0
- package/README.md +2579 -0
- package/WAProto/AICommon/AICommon.js +19396 -0
- package/WAProto/AICommon/AICommon.proto +820 -0
- package/WAProto/Adv/Adv.js +1137 -0
- package/WAProto/Adv/Adv.proto +42 -0
- package/WAProto/BotMetadata/BotMetadata.js +8975 -0
- package/WAProto/BotMetadata/BotMetadata.proto +484 -0
- package/WAProto/Cert/Cert.js +893 -0
- package/WAProto/Cert/Cert.proto +30 -0
- package/WAProto/ChatLockSettings/ChatLockSettings.js +673 -0
- package/WAProto/ChatLockSettings/ChatLockSettings.proto +9 -0
- package/WAProto/CompanionReg/CompanionReg.js +2457 -0
- package/WAProto/CompanionReg/CompanionReg.proto +103 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.js +846 -0
- package/WAProto/DeviceCapabilities/DeviceCapabilities.proto +38 -0
- package/WAProto/E2E/E2E.js +78728 -0
- package/WAProto/E2E/E2E.proto +1970 -0
- package/WAProto/Ephemeral/Ephemeral.js +143 -0
- package/WAProto/Ephemeral/Ephemeral.proto +7 -0
- package/WAProto/HistorySync/HistorySync.js +95931 -0
- package/WAProto/HistorySync/HistorySync.proto +229 -0
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.js +414 -0
- package/WAProto/LidMigrationSyncPayload/LidMigrationSyncPayload.proto +13 -0
- package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.js +980 -0
- package/WAProto/MdStorageChatRowOpaqueData/MdStorageChatRowOpaqueData.proto +38 -0
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.js +81185 -0
- package/WAProto/MdStorageMsgRowOpaqueData/MdStorageMsgRowOpaqueData.proto +88 -0
- package/WAProto/MmsRetry/MmsRetry.js +310 -0
- package/WAProto/MmsRetry/MmsRetry.proto +19 -0
- package/WAProto/Protocol/Protocol.js +399 -0
- package/WAProto/Protocol/Protocol.proto +22 -0
- package/WAProto/Reporting/Reporting.js +535 -0
- package/WAProto/Reporting/Reporting.proto +22 -0
- package/WAProto/ServerSync/ServerSync.js +1830 -0
- package/WAProto/ServerSync/ServerSync.proto +70 -0
- package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.js +3267 -0
- package/WAProto/SignalLocalStorageProtocol/SignalLocalStorageProtocol.proto +95 -0
- package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.js +1140 -0
- package/WAProto/SignalWhisperTextProtocol/SignalWhisperTextProtocol.proto +44 -0
- package/WAProto/StatusAttributions/StatusAttributions.js +1604 -0
- package/WAProto/StatusAttributions/StatusAttributions.proto +89 -0
- package/WAProto/SyncAction/SyncAction.js +17424 -0
- package/WAProto/SyncAction/SyncAction.proto +663 -0
- package/WAProto/UserPassword/UserPassword.js +544 -0
- package/WAProto/UserPassword/UserPassword.proto +28 -0
- package/WAProto/VnameCert/VnameCert.js +1466 -0
- package/WAProto/VnameCert/VnameCert.proto +65 -0
- package/WAProto/Wa6/Wa6.js +4601 -0
- package/WAProto/Wa6/Wa6.proto +241 -0
- package/WAProto/Web/Web.js +90819 -0
- package/WAProto/Web/Web.proto +605 -0
- package/WAProto/index.js +30 -0
- package/engine-requirements.js +9 -0
- package/lib/Defaults/baileys-version.json +3 -0
- package/lib/Defaults/connection.js +39 -0
- package/lib/Defaults/constants.js +50 -0
- package/lib/Defaults/history.js +13 -0
- package/lib/Defaults/index.js +36 -0
- package/lib/Defaults/media.js +43 -0
- package/lib/Defaults/phonenumber-mcc.json +223 -0
- package/lib/Defaults/prefix.js +12 -0
- package/lib/Function/Download/tiktok.js +19 -0
- package/lib/Function/Tools/bypass.js +19 -0
- package/lib/Function/index.js +13 -0
- package/lib/Signal/Group/ciphertext-message.js +14 -0
- package/lib/Signal/Group/group-session-builder.js +46 -0
- package/lib/Signal/Group/group_cipher.js +104 -0
- package/lib/Signal/Group/index.js +42 -0
- package/lib/Signal/Group/keyhelper.js +21 -0
- package/lib/Signal/Group/queue-job.js +57 -0
- package/lib/Signal/Group/sender-chain-key.js +34 -0
- package/lib/Signal/Group/sender-key-distribution-message.js +66 -0
- package/lib/Signal/Group/sender-key-message.js +78 -0
- package/lib/Signal/Group/sender-key-name.js +49 -0
- package/lib/Signal/Group/sender-key-record.js +45 -0
- package/lib/Signal/Group/sender-key-state.js +100 -0
- package/lib/Signal/Group/sender-message-key.js +28 -0
- package/lib/Signal/libsignal.js +364 -0
- package/lib/Signal/lid-mapping.js +164 -0
- package/lib/Socket/Client/abstract-socket-client.js +13 -0
- package/lib/Socket/Client/index.js +31 -0
- package/lib/Socket/Client/mobile-socket-client.js +65 -0
- package/lib/Socket/Client/types.js +12 -0
- package/lib/Socket/Client/web-socket-client.js +62 -0
- package/lib/Socket/Client/websocket.js +67 -0
- package/lib/Socket/business.js +291 -0
- package/lib/Socket/chats.js +874 -0
- package/lib/Socket/community.js +454 -0
- package/lib/Socket/dugong.js +658 -0
- package/lib/Socket/groups.js +357 -0
- package/lib/Socket/index.js +13 -0
- package/lib/Socket/messages-recv.js +1509 -0
- package/lib/Socket/messages-send.js +1505 -0
- package/lib/Socket/mex.js +54 -0
- package/lib/Socket/newsletter.js +171 -0
- package/lib/Socket/registration.js +167 -0
- package/lib/Socket/rich-content.js +279 -0
- package/lib/Socket/socket.js +905 -0
- package/lib/Socket/username.js +157 -0
- package/lib/Socket/usync.js +70 -0
- package/lib/Store/index.js +37 -0
- package/lib/Store/keyed-db.js +114 -0
- package/lib/Store/make-cache-manager-store.js +77 -0
- package/lib/Store/make-in-memory-store.js +423 -0
- package/lib/Store/make-ordered-dictionary.js +78 -0
- package/lib/Store/object-repository.js +26 -0
- package/lib/Types/Auth.js +2 -0
- package/lib/Types/Bussines.js +2 -0
- package/lib/Types/Call.js +2 -0
- package/lib/Types/Chat.js +10 -0
- package/lib/Types/Contact.js +2 -0
- package/lib/Types/Events.js +2 -0
- package/lib/Types/GroupMetadata.js +2 -0
- package/lib/Types/Label.js +25 -0
- package/lib/Types/LabelAssociation.js +4 -0
- package/lib/Types/Message.js +11 -0
- package/lib/Types/Mex.js +40 -0
- package/lib/Types/MexUpdates.js +15 -0
- package/lib/Types/Newsletter.js +32 -0
- package/lib/Types/Product.js +2 -0
- package/lib/Types/Signal.js +2 -0
- package/lib/Types/Socket.js +2 -0
- package/lib/Types/State.js +9 -0
- package/lib/Types/USync.js +2 -0
- package/lib/Types/index.js +60 -0
- package/lib/Utils/auth-utils.js +256 -0
- package/lib/Utils/baileys-event-stream.js +63 -0
- package/lib/Utils/bot-toolkit.js +455 -0
- package/lib/Utils/browser-utils.js +29 -0
- package/lib/Utils/business.js +233 -0
- package/lib/Utils/chat-utils.js +904 -0
- package/lib/Utils/companion-reg-client-utils.js +41 -0
- package/lib/Utils/crypto.js +144 -0
- package/lib/Utils/decode-wa-message.js +305 -0
- package/lib/Utils/event-buffer.js +555 -0
- package/lib/Utils/generics.js +411 -0
- package/lib/Utils/history.js +100 -0
- package/lib/Utils/identity-change-handler.js +53 -0
- package/lib/Utils/index.js +57 -0
- package/lib/Utils/link-preview.js +76 -0
- package/lib/Utils/logger.js +4 -0
- package/lib/Utils/lt-hash.js +45 -0
- package/lib/Utils/make-mutex.js +33 -0
- package/lib/Utils/message-composer.js +289 -0
- package/lib/Utils/message-retry-manager.js +134 -0
- package/lib/Utils/messages-media.js +806 -0
- package/lib/Utils/messages.js +1908 -0
- package/lib/Utils/noise-handler.js +157 -0
- package/lib/Utils/offline-node-processor.js +42 -0
- package/lib/Utils/pre-key-manager.js +86 -0
- package/lib/Utils/process-message.js +814 -0
- package/lib/Utils/reporting-utils.js +264 -0
- package/lib/Utils/signal.js +183 -0
- package/lib/Utils/stanza-ack.js +36 -0
- package/lib/Utils/sync-action-utils.js +52 -0
- package/lib/Utils/tc-token-utils.js +167 -0
- package/lib/Utils/use-multi-file-auth-state.js +104 -0
- package/lib/Utils/validate-connection.js +229 -0
- package/lib/Utils/vialeys-event-stream.js +41 -0
- package/lib/WABinary/constants.js +1308 -0
- package/lib/WABinary/decode.js +233 -0
- package/lib/WABinary/encode.js +212 -0
- package/lib/WABinary/generic-utils.js +124 -0
- package/lib/WABinary/index.js +36 -0
- package/lib/WABinary/jid-utils.js +101 -0
- package/lib/WABinary/types.js +2 -0
- package/lib/WAM/BinaryInfo.js +12 -0
- package/lib/WAM/constants.js +20491 -0
- package/lib/WAM/encode.js +148 -0
- package/lib/WAM/index.js +34 -0
- package/lib/WAUSync/Protocols/USyncBotProfileProtocol.js +62 -0
- package/lib/WAUSync/Protocols/USyncContactProtocol.js +38 -0
- package/lib/WAUSync/Protocols/USyncDeviceProtocol.js +50 -0
- package/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.js +25 -0
- package/lib/WAUSync/Protocols/USyncLIDProtocol.js +24 -0
- package/lib/WAUSync/Protocols/USyncStatusProtocol.js +32 -0
- package/lib/WAUSync/Protocols/USyncUsernameProtocol.js +24 -0
- package/lib/WAUSync/Protocols/index.js +38 -0
- package/lib/WAUSync/USyncQuery.js +97 -0
- package/lib/WAUSync/USyncUser.js +33 -0
- package/lib/WAUSync/index.js +34 -0
- package/lib/index.js +113 -0
- package/lib/messages-send.js +1496 -0
- package/package.json +100 -0
|
@@ -0,0 +1,399 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var $protobuf = require("protobufjs/minimal");
|
|
3
|
+
var $Reader = $protobuf.Reader,
|
|
4
|
+
$Writer = $protobuf.Writer,
|
|
5
|
+
$util = $protobuf.util;
|
|
6
|
+
var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
|
|
7
|
+
$root.Protocol = (function () {
|
|
8
|
+
var Protocol = {};
|
|
9
|
+
Protocol.LimitSharing = (function () {
|
|
10
|
+
function LimitSharing(properties) {
|
|
11
|
+
if (properties)
|
|
12
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
13
|
+
if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
14
|
+
}
|
|
15
|
+
LimitSharing.prototype.sharingLimited = null;
|
|
16
|
+
LimitSharing.prototype.trigger = null;
|
|
17
|
+
LimitSharing.prototype.limitSharingSettingTimestamp = null;
|
|
18
|
+
LimitSharing.prototype.initiatedByMe = null;
|
|
19
|
+
var $oneOfFields;
|
|
20
|
+
Object.defineProperty(LimitSharing.prototype, "_sharingLimited", {
|
|
21
|
+
get: $util.oneOfGetter(($oneOfFields = ["sharingLimited"])),
|
|
22
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(LimitSharing.prototype, "_trigger", {
|
|
25
|
+
get: $util.oneOfGetter(($oneOfFields = ["trigger"])),
|
|
26
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(LimitSharing.prototype, "_limitSharingSettingTimestamp", {
|
|
29
|
+
get: $util.oneOfGetter(($oneOfFields = ["limitSharingSettingTimestamp"])),
|
|
30
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(LimitSharing.prototype, "_initiatedByMe", {
|
|
33
|
+
get: $util.oneOfGetter(($oneOfFields = ["initiatedByMe"])),
|
|
34
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
35
|
+
});
|
|
36
|
+
LimitSharing.create = function create(properties) {
|
|
37
|
+
return new LimitSharing(properties);
|
|
38
|
+
};
|
|
39
|
+
LimitSharing.encode = function encode(message, writer) {
|
|
40
|
+
if (!writer) writer = $Writer.create();
|
|
41
|
+
if (
|
|
42
|
+
message.sharingLimited != null &&
|
|
43
|
+
Object.hasOwnProperty.call(message, "sharingLimited")
|
|
44
|
+
)
|
|
45
|
+
writer.uint32(8).bool(message.sharingLimited);
|
|
46
|
+
if (message.trigger != null && Object.hasOwnProperty.call(message, "trigger"))
|
|
47
|
+
writer.uint32(16).int32(message.trigger);
|
|
48
|
+
if (
|
|
49
|
+
message.limitSharingSettingTimestamp != null &&
|
|
50
|
+
Object.hasOwnProperty.call(message, "limitSharingSettingTimestamp")
|
|
51
|
+
)
|
|
52
|
+
writer.uint32(24).int64(message.limitSharingSettingTimestamp);
|
|
53
|
+
if (
|
|
54
|
+
message.initiatedByMe != null &&
|
|
55
|
+
Object.hasOwnProperty.call(message, "initiatedByMe")
|
|
56
|
+
)
|
|
57
|
+
writer.uint32(32).bool(message.initiatedByMe);
|
|
58
|
+
return writer;
|
|
59
|
+
};
|
|
60
|
+
LimitSharing.encodeDelimited = function encodeDelimited(message, writer) {
|
|
61
|
+
return this.encode(message, writer).ldelim();
|
|
62
|
+
};
|
|
63
|
+
LimitSharing.decode = function decode(reader, length, error) {
|
|
64
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
65
|
+
var end = length === undefined ? reader.len : reader.pos + length,
|
|
66
|
+
message = new $root.Protocol.LimitSharing();
|
|
67
|
+
while (reader.pos < end) {
|
|
68
|
+
var tag = reader.uint32();
|
|
69
|
+
if (tag === error) break;
|
|
70
|
+
switch (tag >>> 3) {
|
|
71
|
+
case 1: {
|
|
72
|
+
message.sharingLimited = reader.bool();
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
case 2: {
|
|
76
|
+
message.trigger = reader.int32();
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
case 3: {
|
|
80
|
+
message.limitSharingSettingTimestamp = reader.int64();
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case 4: {
|
|
84
|
+
message.initiatedByMe = reader.bool();
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
default:
|
|
88
|
+
reader.skipType(tag & 7);
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return message;
|
|
93
|
+
};
|
|
94
|
+
LimitSharing.decodeDelimited = function decodeDelimited(reader) {
|
|
95
|
+
if (!(reader instanceof $Reader)) reader = new $Reader(reader);
|
|
96
|
+
return this.decode(reader, reader.uint32());
|
|
97
|
+
};
|
|
98
|
+
LimitSharing.verify = function verify(message) {
|
|
99
|
+
if (typeof message !== "object" || message === null) return "object expected";
|
|
100
|
+
var properties = {};
|
|
101
|
+
if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited")) {
|
|
102
|
+
properties._sharingLimited = 1;
|
|
103
|
+
if (typeof message.sharingLimited !== "boolean")
|
|
104
|
+
return "sharingLimited: boolean expected";
|
|
105
|
+
}
|
|
106
|
+
if (message.trigger != null && message.hasOwnProperty("trigger")) {
|
|
107
|
+
properties._trigger = 1;
|
|
108
|
+
switch (message.trigger) {
|
|
109
|
+
default:
|
|
110
|
+
return "trigger: enum value expected";
|
|
111
|
+
case 0:
|
|
112
|
+
case 1:
|
|
113
|
+
case 2:
|
|
114
|
+
case 3:
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (
|
|
119
|
+
message.limitSharingSettingTimestamp != null &&
|
|
120
|
+
message.hasOwnProperty("limitSharingSettingTimestamp")
|
|
121
|
+
) {
|
|
122
|
+
properties._limitSharingSettingTimestamp = 1;
|
|
123
|
+
if (
|
|
124
|
+
!$util.isInteger(message.limitSharingSettingTimestamp) &&
|
|
125
|
+
!(
|
|
126
|
+
message.limitSharingSettingTimestamp &&
|
|
127
|
+
$util.isInteger(message.limitSharingSettingTimestamp.low) &&
|
|
128
|
+
$util.isInteger(message.limitSharingSettingTimestamp.high)
|
|
129
|
+
)
|
|
130
|
+
)
|
|
131
|
+
return "limitSharingSettingTimestamp: integer|Long expected";
|
|
132
|
+
}
|
|
133
|
+
if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) {
|
|
134
|
+
properties._initiatedByMe = 1;
|
|
135
|
+
if (typeof message.initiatedByMe !== "boolean")
|
|
136
|
+
return "initiatedByMe: boolean expected";
|
|
137
|
+
}
|
|
138
|
+
return null;
|
|
139
|
+
};
|
|
140
|
+
LimitSharing.fromObject = function fromObject(object) {
|
|
141
|
+
if (object instanceof $root.Protocol.LimitSharing) return object;
|
|
142
|
+
var message = new $root.Protocol.LimitSharing();
|
|
143
|
+
if (object.sharingLimited != null)
|
|
144
|
+
message.sharingLimited = Boolean(object.sharingLimited);
|
|
145
|
+
switch (object.trigger) {
|
|
146
|
+
default:
|
|
147
|
+
if (typeof object.trigger === "number") {
|
|
148
|
+
message.trigger = object.trigger;
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
152
|
+
case "UNKNOWN":
|
|
153
|
+
case 0:
|
|
154
|
+
message.trigger = 0;
|
|
155
|
+
break;
|
|
156
|
+
case "CHAT_SETTING":
|
|
157
|
+
case 1:
|
|
158
|
+
message.trigger = 1;
|
|
159
|
+
break;
|
|
160
|
+
case "BIZ_SUPPORTS_FB_HOSTING":
|
|
161
|
+
case 2:
|
|
162
|
+
message.trigger = 2;
|
|
163
|
+
break;
|
|
164
|
+
case "UNKNOWN_GROUP":
|
|
165
|
+
case 3:
|
|
166
|
+
message.trigger = 3;
|
|
167
|
+
break;
|
|
168
|
+
}
|
|
169
|
+
if (object.limitSharingSettingTimestamp != null)
|
|
170
|
+
if ($util.Long)
|
|
171
|
+
(message.limitSharingSettingTimestamp = $util.Long.fromValue(
|
|
172
|
+
object.limitSharingSettingTimestamp
|
|
173
|
+
)).unsigned = false;
|
|
174
|
+
else if (typeof object.limitSharingSettingTimestamp === "string")
|
|
175
|
+
message.limitSharingSettingTimestamp = parseInt(
|
|
176
|
+
object.limitSharingSettingTimestamp,
|
|
177
|
+
10
|
|
178
|
+
);
|
|
179
|
+
else if (typeof object.limitSharingSettingTimestamp === "number")
|
|
180
|
+
message.limitSharingSettingTimestamp = object.limitSharingSettingTimestamp;
|
|
181
|
+
else if (typeof object.limitSharingSettingTimestamp === "object")
|
|
182
|
+
message.limitSharingSettingTimestamp = new $util.LongBits(
|
|
183
|
+
object.limitSharingSettingTimestamp.low >>> 0,
|
|
184
|
+
object.limitSharingSettingTimestamp.high >>> 0
|
|
185
|
+
).toNumber();
|
|
186
|
+
if (object.initiatedByMe != null) message.initiatedByMe = Boolean(object.initiatedByMe);
|
|
187
|
+
return message;
|
|
188
|
+
};
|
|
189
|
+
LimitSharing.toObject = function toObject(message, options) {
|
|
190
|
+
if (!options) options = {};
|
|
191
|
+
var object = {};
|
|
192
|
+
if (message.sharingLimited != null && message.hasOwnProperty("sharingLimited")) {
|
|
193
|
+
object.sharingLimited = message.sharingLimited;
|
|
194
|
+
if (options.oneofs) object._sharingLimited = "sharingLimited";
|
|
195
|
+
}
|
|
196
|
+
if (message.trigger != null && message.hasOwnProperty("trigger")) {
|
|
197
|
+
object.trigger =
|
|
198
|
+
options.enums === String
|
|
199
|
+
? $root.Protocol.LimitSharing.TriggerType[message.trigger] === undefined
|
|
200
|
+
? message.trigger
|
|
201
|
+
: $root.Protocol.LimitSharing.TriggerType[message.trigger]
|
|
202
|
+
: message.trigger;
|
|
203
|
+
if (options.oneofs) object._trigger = "trigger";
|
|
204
|
+
}
|
|
205
|
+
if (
|
|
206
|
+
message.limitSharingSettingTimestamp != null &&
|
|
207
|
+
message.hasOwnProperty("limitSharingSettingTimestamp")
|
|
208
|
+
) {
|
|
209
|
+
if (typeof message.limitSharingSettingTimestamp === "number")
|
|
210
|
+
object.limitSharingSettingTimestamp =
|
|
211
|
+
options.longs === String
|
|
212
|
+
? String(message.limitSharingSettingTimestamp)
|
|
213
|
+
: message.limitSharingSettingTimestamp;
|
|
214
|
+
else
|
|
215
|
+
object.limitSharingSettingTimestamp =
|
|
216
|
+
options.longs === String
|
|
217
|
+
? $util.Long.prototype.toString.call(
|
|
218
|
+
message.limitSharingSettingTimestamp
|
|
219
|
+
)
|
|
220
|
+
: options.longs === Number
|
|
221
|
+
? new $util.LongBits(
|
|
222
|
+
message.limitSharingSettingTimestamp.low >>> 0,
|
|
223
|
+
message.limitSharingSettingTimestamp.high >>> 0
|
|
224
|
+
).toNumber()
|
|
225
|
+
: message.limitSharingSettingTimestamp;
|
|
226
|
+
if (options.oneofs)
|
|
227
|
+
object._limitSharingSettingTimestamp = "limitSharingSettingTimestamp";
|
|
228
|
+
}
|
|
229
|
+
if (message.initiatedByMe != null && message.hasOwnProperty("initiatedByMe")) {
|
|
230
|
+
object.initiatedByMe = message.initiatedByMe;
|
|
231
|
+
if (options.oneofs) object._initiatedByMe = "initiatedByMe";
|
|
232
|
+
}
|
|
233
|
+
return object;
|
|
234
|
+
};
|
|
235
|
+
LimitSharing.prototype.toJSON = function toJSON() {
|
|
236
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
237
|
+
};
|
|
238
|
+
LimitSharing.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
239
|
+
if (typeUrlPrefix === undefined) {
|
|
240
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
241
|
+
}
|
|
242
|
+
return typeUrlPrefix + "/Protocol.LimitSharing";
|
|
243
|
+
};
|
|
244
|
+
LimitSharing.TriggerType = (function () {
|
|
245
|
+
var valuesById = {},
|
|
246
|
+
values = Object.create(valuesById);
|
|
247
|
+
values[(valuesById[0] = "UNKNOWN")] = 0;
|
|
248
|
+
values[(valuesById[1] = "CHAT_SETTING")] = 1;
|
|
249
|
+
values[(valuesById[2] = "BIZ_SUPPORTS_FB_HOSTING")] = 2;
|
|
250
|
+
values[(valuesById[3] = "UNKNOWN_GROUP")] = 3;
|
|
251
|
+
return values;
|
|
252
|
+
})();
|
|
253
|
+
return LimitSharing;
|
|
254
|
+
})();
|
|
255
|
+
Protocol.MessageKey = (function () {
|
|
256
|
+
function MessageKey(properties) {
|
|
257
|
+
if (properties)
|
|
258
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
259
|
+
if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
260
|
+
}
|
|
261
|
+
MessageKey.prototype.remoteJid = null;
|
|
262
|
+
MessageKey.prototype.fromMe = null;
|
|
263
|
+
MessageKey.prototype.id = null;
|
|
264
|
+
MessageKey.prototype.participant = null;
|
|
265
|
+
var $oneOfFields;
|
|
266
|
+
Object.defineProperty(MessageKey.prototype, "_remoteJid", {
|
|
267
|
+
get: $util.oneOfGetter(($oneOfFields = ["remoteJid"])),
|
|
268
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
269
|
+
});
|
|
270
|
+
Object.defineProperty(MessageKey.prototype, "_fromMe", {
|
|
271
|
+
get: $util.oneOfGetter(($oneOfFields = ["fromMe"])),
|
|
272
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
273
|
+
});
|
|
274
|
+
Object.defineProperty(MessageKey.prototype, "_id", {
|
|
275
|
+
get: $util.oneOfGetter(($oneOfFields = ["id"])),
|
|
276
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
277
|
+
});
|
|
278
|
+
Object.defineProperty(MessageKey.prototype, "_participant", {
|
|
279
|
+
get: $util.oneOfGetter(($oneOfFields = ["participant"])),
|
|
280
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
281
|
+
});
|
|
282
|
+
MessageKey.create = function create(properties) {
|
|
283
|
+
return new MessageKey(properties);
|
|
284
|
+
};
|
|
285
|
+
MessageKey.encode = function encode(message, writer) {
|
|
286
|
+
if (!writer) writer = $Writer.create();
|
|
287
|
+
if (message.remoteJid != null && Object.hasOwnProperty.call(message, "remoteJid"))
|
|
288
|
+
writer.uint32(10).string(message.remoteJid);
|
|
289
|
+
if (message.fromMe != null && Object.hasOwnProperty.call(message, "fromMe"))
|
|
290
|
+
writer.uint32(16).bool(message.fromMe);
|
|
291
|
+
if (message.id != null && Object.hasOwnProperty.call(message, "id"))
|
|
292
|
+
writer.uint32(26).string(message.id);
|
|
293
|
+
if (message.participant != null && Object.hasOwnProperty.call(message, "participant"))
|
|
294
|
+
writer.uint32(34).string(message.participant);
|
|
295
|
+
return writer;
|
|
296
|
+
};
|
|
297
|
+
MessageKey.encodeDelimited = function encodeDelimited(message, writer) {
|
|
298
|
+
return this.encode(message, writer).ldelim();
|
|
299
|
+
};
|
|
300
|
+
MessageKey.decode = function decode(reader, length, error) {
|
|
301
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
302
|
+
var end = length === undefined ? reader.len : reader.pos + length,
|
|
303
|
+
message = new $root.Protocol.MessageKey();
|
|
304
|
+
while (reader.pos < end) {
|
|
305
|
+
var tag = reader.uint32();
|
|
306
|
+
if (tag === error) break;
|
|
307
|
+
switch (tag >>> 3) {
|
|
308
|
+
case 1: {
|
|
309
|
+
message.remoteJid = reader.string();
|
|
310
|
+
break;
|
|
311
|
+
}
|
|
312
|
+
case 2: {
|
|
313
|
+
message.fromMe = reader.bool();
|
|
314
|
+
break;
|
|
315
|
+
}
|
|
316
|
+
case 3: {
|
|
317
|
+
message.id = reader.string();
|
|
318
|
+
break;
|
|
319
|
+
}
|
|
320
|
+
case 4: {
|
|
321
|
+
message.participant = reader.string();
|
|
322
|
+
break;
|
|
323
|
+
}
|
|
324
|
+
default:
|
|
325
|
+
reader.skipType(tag & 7);
|
|
326
|
+
break;
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return message;
|
|
330
|
+
};
|
|
331
|
+
MessageKey.decodeDelimited = function decodeDelimited(reader) {
|
|
332
|
+
if (!(reader instanceof $Reader)) reader = new $Reader(reader);
|
|
333
|
+
return this.decode(reader, reader.uint32());
|
|
334
|
+
};
|
|
335
|
+
MessageKey.verify = function verify(message) {
|
|
336
|
+
if (typeof message !== "object" || message === null) return "object expected";
|
|
337
|
+
var properties = {};
|
|
338
|
+
if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) {
|
|
339
|
+
properties._remoteJid = 1;
|
|
340
|
+
if (!$util.isString(message.remoteJid)) return "remoteJid: string expected";
|
|
341
|
+
}
|
|
342
|
+
if (message.fromMe != null && message.hasOwnProperty("fromMe")) {
|
|
343
|
+
properties._fromMe = 1;
|
|
344
|
+
if (typeof message.fromMe !== "boolean") return "fromMe: boolean expected";
|
|
345
|
+
}
|
|
346
|
+
if (message.id != null && message.hasOwnProperty("id")) {
|
|
347
|
+
properties._id = 1;
|
|
348
|
+
if (!$util.isString(message.id)) return "id: string expected";
|
|
349
|
+
}
|
|
350
|
+
if (message.participant != null && message.hasOwnProperty("participant")) {
|
|
351
|
+
properties._participant = 1;
|
|
352
|
+
if (!$util.isString(message.participant)) return "participant: string expected";
|
|
353
|
+
}
|
|
354
|
+
return null;
|
|
355
|
+
};
|
|
356
|
+
MessageKey.fromObject = function fromObject(object) {
|
|
357
|
+
if (object instanceof $root.Protocol.MessageKey) return object;
|
|
358
|
+
var message = new $root.Protocol.MessageKey();
|
|
359
|
+
if (object.remoteJid != null) message.remoteJid = String(object.remoteJid);
|
|
360
|
+
if (object.fromMe != null) message.fromMe = Boolean(object.fromMe);
|
|
361
|
+
if (object.id != null) message.id = String(object.id);
|
|
362
|
+
if (object.participant != null) message.participant = String(object.participant);
|
|
363
|
+
return message;
|
|
364
|
+
};
|
|
365
|
+
MessageKey.toObject = function toObject(message, options) {
|
|
366
|
+
if (!options) options = {};
|
|
367
|
+
var object = {};
|
|
368
|
+
if (message.remoteJid != null && message.hasOwnProperty("remoteJid")) {
|
|
369
|
+
object.remoteJid = message.remoteJid;
|
|
370
|
+
if (options.oneofs) object._remoteJid = "remoteJid";
|
|
371
|
+
}
|
|
372
|
+
if (message.fromMe != null && message.hasOwnProperty("fromMe")) {
|
|
373
|
+
object.fromMe = message.fromMe;
|
|
374
|
+
if (options.oneofs) object._fromMe = "fromMe";
|
|
375
|
+
}
|
|
376
|
+
if (message.id != null && message.hasOwnProperty("id")) {
|
|
377
|
+
object.id = message.id;
|
|
378
|
+
if (options.oneofs) object._id = "id";
|
|
379
|
+
}
|
|
380
|
+
if (message.participant != null && message.hasOwnProperty("participant")) {
|
|
381
|
+
object.participant = message.participant;
|
|
382
|
+
if (options.oneofs) object._participant = "participant";
|
|
383
|
+
}
|
|
384
|
+
return object;
|
|
385
|
+
};
|
|
386
|
+
MessageKey.prototype.toJSON = function toJSON() {
|
|
387
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
388
|
+
};
|
|
389
|
+
MessageKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
390
|
+
if (typeUrlPrefix === undefined) {
|
|
391
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
392
|
+
}
|
|
393
|
+
return typeUrlPrefix + "/Protocol.MessageKey";
|
|
394
|
+
};
|
|
395
|
+
return MessageKey;
|
|
396
|
+
})();
|
|
397
|
+
return Protocol;
|
|
398
|
+
})();
|
|
399
|
+
module.exports = $root;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package Protocol;
|
|
3
|
+
|
|
4
|
+
message LimitSharing {
|
|
5
|
+
optional bool sharingLimited = 1;
|
|
6
|
+
optional TriggerType trigger = 2;
|
|
7
|
+
optional int64 limitSharingSettingTimestamp = 3;
|
|
8
|
+
optional bool initiatedByMe = 4;
|
|
9
|
+
enum TriggerType {
|
|
10
|
+
UNKNOWN = 0;
|
|
11
|
+
CHAT_SETTING = 1;
|
|
12
|
+
BIZ_SUPPORTS_FB_HOSTING = 2;
|
|
13
|
+
UNKNOWN_GROUP = 3;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message MessageKey {
|
|
18
|
+
optional string remoteJid = 1;
|
|
19
|
+
optional bool fromMe = 2;
|
|
20
|
+
optional string id = 3;
|
|
21
|
+
optional string participant = 4;
|
|
22
|
+
}
|