@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,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function StatusMentionMessage(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
|
+
StatusMentionMessage.prototype.quotedStatus = null;
|
|
9
|
+
let $oneOfFields;
|
|
10
|
+
Object.defineProperty(StatusMentionMessage.prototype, "_quotedStatus", {
|
|
11
|
+
get: $util.oneOfGetter($oneOfFields = ["quotedStatus"]),
|
|
12
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
13
|
+
});
|
|
14
|
+
StatusMentionMessage.create = function create(properties) {
|
|
15
|
+
return new StatusMentionMessage(properties);
|
|
16
|
+
};
|
|
17
|
+
StatusMentionMessage.encode = function encode(m, w) {
|
|
18
|
+
if (!w)
|
|
19
|
+
w = $Writer.create();
|
|
20
|
+
if (m.quotedStatus != null && Object.hasOwnProperty.call(m, "quotedStatus"))
|
|
21
|
+
$root.proto.Message.encode(m.quotedStatus, w.uint32(10).fork()).ldelim();
|
|
22
|
+
return w;
|
|
23
|
+
};
|
|
24
|
+
StatusMentionMessage.decode = function decode(r, l, e, n) {
|
|
25
|
+
if (!(r instanceof $Reader))
|
|
26
|
+
r = $Reader.create(r);
|
|
27
|
+
if (n === undefined)
|
|
28
|
+
n = 0;
|
|
29
|
+
if (n > $Reader.recursionLimit)
|
|
30
|
+
throw Error("maximum nesting depth exceeded");
|
|
31
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusMentionMessage();
|
|
32
|
+
while (r.pos < c) {
|
|
33
|
+
var t = r.uint32();
|
|
34
|
+
if (t === e)
|
|
35
|
+
break;
|
|
36
|
+
switch (t >>> 3) {
|
|
37
|
+
case 1: {
|
|
38
|
+
m.quotedStatus = $root.proto.Message.decode(r, r.uint32(), undefined, n + 1);
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
r.skipType(t & 7, n);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return m;
|
|
47
|
+
};
|
|
48
|
+
StatusMentionMessage.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.StatusMentionMessage)
|
|
50
|
+
return d;
|
|
51
|
+
if (n === undefined)
|
|
52
|
+
n = 0;
|
|
53
|
+
if (n > $util.recursionLimit)
|
|
54
|
+
throw Error("maximum nesting depth exceeded");
|
|
55
|
+
var m = new $root.proto.StatusMentionMessage();
|
|
56
|
+
if (d.quotedStatus != null) {
|
|
57
|
+
if (typeof d.quotedStatus !== "object")
|
|
58
|
+
throw TypeError(".proto.StatusMentionMessage.quotedStatus: object expected");
|
|
59
|
+
m.quotedStatus = $root.proto.Message.fromObject(d.quotedStatus, n + 1);
|
|
60
|
+
}
|
|
61
|
+
return m;
|
|
62
|
+
};
|
|
63
|
+
StatusMentionMessage.toObject = function toObject(m, o) {
|
|
64
|
+
if (!o)
|
|
65
|
+
o = {};
|
|
66
|
+
var d = {};
|
|
67
|
+
if (m.quotedStatus != null && m.hasOwnProperty("quotedStatus")) {
|
|
68
|
+
d.quotedStatus = $root.proto.Message.toObject(m.quotedStatus, o);
|
|
69
|
+
if (o.oneofs)
|
|
70
|
+
d._quotedStatus = "quotedStatus";
|
|
71
|
+
}
|
|
72
|
+
return d;
|
|
73
|
+
};
|
|
74
|
+
StatusMentionMessage.prototype.toJSON = function toJSON() {
|
|
75
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
76
|
+
};
|
|
77
|
+
StatusMentionMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
78
|
+
if (typeUrlPrefix === undefined) {
|
|
79
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
80
|
+
}
|
|
81
|
+
return typeUrlPrefix + "/proto.StatusMentionMessage";
|
|
82
|
+
};
|
|
83
|
+
return StatusMentionMessage;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function StatusPSA(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
|
+
StatusPSA.prototype.campaignId = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
9
|
+
StatusPSA.prototype.campaignExpirationTimestamp = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(StatusPSA.prototype, "_campaignExpirationTimestamp", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["campaignExpirationTimestamp"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
StatusPSA.create = function create(properties) {
|
|
16
|
+
return new StatusPSA(properties);
|
|
17
|
+
};
|
|
18
|
+
StatusPSA.encode = function encode(m, w) {
|
|
19
|
+
if (!w)
|
|
20
|
+
w = $Writer.create();
|
|
21
|
+
if (m.campaignId != null && Object.hasOwnProperty.call(m, "campaignId"))
|
|
22
|
+
w.uint32(352).uint64(m.campaignId);
|
|
23
|
+
if (m.campaignExpirationTimestamp != null && Object.hasOwnProperty.call(m, "campaignExpirationTimestamp"))
|
|
24
|
+
w.uint32(360).uint64(m.campaignExpirationTimestamp);
|
|
25
|
+
return w;
|
|
26
|
+
};
|
|
27
|
+
StatusPSA.decode = function decode(r, l, e, n) {
|
|
28
|
+
if (!(r instanceof $Reader))
|
|
29
|
+
r = $Reader.create(r);
|
|
30
|
+
if (n === undefined)
|
|
31
|
+
n = 0;
|
|
32
|
+
if (n > $Reader.recursionLimit)
|
|
33
|
+
throw Error("maximum nesting depth exceeded");
|
|
34
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StatusPSA();
|
|
35
|
+
while (r.pos < c) {
|
|
36
|
+
var t = r.uint32();
|
|
37
|
+
if (t === e)
|
|
38
|
+
break;
|
|
39
|
+
switch (t >>> 3) {
|
|
40
|
+
case 44: {
|
|
41
|
+
m.campaignId = r.uint64();
|
|
42
|
+
break;
|
|
43
|
+
}
|
|
44
|
+
case 45: {
|
|
45
|
+
m.campaignExpirationTimestamp = r.uint64();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
default:
|
|
49
|
+
r.skipType(t & 7, n);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return m;
|
|
54
|
+
};
|
|
55
|
+
StatusPSA.fromObject = function fromObject(d, n) {
|
|
56
|
+
if (d instanceof $root.proto.StatusPSA)
|
|
57
|
+
return d;
|
|
58
|
+
if (n === undefined)
|
|
59
|
+
n = 0;
|
|
60
|
+
if (n > $util.recursionLimit)
|
|
61
|
+
throw Error("maximum nesting depth exceeded");
|
|
62
|
+
var m = new $root.proto.StatusPSA();
|
|
63
|
+
if (d.campaignId != null) {
|
|
64
|
+
if ($util.Long)
|
|
65
|
+
(m.campaignId = $util.Long.fromValue(d.campaignId)).unsigned = true;
|
|
66
|
+
else if (typeof d.campaignId === "string")
|
|
67
|
+
m.campaignId = parseInt(d.campaignId, 10);
|
|
68
|
+
else if (typeof d.campaignId === "number")
|
|
69
|
+
m.campaignId = d.campaignId;
|
|
70
|
+
else if (typeof d.campaignId === "object")
|
|
71
|
+
m.campaignId = new $util.LongBits(d.campaignId.low >>> 0, d.campaignId.high >>> 0).toNumber(true);
|
|
72
|
+
}
|
|
73
|
+
if (d.campaignExpirationTimestamp != null) {
|
|
74
|
+
if ($util.Long)
|
|
75
|
+
(m.campaignExpirationTimestamp = $util.Long.fromValue(d.campaignExpirationTimestamp)).unsigned = true;
|
|
76
|
+
else if (typeof d.campaignExpirationTimestamp === "string")
|
|
77
|
+
m.campaignExpirationTimestamp = parseInt(d.campaignExpirationTimestamp, 10);
|
|
78
|
+
else if (typeof d.campaignExpirationTimestamp === "number")
|
|
79
|
+
m.campaignExpirationTimestamp = d.campaignExpirationTimestamp;
|
|
80
|
+
else if (typeof d.campaignExpirationTimestamp === "object")
|
|
81
|
+
m.campaignExpirationTimestamp = new $util.LongBits(d.campaignExpirationTimestamp.low >>> 0, d.campaignExpirationTimestamp.high >>> 0).toNumber(true);
|
|
82
|
+
}
|
|
83
|
+
return m;
|
|
84
|
+
};
|
|
85
|
+
StatusPSA.toObject = function toObject(m, o) {
|
|
86
|
+
if (!o)
|
|
87
|
+
o = {};
|
|
88
|
+
var d = {};
|
|
89
|
+
if (o.defaults) {
|
|
90
|
+
if ($util.Long) {
|
|
91
|
+
var n = new $util.Long(0, 0, true);
|
|
92
|
+
d.campaignId = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
|
|
93
|
+
} else
|
|
94
|
+
d.campaignId = o.longs === String ? "0" : 0;
|
|
95
|
+
}
|
|
96
|
+
if (m.campaignId != null && m.hasOwnProperty("campaignId")) {
|
|
97
|
+
if (typeof m.campaignId === "number")
|
|
98
|
+
d.campaignId = o.longs === String ? String(m.campaignId) : m.campaignId;
|
|
99
|
+
else
|
|
100
|
+
d.campaignId = o.longs === String ? longToString(m.campaignId, true) : o.longs === Number ? longToNumber(m.campaignId, true) : m.campaignId;
|
|
101
|
+
}
|
|
102
|
+
if (m.campaignExpirationTimestamp != null && m.hasOwnProperty("campaignExpirationTimestamp")) {
|
|
103
|
+
if (typeof m.campaignExpirationTimestamp === "number")
|
|
104
|
+
d.campaignExpirationTimestamp = o.longs === String ? String(m.campaignExpirationTimestamp) : m.campaignExpirationTimestamp;
|
|
105
|
+
else
|
|
106
|
+
d.campaignExpirationTimestamp = o.longs === String ? longToString(m.campaignExpirationTimestamp, true) : o.longs === Number ? longToNumber(m.campaignExpirationTimestamp, true) : m.campaignExpirationTimestamp;
|
|
107
|
+
if (o.oneofs)
|
|
108
|
+
d._campaignExpirationTimestamp = "campaignExpirationTimestamp";
|
|
109
|
+
}
|
|
110
|
+
return d;
|
|
111
|
+
};
|
|
112
|
+
StatusPSA.prototype.toJSON = function toJSON() {
|
|
113
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
114
|
+
};
|
|
115
|
+
StatusPSA.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
116
|
+
if (typeUrlPrefix === undefined) {
|
|
117
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
118
|
+
}
|
|
119
|
+
return typeUrlPrefix + "/proto.StatusPSA";
|
|
120
|
+
};
|
|
121
|
+
return StatusPSA;
|
|
@@ -0,0 +1,357 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function StickerMetadata(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
|
+
StickerMetadata.prototype.url = null;
|
|
9
|
+
StickerMetadata.prototype.fileSha256 = null;
|
|
10
|
+
StickerMetadata.prototype.fileEncSha256 = null;
|
|
11
|
+
StickerMetadata.prototype.mediaKey = null;
|
|
12
|
+
StickerMetadata.prototype.mimetype = null;
|
|
13
|
+
StickerMetadata.prototype.height = null;
|
|
14
|
+
StickerMetadata.prototype.width = null;
|
|
15
|
+
StickerMetadata.prototype.directPath = null;
|
|
16
|
+
StickerMetadata.prototype.fileLength = null;
|
|
17
|
+
StickerMetadata.prototype.weight = null;
|
|
18
|
+
StickerMetadata.prototype.lastStickerSentTs = null;
|
|
19
|
+
StickerMetadata.prototype.isLottie = null;
|
|
20
|
+
StickerMetadata.prototype.imageHash = null;
|
|
21
|
+
StickerMetadata.prototype.isAvatarSticker = null;
|
|
22
|
+
let $oneOfFields;
|
|
23
|
+
Object.defineProperty(StickerMetadata.prototype, "_url", {
|
|
24
|
+
get: $util.oneOfGetter($oneOfFields = ["url"]),
|
|
25
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(StickerMetadata.prototype, "_fileSha256", {
|
|
28
|
+
get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
|
|
29
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(StickerMetadata.prototype, "_fileEncSha256", {
|
|
32
|
+
get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
|
|
33
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(StickerMetadata.prototype, "_mediaKey", {
|
|
36
|
+
get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
|
|
37
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(StickerMetadata.prototype, "_mimetype", {
|
|
40
|
+
get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
|
|
41
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(StickerMetadata.prototype, "_height", {
|
|
44
|
+
get: $util.oneOfGetter($oneOfFields = ["height"]),
|
|
45
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(StickerMetadata.prototype, "_width", {
|
|
48
|
+
get: $util.oneOfGetter($oneOfFields = ["width"]),
|
|
49
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
50
|
+
});
|
|
51
|
+
Object.defineProperty(StickerMetadata.prototype, "_directPath", {
|
|
52
|
+
get: $util.oneOfGetter($oneOfFields = ["directPath"]),
|
|
53
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
54
|
+
});
|
|
55
|
+
Object.defineProperty(StickerMetadata.prototype, "_fileLength", {
|
|
56
|
+
get: $util.oneOfGetter($oneOfFields = ["fileLength"]),
|
|
57
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
58
|
+
});
|
|
59
|
+
Object.defineProperty(StickerMetadata.prototype, "_weight", {
|
|
60
|
+
get: $util.oneOfGetter($oneOfFields = ["weight"]),
|
|
61
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
62
|
+
});
|
|
63
|
+
Object.defineProperty(StickerMetadata.prototype, "_lastStickerSentTs", {
|
|
64
|
+
get: $util.oneOfGetter($oneOfFields = ["lastStickerSentTs"]),
|
|
65
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
66
|
+
});
|
|
67
|
+
Object.defineProperty(StickerMetadata.prototype, "_isLottie", {
|
|
68
|
+
get: $util.oneOfGetter($oneOfFields = ["isLottie"]),
|
|
69
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
70
|
+
});
|
|
71
|
+
Object.defineProperty(StickerMetadata.prototype, "_imageHash", {
|
|
72
|
+
get: $util.oneOfGetter($oneOfFields = ["imageHash"]),
|
|
73
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
74
|
+
});
|
|
75
|
+
Object.defineProperty(StickerMetadata.prototype, "_isAvatarSticker", {
|
|
76
|
+
get: $util.oneOfGetter($oneOfFields = ["isAvatarSticker"]),
|
|
77
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
78
|
+
});
|
|
79
|
+
StickerMetadata.create = function create(properties) {
|
|
80
|
+
return new StickerMetadata(properties);
|
|
81
|
+
};
|
|
82
|
+
StickerMetadata.encode = function encode(m, w) {
|
|
83
|
+
if (!w)
|
|
84
|
+
w = $Writer.create();
|
|
85
|
+
if (m.url != null && Object.hasOwnProperty.call(m, "url"))
|
|
86
|
+
w.uint32(10).string(m.url);
|
|
87
|
+
if (m.fileSha256 != null && Object.hasOwnProperty.call(m, "fileSha256"))
|
|
88
|
+
w.uint32(18).bytes(m.fileSha256);
|
|
89
|
+
if (m.fileEncSha256 != null && Object.hasOwnProperty.call(m, "fileEncSha256"))
|
|
90
|
+
w.uint32(26).bytes(m.fileEncSha256);
|
|
91
|
+
if (m.mediaKey != null && Object.hasOwnProperty.call(m, "mediaKey"))
|
|
92
|
+
w.uint32(34).bytes(m.mediaKey);
|
|
93
|
+
if (m.mimetype != null && Object.hasOwnProperty.call(m, "mimetype"))
|
|
94
|
+
w.uint32(42).string(m.mimetype);
|
|
95
|
+
if (m.height != null && Object.hasOwnProperty.call(m, "height"))
|
|
96
|
+
w.uint32(48).uint32(m.height);
|
|
97
|
+
if (m.width != null && Object.hasOwnProperty.call(m, "width"))
|
|
98
|
+
w.uint32(56).uint32(m.width);
|
|
99
|
+
if (m.directPath != null && Object.hasOwnProperty.call(m, "directPath"))
|
|
100
|
+
w.uint32(66).string(m.directPath);
|
|
101
|
+
if (m.fileLength != null && Object.hasOwnProperty.call(m, "fileLength"))
|
|
102
|
+
w.uint32(72).uint64(m.fileLength);
|
|
103
|
+
if (m.weight != null && Object.hasOwnProperty.call(m, "weight"))
|
|
104
|
+
w.uint32(85).float(m.weight);
|
|
105
|
+
if (m.lastStickerSentTs != null && Object.hasOwnProperty.call(m, "lastStickerSentTs"))
|
|
106
|
+
w.uint32(88).int64(m.lastStickerSentTs);
|
|
107
|
+
if (m.isLottie != null && Object.hasOwnProperty.call(m, "isLottie"))
|
|
108
|
+
w.uint32(96).bool(m.isLottie);
|
|
109
|
+
if (m.imageHash != null && Object.hasOwnProperty.call(m, "imageHash"))
|
|
110
|
+
w.uint32(106).string(m.imageHash);
|
|
111
|
+
if (m.isAvatarSticker != null && Object.hasOwnProperty.call(m, "isAvatarSticker"))
|
|
112
|
+
w.uint32(112).bool(m.isAvatarSticker);
|
|
113
|
+
return w;
|
|
114
|
+
};
|
|
115
|
+
StickerMetadata.decode = function decode(r, l, e, n) {
|
|
116
|
+
if (!(r instanceof $Reader))
|
|
117
|
+
r = $Reader.create(r);
|
|
118
|
+
if (n === undefined)
|
|
119
|
+
n = 0;
|
|
120
|
+
if (n > $Reader.recursionLimit)
|
|
121
|
+
throw Error("maximum nesting depth exceeded");
|
|
122
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.StickerMetadata();
|
|
123
|
+
while (r.pos < c) {
|
|
124
|
+
var t = r.uint32();
|
|
125
|
+
if (t === e)
|
|
126
|
+
break;
|
|
127
|
+
switch (t >>> 3) {
|
|
128
|
+
case 1: {
|
|
129
|
+
m.url = r.string();
|
|
130
|
+
break;
|
|
131
|
+
}
|
|
132
|
+
case 2: {
|
|
133
|
+
m.fileSha256 = r.bytes();
|
|
134
|
+
break;
|
|
135
|
+
}
|
|
136
|
+
case 3: {
|
|
137
|
+
m.fileEncSha256 = r.bytes();
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
case 4: {
|
|
141
|
+
m.mediaKey = r.bytes();
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
case 5: {
|
|
145
|
+
m.mimetype = r.string();
|
|
146
|
+
break;
|
|
147
|
+
}
|
|
148
|
+
case 6: {
|
|
149
|
+
m.height = r.uint32();
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
case 7: {
|
|
153
|
+
m.width = r.uint32();
|
|
154
|
+
break;
|
|
155
|
+
}
|
|
156
|
+
case 8: {
|
|
157
|
+
m.directPath = r.string();
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
case 9: {
|
|
161
|
+
m.fileLength = r.uint64();
|
|
162
|
+
break;
|
|
163
|
+
}
|
|
164
|
+
case 10: {
|
|
165
|
+
m.weight = r.float();
|
|
166
|
+
break;
|
|
167
|
+
}
|
|
168
|
+
case 11: {
|
|
169
|
+
m.lastStickerSentTs = r.int64();
|
|
170
|
+
break;
|
|
171
|
+
}
|
|
172
|
+
case 12: {
|
|
173
|
+
m.isLottie = r.bool();
|
|
174
|
+
break;
|
|
175
|
+
}
|
|
176
|
+
case 13: {
|
|
177
|
+
m.imageHash = r.string();
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
case 14: {
|
|
181
|
+
m.isAvatarSticker = r.bool();
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
default:
|
|
185
|
+
r.skipType(t & 7, n);
|
|
186
|
+
break;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return m;
|
|
190
|
+
};
|
|
191
|
+
StickerMetadata.fromObject = function fromObject(d, n) {
|
|
192
|
+
if (d instanceof $root.proto.StickerMetadata)
|
|
193
|
+
return d;
|
|
194
|
+
if (n === undefined)
|
|
195
|
+
n = 0;
|
|
196
|
+
if (n > $util.recursionLimit)
|
|
197
|
+
throw Error("maximum nesting depth exceeded");
|
|
198
|
+
var m = new $root.proto.StickerMetadata();
|
|
199
|
+
if (d.url != null) {
|
|
200
|
+
m.url = String(d.url);
|
|
201
|
+
}
|
|
202
|
+
if (d.fileSha256 != null) {
|
|
203
|
+
if (typeof d.fileSha256 === "string")
|
|
204
|
+
$util.base64.decode(d.fileSha256, m.fileSha256 = $util.newBuffer($util.base64.length(d.fileSha256)), 0);
|
|
205
|
+
else if (d.fileSha256.length >= 0)
|
|
206
|
+
m.fileSha256 = d.fileSha256;
|
|
207
|
+
}
|
|
208
|
+
if (d.fileEncSha256 != null) {
|
|
209
|
+
if (typeof d.fileEncSha256 === "string")
|
|
210
|
+
$util.base64.decode(d.fileEncSha256, m.fileEncSha256 = $util.newBuffer($util.base64.length(d.fileEncSha256)), 0);
|
|
211
|
+
else if (d.fileEncSha256.length >= 0)
|
|
212
|
+
m.fileEncSha256 = d.fileEncSha256;
|
|
213
|
+
}
|
|
214
|
+
if (d.mediaKey != null) {
|
|
215
|
+
if (typeof d.mediaKey === "string")
|
|
216
|
+
$util.base64.decode(d.mediaKey, m.mediaKey = $util.newBuffer($util.base64.length(d.mediaKey)), 0);
|
|
217
|
+
else if (d.mediaKey.length >= 0)
|
|
218
|
+
m.mediaKey = d.mediaKey;
|
|
219
|
+
}
|
|
220
|
+
if (d.mimetype != null) {
|
|
221
|
+
m.mimetype = String(d.mimetype);
|
|
222
|
+
}
|
|
223
|
+
if (d.height != null) {
|
|
224
|
+
m.height = d.height >>> 0;
|
|
225
|
+
}
|
|
226
|
+
if (d.width != null) {
|
|
227
|
+
m.width = d.width >>> 0;
|
|
228
|
+
}
|
|
229
|
+
if (d.directPath != null) {
|
|
230
|
+
m.directPath = String(d.directPath);
|
|
231
|
+
}
|
|
232
|
+
if (d.fileLength != null) {
|
|
233
|
+
if ($util.Long)
|
|
234
|
+
(m.fileLength = $util.Long.fromValue(d.fileLength)).unsigned = true;
|
|
235
|
+
else if (typeof d.fileLength === "string")
|
|
236
|
+
m.fileLength = parseInt(d.fileLength, 10);
|
|
237
|
+
else if (typeof d.fileLength === "number")
|
|
238
|
+
m.fileLength = d.fileLength;
|
|
239
|
+
else if (typeof d.fileLength === "object")
|
|
240
|
+
m.fileLength = new $util.LongBits(d.fileLength.low >>> 0, d.fileLength.high >>> 0).toNumber(true);
|
|
241
|
+
}
|
|
242
|
+
if (d.weight != null) {
|
|
243
|
+
m.weight = Number(d.weight);
|
|
244
|
+
}
|
|
245
|
+
if (d.lastStickerSentTs != null) {
|
|
246
|
+
if ($util.Long)
|
|
247
|
+
(m.lastStickerSentTs = $util.Long.fromValue(d.lastStickerSentTs)).unsigned = false;
|
|
248
|
+
else if (typeof d.lastStickerSentTs === "string")
|
|
249
|
+
m.lastStickerSentTs = parseInt(d.lastStickerSentTs, 10);
|
|
250
|
+
else if (typeof d.lastStickerSentTs === "number")
|
|
251
|
+
m.lastStickerSentTs = d.lastStickerSentTs;
|
|
252
|
+
else if (typeof d.lastStickerSentTs === "object")
|
|
253
|
+
m.lastStickerSentTs = new $util.LongBits(d.lastStickerSentTs.low >>> 0, d.lastStickerSentTs.high >>> 0).toNumber();
|
|
254
|
+
}
|
|
255
|
+
if (d.isLottie != null) {
|
|
256
|
+
m.isLottie = Boolean(d.isLottie);
|
|
257
|
+
}
|
|
258
|
+
if (d.imageHash != null) {
|
|
259
|
+
m.imageHash = String(d.imageHash);
|
|
260
|
+
}
|
|
261
|
+
if (d.isAvatarSticker != null) {
|
|
262
|
+
m.isAvatarSticker = Boolean(d.isAvatarSticker);
|
|
263
|
+
}
|
|
264
|
+
return m;
|
|
265
|
+
};
|
|
266
|
+
StickerMetadata.toObject = function toObject(m, o) {
|
|
267
|
+
if (!o)
|
|
268
|
+
o = {};
|
|
269
|
+
var d = {};
|
|
270
|
+
if (m.url != null && m.hasOwnProperty("url")) {
|
|
271
|
+
d.url = m.url;
|
|
272
|
+
if (o.oneofs)
|
|
273
|
+
d._url = "url";
|
|
274
|
+
}
|
|
275
|
+
if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) {
|
|
276
|
+
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;
|
|
277
|
+
if (o.oneofs)
|
|
278
|
+
d._fileSha256 = "fileSha256";
|
|
279
|
+
}
|
|
280
|
+
if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) {
|
|
281
|
+
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;
|
|
282
|
+
if (o.oneofs)
|
|
283
|
+
d._fileEncSha256 = "fileEncSha256";
|
|
284
|
+
}
|
|
285
|
+
if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) {
|
|
286
|
+
d.mediaKey = o.bytes === String ? $util.base64.encode(m.mediaKey, 0, m.mediaKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.mediaKey) : m.mediaKey;
|
|
287
|
+
if (o.oneofs)
|
|
288
|
+
d._mediaKey = "mediaKey";
|
|
289
|
+
}
|
|
290
|
+
if (m.mimetype != null && m.hasOwnProperty("mimetype")) {
|
|
291
|
+
d.mimetype = m.mimetype;
|
|
292
|
+
if (o.oneofs)
|
|
293
|
+
d._mimetype = "mimetype";
|
|
294
|
+
}
|
|
295
|
+
if (m.height != null && m.hasOwnProperty("height")) {
|
|
296
|
+
d.height = m.height;
|
|
297
|
+
if (o.oneofs)
|
|
298
|
+
d._height = "height";
|
|
299
|
+
}
|
|
300
|
+
if (m.width != null && m.hasOwnProperty("width")) {
|
|
301
|
+
d.width = m.width;
|
|
302
|
+
if (o.oneofs)
|
|
303
|
+
d._width = "width";
|
|
304
|
+
}
|
|
305
|
+
if (m.directPath != null && m.hasOwnProperty("directPath")) {
|
|
306
|
+
d.directPath = m.directPath;
|
|
307
|
+
if (o.oneofs)
|
|
308
|
+
d._directPath = "directPath";
|
|
309
|
+
}
|
|
310
|
+
if (m.fileLength != null && m.hasOwnProperty("fileLength")) {
|
|
311
|
+
if (typeof m.fileLength === "number")
|
|
312
|
+
d.fileLength = o.longs === String ? String(m.fileLength) : m.fileLength;
|
|
313
|
+
else
|
|
314
|
+
d.fileLength = o.longs === String ? longToString(m.fileLength, true) : o.longs === Number ? longToNumber(m.fileLength, true) : m.fileLength;
|
|
315
|
+
if (o.oneofs)
|
|
316
|
+
d._fileLength = "fileLength";
|
|
317
|
+
}
|
|
318
|
+
if (m.weight != null && m.hasOwnProperty("weight")) {
|
|
319
|
+
d.weight = o.json && !isFinite(m.weight) ? String(m.weight) : m.weight;
|
|
320
|
+
if (o.oneofs)
|
|
321
|
+
d._weight = "weight";
|
|
322
|
+
}
|
|
323
|
+
if (m.lastStickerSentTs != null && m.hasOwnProperty("lastStickerSentTs")) {
|
|
324
|
+
if (typeof m.lastStickerSentTs === "number")
|
|
325
|
+
d.lastStickerSentTs = o.longs === String ? String(m.lastStickerSentTs) : m.lastStickerSentTs;
|
|
326
|
+
else
|
|
327
|
+
d.lastStickerSentTs = o.longs === String ? longToString(m.lastStickerSentTs) : o.longs === Number ? longToNumber(m.lastStickerSentTs) : m.lastStickerSentTs;
|
|
328
|
+
if (o.oneofs)
|
|
329
|
+
d._lastStickerSentTs = "lastStickerSentTs";
|
|
330
|
+
}
|
|
331
|
+
if (m.isLottie != null && m.hasOwnProperty("isLottie")) {
|
|
332
|
+
d.isLottie = m.isLottie;
|
|
333
|
+
if (o.oneofs)
|
|
334
|
+
d._isLottie = "isLottie";
|
|
335
|
+
}
|
|
336
|
+
if (m.imageHash != null && m.hasOwnProperty("imageHash")) {
|
|
337
|
+
d.imageHash = m.imageHash;
|
|
338
|
+
if (o.oneofs)
|
|
339
|
+
d._imageHash = "imageHash";
|
|
340
|
+
}
|
|
341
|
+
if (m.isAvatarSticker != null && m.hasOwnProperty("isAvatarSticker")) {
|
|
342
|
+
d.isAvatarSticker = m.isAvatarSticker;
|
|
343
|
+
if (o.oneofs)
|
|
344
|
+
d._isAvatarSticker = "isAvatarSticker";
|
|
345
|
+
}
|
|
346
|
+
return d;
|
|
347
|
+
};
|
|
348
|
+
StickerMetadata.prototype.toJSON = function toJSON() {
|
|
349
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
350
|
+
};
|
|
351
|
+
StickerMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
352
|
+
if (typeUrlPrefix === undefined) {
|
|
353
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
354
|
+
}
|
|
355
|
+
return typeUrlPrefix + "/proto.StickerMetadata";
|
|
356
|
+
};
|
|
357
|
+
return StickerMetadata;
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncActionData(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
|
+
SyncActionData.prototype.index = null;
|
|
9
|
+
SyncActionData.prototype.value = null;
|
|
10
|
+
SyncActionData.prototype.padding = null;
|
|
11
|
+
SyncActionData.prototype.version = null;
|
|
12
|
+
let $oneOfFields;
|
|
13
|
+
Object.defineProperty(SyncActionData.prototype, "_index", {
|
|
14
|
+
get: $util.oneOfGetter($oneOfFields = ["index"]),
|
|
15
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
16
|
+
});
|
|
17
|
+
Object.defineProperty(SyncActionData.prototype, "_value", {
|
|
18
|
+
get: $util.oneOfGetter($oneOfFields = ["value"]),
|
|
19
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(SyncActionData.prototype, "_padding", {
|
|
22
|
+
get: $util.oneOfGetter($oneOfFields = ["padding"]),
|
|
23
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
24
|
+
});
|
|
25
|
+
Object.defineProperty(SyncActionData.prototype, "_version", {
|
|
26
|
+
get: $util.oneOfGetter($oneOfFields = ["version"]),
|
|
27
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
28
|
+
});
|
|
29
|
+
SyncActionData.create = function create(properties) {
|
|
30
|
+
return new SyncActionData(properties);
|
|
31
|
+
};
|
|
32
|
+
SyncActionData.encode = function encode(m, w) {
|
|
33
|
+
if (!w)
|
|
34
|
+
w = $Writer.create();
|
|
35
|
+
if (m.index != null && Object.hasOwnProperty.call(m, "index"))
|
|
36
|
+
w.uint32(10).bytes(m.index);
|
|
37
|
+
if (m.value != null && Object.hasOwnProperty.call(m, "value"))
|
|
38
|
+
$root.proto.SyncActionValue.encode(m.value, w.uint32(18).fork()).ldelim();
|
|
39
|
+
if (m.padding != null && Object.hasOwnProperty.call(m, "padding"))
|
|
40
|
+
w.uint32(26).bytes(m.padding);
|
|
41
|
+
if (m.version != null && Object.hasOwnProperty.call(m, "version"))
|
|
42
|
+
w.uint32(32).int32(m.version);
|
|
43
|
+
return w;
|
|
44
|
+
};
|
|
45
|
+
SyncActionData.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.SyncActionData();
|
|
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.index = r.bytes();
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
case 2: {
|
|
63
|
+
m.value = $root.proto.SyncActionValue.decode(r, r.uint32(), undefined, n + 1);
|
|
64
|
+
break;
|
|
65
|
+
}
|
|
66
|
+
case 3: {
|
|
67
|
+
m.padding = r.bytes();
|
|
68
|
+
break;
|
|
69
|
+
}
|
|
70
|
+
case 4: {
|
|
71
|
+
m.version = r.int32();
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
default:
|
|
75
|
+
r.skipType(t & 7, n);
|
|
76
|
+
break;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return m;
|
|
80
|
+
};
|
|
81
|
+
SyncActionData.fromObject = function fromObject(d, n) {
|
|
82
|
+
if (d instanceof $root.proto.SyncActionData)
|
|
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.SyncActionData();
|
|
89
|
+
if (d.index != null) {
|
|
90
|
+
if (typeof d.index === "string")
|
|
91
|
+
$util.base64.decode(d.index, m.index = $util.newBuffer($util.base64.length(d.index)), 0);
|
|
92
|
+
else if (d.index.length >= 0)
|
|
93
|
+
m.index = d.index;
|
|
94
|
+
}
|
|
95
|
+
if (d.value != null) {
|
|
96
|
+
if (typeof d.value !== "object")
|
|
97
|
+
throw TypeError(".proto.SyncActionData.value: object expected");
|
|
98
|
+
m.value = $root.proto.SyncActionValue.fromObject(d.value, n + 1);
|
|
99
|
+
}
|
|
100
|
+
if (d.padding != null) {
|
|
101
|
+
if (typeof d.padding === "string")
|
|
102
|
+
$util.base64.decode(d.padding, m.padding = $util.newBuffer($util.base64.length(d.padding)), 0);
|
|
103
|
+
else if (d.padding.length >= 0)
|
|
104
|
+
m.padding = d.padding;
|
|
105
|
+
}
|
|
106
|
+
if (d.version != null) {
|
|
107
|
+
m.version = d.version | 0;
|
|
108
|
+
}
|
|
109
|
+
return m;
|
|
110
|
+
};
|
|
111
|
+
SyncActionData.toObject = function toObject(m, o) {
|
|
112
|
+
if (!o)
|
|
113
|
+
o = {};
|
|
114
|
+
var d = {};
|
|
115
|
+
if (m.index != null && m.hasOwnProperty("index")) {
|
|
116
|
+
d.index = o.bytes === String ? $util.base64.encode(m.index, 0, m.index.length) : o.bytes === Array ? Array.prototype.slice.call(m.index) : m.index;
|
|
117
|
+
if (o.oneofs)
|
|
118
|
+
d._index = "index";
|
|
119
|
+
}
|
|
120
|
+
if (m.value != null && m.hasOwnProperty("value")) {
|
|
121
|
+
d.value = $root.proto.SyncActionValue.toObject(m.value, o);
|
|
122
|
+
if (o.oneofs)
|
|
123
|
+
d._value = "value";
|
|
124
|
+
}
|
|
125
|
+
if (m.padding != null && m.hasOwnProperty("padding")) {
|
|
126
|
+
d.padding = o.bytes === String ? $util.base64.encode(m.padding, 0, m.padding.length) : o.bytes === Array ? Array.prototype.slice.call(m.padding) : m.padding;
|
|
127
|
+
if (o.oneofs)
|
|
128
|
+
d._padding = "padding";
|
|
129
|
+
}
|
|
130
|
+
if (m.version != null && m.hasOwnProperty("version")) {
|
|
131
|
+
d.version = m.version;
|
|
132
|
+
if (o.oneofs)
|
|
133
|
+
d._version = "version";
|
|
134
|
+
}
|
|
135
|
+
return d;
|
|
136
|
+
};
|
|
137
|
+
SyncActionData.prototype.toJSON = function toJSON() {
|
|
138
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
139
|
+
};
|
|
140
|
+
SyncActionData.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
141
|
+
if (typeUrlPrefix === undefined) {
|
|
142
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
143
|
+
}
|
|
144
|
+
return typeUrlPrefix + "/proto.SyncActionData";
|
|
145
|
+
};
|
|
146
|
+
return SyncActionData;
|