@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,88 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package MdStorageMsgRowOpaqueData;
|
|
3
|
+
|
|
4
|
+
import "../E2E/E2E.proto";
|
|
5
|
+
|
|
6
|
+
message MsgOpaqueData {
|
|
7
|
+
optional string body = 1;
|
|
8
|
+
optional string caption = 3;
|
|
9
|
+
optional double lng = 5;
|
|
10
|
+
optional bool isLive = 6;
|
|
11
|
+
optional double lat = 7;
|
|
12
|
+
optional int32 paymentAmount1000 = 8;
|
|
13
|
+
optional string paymentNoteMsgBody = 9;
|
|
14
|
+
optional string matchedText = 11;
|
|
15
|
+
optional string title = 12;
|
|
16
|
+
optional string description = 13;
|
|
17
|
+
optional bytes futureproofBuffer = 14;
|
|
18
|
+
optional string clientUrl = 15;
|
|
19
|
+
optional string loc = 16;
|
|
20
|
+
optional string pollName = 17;
|
|
21
|
+
repeated PollOption pollOptions = 18;
|
|
22
|
+
optional uint32 pollSelectableOptionsCount = 20;
|
|
23
|
+
optional bytes messageSecret = 21;
|
|
24
|
+
optional string originalSelfAuthor = 51;
|
|
25
|
+
optional int64 senderTimestampMs = 22;
|
|
26
|
+
optional string pollUpdateParentKey = 23;
|
|
27
|
+
optional E2E.PollEncValue encPollVote = 24;
|
|
28
|
+
optional bool isSentCagPollCreation = 28;
|
|
29
|
+
optional PollContentType pollContentType = 42;
|
|
30
|
+
optional PollType pollType = 46;
|
|
31
|
+
optional int32 correctOptionIndex = 47;
|
|
32
|
+
optional PollVotesSnapshot pollVotesSnapshot = 41;
|
|
33
|
+
optional string encReactionTargetMessageKey = 25;
|
|
34
|
+
optional bytes encReactionEncPayload = 26;
|
|
35
|
+
optional bytes encReactionEncIv = 27;
|
|
36
|
+
optional bytes botMessageSecret = 29;
|
|
37
|
+
optional string targetMessageKey = 30;
|
|
38
|
+
optional bytes encPayload = 31;
|
|
39
|
+
optional bytes encIv = 32;
|
|
40
|
+
optional string eventName = 33;
|
|
41
|
+
optional bool isEventCanceled = 34;
|
|
42
|
+
optional string eventDescription = 35;
|
|
43
|
+
optional string eventJoinLink = 36;
|
|
44
|
+
optional int64 eventStartTime = 37;
|
|
45
|
+
optional EventLocation eventLocation = 38;
|
|
46
|
+
optional int64 eventEndTime = 40;
|
|
47
|
+
optional bool eventIsScheduledCall = 44;
|
|
48
|
+
optional bool eventExtraGuestsAllowed = 45;
|
|
49
|
+
optional bytes plainProtobufBytes = 43;
|
|
50
|
+
message EventLocation {
|
|
51
|
+
optional double degreesLatitude = 1;
|
|
52
|
+
optional double degreesLongitude = 2;
|
|
53
|
+
optional string name = 3;
|
|
54
|
+
optional string address = 4;
|
|
55
|
+
optional string url = 5;
|
|
56
|
+
optional bytes jpegThumbnail = 6;
|
|
57
|
+
}
|
|
58
|
+
enum PollContentType {
|
|
59
|
+
UNKNOWN = 0;
|
|
60
|
+
TEXT = 1;
|
|
61
|
+
IMAGE = 2;
|
|
62
|
+
}
|
|
63
|
+
message PollOption {
|
|
64
|
+
optional string name = 1;
|
|
65
|
+
optional string hash = 2;
|
|
66
|
+
}
|
|
67
|
+
enum PollType {
|
|
68
|
+
POLL = 0;
|
|
69
|
+
QUIZ = 1;
|
|
70
|
+
}
|
|
71
|
+
message PollVoteSnapshot {
|
|
72
|
+
optional MsgOpaqueData.PollOption option = 1;
|
|
73
|
+
optional int32 optionVoteCount = 2;
|
|
74
|
+
}
|
|
75
|
+
message PollVotesSnapshot {
|
|
76
|
+
repeated MsgOpaqueData.PollVoteSnapshot pollVotes = 1;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message PollEncValue {
|
|
81
|
+
optional bytes encPayload = 1;
|
|
82
|
+
optional bytes encIv = 2;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
message MsgRowOpaqueData {
|
|
86
|
+
optional MsgOpaqueData currentMsg = 1;
|
|
87
|
+
optional MsgOpaqueData quotedMsg = 2;
|
|
88
|
+
}
|
|
@@ -0,0 +1,310 @@
|
|
|
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.MmsRetry = (function () {
|
|
8
|
+
var MmsRetry = {};
|
|
9
|
+
MmsRetry.ServerErrorReceipt = (function () {
|
|
10
|
+
function ServerErrorReceipt(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
|
+
ServerErrorReceipt.prototype.stanzaId = null;
|
|
16
|
+
var $oneOfFields;
|
|
17
|
+
Object.defineProperty(ServerErrorReceipt.prototype, "_stanzaId", {
|
|
18
|
+
get: $util.oneOfGetter(($oneOfFields = ["stanzaId"])),
|
|
19
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
20
|
+
});
|
|
21
|
+
ServerErrorReceipt.create = function create(properties) {
|
|
22
|
+
return new ServerErrorReceipt(properties);
|
|
23
|
+
};
|
|
24
|
+
ServerErrorReceipt.encode = function encode(message, writer) {
|
|
25
|
+
if (!writer) writer = $Writer.create();
|
|
26
|
+
if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId"))
|
|
27
|
+
writer.uint32(10).string(message.stanzaId);
|
|
28
|
+
return writer;
|
|
29
|
+
};
|
|
30
|
+
ServerErrorReceipt.encodeDelimited = function encodeDelimited(message, writer) {
|
|
31
|
+
return this.encode(message, writer).ldelim();
|
|
32
|
+
};
|
|
33
|
+
ServerErrorReceipt.decode = function decode(reader, length, error) {
|
|
34
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
35
|
+
var end = length === undefined ? reader.len : reader.pos + length,
|
|
36
|
+
message = new $root.MmsRetry.ServerErrorReceipt();
|
|
37
|
+
while (reader.pos < end) {
|
|
38
|
+
var tag = reader.uint32();
|
|
39
|
+
if (tag === error) break;
|
|
40
|
+
switch (tag >>> 3) {
|
|
41
|
+
case 1: {
|
|
42
|
+
message.stanzaId = reader.string();
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
default:
|
|
46
|
+
reader.skipType(tag & 7);
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return message;
|
|
51
|
+
};
|
|
52
|
+
ServerErrorReceipt.decodeDelimited = function decodeDelimited(reader) {
|
|
53
|
+
if (!(reader instanceof $Reader)) reader = new $Reader(reader);
|
|
54
|
+
return this.decode(reader, reader.uint32());
|
|
55
|
+
};
|
|
56
|
+
ServerErrorReceipt.verify = function verify(message) {
|
|
57
|
+
if (typeof message !== "object" || message === null) return "object expected";
|
|
58
|
+
var properties = {};
|
|
59
|
+
if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
|
|
60
|
+
properties._stanzaId = 1;
|
|
61
|
+
if (!$util.isString(message.stanzaId)) return "stanzaId: string expected";
|
|
62
|
+
}
|
|
63
|
+
return null;
|
|
64
|
+
};
|
|
65
|
+
ServerErrorReceipt.fromObject = function fromObject(object) {
|
|
66
|
+
if (object instanceof $root.MmsRetry.ServerErrorReceipt) return object;
|
|
67
|
+
var message = new $root.MmsRetry.ServerErrorReceipt();
|
|
68
|
+
if (object.stanzaId != null) message.stanzaId = String(object.stanzaId);
|
|
69
|
+
return message;
|
|
70
|
+
};
|
|
71
|
+
ServerErrorReceipt.toObject = function toObject(message, options) {
|
|
72
|
+
if (!options) options = {};
|
|
73
|
+
var object = {};
|
|
74
|
+
if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
|
|
75
|
+
object.stanzaId = message.stanzaId;
|
|
76
|
+
if (options.oneofs) object._stanzaId = "stanzaId";
|
|
77
|
+
}
|
|
78
|
+
return object;
|
|
79
|
+
};
|
|
80
|
+
ServerErrorReceipt.prototype.toJSON = function toJSON() {
|
|
81
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
82
|
+
};
|
|
83
|
+
ServerErrorReceipt.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
84
|
+
if (typeUrlPrefix === undefined) {
|
|
85
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
86
|
+
}
|
|
87
|
+
return typeUrlPrefix + "/MmsRetry.ServerErrorReceipt";
|
|
88
|
+
};
|
|
89
|
+
return ServerErrorReceipt;
|
|
90
|
+
})();
|
|
91
|
+
MmsRetry.MediaRetryNotification = (function () {
|
|
92
|
+
function MediaRetryNotification(properties) {
|
|
93
|
+
if (properties)
|
|
94
|
+
for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
|
|
95
|
+
if (properties[keys[i]] != null) this[keys[i]] = properties[keys[i]];
|
|
96
|
+
}
|
|
97
|
+
MediaRetryNotification.prototype.stanzaId = null;
|
|
98
|
+
MediaRetryNotification.prototype.directPath = null;
|
|
99
|
+
MediaRetryNotification.prototype.result = null;
|
|
100
|
+
MediaRetryNotification.prototype.messageSecret = null;
|
|
101
|
+
var $oneOfFields;
|
|
102
|
+
Object.defineProperty(MediaRetryNotification.prototype, "_stanzaId", {
|
|
103
|
+
get: $util.oneOfGetter(($oneOfFields = ["stanzaId"])),
|
|
104
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(MediaRetryNotification.prototype, "_directPath", {
|
|
107
|
+
get: $util.oneOfGetter(($oneOfFields = ["directPath"])),
|
|
108
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
109
|
+
});
|
|
110
|
+
Object.defineProperty(MediaRetryNotification.prototype, "_result", {
|
|
111
|
+
get: $util.oneOfGetter(($oneOfFields = ["result"])),
|
|
112
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
113
|
+
});
|
|
114
|
+
Object.defineProperty(MediaRetryNotification.prototype, "_messageSecret", {
|
|
115
|
+
get: $util.oneOfGetter(($oneOfFields = ["messageSecret"])),
|
|
116
|
+
set: $util.oneOfSetter($oneOfFields),
|
|
117
|
+
});
|
|
118
|
+
MediaRetryNotification.create = function create(properties) {
|
|
119
|
+
return new MediaRetryNotification(properties);
|
|
120
|
+
};
|
|
121
|
+
MediaRetryNotification.encode = function encode(message, writer) {
|
|
122
|
+
if (!writer) writer = $Writer.create();
|
|
123
|
+
if (message.stanzaId != null && Object.hasOwnProperty.call(message, "stanzaId"))
|
|
124
|
+
writer.uint32(10).string(message.stanzaId);
|
|
125
|
+
if (message.directPath != null && Object.hasOwnProperty.call(message, "directPath"))
|
|
126
|
+
writer.uint32(18).string(message.directPath);
|
|
127
|
+
if (message.result != null && Object.hasOwnProperty.call(message, "result"))
|
|
128
|
+
writer.uint32(24).int32(message.result);
|
|
129
|
+
if (
|
|
130
|
+
message.messageSecret != null &&
|
|
131
|
+
Object.hasOwnProperty.call(message, "messageSecret")
|
|
132
|
+
)
|
|
133
|
+
writer.uint32(34).bytes(message.messageSecret);
|
|
134
|
+
return writer;
|
|
135
|
+
};
|
|
136
|
+
MediaRetryNotification.encodeDelimited = function encodeDelimited(message, writer) {
|
|
137
|
+
return this.encode(message, writer).ldelim();
|
|
138
|
+
};
|
|
139
|
+
MediaRetryNotification.decode = function decode(reader, length, error) {
|
|
140
|
+
if (!(reader instanceof $Reader)) reader = $Reader.create(reader);
|
|
141
|
+
var end = length === undefined ? reader.len : reader.pos + length,
|
|
142
|
+
message = new $root.MmsRetry.MediaRetryNotification();
|
|
143
|
+
while (reader.pos < end) {
|
|
144
|
+
var tag = reader.uint32();
|
|
145
|
+
if (tag === error) break;
|
|
146
|
+
switch (tag >>> 3) {
|
|
147
|
+
case 1: {
|
|
148
|
+
message.stanzaId = reader.string();
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
case 2: {
|
|
152
|
+
message.directPath = reader.string();
|
|
153
|
+
break;
|
|
154
|
+
}
|
|
155
|
+
case 3: {
|
|
156
|
+
message.result = reader.int32();
|
|
157
|
+
break;
|
|
158
|
+
}
|
|
159
|
+
case 4: {
|
|
160
|
+
message.messageSecret = reader.bytes();
|
|
161
|
+
break;
|
|
162
|
+
}
|
|
163
|
+
default:
|
|
164
|
+
reader.skipType(tag & 7);
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
return message;
|
|
169
|
+
};
|
|
170
|
+
MediaRetryNotification.decodeDelimited = function decodeDelimited(reader) {
|
|
171
|
+
if (!(reader instanceof $Reader)) reader = new $Reader(reader);
|
|
172
|
+
return this.decode(reader, reader.uint32());
|
|
173
|
+
};
|
|
174
|
+
MediaRetryNotification.verify = function verify(message) {
|
|
175
|
+
if (typeof message !== "object" || message === null) return "object expected";
|
|
176
|
+
var properties = {};
|
|
177
|
+
if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
|
|
178
|
+
properties._stanzaId = 1;
|
|
179
|
+
if (!$util.isString(message.stanzaId)) return "stanzaId: string expected";
|
|
180
|
+
}
|
|
181
|
+
if (message.directPath != null && message.hasOwnProperty("directPath")) {
|
|
182
|
+
properties._directPath = 1;
|
|
183
|
+
if (!$util.isString(message.directPath)) return "directPath: string expected";
|
|
184
|
+
}
|
|
185
|
+
if (message.result != null && message.hasOwnProperty("result")) {
|
|
186
|
+
properties._result = 1;
|
|
187
|
+
switch (message.result) {
|
|
188
|
+
default:
|
|
189
|
+
return "result: enum value expected";
|
|
190
|
+
case 0:
|
|
191
|
+
case 1:
|
|
192
|
+
case 2:
|
|
193
|
+
case 3:
|
|
194
|
+
break;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) {
|
|
198
|
+
properties._messageSecret = 1;
|
|
199
|
+
if (
|
|
200
|
+
!(
|
|
201
|
+
(message.messageSecret &&
|
|
202
|
+
typeof message.messageSecret.length === "number") ||
|
|
203
|
+
$util.isString(message.messageSecret)
|
|
204
|
+
)
|
|
205
|
+
)
|
|
206
|
+
return "messageSecret: buffer expected";
|
|
207
|
+
}
|
|
208
|
+
return null;
|
|
209
|
+
};
|
|
210
|
+
MediaRetryNotification.fromObject = function fromObject(object) {
|
|
211
|
+
if (object instanceof $root.MmsRetry.MediaRetryNotification) return object;
|
|
212
|
+
var message = new $root.MmsRetry.MediaRetryNotification();
|
|
213
|
+
if (object.stanzaId != null) message.stanzaId = String(object.stanzaId);
|
|
214
|
+
if (object.directPath != null) message.directPath = String(object.directPath);
|
|
215
|
+
switch (object.result) {
|
|
216
|
+
default:
|
|
217
|
+
if (typeof object.result === "number") {
|
|
218
|
+
message.result = object.result;
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
break;
|
|
222
|
+
case "GENERAL_ERROR":
|
|
223
|
+
case 0:
|
|
224
|
+
message.result = 0;
|
|
225
|
+
break;
|
|
226
|
+
case "SUCCESS":
|
|
227
|
+
case 1:
|
|
228
|
+
message.result = 1;
|
|
229
|
+
break;
|
|
230
|
+
case "NOT_FOUND":
|
|
231
|
+
case 2:
|
|
232
|
+
message.result = 2;
|
|
233
|
+
break;
|
|
234
|
+
case "DECRYPTION_ERROR":
|
|
235
|
+
case 3:
|
|
236
|
+
message.result = 3;
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
if (object.messageSecret != null)
|
|
240
|
+
if (typeof object.messageSecret === "string")
|
|
241
|
+
$util.base64.decode(
|
|
242
|
+
object.messageSecret,
|
|
243
|
+
(message.messageSecret = $util.newBuffer(
|
|
244
|
+
$util.base64.length(object.messageSecret)
|
|
245
|
+
)),
|
|
246
|
+
0
|
|
247
|
+
);
|
|
248
|
+
else if (object.messageSecret.length >= 0)
|
|
249
|
+
message.messageSecret = object.messageSecret;
|
|
250
|
+
return message;
|
|
251
|
+
};
|
|
252
|
+
MediaRetryNotification.toObject = function toObject(message, options) {
|
|
253
|
+
if (!options) options = {};
|
|
254
|
+
var object = {};
|
|
255
|
+
if (message.stanzaId != null && message.hasOwnProperty("stanzaId")) {
|
|
256
|
+
object.stanzaId = message.stanzaId;
|
|
257
|
+
if (options.oneofs) object._stanzaId = "stanzaId";
|
|
258
|
+
}
|
|
259
|
+
if (message.directPath != null && message.hasOwnProperty("directPath")) {
|
|
260
|
+
object.directPath = message.directPath;
|
|
261
|
+
if (options.oneofs) object._directPath = "directPath";
|
|
262
|
+
}
|
|
263
|
+
if (message.result != null && message.hasOwnProperty("result")) {
|
|
264
|
+
object.result =
|
|
265
|
+
options.enums === String
|
|
266
|
+
? $root.MmsRetry.MediaRetryNotification.ResultType[message.result] ===
|
|
267
|
+
undefined
|
|
268
|
+
? message.result
|
|
269
|
+
: $root.MmsRetry.MediaRetryNotification.ResultType[message.result]
|
|
270
|
+
: message.result;
|
|
271
|
+
if (options.oneofs) object._result = "result";
|
|
272
|
+
}
|
|
273
|
+
if (message.messageSecret != null && message.hasOwnProperty("messageSecret")) {
|
|
274
|
+
object.messageSecret =
|
|
275
|
+
options.bytes === String
|
|
276
|
+
? $util.base64.encode(
|
|
277
|
+
message.messageSecret,
|
|
278
|
+
0,
|
|
279
|
+
message.messageSecret.length
|
|
280
|
+
)
|
|
281
|
+
: options.bytes === Array
|
|
282
|
+
? Array.prototype.slice.call(message.messageSecret)
|
|
283
|
+
: message.messageSecret;
|
|
284
|
+
if (options.oneofs) object._messageSecret = "messageSecret";
|
|
285
|
+
}
|
|
286
|
+
return object;
|
|
287
|
+
};
|
|
288
|
+
MediaRetryNotification.prototype.toJSON = function toJSON() {
|
|
289
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
290
|
+
};
|
|
291
|
+
MediaRetryNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
292
|
+
if (typeUrlPrefix === undefined) {
|
|
293
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
294
|
+
}
|
|
295
|
+
return typeUrlPrefix + "/MmsRetry.MediaRetryNotification";
|
|
296
|
+
};
|
|
297
|
+
MediaRetryNotification.ResultType = (function () {
|
|
298
|
+
var valuesById = {},
|
|
299
|
+
values = Object.create(valuesById);
|
|
300
|
+
values[(valuesById[0] = "GENERAL_ERROR")] = 0;
|
|
301
|
+
values[(valuesById[1] = "SUCCESS")] = 1;
|
|
302
|
+
values[(valuesById[2] = "NOT_FOUND")] = 2;
|
|
303
|
+
values[(valuesById[3] = "DECRYPTION_ERROR")] = 3;
|
|
304
|
+
return values;
|
|
305
|
+
})();
|
|
306
|
+
return MediaRetryNotification;
|
|
307
|
+
})();
|
|
308
|
+
return MmsRetry;
|
|
309
|
+
})();
|
|
310
|
+
module.exports = $root;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package MmsRetry;
|
|
3
|
+
|
|
4
|
+
message ServerErrorReceipt {
|
|
5
|
+
optional string stanzaId = 1;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
message MediaRetryNotification {
|
|
9
|
+
optional string stanzaId = 1;
|
|
10
|
+
optional string directPath = 2;
|
|
11
|
+
optional ResultType result = 3;
|
|
12
|
+
optional bytes messageSecret = 4;
|
|
13
|
+
enum ResultType {
|
|
14
|
+
GENERAL_ERROR = 0;
|
|
15
|
+
SUCCESS = 1;
|
|
16
|
+
NOT_FOUND = 2;
|
|
17
|
+
DECRYPTION_ERROR = 3;
|
|
18
|
+
}
|
|
19
|
+
}
|