@hiroosy/baileys-lite 0.3.4 → 0.3.6
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/WAProto/index.js +231 -113252
- package/WAProto/parts/ADVDeviceIdentity.part +201 -0
- package/WAProto/parts/ADVEncryptionType.part +6 -0
- package/WAProto/parts/ADVKeyIndexList.part +201 -0
- package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
- package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
- package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
- package/WAProto/parts/AIHomeState.part +405 -0
- package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
- package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
- package/WAProto/parts/AIMetadataOperation.part +83 -0
- package/WAProto/parts/AIQueryFanout.part +133 -0
- package/WAProto/parts/AIRegenerateMetadata.part +112 -0
- package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
- package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
- package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
- package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
- package/WAProto/parts/AIRichResponseImageURL.part +119 -0
- package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
- package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMessage.part +167 -0
- package/WAProto/parts/AIRichResponseMessageType.part +5 -0
- package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
- package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
- package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
- package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
- package/WAProto/parts/AISubscriptionRequestType.part +7 -0
- package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
- package/WAProto/parts/AIThreadInfo.part +316 -0
- package/WAProto/parts/Account.part +138 -0
- package/WAProto/parts/ActionLink.part +100 -0
- package/WAProto/parts/AutoDownloadSettings.part +138 -0
- package/WAProto/parts/AvatarUserSettings.part +100 -0
- package/WAProto/parts/BizAccountLinkInfo.part +210 -0
- package/WAProto/parts/BizAccountPayload.part +105 -0
- package/WAProto/parts/BizIdentityInfo.part +298 -0
- package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
- package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
- package/WAProto/parts/BotAgentMetadata.part +83 -0
- package/WAProto/parts/BotCapabilityMetadata.part +437 -0
- package/WAProto/parts/BotCommandMetadata.part +119 -0
- package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
- package/WAProto/parts/BotFeedbackMessage.part +1366 -0
- package/WAProto/parts/BotGroupMetadata.part +92 -0
- package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
- package/WAProto/parts/BotImagineMetadata.part +134 -0
- package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
- package/WAProto/parts/BotLinkedAccount.part +95 -0
- package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
- package/WAProto/parts/BotMediaMetadata.part +229 -0
- package/WAProto/parts/BotMemoryFact.part +100 -0
- package/WAProto/parts/BotMemoryMetadata.part +141 -0
- package/WAProto/parts/BotMemuMetadata.part +92 -0
- package/WAProto/parts/BotMessageOrigin.part +95 -0
- package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
- package/WAProto/parts/BotMessageSharingInfo.part +297 -0
- package/WAProto/parts/BotMetadata.part +934 -0
- package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
- package/WAProto/parts/BotMetricsMetadata.part +341 -0
- package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
- package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
- package/WAProto/parts/BotModelMetadata.part +167 -0
- package/WAProto/parts/BotPluginMetadata.part +379 -0
- package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
- package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
- package/WAProto/parts/BotPromptSuggestion.part +100 -0
- package/WAProto/parts/BotPromptSuggestions.part +92 -0
- package/WAProto/parts/BotPttPromptMetadata.part +81 -0
- package/WAProto/parts/BotQuotaMetadata.part +241 -0
- package/WAProto/parts/BotReminderMetadata.part +232 -0
- package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
- package/WAProto/parts/BotRenderingMetadata.part +203 -0
- package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
- package/WAProto/parts/BotSessionMetadata.part +137 -0
- package/WAProto/parts/BotSessionSource.part +11 -0
- package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
- package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
- package/WAProto/parts/BotSourcesMetadata.part +322 -0
- package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
- package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
- package/WAProto/parts/CallLogRecord.part +646 -0
- package/WAProto/parts/CertChain.part +392 -0
- package/WAProto/parts/ChatLockSettings.part +102 -0
- package/WAProto/parts/ChatRowOpaqueData.part +712 -0
- package/WAProto/parts/Citation.part +119 -0
- package/WAProto/parts/ClientPairingProps.part +160 -0
- package/WAProto/parts/ClientPayload.part +2892 -0
- package/WAProto/parts/CollectionName.part +9 -0
- package/WAProto/parts/CommentMetadata.part +102 -0
- package/WAProto/parts/CompanionCommitment.part +84 -0
- package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
- package/WAProto/parts/Config.part +136 -0
- package/WAProto/parts/ContextInfo.part +4137 -0
- package/WAProto/parts/Conversation.part +1472 -0
- package/WAProto/parts/DeviceCapabilities.part +670 -0
- package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
- package/WAProto/parts/DeviceListMetadata.part +306 -0
- package/WAProto/parts/DeviceProps.part +982 -0
- package/WAProto/parts/DisappearingMode.part +206 -0
- package/WAProto/parts/EmbeddedContent.part +100 -0
- package/WAProto/parts/EmbeddedMessage.part +102 -0
- package/WAProto/parts/EmbeddedMusic.part +370 -0
- package/WAProto/parts/EncryptedPairingRequest.part +106 -0
- package/WAProto/parts/EphemeralSetting.part +110 -0
- package/WAProto/parts/EventAdditionalMetadata.part +81 -0
- package/WAProto/parts/EventResponse.part +152 -0
- package/WAProto/parts/ExitCode.part +110 -0
- package/WAProto/parts/ExternalBlobReference.part +195 -0
- package/WAProto/parts/Field.part +193 -0
- package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
- package/WAProto/parts/GlobalSettings.part +497 -0
- package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
- package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
- package/WAProto/parts/GroupMention.part +100 -0
- package/WAProto/parts/GroupParticipant.part +142 -0
- package/WAProto/parts/GroupRootKeyShare.part +92 -0
- package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
- package/WAProto/parts/HandshakeMessage.part +815 -0
- package/WAProto/parts/HatchMetadataSync.part +132 -0
- package/WAProto/parts/HistorySync.part +605 -0
- package/WAProto/parts/HistorySyncMsg.part +112 -0
- package/WAProto/parts/HydratedTemplateButton.part +501 -0
- package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
- package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
- package/WAProto/parts/InlineContact.part +157 -0
- package/WAProto/parts/InteractiveAnnotation.part +246 -0
- package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
- package/WAProto/parts/KeepInChat.part +225 -0
- package/WAProto/parts/KeepType.part +6 -0
- package/WAProto/parts/KeyExchangeMessage.part +169 -0
- package/WAProto/parts/KeyId.part +84 -0
- package/WAProto/parts/LIDMigrationMapping.part +149 -0
- package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
- package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
- package/WAProto/parts/LegacyMessage.part +104 -0
- package/WAProto/parts/LimitSharing.part +177 -0
- package/WAProto/parts/LocalizedName.part +119 -0
- package/WAProto/parts/Location.part +119 -0
- package/WAProto/parts/MediaData.part +81 -0
- package/WAProto/parts/MediaDomainInfo.part +120 -0
- package/WAProto/parts/MediaKeyDomain.part +6 -0
- package/WAProto/parts/MediaNotifyMessage.part +132 -0
- package/WAProto/parts/MediaRetryNotification.part +170 -0
- package/WAProto/parts/MediaVisibility.part +6 -0
- package/WAProto/parts/MemberLabel.part +110 -0
- package/WAProto/parts/Message.part +32376 -0
- package/WAProto/parts/MessageAddOn.part +305 -0
- package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
- package/WAProto/parts/MessageAssociation.part +235 -0
- package/WAProto/parts/MessageContextInfo.part +451 -0
- package/WAProto/parts/MessageKey.part +138 -0
- package/WAProto/parts/MessageSecretMessage.part +125 -0
- package/WAProto/parts/Money.part +129 -0
- package/WAProto/parts/MsgOpaqueData.part +1732 -0
- package/WAProto/parts/MsgRowOpaqueData.part +104 -0
- package/WAProto/parts/MutationProps.part +89 -0
- package/WAProto/parts/NoiseCertificate.part +277 -0
- package/WAProto/parts/NotificationMessageInfo.part +152 -0
- package/WAProto/parts/NotificationSettings.part +176 -0
- package/WAProto/parts/PairingRequest.part +128 -0
- package/WAProto/parts/PastParticipant.part +148 -0
- package/WAProto/parts/PastParticipants.part +112 -0
- package/WAProto/parts/PatchDebugData.part +358 -0
- package/WAProto/parts/PaymentBackground.part +460 -0
- package/WAProto/parts/PaymentInfo.part +602 -0
- package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
- package/WAProto/parts/PhotoChange.part +125 -0
- package/WAProto/parts/PinInChat.part +205 -0
- package/WAProto/parts/Point.part +138 -0
- package/WAProto/parts/PollAdditionalMetadata.part +216 -0
- package/WAProto/parts/PollEncValue.part +106 -0
- package/WAProto/parts/PollUpdate.part +202 -0
- package/WAProto/parts/PreKeyRecordStructure.part +125 -0
- package/WAProto/parts/PreKeySignalMessage.part +185 -0
- package/WAProto/parts/PremiumMessageInfo.part +81 -0
- package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
- package/WAProto/parts/PrivacySystemMessage.part +6 -0
- package/WAProto/parts/ProcessedVideo.part +266 -0
- package/WAProto/parts/ProloguePayload.part +105 -0
- package/WAProto/parts/Pushname.part +100 -0
- package/WAProto/parts/QuarantinedMessage.part +103 -0
- package/WAProto/parts/Reaction.part +169 -0
- package/WAProto/parts/RecentEmojiWeight.part +100 -0
- package/WAProto/parts/RecordStructure.part +114 -0
- package/WAProto/parts/Reportable.part +138 -0
- package/WAProto/parts/ReportingTokenInfo.part +84 -0
- package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
- package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
- package/WAProto/parts/SenderKeyMessage.part +122 -0
- package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
- package/WAProto/parts/SenderKeyStateStructure.part +469 -0
- package/WAProto/parts/ServerErrorReceipt.part +81 -0
- package/WAProto/parts/SessionStructure.part +1087 -0
- package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
- package/WAProto/parts/SessionTransparencyType.part +5 -0
- package/WAProto/parts/SignalMessage.part +144 -0
- package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
- package/WAProto/parts/StatusAttribution.part +1235 -0
- package/WAProto/parts/StatusMentionMessage.part +83 -0
- package/WAProto/parts/StatusPSA.part +121 -0
- package/WAProto/parts/StickerMetadata.part +357 -0
- package/WAProto/parts/SyncActionData.part +146 -0
- package/WAProto/parts/SyncActionValue.part +12959 -0
- package/WAProto/parts/SyncdIndex.part +84 -0
- package/WAProto/parts/SyncdMutation.part +121 -0
- package/WAProto/parts/SyncdMutations.part +92 -0
- package/WAProto/parts/SyncdPatch.part +262 -0
- package/WAProto/parts/SyncdRecord.part +125 -0
- package/WAProto/parts/SyncdSnapshot.part +157 -0
- package/WAProto/parts/SyncdValue.part +84 -0
- package/WAProto/parts/SyncdVersion.part +91 -0
- package/WAProto/parts/TapLinkAction.part +100 -0
- package/WAProto/parts/TemplateButton.part +449 -0
- package/WAProto/parts/ThreadID.part +126 -0
- package/WAProto/parts/UrlTrackingMap.part +231 -0
- package/WAProto/parts/UserPassword.part +399 -0
- package/WAProto/parts/UserReceipt.part +221 -0
- package/WAProto/parts/VerifiedNameCertificate.part +318 -0
- package/WAProto/parts/WallpaperSettings.part +119 -0
- package/WAProto/parts/WebFeatures.part +1870 -0
- package/WAProto/parts/WebLinkRenderConfig.part +5 -0
- package/WAProto/parts/WebMessageInfo.part +2851 -0
- package/WAProto/parts/WebNotificationsInfo.part +160 -0
- package/package.json +1 -1
- package/src/socket/messages-recv.js +3 -1
- package/src/socket/messages-send.js +25 -10
- package/src/socket/socket-core.js +53 -57
- package/src/utils/wa-protocol-core.js +3 -9
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function MediaDomainInfo(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
|
+
MediaDomainInfo.prototype.mediaKeyDomain = null;
|
|
9
|
+
MediaDomainInfo.prototype.e2EeMediaKey = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(MediaDomainInfo.prototype, "_mediaKeyDomain", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["mediaKeyDomain"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(MediaDomainInfo.prototype, "_e2EeMediaKey", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["e2EeMediaKey"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
MediaDomainInfo.create = function create(properties) {
|
|
20
|
+
return new MediaDomainInfo(properties);
|
|
21
|
+
};
|
|
22
|
+
MediaDomainInfo.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.mediaKeyDomain != null && Object.hasOwnProperty.call(m, "mediaKeyDomain"))
|
|
26
|
+
w.uint32(8).int32(m.mediaKeyDomain);
|
|
27
|
+
if (m.e2EeMediaKey != null && Object.hasOwnProperty.call(m, "e2EeMediaKey"))
|
|
28
|
+
w.uint32(18).bytes(m.e2EeMediaKey);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
MediaDomainInfo.decode = function decode(r, l, e, n) {
|
|
32
|
+
if (!(r instanceof $Reader))
|
|
33
|
+
r = $Reader.create(r);
|
|
34
|
+
if (n === undefined)
|
|
35
|
+
n = 0;
|
|
36
|
+
if (n > $Reader.recursionLimit)
|
|
37
|
+
throw Error("maximum nesting depth exceeded");
|
|
38
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MediaDomainInfo();
|
|
39
|
+
while (r.pos < c) {
|
|
40
|
+
var t = r.uint32();
|
|
41
|
+
if (t === e)
|
|
42
|
+
break;
|
|
43
|
+
switch (t >>> 3) {
|
|
44
|
+
case 1: {
|
|
45
|
+
m.mediaKeyDomain = r.int32();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.e2EeMediaKey = r.bytes();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
MediaDomainInfo.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.MediaDomainInfo)
|
|
61
|
+
return d;
|
|
62
|
+
if (n === undefined)
|
|
63
|
+
n = 0;
|
|
64
|
+
if (n > $util.recursionLimit)
|
|
65
|
+
throw Error("maximum nesting depth exceeded");
|
|
66
|
+
var m = new $root.proto.MediaDomainInfo();
|
|
67
|
+
switch (d.mediaKeyDomain) {
|
|
68
|
+
default:
|
|
69
|
+
if (typeof d.mediaKeyDomain === "number") {
|
|
70
|
+
m.mediaKeyDomain = d.mediaKeyDomain;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case "MEDIA_KEY_DOMAIN_UNKNOWN":
|
|
75
|
+
case 0:
|
|
76
|
+
m.mediaKeyDomain = 0;
|
|
77
|
+
break;
|
|
78
|
+
case "MEDIA_KEY_DOMAIN_E2EE":
|
|
79
|
+
case 1:
|
|
80
|
+
m.mediaKeyDomain = 1;
|
|
81
|
+
break;
|
|
82
|
+
case "MEDIA_KEY_DOMAIN_NON_E2EE":
|
|
83
|
+
case 2:
|
|
84
|
+
m.mediaKeyDomain = 2;
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
if (d.e2EeMediaKey != null) {
|
|
88
|
+
if (typeof d.e2EeMediaKey === "string")
|
|
89
|
+
$util.base64.decode(d.e2EeMediaKey, m.e2EeMediaKey = $util.newBuffer($util.base64.length(d.e2EeMediaKey)), 0);
|
|
90
|
+
else if (d.e2EeMediaKey.length >= 0)
|
|
91
|
+
m.e2EeMediaKey = d.e2EeMediaKey;
|
|
92
|
+
}
|
|
93
|
+
return m;
|
|
94
|
+
};
|
|
95
|
+
MediaDomainInfo.toObject = function toObject(m, o) {
|
|
96
|
+
if (!o)
|
|
97
|
+
o = {};
|
|
98
|
+
var d = {};
|
|
99
|
+
if (m.mediaKeyDomain != null && m.hasOwnProperty("mediaKeyDomain")) {
|
|
100
|
+
d.mediaKeyDomain = o.enums === String ? $root.proto.MediaKeyDomain[m.mediaKeyDomain] === undefined ? m.mediaKeyDomain : $root.proto.MediaKeyDomain[m.mediaKeyDomain] : m.mediaKeyDomain;
|
|
101
|
+
if (o.oneofs)
|
|
102
|
+
d._mediaKeyDomain = "mediaKeyDomain";
|
|
103
|
+
}
|
|
104
|
+
if (m.e2EeMediaKey != null && m.hasOwnProperty("e2EeMediaKey")) {
|
|
105
|
+
d.e2EeMediaKey = o.bytes === String ? $util.base64.encode(m.e2EeMediaKey, 0, m.e2EeMediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.e2EeMediaKey) : m.e2EeMediaKey;
|
|
106
|
+
if (o.oneofs)
|
|
107
|
+
d._e2EeMediaKey = "e2EeMediaKey";
|
|
108
|
+
}
|
|
109
|
+
return d;
|
|
110
|
+
};
|
|
111
|
+
MediaDomainInfo.prototype.toJSON = function toJSON() {
|
|
112
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
113
|
+
};
|
|
114
|
+
MediaDomainInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
115
|
+
if (typeUrlPrefix === undefined) {
|
|
116
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
117
|
+
}
|
|
118
|
+
return typeUrlPrefix + "/proto.MediaDomainInfo";
|
|
119
|
+
};
|
|
120
|
+
return MediaDomainInfo;
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function MediaNotifyMessage(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
|
+
MediaNotifyMessage.prototype.expressPathUrl = null;
|
|
9
|
+
MediaNotifyMessage.prototype.fileEncSha256 = null;
|
|
10
|
+
MediaNotifyMessage.prototype.fileLength = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(MediaNotifyMessage.prototype, "_expressPathUrl", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["expressPathUrl"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(MediaNotifyMessage.prototype, "_fileEncSha256", {
|
|
17
|
+
get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
|
|
18
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(MediaNotifyMessage.prototype, "_fileLength", {
|
|
21
|
+
get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
|
|
22
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23
|
+
});
|
|
24
|
+
MediaNotifyMessage.create = function create(properties) {
|
|
25
|
+
return new MediaNotifyMessage(properties);
|
|
26
|
+
};
|
|
27
|
+
MediaNotifyMessage.encode = function encode(m, w) {
|
|
28
|
+
if (!w)
|
|
29
|
+
w = $Writer.create();
|
|
30
|
+
if (m.expressPathUrl != null && Object.hasOwnProperty.call(m, "expressPathUrl"))
|
|
31
|
+
w.uint32(10).string(m.expressPathUrl);
|
|
32
|
+
if (m.fileEncSha256 != null && Object.hasOwnProperty.call(m, "fileEncSha256"))
|
|
33
|
+
w.uint32(18).bytes(m.fileEncSha256);
|
|
34
|
+
if (m.fileLength != null && Object.hasOwnProperty.call(m, "fileLength"))
|
|
35
|
+
w.uint32(24).uint64(m.fileLength);
|
|
36
|
+
return w;
|
|
37
|
+
};
|
|
38
|
+
MediaNotifyMessage.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.MediaNotifyMessage();
|
|
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.expressPathUrl = r.string();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case 2: {
|
|
56
|
+
m.fileEncSha256 = r.bytes();
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 3: {
|
|
60
|
+
m.fileLength = r.uint64();
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
default:
|
|
64
|
+
r.skipType(t & 7, n);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return m;
|
|
69
|
+
};
|
|
70
|
+
MediaNotifyMessage.fromObject = function fromObject(d, n) {
|
|
71
|
+
if (d instanceof $root.proto.MediaNotifyMessage)
|
|
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.MediaNotifyMessage();
|
|
78
|
+
if (d.expressPathUrl != null) {
|
|
79
|
+
m.expressPathUrl = String(d.expressPathUrl);
|
|
80
|
+
}
|
|
81
|
+
if (d.fileEncSha256 != null) {
|
|
82
|
+
if (typeof d.fileEncSha256 === "string")
|
|
83
|
+
$util.base64.decode(d.fileEncSha256, m.fileEncSha256 = $util.newBuffer($util.base64.length(d.fileEncSha256)), 0);
|
|
84
|
+
else if (d.fileEncSha256.length >= 0)
|
|
85
|
+
m.fileEncSha256 = d.fileEncSha256;
|
|
86
|
+
}
|
|
87
|
+
if (d.fileLength != null) {
|
|
88
|
+
if ($util.Long)
|
|
89
|
+
(m.fileLength = $util.Long.fromValue(d.fileLength)).unsigned = true;
|
|
90
|
+
else if (typeof d.fileLength === "string")
|
|
91
|
+
m.fileLength = parseInt(d.fileLength, 10);
|
|
92
|
+
else if (typeof d.fileLength === "number")
|
|
93
|
+
m.fileLength = d.fileLength;
|
|
94
|
+
else if (typeof d.fileLength === "object")
|
|
95
|
+
m.fileLength = new $util.LongBits(d.fileLength.low >>> 0, d.fileLength.high >>> 0).toNumber(true);
|
|
96
|
+
}
|
|
97
|
+
return m;
|
|
98
|
+
};
|
|
99
|
+
MediaNotifyMessage.toObject = function toObject(m, o) {
|
|
100
|
+
if (!o)
|
|
101
|
+
o = {};
|
|
102
|
+
var d = {};
|
|
103
|
+
if (m.expressPathUrl != null && m.hasOwnProperty("expressPathUrl")) {
|
|
104
|
+
d.expressPathUrl = m.expressPathUrl;
|
|
105
|
+
if (o.oneofs)
|
|
106
|
+
d._expressPathUrl = "expressPathUrl";
|
|
107
|
+
}
|
|
108
|
+
if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) {
|
|
109
|
+
d.fileEncSha256 = o.bytes === String ? $util.base64.encode(m.fileEncSha256, 0, m.fileEncSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileEncSha256) : m.fileEncSha256;
|
|
110
|
+
if (o.oneofs)
|
|
111
|
+
d._fileEncSha256 = "fileEncSha256";
|
|
112
|
+
}
|
|
113
|
+
if (m.fileLength != null && m.hasOwnProperty("fileLength")) {
|
|
114
|
+
if (typeof m.fileLength === "number")
|
|
115
|
+
d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength;
|
|
116
|
+
else
|
|
117
|
+
d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength;
|
|
118
|
+
if (o.oneofs)
|
|
119
|
+
d._fileLength = "fileLength";
|
|
120
|
+
}
|
|
121
|
+
return d;
|
|
122
|
+
};
|
|
123
|
+
MediaNotifyMessage.prototype.toJSON = function toJSON() {
|
|
124
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
125
|
+
};
|
|
126
|
+
MediaNotifyMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
127
|
+
if (typeUrlPrefix === undefined) {
|
|
128
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
129
|
+
}
|
|
130
|
+
return typeUrlPrefix + "/proto.MediaNotifyMessage";
|
|
131
|
+
};
|
|
132
|
+
return MediaNotifyMessage;
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function MediaRetryNotification(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
|
+
MediaRetryNotification.prototype.stanzaId = null;
|
|
9
|
+
MediaRetryNotification.prototype.directPath = null;
|
|
10
|
+
MediaRetryNotification.prototype.result = null;
|
|
11
|
+
MediaRetryNotification.prototype.messageSecret = null;
|
|
12
|
+
let $oneOfFields;
|
|
13
|
+
Object.defineProperty(MediaRetryNotification.prototype, "_stanzaId", {
|
|
14
|
+
get: $util.oneOfGetter($oneOfFields = ["stanzaId"]),
|
|
15
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(MediaRetryNotification.prototype, "_directPath", {
|
|
18
|
+
get: $util.oneOfGetter($oneOfFields = ["directPath"]),
|
|
19
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(MediaRetryNotification.prototype, "_result", {
|
|
22
|
+
get: $util.oneOfGetter($oneOfFields = ["result"]),
|
|
23
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(MediaRetryNotification.prototype, "_messageSecret", {
|
|
26
|
+
get: $util.oneOfGetter($oneOfFields = ["messageSecret"]),
|
|
27
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28
|
+
});
|
|
29
|
+
MediaRetryNotification.create = function create(properties) {
|
|
30
|
+
return new MediaRetryNotification(properties);
|
|
31
|
+
};
|
|
32
|
+
MediaRetryNotification.encode = function encode(m, w) {
|
|
33
|
+
if (!w)
|
|
34
|
+
w = $Writer.create();
|
|
35
|
+
if (m.stanzaId != null && Object.hasOwnProperty.call(m, "stanzaId"))
|
|
36
|
+
w.uint32(10).string(m.stanzaId);
|
|
37
|
+
if (m.directPath != null && Object.hasOwnProperty.call(m, "directPath"))
|
|
38
|
+
w.uint32(18).string(m.directPath);
|
|
39
|
+
if (m.result != null && Object.hasOwnProperty.call(m, "result"))
|
|
40
|
+
w.uint32(24).int32(m.result);
|
|
41
|
+
if (m.messageSecret != null && Object.hasOwnProperty.call(m, "messageSecret"))
|
|
42
|
+
w.uint32(34).bytes(m.messageSecret);
|
|
43
|
+
return w;
|
|
44
|
+
};
|
|
45
|
+
MediaRetryNotification.decode = function decode(r, l, e, n) {
|
|
46
|
+
if (!(r instanceof $Reader))
|
|
47
|
+
r = $Reader.create(r);
|
|
48
|
+
if (n === undefined)
|
|
49
|
+
n = 0;
|
|
50
|
+
if (n > $Reader.recursionLimit)
|
|
51
|
+
throw Error("maximum nesting depth exceeded");
|
|
52
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MediaRetryNotification();
|
|
53
|
+
while (r.pos < c) {
|
|
54
|
+
var t = r.uint32();
|
|
55
|
+
if (t === e)
|
|
56
|
+
break;
|
|
57
|
+
switch (t >>> 3) {
|
|
58
|
+
case 1: {
|
|
59
|
+
m.stanzaId = r.string();
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 2: {
|
|
63
|
+
m.directPath = r.string();
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
case 3: {
|
|
67
|
+
m.result = r.int32();
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case 4: {
|
|
71
|
+
m.messageSecret = r.bytes();
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
default:
|
|
75
|
+
r.skipType(t & 7, n);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return m;
|
|
80
|
+
};
|
|
81
|
+
MediaRetryNotification.fromObject = function fromObject(d, n) {
|
|
82
|
+
if (d instanceof $root.proto.MediaRetryNotification)
|
|
83
|
+
return d;
|
|
84
|
+
if (n === undefined)
|
|
85
|
+
n = 0;
|
|
86
|
+
if (n > $util.recursionLimit)
|
|
87
|
+
throw Error("maximum nesting depth exceeded");
|
|
88
|
+
var m = new $root.proto.MediaRetryNotification();
|
|
89
|
+
if (d.stanzaId != null) {
|
|
90
|
+
m.stanzaId = String(d.stanzaId);
|
|
91
|
+
}
|
|
92
|
+
if (d.directPath != null) {
|
|
93
|
+
m.directPath = String(d.directPath);
|
|
94
|
+
}
|
|
95
|
+
switch (d.result) {
|
|
96
|
+
default:
|
|
97
|
+
if (typeof d.result === "number") {
|
|
98
|
+
m.result = d.result;
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
break;
|
|
102
|
+
case "GENERAL_ERROR":
|
|
103
|
+
case 0:
|
|
104
|
+
m.result = 0;
|
|
105
|
+
break;
|
|
106
|
+
case "SUCCESS":
|
|
107
|
+
case 1:
|
|
108
|
+
m.result = 1;
|
|
109
|
+
break;
|
|
110
|
+
case "NOT_FOUND":
|
|
111
|
+
case 2:
|
|
112
|
+
m.result = 2;
|
|
113
|
+
break;
|
|
114
|
+
case "DECRYPTION_ERROR":
|
|
115
|
+
case 3:
|
|
116
|
+
m.result = 3;
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
if (d.messageSecret != null) {
|
|
120
|
+
if (typeof d.messageSecret === "string")
|
|
121
|
+
$util.base64.decode(d.messageSecret, m.messageSecret = $util.newBuffer($util.base64.length(d.messageSecret)), 0);
|
|
122
|
+
else if (d.messageSecret.length >= 0)
|
|
123
|
+
m.messageSecret = d.messageSecret;
|
|
124
|
+
}
|
|
125
|
+
return m;
|
|
126
|
+
};
|
|
127
|
+
MediaRetryNotification.toObject = function toObject(m, o) {
|
|
128
|
+
if (!o)
|
|
129
|
+
o = {};
|
|
130
|
+
var d = {};
|
|
131
|
+
if (m.stanzaId != null && m.hasOwnProperty("stanzaId")) {
|
|
132
|
+
d.stanzaId = m.stanzaId;
|
|
133
|
+
if (o.oneofs)
|
|
134
|
+
d._stanzaId = "stanzaId";
|
|
135
|
+
}
|
|
136
|
+
if (m.directPath != null && m.hasOwnProperty("directPath")) {
|
|
137
|
+
d.directPath = m.directPath;
|
|
138
|
+
if (o.oneofs)
|
|
139
|
+
d._directPath = "directPath";
|
|
140
|
+
}
|
|
141
|
+
if (m.result != null && m.hasOwnProperty("result")) {
|
|
142
|
+
d.result = o.enums === String ? $root.proto.MediaRetryNotification.ResultType[m.result] === undefined ? m.result : $root.proto.MediaRetryNotification.ResultType[m.result] : m.result;
|
|
143
|
+
if (o.oneofs)
|
|
144
|
+
d._result = "result";
|
|
145
|
+
}
|
|
146
|
+
if (m.messageSecret != null && m.hasOwnProperty("messageSecret")) {
|
|
147
|
+
d.messageSecret = o.bytes === String ? $util.base64.encode(m.messageSecret, 0, m.messageSecret.length) : o.bytes === Array ? Array.prototype.slice.call(m.messageSecret) : m.messageSecret;
|
|
148
|
+
if (o.oneofs)
|
|
149
|
+
d._messageSecret = "messageSecret";
|
|
150
|
+
}
|
|
151
|
+
return d;
|
|
152
|
+
};
|
|
153
|
+
MediaRetryNotification.prototype.toJSON = function toJSON() {
|
|
154
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
155
|
+
};
|
|
156
|
+
MediaRetryNotification.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
157
|
+
if (typeUrlPrefix === undefined) {
|
|
158
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
159
|
+
}
|
|
160
|
+
return typeUrlPrefix + "/proto.MediaRetryNotification";
|
|
161
|
+
};
|
|
162
|
+
$lazy(MediaRetryNotification, "ResultType", function() {
|
|
163
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
164
|
+
values[valuesById[0] = "GENERAL_ERROR"] = 0;
|
|
165
|
+
values[valuesById[1] = "SUCCESS"] = 1;
|
|
166
|
+
values[valuesById[2] = "NOT_FOUND"] = 2;
|
|
167
|
+
values[valuesById[3] = "DECRYPTION_ERROR"] = 3;
|
|
168
|
+
return values;
|
|
169
|
+
});
|
|
170
|
+
return MediaRetryNotification;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function MemberLabel(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
|
+
MemberLabel.prototype.label = null;
|
|
9
|
+
MemberLabel.prototype.labelTimestamp = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(MemberLabel.prototype, "_label", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["label"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(MemberLabel.prototype, "_labelTimestamp", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["labelTimestamp"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
MemberLabel.create = function create(properties) {
|
|
20
|
+
return new MemberLabel(properties);
|
|
21
|
+
};
|
|
22
|
+
MemberLabel.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.label != null && Object.hasOwnProperty.call(m, "label"))
|
|
26
|
+
w.uint32(10).string(m.label);
|
|
27
|
+
if (m.labelTimestamp != null && Object.hasOwnProperty.call(m, "labelTimestamp"))
|
|
28
|
+
w.uint32(16).int64(m.labelTimestamp);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
MemberLabel.decode = function decode(r, l, e, n) {
|
|
32
|
+
if (!(r instanceof $Reader))
|
|
33
|
+
r = $Reader.create(r);
|
|
34
|
+
if (n === undefined)
|
|
35
|
+
n = 0;
|
|
36
|
+
if (n > $Reader.recursionLimit)
|
|
37
|
+
throw Error("maximum nesting depth exceeded");
|
|
38
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.MemberLabel();
|
|
39
|
+
while (r.pos < c) {
|
|
40
|
+
var t = r.uint32();
|
|
41
|
+
if (t === e)
|
|
42
|
+
break;
|
|
43
|
+
switch (t >>> 3) {
|
|
44
|
+
case 1: {
|
|
45
|
+
m.label = r.string();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.labelTimestamp = r.int64();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
MemberLabel.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.MemberLabel)
|
|
61
|
+
return d;
|
|
62
|
+
if (n === undefined)
|
|
63
|
+
n = 0;
|
|
64
|
+
if (n > $util.recursionLimit)
|
|
65
|
+
throw Error("maximum nesting depth exceeded");
|
|
66
|
+
var m = new $root.proto.MemberLabel();
|
|
67
|
+
if (d.label != null) {
|
|
68
|
+
m.label = String(d.label);
|
|
69
|
+
}
|
|
70
|
+
if (d.labelTimestamp != null) {
|
|
71
|
+
if ($util.Long)
|
|
72
|
+
(m.labelTimestamp = $util.Long.fromValue(d.labelTimestamp)).unsigned = false;
|
|
73
|
+
else if (typeof d.labelTimestamp === "string")
|
|
74
|
+
m.labelTimestamp = parseInt(d.labelTimestamp, 10);
|
|
75
|
+
else if (typeof d.labelTimestamp === "number")
|
|
76
|
+
m.labelTimestamp = d.labelTimestamp;
|
|
77
|
+
else if (typeof d.labelTimestamp === "object")
|
|
78
|
+
m.labelTimestamp = new $util.LongBits(d.labelTimestamp.low >>> 0, d.labelTimestamp.high >>> 0).toNumber();
|
|
79
|
+
}
|
|
80
|
+
return m;
|
|
81
|
+
};
|
|
82
|
+
MemberLabel.toObject = function toObject(m, o) {
|
|
83
|
+
if (!o)
|
|
84
|
+
o = {};
|
|
85
|
+
var d = {};
|
|
86
|
+
if (m.label != null && m.hasOwnProperty("label")) {
|
|
87
|
+
d.label = m.label;
|
|
88
|
+
if (o.oneofs)
|
|
89
|
+
d._label = "label";
|
|
90
|
+
}
|
|
91
|
+
if (m.labelTimestamp != null && m.hasOwnProperty("labelTimestamp")) {
|
|
92
|
+
if (typeof m.labelTimestamp === "number")
|
|
93
|
+
d.labelTimestamp = o.longs === String ? String(m.labelTimestamp) : m.labelTimestamp;
|
|
94
|
+
else
|
|
95
|
+
d.labelTimestamp = o.longs === String ? longToString(m.labelTimestamp) : o.longs === Number ? longToNumber(m.labelTimestamp) : m.labelTimestamp;
|
|
96
|
+
if (o.oneofs)
|
|
97
|
+
d._labelTimestamp = "labelTimestamp";
|
|
98
|
+
}
|
|
99
|
+
return d;
|
|
100
|
+
};
|
|
101
|
+
MemberLabel.prototype.toJSON = function toJSON() {
|
|
102
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
103
|
+
};
|
|
104
|
+
MemberLabel.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
105
|
+
if (typeUrlPrefix === undefined) {
|
|
106
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
107
|
+
}
|
|
108
|
+
return typeUrlPrefix + "/proto.MemberLabel";
|
|
109
|
+
};
|
|
110
|
+
return MemberLabel;
|