@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,143 @@
|
|
|
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.Ephemeral = (function () {
|
|
8
|
+
var Ephemeral = {};
|
|
9
|
+
Ephemeral.EphemeralSetting = (function () {
|
|
10
|
+
function EphemeralSetting(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
|
+
EphemeralSetting.prototype.duration = null;
|
|
16
|
+
EphemeralSetting.prototype.timestamp = null;
|
|
17
|
+
var $oneOfFields;
|
|
18
|
+
Object.defineProperty(EphemeralSetting.prototype, "_duration", {
|
|
19
|
+
get: $util.oneOfGetter(($oneOfFields = ["duration"])),
|
|
20
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(EphemeralSetting.prototype, "_timestamp", {
|
|
23
|
+
get: $util.oneOfGetter(($oneOfFields = ["timestamp"])),
|
|
24
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
25
|
+
});
|
|
26
|
+
EphemeralSetting.create = function create(properties) {
|
|
27
|
+
return new EphemeralSetting(properties);
|
|
28
|
+
};
|
|
29
|
+
EphemeralSetting.encode = function encode(message, writer) {
|
|
30
|
+
if (!writer) writer = $Writer.create();
|
|
31
|
+
if (message.duration != null && Object.hasOwnProperty.call(message, "duration"))
|
|
32
|
+
writer.uint32(13).sfixed32(message.duration);
|
|
33
|
+
if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp"))
|
|
34
|
+
writer.uint32(17).sfixed64(message.timestamp);
|
|
35
|
+
return writer;
|
|
36
|
+
};
|
|
37
|
+
EphemeralSetting.encodeDelimited = function encodeDelimited(message, writer) {
|
|
38
|
+
return this.encode(message, writer).ldelim();
|
|
39
|
+
};
|
|
40
|
+
EphemeralSetting.decode = function decode(reader, length, error) {
|
|
41
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
42
|
+
var end = length === undefined ? reader.len : reader.pos + length,
|
|
43
|
+
message = new $root.Ephemeral.EphemeralSetting();
|
|
44
|
+
while (reader.pos < end) {
|
|
45
|
+
var tag = reader.uint32();
|
|
46
|
+
if (tag === error) break;
|
|
47
|
+
switch (tag >>> 3) {
|
|
48
|
+
case 1: {
|
|
49
|
+
message.duration = reader.sfixed32();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
case 2: {
|
|
53
|
+
message.timestamp = reader.sfixed64();
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
default:
|
|
57
|
+
reader.skipType(tag & 7);
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return message;
|
|
62
|
+
};
|
|
63
|
+
EphemeralSetting.decodeDelimited = function decodeDelimited(reader) {
|
|
64
|
+
if (!(reader instanceof $Reader)) reader = new $Reader(reader);
|
|
65
|
+
return this.decode(reader, reader.uint32());
|
|
66
|
+
};
|
|
67
|
+
EphemeralSetting.verify = function verify(message) {
|
|
68
|
+
if (typeof message !== "object" || message === null) return "object expected";
|
|
69
|
+
var properties = {};
|
|
70
|
+
if (message.duration != null && message.hasOwnProperty("duration")) {
|
|
71
|
+
properties._duration = 1;
|
|
72
|
+
if (!$util.isInteger(message.duration)) return "duration: integer expected";
|
|
73
|
+
}
|
|
74
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
75
|
+
properties._timestamp = 1;
|
|
76
|
+
if (
|
|
77
|
+
!$util.isInteger(message.timestamp) &&
|
|
78
|
+
!(
|
|
79
|
+
message.timestamp &&
|
|
80
|
+
$util.isInteger(message.timestamp.low) &&
|
|
81
|
+
$util.isInteger(message.timestamp.high)
|
|
82
|
+
)
|
|
83
|
+
)
|
|
84
|
+
return "timestamp: integer|Long expected";
|
|
85
|
+
}
|
|
86
|
+
return null;
|
|
87
|
+
};
|
|
88
|
+
EphemeralSetting.fromObject = function fromObject(object) {
|
|
89
|
+
if (object instanceof $root.Ephemeral.EphemeralSetting) return object;
|
|
90
|
+
var message = new $root.Ephemeral.EphemeralSetting();
|
|
91
|
+
if (object.duration != null) message.duration = object.duration | 0;
|
|
92
|
+
if (object.timestamp != null)
|
|
93
|
+
if ($util.Long)
|
|
94
|
+
(message.timestamp = $util.Long.fromValue(object.timestamp)).unsigned = false;
|
|
95
|
+
else if (typeof object.timestamp === "string")
|
|
96
|
+
message.timestamp = parseInt(object.timestamp, 10);
|
|
97
|
+
else if (typeof object.timestamp === "number") message.timestamp = object.timestamp;
|
|
98
|
+
else if (typeof object.timestamp === "object")
|
|
99
|
+
message.timestamp = new $util.LongBits(
|
|
100
|
+
object.timestamp.low >>> 0,
|
|
101
|
+
object.timestamp.high >>> 0
|
|
102
|
+
).toNumber();
|
|
103
|
+
return message;
|
|
104
|
+
};
|
|
105
|
+
EphemeralSetting.toObject = function toObject(message, options) {
|
|
106
|
+
if (!options) options = {};
|
|
107
|
+
var object = {};
|
|
108
|
+
if (message.duration != null && message.hasOwnProperty("duration")) {
|
|
109
|
+
object.duration = message.duration;
|
|
110
|
+
if (options.oneofs) object._duration = "duration";
|
|
111
|
+
}
|
|
112
|
+
if (message.timestamp != null && message.hasOwnProperty("timestamp")) {
|
|
113
|
+
if (typeof message.timestamp === "number")
|
|
114
|
+
object.timestamp =
|
|
115
|
+
options.longs === String ? String(message.timestamp) : message.timestamp;
|
|
116
|
+
else
|
|
117
|
+
object.timestamp =
|
|
118
|
+
options.longs === String
|
|
119
|
+
? $util.Long.prototype.toString.call(message.timestamp)
|
|
120
|
+
: options.longs === Number
|
|
121
|
+
? new $util.LongBits(
|
|
122
|
+
message.timestamp.low >>> 0,
|
|
123
|
+
message.timestamp.high >>> 0
|
|
124
|
+
).toNumber()
|
|
125
|
+
: message.timestamp;
|
|
126
|
+
if (options.oneofs) object._timestamp = "timestamp";
|
|
127
|
+
}
|
|
128
|
+
return object;
|
|
129
|
+
};
|
|
130
|
+
EphemeralSetting.prototype.toJSON = function toJSON() {
|
|
131
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
132
|
+
};
|
|
133
|
+
EphemeralSetting.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
134
|
+
if (typeUrlPrefix === undefined) {
|
|
135
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
136
|
+
}
|
|
137
|
+
return typeUrlPrefix + "/Ephemeral.EphemeralSetting";
|
|
138
|
+
};
|
|
139
|
+
return EphemeralSetting;
|
|
140
|
+
})();
|
|
141
|
+
return Ephemeral;
|
|
142
|
+
})();
|
|
143
|
+
module.exports = $root;
|