@hiroosy/baileys-lite 0.3.4 → 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 +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
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function PollEncValue(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
|
+
PollEncValue.prototype.encPayload = null;
|
|
9
|
+
PollEncValue.prototype.encIv = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(PollEncValue.prototype, "_encPayload", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["encPayload"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(PollEncValue.prototype, "_encIv", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["encIv"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
PollEncValue.create = function create(properties) {
|
|
20
|
+
return new PollEncValue(properties);
|
|
21
|
+
};
|
|
22
|
+
PollEncValue.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.encPayload != null && Object.hasOwnProperty.call(m, "encPayload"))
|
|
26
|
+
w.uint32(10).bytes(m.encPayload);
|
|
27
|
+
if (m.encIv != null && Object.hasOwnProperty.call(m, "encIv"))
|
|
28
|
+
w.uint32(18).bytes(m.encIv);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
PollEncValue.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.PollEncValue();
|
|
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.encPayload = r.bytes();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.encIv = r.bytes();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
PollEncValue.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.PollEncValue)
|
|
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.PollEncValue();
|
|
67
|
+
if (d.encPayload != null) {
|
|
68
|
+
if (typeof d.encPayload === "string")
|
|
69
|
+
$util.base64.decode(d.encPayload, m.encPayload = $util.newBuffer($util.base64.length(d.encPayload)), 0);
|
|
70
|
+
else if (d.encPayload.length >= 0)
|
|
71
|
+
m.encPayload = d.encPayload;
|
|
72
|
+
}
|
|
73
|
+
if (d.encIv != null) {
|
|
74
|
+
if (typeof d.encIv === "string")
|
|
75
|
+
$util.base64.decode(d.encIv, m.encIv = $util.newBuffer($util.base64.length(d.encIv)), 0);
|
|
76
|
+
else if (d.encIv.length >= 0)
|
|
77
|
+
m.encIv = d.encIv;
|
|
78
|
+
}
|
|
79
|
+
return m;
|
|
80
|
+
};
|
|
81
|
+
PollEncValue.toObject = function toObject(m, o) {
|
|
82
|
+
if (!o)
|
|
83
|
+
o = {};
|
|
84
|
+
var d = {};
|
|
85
|
+
if (m.encPayload != null && m.hasOwnProperty("encPayload")) {
|
|
86
|
+
d.encPayload = o.bytes === String ? $util.base64.encode(m.encPayload, 0, m.encPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encPayload) : m.encPayload;
|
|
87
|
+
if (o.oneofs)
|
|
88
|
+
d._encPayload = "encPayload";
|
|
89
|
+
}
|
|
90
|
+
if (m.encIv != null && m.hasOwnProperty("encIv")) {
|
|
91
|
+
d.encIv = o.bytes === String ? $util.base64.encode(m.encIv, 0, m.encIv.length) : o.bytes === Array ? Array.prototype.slice.call(m.encIv) : m.encIv;
|
|
92
|
+
if (o.oneofs)
|
|
93
|
+
d._encIv = "encIv";
|
|
94
|
+
}
|
|
95
|
+
return d;
|
|
96
|
+
};
|
|
97
|
+
PollEncValue.prototype.toJSON = function toJSON() {
|
|
98
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
99
|
+
};
|
|
100
|
+
PollEncValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
101
|
+
if (typeUrlPrefix === undefined) {
|
|
102
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
103
|
+
}
|
|
104
|
+
return typeUrlPrefix + "/proto.PollEncValue";
|
|
105
|
+
};
|
|
106
|
+
return PollEncValue;
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function PollUpdate(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
|
+
PollUpdate.prototype.pollUpdateMessageKey = null;
|
|
9
|
+
PollUpdate.prototype.vote = null;
|
|
10
|
+
PollUpdate.prototype.senderTimestampMs = null;
|
|
11
|
+
PollUpdate.prototype.serverTimestampMs = null;
|
|
12
|
+
PollUpdate.prototype.unread = null;
|
|
13
|
+
PollUpdate.prototype.metadata = null;
|
|
14
|
+
let $oneOfFields;
|
|
15
|
+
Object.defineProperty(PollUpdate.prototype, "_pollUpdateMessageKey", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["pollUpdateMessageKey"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(PollUpdate.prototype, "_vote", {
|
|
20
|
+
get: $util.oneOfGetter($oneOfFields = ["vote"]),
|
|
21
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(PollUpdate.prototype, "_senderTimestampMs", {
|
|
24
|
+
get: $util.oneOfGetter($oneOfFields = ["senderTimestampMs"]),
|
|
25
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(PollUpdate.prototype, "_serverTimestampMs", {
|
|
28
|
+
get: $util.oneOfGetter($oneOfFields = ["serverTimestampMs"]),
|
|
29
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(PollUpdate.prototype, "_unread", {
|
|
32
|
+
get: $util.oneOfGetter($oneOfFields = ["unread"]),
|
|
33
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(PollUpdate.prototype, "_metadata", {
|
|
36
|
+
get: $util.oneOfGetter($oneOfFields = ["metadata"]),
|
|
37
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
38
|
+
});
|
|
39
|
+
PollUpdate.create = function create(properties) {
|
|
40
|
+
return new PollUpdate(properties);
|
|
41
|
+
};
|
|
42
|
+
PollUpdate.encode = function encode(m, w) {
|
|
43
|
+
if (!w)
|
|
44
|
+
w = $Writer.create();
|
|
45
|
+
if (m.pollUpdateMessageKey != null && Object.hasOwnProperty.call(m, "pollUpdateMessageKey"))
|
|
46
|
+
$root.proto.MessageKey.encode(m.pollUpdateMessageKey, w.uint32(10).fork()).ldelim();
|
|
47
|
+
if (m.vote != null && Object.hasOwnProperty.call(m, "vote"))
|
|
48
|
+
$root.proto.Message.PollVoteMessage.encode(m.vote, w.uint32(18).fork()).ldelim();
|
|
49
|
+
if (m.senderTimestampMs != null && Object.hasOwnProperty.call(m, "senderTimestampMs"))
|
|
50
|
+
w.uint32(24).int64(m.senderTimestampMs);
|
|
51
|
+
if (m.serverTimestampMs != null && Object.hasOwnProperty.call(m, "serverTimestampMs"))
|
|
52
|
+
w.uint32(32).int64(m.serverTimestampMs);
|
|
53
|
+
if (m.unread != null && Object.hasOwnProperty.call(m, "unread"))
|
|
54
|
+
w.uint32(40).bool(m.unread);
|
|
55
|
+
if (m.metadata != null && Object.hasOwnProperty.call(m, "metadata"))
|
|
56
|
+
$root.proto.Message.PollUpdateMessageMetadata.encode(m.metadata, w.uint32(50).fork()).ldelim();
|
|
57
|
+
return w;
|
|
58
|
+
};
|
|
59
|
+
PollUpdate.decode = function decode(r, l, e, n) {
|
|
60
|
+
if (!(r instanceof $Reader))
|
|
61
|
+
r = $Reader.create(r);
|
|
62
|
+
if (n === undefined)
|
|
63
|
+
n = 0;
|
|
64
|
+
if (n > $Reader.recursionLimit)
|
|
65
|
+
throw Error("maximum nesting depth exceeded");
|
|
66
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.PollUpdate();
|
|
67
|
+
while (r.pos < c) {
|
|
68
|
+
var t = r.uint32();
|
|
69
|
+
if (t === e)
|
|
70
|
+
break;
|
|
71
|
+
switch (t >>> 3) {
|
|
72
|
+
case 1: {
|
|
73
|
+
m.pollUpdateMessageKey = $root.proto.MessageKey.decode(r, r.uint32(), undefined, n + 1);
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
case 2: {
|
|
77
|
+
m.vote = $root.proto.Message.PollVoteMessage.decode(r, r.uint32(), undefined, n + 1);
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
case 3: {
|
|
81
|
+
m.senderTimestampMs = r.int64();
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case 4: {
|
|
85
|
+
m.serverTimestampMs = r.int64();
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
case 5: {
|
|
89
|
+
m.unread = r.bool();
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case 6: {
|
|
93
|
+
m.metadata = $root.proto.Message.PollUpdateMessageMetadata.decode(r, r.uint32(), undefined, n + 1);
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
default:
|
|
97
|
+
r.skipType(t & 7, n);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return m;
|
|
102
|
+
};
|
|
103
|
+
PollUpdate.fromObject = function fromObject(d, n) {
|
|
104
|
+
if (d instanceof $root.proto.PollUpdate)
|
|
105
|
+
return d;
|
|
106
|
+
if (n === undefined)
|
|
107
|
+
n = 0;
|
|
108
|
+
if (n > $util.recursionLimit)
|
|
109
|
+
throw Error("maximum nesting depth exceeded");
|
|
110
|
+
var m = new $root.proto.PollUpdate();
|
|
111
|
+
if (d.pollUpdateMessageKey != null) {
|
|
112
|
+
if (typeof d.pollUpdateMessageKey !== "object")
|
|
113
|
+
throw TypeError(".proto.PollUpdate.pollUpdateMessageKey: object expected");
|
|
114
|
+
m.pollUpdateMessageKey = $root.proto.MessageKey.fromObject(d.pollUpdateMessageKey, n + 1);
|
|
115
|
+
}
|
|
116
|
+
if (d.vote != null) {
|
|
117
|
+
if (typeof d.vote !== "object")
|
|
118
|
+
throw TypeError(".proto.PollUpdate.vote: object expected");
|
|
119
|
+
m.vote = $root.proto.Message.PollVoteMessage.fromObject(d.vote, n + 1);
|
|
120
|
+
}
|
|
121
|
+
if (d.senderTimestampMs != null) {
|
|
122
|
+
if ($util.Long)
|
|
123
|
+
(m.senderTimestampMs = $util.Long.fromValue(d.senderTimestampMs)).unsigned = false;
|
|
124
|
+
else if (typeof d.senderTimestampMs === "string")
|
|
125
|
+
m.senderTimestampMs = parseInt(d.senderTimestampMs, 10);
|
|
126
|
+
else if (typeof d.senderTimestampMs === "number")
|
|
127
|
+
m.senderTimestampMs = d.senderTimestampMs;
|
|
128
|
+
else if (typeof d.senderTimestampMs === "object")
|
|
129
|
+
m.senderTimestampMs = new $util.LongBits(d.senderTimestampMs.low >>> 0, d.senderTimestampMs.high >>> 0).toNumber();
|
|
130
|
+
}
|
|
131
|
+
if (d.serverTimestampMs != null) {
|
|
132
|
+
if ($util.Long)
|
|
133
|
+
(m.serverTimestampMs = $util.Long.fromValue(d.serverTimestampMs)).unsigned = false;
|
|
134
|
+
else if (typeof d.serverTimestampMs === "string")
|
|
135
|
+
m.serverTimestampMs = parseInt(d.serverTimestampMs, 10);
|
|
136
|
+
else if (typeof d.serverTimestampMs === "number")
|
|
137
|
+
m.serverTimestampMs = d.serverTimestampMs;
|
|
138
|
+
else if (typeof d.serverTimestampMs === "object")
|
|
139
|
+
m.serverTimestampMs = new $util.LongBits(d.serverTimestampMs.low >>> 0, d.serverTimestampMs.high >>> 0).toNumber();
|
|
140
|
+
}
|
|
141
|
+
if (d.unread != null) {
|
|
142
|
+
m.unread = Boolean(d.unread);
|
|
143
|
+
}
|
|
144
|
+
if (d.metadata != null) {
|
|
145
|
+
if (typeof d.metadata !== "object")
|
|
146
|
+
throw TypeError(".proto.PollUpdate.metadata: object expected");
|
|
147
|
+
m.metadata = $root.proto.Message.PollUpdateMessageMetadata.fromObject(d.metadata, n + 1);
|
|
148
|
+
}
|
|
149
|
+
return m;
|
|
150
|
+
};
|
|
151
|
+
PollUpdate.toObject = function toObject(m, o) {
|
|
152
|
+
if (!o)
|
|
153
|
+
o = {};
|
|
154
|
+
var d = {};
|
|
155
|
+
if (m.pollUpdateMessageKey != null && m.hasOwnProperty("pollUpdateMessageKey")) {
|
|
156
|
+
d.pollUpdateMessageKey = $root.proto.MessageKey.toObject(m.pollUpdateMessageKey, o);
|
|
157
|
+
if (o.oneofs)
|
|
158
|
+
d._pollUpdateMessageKey = "pollUpdateMessageKey";
|
|
159
|
+
}
|
|
160
|
+
if (m.vote != null && m.hasOwnProperty("vote")) {
|
|
161
|
+
d.vote = $root.proto.Message.PollVoteMessage.toObject(m.vote, o);
|
|
162
|
+
if (o.oneofs)
|
|
163
|
+
d._vote = "vote";
|
|
164
|
+
}
|
|
165
|
+
if (m.senderTimestampMs != null && m.hasOwnProperty("senderTimestampMs")) {
|
|
166
|
+
if (typeof m.senderTimestampMs === "number")
|
|
167
|
+
d.senderTimestampMs = o.longs === String ? String(m.senderTimestampMs) : m.senderTimestampMs;
|
|
168
|
+
else
|
|
169
|
+
d.senderTimestampMs = o.longs === String ? longToString(m.senderTimestampMs) : o.longs === Number ? longToNumber(m.senderTimestampMs) : m.senderTimestampMs;
|
|
170
|
+
if (o.oneofs)
|
|
171
|
+
d._senderTimestampMs = "senderTimestampMs";
|
|
172
|
+
}
|
|
173
|
+
if (m.serverTimestampMs != null && m.hasOwnProperty("serverTimestampMs")) {
|
|
174
|
+
if (typeof m.serverTimestampMs === "number")
|
|
175
|
+
d.serverTimestampMs = o.longs === String ? String(m.serverTimestampMs) : m.serverTimestampMs;
|
|
176
|
+
else
|
|
177
|
+
d.serverTimestampMs = o.longs === String ? longToString(m.serverTimestampMs) : o.longs === Number ? longToNumber(m.serverTimestampMs) : m.serverTimestampMs;
|
|
178
|
+
if (o.oneofs)
|
|
179
|
+
d._serverTimestampMs = "serverTimestampMs";
|
|
180
|
+
}
|
|
181
|
+
if (m.unread != null && m.hasOwnProperty("unread")) {
|
|
182
|
+
d.unread = m.unread;
|
|
183
|
+
if (o.oneofs)
|
|
184
|
+
d._unread = "unread";
|
|
185
|
+
}
|
|
186
|
+
if (m.metadata != null && m.hasOwnProperty("metadata")) {
|
|
187
|
+
d.metadata = $root.proto.Message.PollUpdateMessageMetadata.toObject(m.metadata, o);
|
|
188
|
+
if (o.oneofs)
|
|
189
|
+
d._metadata = "metadata";
|
|
190
|
+
}
|
|
191
|
+
return d;
|
|
192
|
+
};
|
|
193
|
+
PollUpdate.prototype.toJSON = function toJSON() {
|
|
194
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
195
|
+
};
|
|
196
|
+
PollUpdate.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
197
|
+
if (typeUrlPrefix === undefined) {
|
|
198
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
199
|
+
}
|
|
200
|
+
return typeUrlPrefix + "/proto.PollUpdate";
|
|
201
|
+
};
|
|
202
|
+
return PollUpdate;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function PreKeyRecordStructure(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
|
+
PreKeyRecordStructure.prototype.id = null;
|
|
9
|
+
PreKeyRecordStructure.prototype.publicKey = null;
|
|
10
|
+
PreKeyRecordStructure.prototype.privateKey = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(PreKeyRecordStructure.prototype, "_id", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["id"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(PreKeyRecordStructure.prototype, "_publicKey", {
|
|
17
|
+
get: $util.oneOfGetter($oneOfFields = ["publicKey"]),
|
|
18
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(PreKeyRecordStructure.prototype, "_privateKey", {
|
|
21
|
+
get: $util.oneOfGetter($oneOfFields = ["privateKey"]),
|
|
22
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23
|
+
});
|
|
24
|
+
PreKeyRecordStructure.create = function create(properties) {
|
|
25
|
+
return new PreKeyRecordStructure(properties);
|
|
26
|
+
};
|
|
27
|
+
PreKeyRecordStructure.encode = function encode(m, w) {
|
|
28
|
+
if (!w)
|
|
29
|
+
w = $Writer.create();
|
|
30
|
+
if (m.id != null && Object.hasOwnProperty.call(m, "id"))
|
|
31
|
+
w.uint32(8).uint32(m.id);
|
|
32
|
+
if (m.publicKey != null && Object.hasOwnProperty.call(m, "publicKey"))
|
|
33
|
+
w.uint32(18).bytes(m.publicKey);
|
|
34
|
+
if (m.privateKey != null && Object.hasOwnProperty.call(m, "privateKey"))
|
|
35
|
+
w.uint32(26).bytes(m.privateKey);
|
|
36
|
+
return w;
|
|
37
|
+
};
|
|
38
|
+
PreKeyRecordStructure.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.PreKeyRecordStructure();
|
|
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.id = r.uint32();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case 2: {
|
|
56
|
+
m.publicKey = r.bytes();
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 3: {
|
|
60
|
+
m.privateKey = r.bytes();
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
default:
|
|
64
|
+
r.skipType(t & 7, n);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return m;
|
|
69
|
+
};
|
|
70
|
+
PreKeyRecordStructure.fromObject = function fromObject(d, n) {
|
|
71
|
+
if (d instanceof $root.proto.PreKeyRecordStructure)
|
|
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.PreKeyRecordStructure();
|
|
78
|
+
if (d.id != null) {
|
|
79
|
+
m.id = d.id >>> 0;
|
|
80
|
+
}
|
|
81
|
+
if (d.publicKey != null) {
|
|
82
|
+
if (typeof d.publicKey === "string")
|
|
83
|
+
$util.base64.decode(d.publicKey, m.publicKey = $util.newBuffer($util.base64.length(d.publicKey)), 0);
|
|
84
|
+
else if (d.publicKey.length >= 0)
|
|
85
|
+
m.publicKey = d.publicKey;
|
|
86
|
+
}
|
|
87
|
+
if (d.privateKey != null) {
|
|
88
|
+
if (typeof d.privateKey === "string")
|
|
89
|
+
$util.base64.decode(d.privateKey, m.privateKey = $util.newBuffer($util.base64.length(d.privateKey)), 0);
|
|
90
|
+
else if (d.privateKey.length >= 0)
|
|
91
|
+
m.privateKey = d.privateKey;
|
|
92
|
+
}
|
|
93
|
+
return m;
|
|
94
|
+
};
|
|
95
|
+
PreKeyRecordStructure.toObject = function toObject(m, o) {
|
|
96
|
+
if (!o)
|
|
97
|
+
o = {};
|
|
98
|
+
var d = {};
|
|
99
|
+
if (m.id != null && m.hasOwnProperty("id")) {
|
|
100
|
+
d.id = m.id;
|
|
101
|
+
if (o.oneofs)
|
|
102
|
+
d._id = "id";
|
|
103
|
+
}
|
|
104
|
+
if (m.publicKey != null && m.hasOwnProperty("publicKey")) {
|
|
105
|
+
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;
|
|
106
|
+
if (o.oneofs)
|
|
107
|
+
d._publicKey = "publicKey";
|
|
108
|
+
}
|
|
109
|
+
if (m.privateKey != null && m.hasOwnProperty("privateKey")) {
|
|
110
|
+
d.privateKey = o.bytes === String ? $util.base64.encode(m.privateKey, 0, m.privateKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.privateKey) : m.privateKey;
|
|
111
|
+
if (o.oneofs)
|
|
112
|
+
d._privateKey = "privateKey";
|
|
113
|
+
}
|
|
114
|
+
return d;
|
|
115
|
+
};
|
|
116
|
+
PreKeyRecordStructure.prototype.toJSON = function toJSON() {
|
|
117
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
118
|
+
};
|
|
119
|
+
PreKeyRecordStructure.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
120
|
+
if (typeUrlPrefix === undefined) {
|
|
121
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
122
|
+
}
|
|
123
|
+
return typeUrlPrefix + "/proto.PreKeyRecordStructure";
|
|
124
|
+
};
|
|
125
|
+
return PreKeyRecordStructure;
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function PreKeySignalMessage(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
|
+
PreKeySignalMessage.prototype.registrationId = null;
|
|
9
|
+
PreKeySignalMessage.prototype.preKeyId = null;
|
|
10
|
+
PreKeySignalMessage.prototype.signedPreKeyId = null;
|
|
11
|
+
PreKeySignalMessage.prototype.baseKey = null;
|
|
12
|
+
PreKeySignalMessage.prototype.identityKey = null;
|
|
13
|
+
PreKeySignalMessage.prototype.message = null;
|
|
14
|
+
let $oneOfFields;
|
|
15
|
+
Object.defineProperty(PreKeySignalMessage.prototype, "_registrationId", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["registrationId"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(PreKeySignalMessage.prototype, "_preKeyId", {
|
|
20
|
+
get: $util.oneOfGetter($oneOfFields = ["preKeyId"]),
|
|
21
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(PreKeySignalMessage.prototype, "_signedPreKeyId", {
|
|
24
|
+
get: $util.oneOfGetter($oneOfFields = ["signedPreKeyId"]),
|
|
25
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(PreKeySignalMessage.prototype, "_baseKey", {
|
|
28
|
+
get: $util.oneOfGetter($oneOfFields = ["baseKey"]),
|
|
29
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(PreKeySignalMessage.prototype, "_identityKey", {
|
|
32
|
+
get: $util.oneOfGetter($oneOfFields = ["identityKey"]),
|
|
33
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(PreKeySignalMessage.prototype, "_message", {
|
|
36
|
+
get: $util.oneOfGetter($oneOfFields = ["message"]),
|
|
37
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
38
|
+
});
|
|
39
|
+
PreKeySignalMessage.create = function create(properties) {
|
|
40
|
+
return new PreKeySignalMessage(properties);
|
|
41
|
+
};
|
|
42
|
+
PreKeySignalMessage.encode = function encode(m, w) {
|
|
43
|
+
if (!w)
|
|
44
|
+
w = $Writer.create();
|
|
45
|
+
if (m.preKeyId != null && Object.hasOwnProperty.call(m, "preKeyId"))
|
|
46
|
+
w.uint32(8).uint32(m.preKeyId);
|
|
47
|
+
if (m.baseKey != null && Object.hasOwnProperty.call(m, "baseKey"))
|
|
48
|
+
w.uint32(18).bytes(m.baseKey);
|
|
49
|
+
if (m.identityKey != null && Object.hasOwnProperty.call(m, "identityKey"))
|
|
50
|
+
w.uint32(26).bytes(m.identityKey);
|
|
51
|
+
if (m.message != null && Object.hasOwnProperty.call(m, "message"))
|
|
52
|
+
w.uint32(34).bytes(m.message);
|
|
53
|
+
if (m.registrationId != null && Object.hasOwnProperty.call(m, "registrationId"))
|
|
54
|
+
w.uint32(40).uint32(m.registrationId);
|
|
55
|
+
if (m.signedPreKeyId != null && Object.hasOwnProperty.call(m, "signedPreKeyId"))
|
|
56
|
+
w.uint32(48).uint32(m.signedPreKeyId);
|
|
57
|
+
return w;
|
|
58
|
+
};
|
|
59
|
+
PreKeySignalMessage.decode = function decode(r, l, e, n) {
|
|
60
|
+
if (!(r instanceof $Reader))
|
|
61
|
+
r = $Reader.create(r);
|
|
62
|
+
if (n === undefined)
|
|
63
|
+
n = 0;
|
|
64
|
+
if (n > $Reader.recursionLimit)
|
|
65
|
+
throw Error("maximum nesting depth exceeded");
|
|
66
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.PreKeySignalMessage();
|
|
67
|
+
while (r.pos < c) {
|
|
68
|
+
var t = r.uint32();
|
|
69
|
+
if (t === e)
|
|
70
|
+
break;
|
|
71
|
+
switch (t >>> 3) {
|
|
72
|
+
case 5: {
|
|
73
|
+
m.registrationId = r.uint32();
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
case 1: {
|
|
77
|
+
m.preKeyId = r.uint32();
|
|
78
|
+
break;
|
|
79
|
+
}
|
|
80
|
+
case 6: {
|
|
81
|
+
m.signedPreKeyId = r.uint32();
|
|
82
|
+
break;
|
|
83
|
+
}
|
|
84
|
+
case 2: {
|
|
85
|
+
m.baseKey = r.bytes();
|
|
86
|
+
break;
|
|
87
|
+
}
|
|
88
|
+
case 3: {
|
|
89
|
+
m.identityKey = r.bytes();
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case 4: {
|
|
93
|
+
m.message = r.bytes();
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
default:
|
|
97
|
+
r.skipType(t & 7, n);
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return m;
|
|
102
|
+
};
|
|
103
|
+
PreKeySignalMessage.fromObject = function fromObject(d, n) {
|
|
104
|
+
if (d instanceof $root.proto.PreKeySignalMessage)
|
|
105
|
+
return d;
|
|
106
|
+
if (n === undefined)
|
|
107
|
+
n = 0;
|
|
108
|
+
if (n > $util.recursionLimit)
|
|
109
|
+
throw Error("maximum nesting depth exceeded");
|
|
110
|
+
var m = new $root.proto.PreKeySignalMessage();
|
|
111
|
+
if (d.registrationId != null) {
|
|
112
|
+
m.registrationId = d.registrationId >>> 0;
|
|
113
|
+
}
|
|
114
|
+
if (d.preKeyId != null) {
|
|
115
|
+
m.preKeyId = d.preKeyId >>> 0;
|
|
116
|
+
}
|
|
117
|
+
if (d.signedPreKeyId != null) {
|
|
118
|
+
m.signedPreKeyId = d.signedPreKeyId >>> 0;
|
|
119
|
+
}
|
|
120
|
+
if (d.baseKey != null) {
|
|
121
|
+
if (typeof d.baseKey === "string")
|
|
122
|
+
$util.base64.decode(d.baseKey, m.baseKey = $util.newBuffer($util.base64.length(d.baseKey)), 0);
|
|
123
|
+
else if (d.baseKey.length >= 0)
|
|
124
|
+
m.baseKey = d.baseKey;
|
|
125
|
+
}
|
|
126
|
+
if (d.identityKey != null) {
|
|
127
|
+
if (typeof d.identityKey === "string")
|
|
128
|
+
$util.base64.decode(d.identityKey, m.identityKey = $util.newBuffer($util.base64.length(d.identityKey)), 0);
|
|
129
|
+
else if (d.identityKey.length >= 0)
|
|
130
|
+
m.identityKey = d.identityKey;
|
|
131
|
+
}
|
|
132
|
+
if (d.message != null) {
|
|
133
|
+
if (typeof d.message === "string")
|
|
134
|
+
$util.base64.decode(d.message, m.message = $util.newBuffer($util.base64.length(d.message)), 0);
|
|
135
|
+
else if (d.message.length >= 0)
|
|
136
|
+
m.message = d.message;
|
|
137
|
+
}
|
|
138
|
+
return m;
|
|
139
|
+
};
|
|
140
|
+
PreKeySignalMessage.toObject = function toObject(m, o) {
|
|
141
|
+
if (!o)
|
|
142
|
+
o = {};
|
|
143
|
+
var d = {};
|
|
144
|
+
if (m.preKeyId != null && m.hasOwnProperty("preKeyId")) {
|
|
145
|
+
d.preKeyId = m.preKeyId;
|
|
146
|
+
if (o.oneofs)
|
|
147
|
+
d._preKeyId = "preKeyId";
|
|
148
|
+
}
|
|
149
|
+
if (m.baseKey != null && m.hasOwnProperty("baseKey")) {
|
|
150
|
+
d.baseKey = o.bytes === String ? $util.base64.encode(m.baseKey, 0, m.baseKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.baseKey) : m.baseKey;
|
|
151
|
+
if (o.oneofs)
|
|
152
|
+
d._baseKey = "baseKey";
|
|
153
|
+
}
|
|
154
|
+
if (m.identityKey != null && m.hasOwnProperty("identityKey")) {
|
|
155
|
+
d.identityKey = o.bytes === String ? $util.base64.encode(m.identityKey, 0, m.identityKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.identityKey) : m.identityKey;
|
|
156
|
+
if (o.oneofs)
|
|
157
|
+
d._identityKey = "identityKey";
|
|
158
|
+
}
|
|
159
|
+
if (m.message != null && m.hasOwnProperty("message")) {
|
|
160
|
+
d.message = o.bytes === String ? $util.base64.encode(m.message, 0, m.message.length) : o.bytes === Array ? Array.prototype.slice.call(m.message) : m.message;
|
|
161
|
+
if (o.oneofs)
|
|
162
|
+
d._message = "message";
|
|
163
|
+
}
|
|
164
|
+
if (m.registrationId != null && m.hasOwnProperty("registrationId")) {
|
|
165
|
+
d.registrationId = m.registrationId;
|
|
166
|
+
if (o.oneofs)
|
|
167
|
+
d._registrationId = "registrationId";
|
|
168
|
+
}
|
|
169
|
+
if (m.signedPreKeyId != null && m.hasOwnProperty("signedPreKeyId")) {
|
|
170
|
+
d.signedPreKeyId = m.signedPreKeyId;
|
|
171
|
+
if (o.oneofs)
|
|
172
|
+
d._signedPreKeyId = "signedPreKeyId";
|
|
173
|
+
}
|
|
174
|
+
return d;
|
|
175
|
+
};
|
|
176
|
+
PreKeySignalMessage.prototype.toJSON = function toJSON() {
|
|
177
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
178
|
+
};
|
|
179
|
+
PreKeySignalMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
180
|
+
if (typeUrlPrefix === undefined) {
|
|
181
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
182
|
+
}
|
|
183
|
+
return typeUrlPrefix + "/proto.PreKeySignalMessage";
|
|
184
|
+
};
|
|
185
|
+
return PreKeySignalMessage;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function PremiumMessageInfo(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
|
+
PremiumMessageInfo.prototype.serverCampaignId = null;
|
|
9
|
+
let $oneOfFields;
|
|
10
|
+
Object.defineProperty(PremiumMessageInfo.prototype, "_serverCampaignId", {
|
|
11
|
+
get: $util.oneOfGetter($oneOfFields = ["serverCampaignId"]),
|
|
12
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
13
|
+
});
|
|
14
|
+
PremiumMessageInfo.create = function create(properties) {
|
|
15
|
+
return new PremiumMessageInfo(properties);
|
|
16
|
+
};
|
|
17
|
+
PremiumMessageInfo.encode = function encode(m, w) {
|
|
18
|
+
if (!w)
|
|
19
|
+
w = $Writer.create();
|
|
20
|
+
if (m.serverCampaignId != null && Object.hasOwnProperty.call(m, "serverCampaignId"))
|
|
21
|
+
w.uint32(10).string(m.serverCampaignId);
|
|
22
|
+
return w;
|
|
23
|
+
};
|
|
24
|
+
PremiumMessageInfo.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.PremiumMessageInfo();
|
|
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.serverCampaignId = r.string();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
r.skipType(t & 7, n);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return m;
|
|
47
|
+
};
|
|
48
|
+
PremiumMessageInfo.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.PremiumMessageInfo)
|
|
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.PremiumMessageInfo();
|
|
56
|
+
if (d.serverCampaignId != null) {
|
|
57
|
+
m.serverCampaignId = String(d.serverCampaignId);
|
|
58
|
+
}
|
|
59
|
+
return m;
|
|
60
|
+
};
|
|
61
|
+
PremiumMessageInfo.toObject = function toObject(m, o) {
|
|
62
|
+
if (!o)
|
|
63
|
+
o = {};
|
|
64
|
+
var d = {};
|
|
65
|
+
if (m.serverCampaignId != null && m.hasOwnProperty("serverCampaignId")) {
|
|
66
|
+
d.serverCampaignId = m.serverCampaignId;
|
|
67
|
+
if (o.oneofs)
|
|
68
|
+
d._serverCampaignId = "serverCampaignId";
|
|
69
|
+
}
|
|
70
|
+
return d;
|
|
71
|
+
};
|
|
72
|
+
PremiumMessageInfo.prototype.toJSON = function toJSON() {
|
|
73
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
74
|
+
};
|
|
75
|
+
PremiumMessageInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
76
|
+
if (typeUrlPrefix === undefined) {
|
|
77
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
78
|
+
}
|
|
79
|
+
return typeUrlPrefix + "/proto.PremiumMessageInfo";
|
|
80
|
+
};
|
|
81
|
+
return PremiumMessageInfo;
|