@hiroosy/baileys-lite 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WAProto/index.js +247 -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/binary/wa-binary.js +4 -2
- package/src/defaults.js +2 -1
- package/src/foundation/cache.js +99 -24
- package/src/foundation/memory.js +103 -0
- package/src/signal/libsignal.js +1 -8
- package/src/signal/signal-repository.js +6 -4
- package/src/socket/chats.js +2 -0
- package/src/socket/messages-recv.js +5 -3
- package/src/socket/messages-send.js +2 -2
- package/src/socket/socket-core.js +3 -0
- package/src/utils/auth-state-core.js +2 -1
- package/src/utils/chat-sync.js +4 -0
- package/src/utils/media.js +13 -8
- package/src/utils/message-processing.js +22 -6
- package/src/utils/wa-protocol-core.js +6 -5
- package/src/wam/wam-constants.js +22 -22851
- package/src/wam/wam-data.json +1 -0
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function PrimaryEphemeralIdentity(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
|
+
PrimaryEphemeralIdentity.prototype.publicKey = null;
|
|
9
|
+
PrimaryEphemeralIdentity.prototype.nonce = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(PrimaryEphemeralIdentity.prototype, "_publicKey", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["publicKey"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(PrimaryEphemeralIdentity.prototype, "_nonce", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["nonce"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
PrimaryEphemeralIdentity.create = function create(properties) {
|
|
20
|
+
return new PrimaryEphemeralIdentity(properties);
|
|
21
|
+
};
|
|
22
|
+
PrimaryEphemeralIdentity.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey"))
|
|
26
|
+
w.uint32(10).bytes(m.publicKey);
|
|
27
|
+
if (m.nonce != null && Object.hasOwnProperty.call(m, "nonce"))
|
|
28
|
+
w.uint32(18).bytes(m.nonce);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
PrimaryEphemeralIdentity.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.PrimaryEphemeralIdentity();
|
|
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.publicKey = r.bytes();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.nonce = r.bytes();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
PrimaryEphemeralIdentity.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.PrimaryEphemeralIdentity)
|
|
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.PrimaryEphemeralIdentity();
|
|
67
|
+
if (d.publicKey != null) {
|
|
68
|
+
if (typeof d.publicKey === "string")
|
|
69
|
+
$util.base64.decode(d.publicKey, m.publicKey = $util.newBuffer($util.base64.length(d.publicKey)), 0);
|
|
70
|
+
else if (d.publicKey.length >= 0)
|
|
71
|
+
m.publicKey = d.publicKey;
|
|
72
|
+
}
|
|
73
|
+
if (d.nonce != null) {
|
|
74
|
+
if (typeof d.nonce === "string")
|
|
75
|
+
$util.base64.decode(d.nonce, m.nonce = $util.newBuffer($util.base64.length(d.nonce)), 0);
|
|
76
|
+
else if (d.nonce.length >= 0)
|
|
77
|
+
m.nonce = d.nonce;
|
|
78
|
+
}
|
|
79
|
+
return m;
|
|
80
|
+
};
|
|
81
|
+
PrimaryEphemeralIdentity.toObject = function toObject(m, o) {
|
|
82
|
+
if (!o)
|
|
83
|
+
o = {};
|
|
84
|
+
var d = {};
|
|
85
|
+
if (m.publicKey != null && m.hasOwnProperty("publicKey")) {
|
|
86
|
+
d.publicKey = o.bytes === String ? $util.base64.encode(m.publicKey, 0, m.publicKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.publicKey) : m.publicKey;
|
|
87
|
+
if (o.oneofs)
|
|
88
|
+
d._publicKey = "publicKey";
|
|
89
|
+
}
|
|
90
|
+
if (m.nonce != null && m.hasOwnProperty("nonce")) {
|
|
91
|
+
d.nonce = o.bytes === String ? $util.base64.encode(m.nonce, 0, m.nonce.length) : o.bytes === Array ? Array.prototype.slice.call(m.nonce) : m.nonce;
|
|
92
|
+
if (o.oneofs)
|
|
93
|
+
d._nonce = "nonce";
|
|
94
|
+
}
|
|
95
|
+
return d;
|
|
96
|
+
};
|
|
97
|
+
PrimaryEphemeralIdentity.prototype.toJSON = function toJSON() {
|
|
98
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
99
|
+
};
|
|
100
|
+
PrimaryEphemeralIdentity.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
101
|
+
if (typeUrlPrefix === undefined) {
|
|
102
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
103
|
+
}
|
|
104
|
+
return typeUrlPrefix + "/proto.PrimaryEphemeralIdentity";
|
|
105
|
+
};
|
|
106
|
+
return PrimaryEphemeralIdentity;
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function ProcessedVideo(p) {
|
|
3
|
+
this.capabilities = [];
|
|
4
|
+
if (p)
|
|
5
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
6
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
7
|
+
this[ks[i]] = p[ks[i]];
|
|
8
|
+
}
|
|
9
|
+
ProcessedVideo.prototype.directPath = null;
|
|
10
|
+
ProcessedVideo.prototype.fileSha256 = null;
|
|
11
|
+
ProcessedVideo.prototype.height = null;
|
|
12
|
+
ProcessedVideo.prototype.width = null;
|
|
13
|
+
ProcessedVideo.prototype.fileLength = null;
|
|
14
|
+
ProcessedVideo.prototype.bitrate = null;
|
|
15
|
+
ProcessedVideo.prototype.quality = null;
|
|
16
|
+
ProcessedVideo.prototype.capabilities = $util.emptyArray;
|
|
17
|
+
let $oneOfFields;
|
|
18
|
+
Object.defineProperty(ProcessedVideo.prototype, "_directPath", {
|
|
19
|
+
get: $util.oneOfGetter($oneOfFields = ["directPath"]),
|
|
20
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(ProcessedVideo.prototype, "_fileSha256", {
|
|
23
|
+
get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
|
|
24
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(ProcessedVideo.prototype, "_height", {
|
|
27
|
+
get: $util.oneOfGetter($oneOfFields = ["height"]),
|
|
28
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(ProcessedVideo.prototype, "_width", {
|
|
31
|
+
get: $util.oneOfGetter($oneOfFields = ["width"]),
|
|
32
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(ProcessedVideo.prototype, "_fileLength", {
|
|
35
|
+
get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
|
|
36
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(ProcessedVideo.prototype, "_bitrate", {
|
|
39
|
+
get: $util.oneOfGetter($oneOfFields = ["bitrate"]),
|
|
40
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
41
|
+
});
|
|
42
|
+
Object.defineProperty(ProcessedVideo.prototype, "_quality", {
|
|
43
|
+
get: $util.oneOfGetter($oneOfFields = ["quality"]),
|
|
44
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
45
|
+
});
|
|
46
|
+
ProcessedVideo.create = function create(properties) {
|
|
47
|
+
return new ProcessedVideo(properties);
|
|
48
|
+
};
|
|
49
|
+
ProcessedVideo.encode = function encode(m, w) {
|
|
50
|
+
if (!w)
|
|
51
|
+
w = $Writer.create();
|
|
52
|
+
if (m.directPath != null && Object.hasOwnProperty.call(m, "directPath"))
|
|
53
|
+
w.uint32(10).string(m.directPath);
|
|
54
|
+
if (m.fileSha256 != null && Object.hasOwnProperty.call(m, "fileSha256"))
|
|
55
|
+
w.uint32(18).bytes(m.fileSha256);
|
|
56
|
+
if (m.height != null && Object.hasOwnProperty.call(m, "height"))
|
|
57
|
+
w.uint32(24).uint32(m.height);
|
|
58
|
+
if (m.width != null && Object.hasOwnProperty.call(m, "width"))
|
|
59
|
+
w.uint32(32).uint32(m.width);
|
|
60
|
+
if (m.fileLength != null && Object.hasOwnProperty.call(m, "fileLength"))
|
|
61
|
+
w.uint32(40).uint64(m.fileLength);
|
|
62
|
+
if (m.bitrate != null && Object.hasOwnProperty.call(m, "bitrate"))
|
|
63
|
+
w.uint32(48).uint32(m.bitrate);
|
|
64
|
+
if (m.quality != null && Object.hasOwnProperty.call(m, "quality"))
|
|
65
|
+
w.uint32(56).int32(m.quality);
|
|
66
|
+
if (m.capabilities != null && m.capabilities.length) {
|
|
67
|
+
for (var i = 0; i < m.capabilities.length; ++i)
|
|
68
|
+
w.uint32(66).string(m.capabilities[i]);
|
|
69
|
+
}
|
|
70
|
+
return w;
|
|
71
|
+
};
|
|
72
|
+
ProcessedVideo.decode = function decode(r, l, e, n) {
|
|
73
|
+
if (!(r instanceof $Reader))
|
|
74
|
+
r = $Reader.create(r);
|
|
75
|
+
if (n === undefined)
|
|
76
|
+
n = 0;
|
|
77
|
+
if (n > $Reader.recursionLimit)
|
|
78
|
+
throw Error("maximum nesting depth exceeded");
|
|
79
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.ProcessedVideo();
|
|
80
|
+
while (r.pos < c) {
|
|
81
|
+
var t = r.uint32();
|
|
82
|
+
if (t === e)
|
|
83
|
+
break;
|
|
84
|
+
switch (t >>> 3) {
|
|
85
|
+
case 1: {
|
|
86
|
+
m.directPath = r.string();
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
case 2: {
|
|
90
|
+
m.fileSha256 = r.bytes();
|
|
91
|
+
break;
|
|
92
|
+
}
|
|
93
|
+
case 3: {
|
|
94
|
+
m.height = r.uint32();
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
case 4: {
|
|
98
|
+
m.width = r.uint32();
|
|
99
|
+
break;
|
|
100
|
+
}
|
|
101
|
+
case 5: {
|
|
102
|
+
m.fileLength = r.uint64();
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
case 6: {
|
|
106
|
+
m.bitrate = r.uint32();
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
case 7: {
|
|
110
|
+
m.quality = r.int32();
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
case 8: {
|
|
114
|
+
if (!(m.capabilities && m.capabilities.length))
|
|
115
|
+
m.capabilities = [];
|
|
116
|
+
m.capabilities.push(r.string());
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
default:
|
|
120
|
+
r.skipType(t & 7, n);
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
return m;
|
|
125
|
+
};
|
|
126
|
+
ProcessedVideo.fromObject = function fromObject(d, n) {
|
|
127
|
+
if (d instanceof $root.proto.ProcessedVideo)
|
|
128
|
+
return d;
|
|
129
|
+
if (n === undefined)
|
|
130
|
+
n = 0;
|
|
131
|
+
if (n > $util.recursionLimit)
|
|
132
|
+
throw Error("maximum nesting depth exceeded");
|
|
133
|
+
var m = new $root.proto.ProcessedVideo();
|
|
134
|
+
if (d.directPath != null) {
|
|
135
|
+
m.directPath = String(d.directPath);
|
|
136
|
+
}
|
|
137
|
+
if (d.fileSha256 != null) {
|
|
138
|
+
if (typeof d.fileSha256 === "string")
|
|
139
|
+
$util.base64.decode(d.fileSha256, m.fileSha256 = $util.newBuffer($util.base64.length(d.fileSha256)), 0);
|
|
140
|
+
else if (d.fileSha256.length >= 0)
|
|
141
|
+
m.fileSha256 = d.fileSha256;
|
|
142
|
+
}
|
|
143
|
+
if (d.height != null) {
|
|
144
|
+
m.height = d.height >>> 0;
|
|
145
|
+
}
|
|
146
|
+
if (d.width != null) {
|
|
147
|
+
m.width = d.width >>> 0;
|
|
148
|
+
}
|
|
149
|
+
if (d.fileLength != null) {
|
|
150
|
+
if ($util.Long)
|
|
151
|
+
(m.fileLength = $util.Long.fromValue(d.fileLength)).unsigned = true;
|
|
152
|
+
else if (typeof d.fileLength === "string")
|
|
153
|
+
m.fileLength = parseInt(d.fileLength, 10);
|
|
154
|
+
else if (typeof d.fileLength === "number")
|
|
155
|
+
m.fileLength = d.fileLength;
|
|
156
|
+
else if (typeof d.fileLength === "object")
|
|
157
|
+
m.fileLength = new $util.LongBits(d.fileLength.low >>> 0, d.fileLength.high >>> 0).toNumber(true);
|
|
158
|
+
}
|
|
159
|
+
if (d.bitrate != null) {
|
|
160
|
+
m.bitrate = d.bitrate >>> 0;
|
|
161
|
+
}
|
|
162
|
+
switch (d.quality) {
|
|
163
|
+
default:
|
|
164
|
+
if (typeof d.quality === "number") {
|
|
165
|
+
m.quality = d.quality;
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
break;
|
|
169
|
+
case "UNDEFINED":
|
|
170
|
+
case 0:
|
|
171
|
+
m.quality = 0;
|
|
172
|
+
break;
|
|
173
|
+
case "LOW":
|
|
174
|
+
case 1:
|
|
175
|
+
m.quality = 1;
|
|
176
|
+
break;
|
|
177
|
+
case "MID":
|
|
178
|
+
case 2:
|
|
179
|
+
m.quality = 2;
|
|
180
|
+
break;
|
|
181
|
+
case "HIGH":
|
|
182
|
+
case 3:
|
|
183
|
+
m.quality = 3;
|
|
184
|
+
break;
|
|
185
|
+
}
|
|
186
|
+
if (d.capabilities) {
|
|
187
|
+
if (!Array.isArray(d.capabilities))
|
|
188
|
+
throw TypeError(".proto.ProcessedVideo.capabilities: array expected");
|
|
189
|
+
m.capabilities = [];
|
|
190
|
+
for (var i = 0; i < d.capabilities.length; ++i) {
|
|
191
|
+
m.capabilities[i] = String(d.capabilities[i]);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
return m;
|
|
195
|
+
};
|
|
196
|
+
ProcessedVideo.toObject = function toObject(m, o) {
|
|
197
|
+
if (!o)
|
|
198
|
+
o = {};
|
|
199
|
+
var d = {};
|
|
200
|
+
if (o.arrays || o.defaults) {
|
|
201
|
+
d.capabilities = [];
|
|
202
|
+
}
|
|
203
|
+
if (m.directPath != null && m.hasOwnProperty("directPath")) {
|
|
204
|
+
d.directPath = m.directPath;
|
|
205
|
+
if (o.oneofs)
|
|
206
|
+
d._directPath = "directPath";
|
|
207
|
+
}
|
|
208
|
+
if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) {
|
|
209
|
+
d.fileSha256 = o.bytes === String ? $util.base64.encode(m.fileSha256, 0, m.fileSha256.length) : o.bytes === Array ? Array.prototype.slice.call(m.fileSha256) : m.fileSha256;
|
|
210
|
+
if (o.oneofs)
|
|
211
|
+
d._fileSha256 = "fileSha256";
|
|
212
|
+
}
|
|
213
|
+
if (m.height != null && m.hasOwnProperty("height")) {
|
|
214
|
+
d.height = m.height;
|
|
215
|
+
if (o.oneofs)
|
|
216
|
+
d._height = "height";
|
|
217
|
+
}
|
|
218
|
+
if (m.width != null && m.hasOwnProperty("width")) {
|
|
219
|
+
d.width = m.width;
|
|
220
|
+
if (o.oneofs)
|
|
221
|
+
d._width = "width";
|
|
222
|
+
}
|
|
223
|
+
if (m.fileLength != null && m.hasOwnProperty("fileLength")) {
|
|
224
|
+
if (typeof m.fileLength === "number")
|
|
225
|
+
d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength;
|
|
226
|
+
else
|
|
227
|
+
d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength;
|
|
228
|
+
if (o.oneofs)
|
|
229
|
+
d._fileLength = "fileLength";
|
|
230
|
+
}
|
|
231
|
+
if (m.bitrate != null && m.hasOwnProperty("bitrate")) {
|
|
232
|
+
d.bitrate = m.bitrate;
|
|
233
|
+
if (o.oneofs)
|
|
234
|
+
d._bitrate = "bitrate";
|
|
235
|
+
}
|
|
236
|
+
if (m.quality != null && m.hasOwnProperty("quality")) {
|
|
237
|
+
d.quality = o.enums === String ? $root.proto.ProcessedVideo.VideoQuality[m.quality] === undefined ? m.quality : $root.proto.ProcessedVideo.VideoQuality[m.quality] : m.quality;
|
|
238
|
+
if (o.oneofs)
|
|
239
|
+
d._quality = "quality";
|
|
240
|
+
}
|
|
241
|
+
if (m.capabilities && m.capabilities.length) {
|
|
242
|
+
d.capabilities = [];
|
|
243
|
+
for (var j = 0; j < m.capabilities.length; ++j) {
|
|
244
|
+
d.capabilities[j] = m.capabilities[j];
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
return d;
|
|
248
|
+
};
|
|
249
|
+
ProcessedVideo.prototype.toJSON = function toJSON() {
|
|
250
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
251
|
+
};
|
|
252
|
+
ProcessedVideo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
253
|
+
if (typeUrlPrefix === undefined) {
|
|
254
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
255
|
+
}
|
|
256
|
+
return typeUrlPrefix + "/proto.ProcessedVideo";
|
|
257
|
+
};
|
|
258
|
+
$lazy(ProcessedVideo, "VideoQuality", function() {
|
|
259
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
260
|
+
values[valuesById[0] = "UNDEFINED"] = 0;
|
|
261
|
+
values[valuesById[1] = "LOW"] = 1;
|
|
262
|
+
values[valuesById[2] = "MID"] = 2;
|
|
263
|
+
values[valuesById[3] = "HIGH"] = 3;
|
|
264
|
+
return values;
|
|
265
|
+
});
|
|
266
|
+
return ProcessedVideo;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function ProloguePayload(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
|
+
ProloguePayload.prototype.companionEphemeralIdentity = null;
|
|
9
|
+
ProloguePayload.prototype.commitment = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(ProloguePayload.prototype, "_companionEphemeralIdentity", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["companionEphemeralIdentity"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(ProloguePayload.prototype, "_commitment", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["commitment"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
ProloguePayload.create = function create(properties) {
|
|
20
|
+
return new ProloguePayload(properties);
|
|
21
|
+
};
|
|
22
|
+
ProloguePayload.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.companionEphemeralIdentity != null && Object.hasOwnProperty.call(m, "companionEphemeralIdentity"))
|
|
26
|
+
w.uint32(10).bytes(m.companionEphemeralIdentity);
|
|
27
|
+
if (m.commitment != null && Object.hasOwnProperty.call(m, "commitment"))
|
|
28
|
+
$root.proto.CompanionCommitment.encode(m.commitment, w.uint32(18).fork()).ldelim();
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
ProloguePayload.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.ProloguePayload();
|
|
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.companionEphemeralIdentity = r.bytes();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.commitment = $root.proto.CompanionCommitment.decode(r, r.uint32(), undefined, n + 1);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
ProloguePayload.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.ProloguePayload)
|
|
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.ProloguePayload();
|
|
67
|
+
if (d.companionEphemeralIdentity != null) {
|
|
68
|
+
if (typeof d.companionEphemeralIdentity === "string")
|
|
69
|
+
$util.base64.decode(d.companionEphemeralIdentity, m.companionEphemeralIdentity = $util.newBuffer($util.base64.length(d.companionEphemeralIdentity)), 0);
|
|
70
|
+
else if (d.companionEphemeralIdentity.length >= 0)
|
|
71
|
+
m.companionEphemeralIdentity = d.companionEphemeralIdentity;
|
|
72
|
+
}
|
|
73
|
+
if (d.commitment != null) {
|
|
74
|
+
if (typeof d.commitment !== "object")
|
|
75
|
+
throw TypeError(".proto.ProloguePayload.commitment: object expected");
|
|
76
|
+
m.commitment = $root.proto.CompanionCommitment.fromObject(d.commitment, n + 1);
|
|
77
|
+
}
|
|
78
|
+
return m;
|
|
79
|
+
};
|
|
80
|
+
ProloguePayload.toObject = function toObject(m, o) {
|
|
81
|
+
if (!o)
|
|
82
|
+
o = {};
|
|
83
|
+
var d = {};
|
|
84
|
+
if (m.companionEphemeralIdentity != null && m.hasOwnProperty("companionEphemeralIdentity")) {
|
|
85
|
+
d.companionEphemeralIdentity = o.bytes === String ? $util.base64.encode(m.companionEphemeralIdentity, 0, m.companionEphemeralIdentity.length) : o.bytes === Array ? Array.prototype.slice.call(m.companionEphemeralIdentity) : m.companionEphemeralIdentity;
|
|
86
|
+
if (o.oneofs)
|
|
87
|
+
d._companionEphemeralIdentity = "companionEphemeralIdentity";
|
|
88
|
+
}
|
|
89
|
+
if (m.commitment != null && m.hasOwnProperty("commitment")) {
|
|
90
|
+
d.commitment = $root.proto.CompanionCommitment.toObject(m.commitment, o);
|
|
91
|
+
if (o.oneofs)
|
|
92
|
+
d._commitment = "commitment";
|
|
93
|
+
}
|
|
94
|
+
return d;
|
|
95
|
+
};
|
|
96
|
+
ProloguePayload.prototype.toJSON = function toJSON() {
|
|
97
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
98
|
+
};
|
|
99
|
+
ProloguePayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
100
|
+
if (typeUrlPrefix === undefined) {
|
|
101
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
102
|
+
}
|
|
103
|
+
return typeUrlPrefix + "/proto.ProloguePayload";
|
|
104
|
+
};
|
|
105
|
+
return ProloguePayload;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function Pushname(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
|
+
Pushname.prototype.id = null;
|
|
9
|
+
Pushname.prototype.pushname = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(Pushname.prototype, "_id", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["id"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(Pushname.prototype, "_pushname", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["pushname"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
Pushname.create = function create(properties) {
|
|
20
|
+
return new Pushname(properties);
|
|
21
|
+
};
|
|
22
|
+
Pushname.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.id != null && Object.hasOwnProperty.call(m, "id"))
|
|
26
|
+
w.uint32(10).string(m.id);
|
|
27
|
+
if (m.pushname != null && Object.hasOwnProperty.call(m, "pushname"))
|
|
28
|
+
w.uint32(18).string(m.pushname);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
Pushname.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.Pushname();
|
|
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.id = r.string();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.pushname = r.string();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
Pushname.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.Pushname)
|
|
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.Pushname();
|
|
67
|
+
if (d.id != null) {
|
|
68
|
+
m.id = String(d.id);
|
|
69
|
+
}
|
|
70
|
+
if (d.pushname != null) {
|
|
71
|
+
m.pushname = String(d.pushname);
|
|
72
|
+
}
|
|
73
|
+
return m;
|
|
74
|
+
};
|
|
75
|
+
Pushname.toObject = function toObject(m, o) {
|
|
76
|
+
if (!o)
|
|
77
|
+
o = {};
|
|
78
|
+
var d = {};
|
|
79
|
+
if (m.id != null && m.hasOwnProperty("id")) {
|
|
80
|
+
d.id = m.id;
|
|
81
|
+
if (o.oneofs)
|
|
82
|
+
d._id = "id";
|
|
83
|
+
}
|
|
84
|
+
if (m.pushname != null && m.hasOwnProperty("pushname")) {
|
|
85
|
+
d.pushname = m.pushname;
|
|
86
|
+
if (o.oneofs)
|
|
87
|
+
d._pushname = "pushname";
|
|
88
|
+
}
|
|
89
|
+
return d;
|
|
90
|
+
};
|
|
91
|
+
Pushname.prototype.toJSON = function toJSON() {
|
|
92
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
93
|
+
};
|
|
94
|
+
Pushname.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
95
|
+
if (typeUrlPrefix === undefined) {
|
|
96
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
97
|
+
}
|
|
98
|
+
return typeUrlPrefix + "/proto.Pushname";
|
|
99
|
+
};
|
|
100
|
+
return Pushname;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function QuarantinedMessage(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
|
+
QuarantinedMessage.prototype.originalData = null;
|
|
9
|
+
QuarantinedMessage.prototype.extractedText = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(QuarantinedMessage.prototype, "_originalData", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["originalData"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(QuarantinedMessage.prototype, "_extractedText", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["extractedText"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
QuarantinedMessage.create = function create(properties) {
|
|
20
|
+
return new QuarantinedMessage(properties);
|
|
21
|
+
};
|
|
22
|
+
QuarantinedMessage.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.originalData != null && Object.hasOwnProperty.call(m, "originalData"))
|
|
26
|
+
w.uint32(10).bytes(m.originalData);
|
|
27
|
+
if (m.extractedText != null && Object.hasOwnProperty.call(m, "extractedText"))
|
|
28
|
+
w.uint32(18).string(m.extractedText);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
QuarantinedMessage.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.QuarantinedMessage();
|
|
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.originalData = r.bytes();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.extractedText = r.string();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
QuarantinedMessage.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.QuarantinedMessage)
|
|
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.QuarantinedMessage();
|
|
67
|
+
if (d.originalData != null) {
|
|
68
|
+
if (typeof d.originalData === "string")
|
|
69
|
+
$util.base64.decode(d.originalData, m.originalData = $util.newBuffer($util.base64.length(d.originalData)), 0);
|
|
70
|
+
else if (d.originalData.length >= 0)
|
|
71
|
+
m.originalData = d.originalData;
|
|
72
|
+
}
|
|
73
|
+
if (d.extractedText != null) {
|
|
74
|
+
m.extractedText = String(d.extractedText);
|
|
75
|
+
}
|
|
76
|
+
return m;
|
|
77
|
+
};
|
|
78
|
+
QuarantinedMessage.toObject = function toObject(m, o) {
|
|
79
|
+
if (!o)
|
|
80
|
+
o = {};
|
|
81
|
+
var d = {};
|
|
82
|
+
if (m.originalData != null && m.hasOwnProperty("originalData")) {
|
|
83
|
+
d.originalData = o.bytes === String ? $util.base64.encode(m.originalData, 0, m.originalData.length) : o.bytes === Array ? Array.prototype.slice.call(m.originalData) : m.originalData;
|
|
84
|
+
if (o.oneofs)
|
|
85
|
+
d._originalData = "originalData";
|
|
86
|
+
}
|
|
87
|
+
if (m.extractedText != null && m.hasOwnProperty("extractedText")) {
|
|
88
|
+
d.extractedText = m.extractedText;
|
|
89
|
+
if (o.oneofs)
|
|
90
|
+
d._extractedText = "extractedText";
|
|
91
|
+
}
|
|
92
|
+
return d;
|
|
93
|
+
};
|
|
94
|
+
QuarantinedMessage.prototype.toJSON = function toJSON() {
|
|
95
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
96
|
+
};
|
|
97
|
+
QuarantinedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
98
|
+
if (typeUrlPrefix === undefined) {
|
|
99
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
100
|
+
}
|
|
101
|
+
return typeUrlPrefix + "/proto.QuarantinedMessage";
|
|
102
|
+
};
|
|
103
|
+
return QuarantinedMessage;
|