@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,169 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function KeyExchangeMessage(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
|
+
KeyExchangeMessage.prototype.id = null;
|
|
9
|
+
KeyExchangeMessage.prototype.baseKey = null;
|
|
10
|
+
KeyExchangeMessage.prototype.ratchetKey = null;
|
|
11
|
+
KeyExchangeMessage.prototype.identityKey = null;
|
|
12
|
+
KeyExchangeMessage.prototype.baseKeySignature = null;
|
|
13
|
+
let $oneOfFields;
|
|
14
|
+
Object.defineProperty(KeyExchangeMessage.prototype, "_id", {
|
|
15
|
+
get: $util.oneOfGetter($oneOfFields = ["id"]),
|
|
16
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(KeyExchangeMessage.prototype, "_baseKey", {
|
|
19
|
+
get: $util.oneOfGetter($oneOfFields = ["baseKey"]),
|
|
20
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(KeyExchangeMessage.prototype, "_ratchetKey", {
|
|
23
|
+
get: $util.oneOfGetter($oneOfFields = ["ratchetKey"]),
|
|
24
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(KeyExchangeMessage.prototype, "_identityKey", {
|
|
27
|
+
get: $util.oneOfGetter($oneOfFields = ["identityKey"]),
|
|
28
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(KeyExchangeMessage.prototype, "_baseKeySignature", {
|
|
31
|
+
get: $util.oneOfGetter($oneOfFields = ["baseKeySignature"]),
|
|
32
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
33
|
+
});
|
|
34
|
+
KeyExchangeMessage.create = function create(properties) {
|
|
35
|
+
return new KeyExchangeMessage(properties);
|
|
36
|
+
};
|
|
37
|
+
KeyExchangeMessage.encode = function encode(m, w) {
|
|
38
|
+
if (!w)
|
|
39
|
+
w = $Writer.create();
|
|
40
|
+
if (m.id != null && Object.hasOwnProperty.call(m, "id"))
|
|
41
|
+
w.uint32(8).uint32(m.id);
|
|
42
|
+
if (m.baseKey != null && Object.hasOwnProperty.call(m, "baseKey"))
|
|
43
|
+
w.uint32(18).bytes(m.baseKey);
|
|
44
|
+
if (m.ratchetKey != null && Object.hasOwnProperty.call(m, "ratchetKey"))
|
|
45
|
+
w.uint32(26).bytes(m.ratchetKey);
|
|
46
|
+
if (m.identityKey != null && Object.hasOwnProperty.call(m, "identityKey"))
|
|
47
|
+
w.uint32(34).bytes(m.identityKey);
|
|
48
|
+
if (m.baseKeySignature != null && Object.hasOwnProperty.call(m, "baseKeySignature"))
|
|
49
|
+
w.uint32(42).bytes(m.baseKeySignature);
|
|
50
|
+
return w;
|
|
51
|
+
};
|
|
52
|
+
KeyExchangeMessage.decode = function decode(r, l, e, n) {
|
|
53
|
+
if (!(r instanceof $Reader))
|
|
54
|
+
r = $Reader.create(r);
|
|
55
|
+
if (n === undefined)
|
|
56
|
+
n = 0;
|
|
57
|
+
if (n > $Reader.recursionLimit)
|
|
58
|
+
throw Error("maximum nesting depth exceeded");
|
|
59
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.KeyExchangeMessage();
|
|
60
|
+
while (r.pos < c) {
|
|
61
|
+
var t = r.uint32();
|
|
62
|
+
if (t === e)
|
|
63
|
+
break;
|
|
64
|
+
switch (t >>> 3) {
|
|
65
|
+
case 1: {
|
|
66
|
+
m.id = r.uint32();
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
case 2: {
|
|
70
|
+
m.baseKey = r.bytes();
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
case 3: {
|
|
74
|
+
m.ratchetKey = r.bytes();
|
|
75
|
+
break;
|
|
76
|
+
}
|
|
77
|
+
case 4: {
|
|
78
|
+
m.identityKey = r.bytes();
|
|
79
|
+
break;
|
|
80
|
+
}
|
|
81
|
+
case 5: {
|
|
82
|
+
m.baseKeySignature = r.bytes();
|
|
83
|
+
break;
|
|
84
|
+
}
|
|
85
|
+
default:
|
|
86
|
+
r.skipType(t & 7, n);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
return m;
|
|
91
|
+
};
|
|
92
|
+
KeyExchangeMessage.fromObject = function fromObject(d, n) {
|
|
93
|
+
if (d instanceof $root.proto.KeyExchangeMessage)
|
|
94
|
+
return d;
|
|
95
|
+
if (n === undefined)
|
|
96
|
+
n = 0;
|
|
97
|
+
if (n > $util.recursionLimit)
|
|
98
|
+
throw Error("maximum nesting depth exceeded");
|
|
99
|
+
var m = new $root.proto.KeyExchangeMessage();
|
|
100
|
+
if (d.id != null) {
|
|
101
|
+
m.id = d.id >>> 0;
|
|
102
|
+
}
|
|
103
|
+
if (d.baseKey != null) {
|
|
104
|
+
if (typeof d.baseKey === "string")
|
|
105
|
+
$util.base64.decode(d.baseKey, m.baseKey = $util.newBuffer($util.base64.length(d.baseKey)), 0);
|
|
106
|
+
else if (d.baseKey.length >= 0)
|
|
107
|
+
m.baseKey = d.baseKey;
|
|
108
|
+
}
|
|
109
|
+
if (d.ratchetKey != null) {
|
|
110
|
+
if (typeof d.ratchetKey === "string")
|
|
111
|
+
$util.base64.decode(d.ratchetKey, m.ratchetKey = $util.newBuffer($util.base64.length(d.ratchetKey)), 0);
|
|
112
|
+
else if (d.ratchetKey.length >= 0)
|
|
113
|
+
m.ratchetKey = d.ratchetKey;
|
|
114
|
+
}
|
|
115
|
+
if (d.identityKey != null) {
|
|
116
|
+
if (typeof d.identityKey === "string")
|
|
117
|
+
$util.base64.decode(d.identityKey, m.identityKey = $util.newBuffer($util.base64.length(d.identityKey)), 0);
|
|
118
|
+
else if (d.identityKey.length >= 0)
|
|
119
|
+
m.identityKey = d.identityKey;
|
|
120
|
+
}
|
|
121
|
+
if (d.baseKeySignature != null) {
|
|
122
|
+
if (typeof d.baseKeySignature === "string")
|
|
123
|
+
$util.base64.decode(d.baseKeySignature, m.baseKeySignature = $util.newBuffer($util.base64.length(d.baseKeySignature)), 0);
|
|
124
|
+
else if (d.baseKeySignature.length >= 0)
|
|
125
|
+
m.baseKeySignature = d.baseKeySignature;
|
|
126
|
+
}
|
|
127
|
+
return m;
|
|
128
|
+
};
|
|
129
|
+
KeyExchangeMessage.toObject = function toObject(m, o) {
|
|
130
|
+
if (!o)
|
|
131
|
+
o = {};
|
|
132
|
+
var d = {};
|
|
133
|
+
if (m.id != null && m.hasOwnProperty("id")) {
|
|
134
|
+
d.id = m.id;
|
|
135
|
+
if (o.oneofs)
|
|
136
|
+
d._id = "id";
|
|
137
|
+
}
|
|
138
|
+
if (m.baseKey != null && m.hasOwnProperty("baseKey")) {
|
|
139
|
+
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;
|
|
140
|
+
if (o.oneofs)
|
|
141
|
+
d._baseKey = "baseKey";
|
|
142
|
+
}
|
|
143
|
+
if (m.ratchetKey != null && m.hasOwnProperty("ratchetKey")) {
|
|
144
|
+
d.ratchetKey = o.bytes === String ? $util.base64.encode(m.ratchetKey, 0, m.ratchetKey.length) : o.bytes === Array ? Array.prototype.slice.call(m.ratchetKey) : m.ratchetKey;
|
|
145
|
+
if (o.oneofs)
|
|
146
|
+
d._ratchetKey = "ratchetKey";
|
|
147
|
+
}
|
|
148
|
+
if (m.identityKey != null && m.hasOwnProperty("identityKey")) {
|
|
149
|
+
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;
|
|
150
|
+
if (o.oneofs)
|
|
151
|
+
d._identityKey = "identityKey";
|
|
152
|
+
}
|
|
153
|
+
if (m.baseKeySignature != null && m.hasOwnProperty("baseKeySignature")) {
|
|
154
|
+
d.baseKeySignature = o.bytes === String ? $util.base64.encode(m.baseKeySignature, 0, m.baseKeySignature.length) : o.bytes === Array ? Array.prototype.slice.call(m.baseKeySignature) : m.baseKeySignature;
|
|
155
|
+
if (o.oneofs)
|
|
156
|
+
d._baseKeySignature = "baseKeySignature";
|
|
157
|
+
}
|
|
158
|
+
return d;
|
|
159
|
+
};
|
|
160
|
+
KeyExchangeMessage.prototype.toJSON = function toJSON() {
|
|
161
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
162
|
+
};
|
|
163
|
+
KeyExchangeMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
164
|
+
if (typeUrlPrefix === undefined) {
|
|
165
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
166
|
+
}
|
|
167
|
+
return typeUrlPrefix + "/proto.KeyExchangeMessage";
|
|
168
|
+
};
|
|
169
|
+
return KeyExchangeMessage;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function KeyId(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
|
+
KeyId.prototype.id = null;
|
|
9
|
+
let $oneOfFields;
|
|
10
|
+
Object.defineProperty(KeyId.prototype, "_id", {
|
|
11
|
+
get: $util.oneOfGetter($oneOfFields = ["id"]),
|
|
12
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
13
|
+
});
|
|
14
|
+
KeyId.create = function create(properties) {
|
|
15
|
+
return new KeyId(properties);
|
|
16
|
+
};
|
|
17
|
+
KeyId.encode = function encode(m, w) {
|
|
18
|
+
if (!w)
|
|
19
|
+
w = $Writer.create();
|
|
20
|
+
if (m.id != null && Object.hasOwnProperty.call(m, "id"))
|
|
21
|
+
w.uint32(10).bytes(m.id);
|
|
22
|
+
return w;
|
|
23
|
+
};
|
|
24
|
+
KeyId.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.KeyId();
|
|
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.id = r.bytes();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
r.skipType(t & 7, n);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return m;
|
|
47
|
+
};
|
|
48
|
+
KeyId.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.KeyId)
|
|
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.KeyId();
|
|
56
|
+
if (d.id != null) {
|
|
57
|
+
if (typeof d.id === "string")
|
|
58
|
+
$util.base64.decode(d.id, m.id = $util.newBuffer($util.base64.length(d.id)), 0);
|
|
59
|
+
else if (d.id.length >= 0)
|
|
60
|
+
m.id = d.id;
|
|
61
|
+
}
|
|
62
|
+
return m;
|
|
63
|
+
};
|
|
64
|
+
KeyId.toObject = function toObject(m, o) {
|
|
65
|
+
if (!o)
|
|
66
|
+
o = {};
|
|
67
|
+
var d = {};
|
|
68
|
+
if (m.id != null && m.hasOwnProperty("id")) {
|
|
69
|
+
d.id = o.bytes === String ? $util.base64.encode(m.id, 0, m.id.length) : o.bytes === Array ? Array.prototype.slice.call(m.id) : m.id;
|
|
70
|
+
if (o.oneofs)
|
|
71
|
+
d._id = "id";
|
|
72
|
+
}
|
|
73
|
+
return d;
|
|
74
|
+
};
|
|
75
|
+
KeyId.prototype.toJSON = function toJSON() {
|
|
76
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
77
|
+
};
|
|
78
|
+
KeyId.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
79
|
+
if (typeUrlPrefix === undefined) {
|
|
80
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
81
|
+
}
|
|
82
|
+
return typeUrlPrefix + "/proto.KeyId";
|
|
83
|
+
};
|
|
84
|
+
return KeyId;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function LIDMigrationMapping(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
|
+
LIDMigrationMapping.prototype.pn = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
9
|
+
LIDMigrationMapping.prototype.assignedLid = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
|
|
10
|
+
LIDMigrationMapping.prototype.latestLid = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(LIDMigrationMapping.prototype, "_latestLid", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["latestLid"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
LIDMigrationMapping.create = function create(properties) {
|
|
17
|
+
return new LIDMigrationMapping(properties);
|
|
18
|
+
};
|
|
19
|
+
LIDMigrationMapping.encode = function encode(m, w) {
|
|
20
|
+
if (!w)
|
|
21
|
+
w = $Writer.create();
|
|
22
|
+
if (m.pn != null && Object.hasOwnProperty.call(m, "pn"))
|
|
23
|
+
w.uint32(8).uint64(m.pn);
|
|
24
|
+
if (m.assignedLid != null && Object.hasOwnProperty.call(m, "assignedLid"))
|
|
25
|
+
w.uint32(16).uint64(m.assignedLid);
|
|
26
|
+
if (m.latestLid != null && Object.hasOwnProperty.call(m, "latestLid"))
|
|
27
|
+
w.uint32(24).uint64(m.latestLid);
|
|
28
|
+
return w;
|
|
29
|
+
};
|
|
30
|
+
LIDMigrationMapping.decode = function decode(r, l, e, n) {
|
|
31
|
+
if (!(r instanceof $Reader))
|
|
32
|
+
r = $Reader.create(r);
|
|
33
|
+
if (n === undefined)
|
|
34
|
+
n = 0;
|
|
35
|
+
if (n > $Reader.recursionLimit)
|
|
36
|
+
throw Error("maximum nesting depth exceeded");
|
|
37
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.LIDMigrationMapping();
|
|
38
|
+
while (r.pos < c) {
|
|
39
|
+
var t = r.uint32();
|
|
40
|
+
if (t === e)
|
|
41
|
+
break;
|
|
42
|
+
switch (t >>> 3) {
|
|
43
|
+
case 1: {
|
|
44
|
+
m.pn = r.uint64();
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
case 2: {
|
|
48
|
+
m.assignedLid = r.uint64();
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
case 3: {
|
|
52
|
+
m.latestLid = r.uint64();
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
default:
|
|
56
|
+
r.skipType(t & 7, n);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
return m;
|
|
61
|
+
};
|
|
62
|
+
LIDMigrationMapping.fromObject = function fromObject(d, n) {
|
|
63
|
+
if (d instanceof $root.proto.LIDMigrationMapping)
|
|
64
|
+
return d;
|
|
65
|
+
if (n === undefined)
|
|
66
|
+
n = 0;
|
|
67
|
+
if (n > $util.recursionLimit)
|
|
68
|
+
throw Error("maximum nesting depth exceeded");
|
|
69
|
+
var m = new $root.proto.LIDMigrationMapping();
|
|
70
|
+
if (d.pn != null) {
|
|
71
|
+
if ($util.Long)
|
|
72
|
+
(m.pn = $util.Long.fromValue(d.pn)).unsigned = true;
|
|
73
|
+
else if (typeof d.pn === "string")
|
|
74
|
+
m.pn = parseInt(d.pn, 10);
|
|
75
|
+
else if (typeof d.pn === "number")
|
|
76
|
+
m.pn = d.pn;
|
|
77
|
+
else if (typeof d.pn === "object")
|
|
78
|
+
m.pn = new $util.LongBits(d.pn.low >>> 0, d.pn.high >>> 0).toNumber(true);
|
|
79
|
+
}
|
|
80
|
+
if (d.assignedLid != null) {
|
|
81
|
+
if ($util.Long)
|
|
82
|
+
(m.assignedLid = $util.Long.fromValue(d.assignedLid)).unsigned = true;
|
|
83
|
+
else if (typeof d.assignedLid === "string")
|
|
84
|
+
m.assignedLid = parseInt(d.assignedLid, 10);
|
|
85
|
+
else if (typeof d.assignedLid === "number")
|
|
86
|
+
m.assignedLid = d.assignedLid;
|
|
87
|
+
else if (typeof d.assignedLid === "object")
|
|
88
|
+
m.assignedLid = new $util.LongBits(d.assignedLid.low >>> 0, d.assignedLid.high >>> 0).toNumber(true);
|
|
89
|
+
}
|
|
90
|
+
if (d.latestLid != null) {
|
|
91
|
+
if ($util.Long)
|
|
92
|
+
(m.latestLid = $util.Long.fromValue(d.latestLid)).unsigned = true;
|
|
93
|
+
else if (typeof d.latestLid === "string")
|
|
94
|
+
m.latestLid = parseInt(d.latestLid, 10);
|
|
95
|
+
else if (typeof d.latestLid === "number")
|
|
96
|
+
m.latestLid = d.latestLid;
|
|
97
|
+
else if (typeof d.latestLid === "object")
|
|
98
|
+
m.latestLid = new $util.LongBits(d.latestLid.low >>> 0, d.latestLid.high >>> 0).toNumber(true);
|
|
99
|
+
}
|
|
100
|
+
return m;
|
|
101
|
+
};
|
|
102
|
+
LIDMigrationMapping.toObject = function toObject(m, o) {
|
|
103
|
+
if (!o)
|
|
104
|
+
o = {};
|
|
105
|
+
var d = {};
|
|
106
|
+
if (o.defaults) {
|
|
107
|
+
if ($util.Long) {
|
|
108
|
+
var n = new $util.Long(0, 0, true);
|
|
109
|
+
d.pn = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
|
|
110
|
+
} else
|
|
111
|
+
d.pn = o.longs === String ? "0" : 0;
|
|
112
|
+
if ($util.Long) {
|
|
113
|
+
var n = new $util.Long(0, 0, true);
|
|
114
|
+
d.assignedLid = o.longs === String ? n.toString() : o.longs === Number ? n.toNumber() : n;
|
|
115
|
+
} else
|
|
116
|
+
d.assignedLid = o.longs === String ? "0" : 0;
|
|
117
|
+
}
|
|
118
|
+
if (m.pn != null && m.hasOwnProperty("pn")) {
|
|
119
|
+
if (typeof m.pn === "number")
|
|
120
|
+
d.pn = o.longs === String ? String(m.pn) : m.pn;
|
|
121
|
+
else
|
|
122
|
+
d.pn = o.longs === String ? longToString(m.pn, true) : o.longs === Number ? longToNumber(m.pn, true) : m.pn;
|
|
123
|
+
}
|
|
124
|
+
if (m.assignedLid != null && m.hasOwnProperty("assignedLid")) {
|
|
125
|
+
if (typeof m.assignedLid === "number")
|
|
126
|
+
d.assignedLid = o.longs === String ? String(m.assignedLid) : m.assignedLid;
|
|
127
|
+
else
|
|
128
|
+
d.assignedLid = o.longs === String ? longToString(m.assignedLid, true) : o.longs === Number ? longToNumber(m.assignedLid, true) : m.assignedLid;
|
|
129
|
+
}
|
|
130
|
+
if (m.latestLid != null && m.hasOwnProperty("latestLid")) {
|
|
131
|
+
if (typeof m.latestLid === "number")
|
|
132
|
+
d.latestLid = o.longs === String ? String(m.latestLid) : m.latestLid;
|
|
133
|
+
else
|
|
134
|
+
d.latestLid = o.longs === String ? longToString(m.latestLid, true) : o.longs === Number ? longToNumber(m.latestLid, true) : m.latestLid;
|
|
135
|
+
if (o.oneofs)
|
|
136
|
+
d._latestLid = "latestLid";
|
|
137
|
+
}
|
|
138
|
+
return d;
|
|
139
|
+
};
|
|
140
|
+
LIDMigrationMapping.prototype.toJSON = function toJSON() {
|
|
141
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
142
|
+
};
|
|
143
|
+
LIDMigrationMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
144
|
+
if (typeUrlPrefix === undefined) {
|
|
145
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
146
|
+
}
|
|
147
|
+
return typeUrlPrefix + "/proto.LIDMigrationMapping";
|
|
148
|
+
};
|
|
149
|
+
return LIDMigrationMapping;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function LIDMigrationMappingSyncMessage(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
|
+
LIDMigrationMappingSyncMessage.prototype.encodedMappingPayload = null;
|
|
9
|
+
let $oneOfFields;
|
|
10
|
+
Object.defineProperty(LIDMigrationMappingSyncMessage.prototype, "_encodedMappingPayload", {
|
|
11
|
+
get: $util.oneOfGetter($oneOfFields = ["encodedMappingPayload"]),
|
|
12
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
13
|
+
});
|
|
14
|
+
LIDMigrationMappingSyncMessage.create = function create(properties) {
|
|
15
|
+
return new LIDMigrationMappingSyncMessage(properties);
|
|
16
|
+
};
|
|
17
|
+
LIDMigrationMappingSyncMessage.encode = function encode(m, w) {
|
|
18
|
+
if (!w)
|
|
19
|
+
w = $Writer.create();
|
|
20
|
+
if (m.encodedMappingPayload != null && Object.hasOwnProperty.call(m, "encodedMappingPayload"))
|
|
21
|
+
w.uint32(10).bytes(m.encodedMappingPayload);
|
|
22
|
+
return w;
|
|
23
|
+
};
|
|
24
|
+
LIDMigrationMappingSyncMessage.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.LIDMigrationMappingSyncMessage();
|
|
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.encodedMappingPayload = r.bytes();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
r.skipType(t & 7, n);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return m;
|
|
47
|
+
};
|
|
48
|
+
LIDMigrationMappingSyncMessage.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.LIDMigrationMappingSyncMessage)
|
|
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.LIDMigrationMappingSyncMessage();
|
|
56
|
+
if (d.encodedMappingPayload != null) {
|
|
57
|
+
if (typeof d.encodedMappingPayload === "string")
|
|
58
|
+
$util.base64.decode(d.encodedMappingPayload, m.encodedMappingPayload = $util.newBuffer($util.base64.length(d.encodedMappingPayload)), 0);
|
|
59
|
+
else if (d.encodedMappingPayload.length >= 0)
|
|
60
|
+
m.encodedMappingPayload = d.encodedMappingPayload;
|
|
61
|
+
}
|
|
62
|
+
return m;
|
|
63
|
+
};
|
|
64
|
+
LIDMigrationMappingSyncMessage.toObject = function toObject(m, o) {
|
|
65
|
+
if (!o)
|
|
66
|
+
o = {};
|
|
67
|
+
var d = {};
|
|
68
|
+
if (m.encodedMappingPayload != null && m.hasOwnProperty("encodedMappingPayload")) {
|
|
69
|
+
d.encodedMappingPayload = o.bytes === String ? $util.base64.encode(m.encodedMappingPayload, 0, m.encodedMappingPayload.length) : o.bytes === Array ? Array.prototype.slice.call(m.encodedMappingPayload) : m.encodedMappingPayload;
|
|
70
|
+
if (o.oneofs)
|
|
71
|
+
d._encodedMappingPayload = "encodedMappingPayload";
|
|
72
|
+
}
|
|
73
|
+
return d;
|
|
74
|
+
};
|
|
75
|
+
LIDMigrationMappingSyncMessage.prototype.toJSON = function toJSON() {
|
|
76
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
77
|
+
};
|
|
78
|
+
LIDMigrationMappingSyncMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
79
|
+
if (typeUrlPrefix === undefined) {
|
|
80
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
81
|
+
}
|
|
82
|
+
return typeUrlPrefix + "/proto.LIDMigrationMappingSyncMessage";
|
|
83
|
+
};
|
|
84
|
+
return LIDMigrationMappingSyncMessage;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function LIDMigrationMappingSyncPayload(p) {
|
|
3
|
+
this.pnToLidMappings = [];
|
|
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
|
+
LIDMigrationMappingSyncPayload.prototype.pnToLidMappings = $util.emptyArray;
|
|
10
|
+
LIDMigrationMappingSyncPayload.prototype.chatDbMigrationTimestamp = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(LIDMigrationMappingSyncPayload.prototype, "_chatDbMigrationTimestamp", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["chatDbMigrationTimestamp"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
LIDMigrationMappingSyncPayload.create = function create(properties) {
|
|
17
|
+
return new LIDMigrationMappingSyncPayload(properties);
|
|
18
|
+
};
|
|
19
|
+
LIDMigrationMappingSyncPayload.encode = function encode(m, w) {
|
|
20
|
+
if (!w)
|
|
21
|
+
w = $Writer.create();
|
|
22
|
+
if (m.pnToLidMappings != null && m.pnToLidMappings.length) {
|
|
23
|
+
for (var i = 0; i < m.pnToLidMappings.length; ++i)
|
|
24
|
+
$root.proto.LIDMigrationMapping.encode(m.pnToLidMappings[i], w.uint32(10).fork()).ldelim();
|
|
25
|
+
}
|
|
26
|
+
if (m.chatDbMigrationTimestamp != null && Object.hasOwnProperty.call(m, "chatDbMigrationTimestamp"))
|
|
27
|
+
w.uint32(16).uint64(m.chatDbMigrationTimestamp);
|
|
28
|
+
return w;
|
|
29
|
+
};
|
|
30
|
+
LIDMigrationMappingSyncPayload.decode = function decode(r, l, e, n) {
|
|
31
|
+
if (!(r instanceof $Reader))
|
|
32
|
+
r = $Reader.create(r);
|
|
33
|
+
if (n === undefined)
|
|
34
|
+
n = 0;
|
|
35
|
+
if (n > $Reader.recursionLimit)
|
|
36
|
+
throw Error("maximum nesting depth exceeded");
|
|
37
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.LIDMigrationMappingSyncPayload();
|
|
38
|
+
while (r.pos < c) {
|
|
39
|
+
var t = r.uint32();
|
|
40
|
+
if (t === e)
|
|
41
|
+
break;
|
|
42
|
+
switch (t >>> 3) {
|
|
43
|
+
case 1: {
|
|
44
|
+
if (!(m.pnToLidMappings && m.pnToLidMappings.length))
|
|
45
|
+
m.pnToLidMappings = [];
|
|
46
|
+
m.pnToLidMappings.push($root.proto.LIDMigrationMapping.decode(r, r.uint32(), undefined, n + 1));
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
case 2: {
|
|
50
|
+
m.chatDbMigrationTimestamp = r.uint64();
|
|
51
|
+
break;
|
|
52
|
+
}
|
|
53
|
+
default:
|
|
54
|
+
r.skipType(t & 7, n);
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
return m;
|
|
59
|
+
};
|
|
60
|
+
LIDMigrationMappingSyncPayload.fromObject = function fromObject(d, n) {
|
|
61
|
+
if (d instanceof $root.proto.LIDMigrationMappingSyncPayload)
|
|
62
|
+
return d;
|
|
63
|
+
if (n === undefined)
|
|
64
|
+
n = 0;
|
|
65
|
+
if (n > $util.recursionLimit)
|
|
66
|
+
throw Error("maximum nesting depth exceeded");
|
|
67
|
+
var m = new $root.proto.LIDMigrationMappingSyncPayload();
|
|
68
|
+
if (d.pnToLidMappings) {
|
|
69
|
+
if (!Array.isArray(d.pnToLidMappings))
|
|
70
|
+
throw TypeError(".proto.LIDMigrationMappingSyncPayload.pnToLidMappings: array expected");
|
|
71
|
+
m.pnToLidMappings = [];
|
|
72
|
+
for (var i = 0; i < d.pnToLidMappings.length; ++i) {
|
|
73
|
+
if (typeof d.pnToLidMappings[i] !== "object")
|
|
74
|
+
throw TypeError(".proto.LIDMigrationMappingSyncPayload.pnToLidMappings: object expected");
|
|
75
|
+
m.pnToLidMappings[i] = $root.proto.LIDMigrationMapping.fromObject(d.pnToLidMappings[i], n + 1);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (d.chatDbMigrationTimestamp != null) {
|
|
79
|
+
if ($util.Long)
|
|
80
|
+
(m.chatDbMigrationTimestamp = $util.Long.fromValue(d.chatDbMigrationTimestamp)).unsigned = true;
|
|
81
|
+
else if (typeof d.chatDbMigrationTimestamp === "string")
|
|
82
|
+
m.chatDbMigrationTimestamp = parseInt(d.chatDbMigrationTimestamp, 10);
|
|
83
|
+
else if (typeof d.chatDbMigrationTimestamp === "number")
|
|
84
|
+
m.chatDbMigrationTimestamp = d.chatDbMigrationTimestamp;
|
|
85
|
+
else if (typeof d.chatDbMigrationTimestamp === "object")
|
|
86
|
+
m.chatDbMigrationTimestamp = new $util.LongBits(d.chatDbMigrationTimestamp.low >>> 0, d.chatDbMigrationTimestamp.high >>> 0).toNumber(true);
|
|
87
|
+
}
|
|
88
|
+
return m;
|
|
89
|
+
};
|
|
90
|
+
LIDMigrationMappingSyncPayload.toObject = function toObject(m, o) {
|
|
91
|
+
if (!o)
|
|
92
|
+
o = {};
|
|
93
|
+
var d = {};
|
|
94
|
+
if (o.arrays || o.defaults) {
|
|
95
|
+
d.pnToLidMappings = [];
|
|
96
|
+
}
|
|
97
|
+
if (m.pnToLidMappings && m.pnToLidMappings.length) {
|
|
98
|
+
d.pnToLidMappings = [];
|
|
99
|
+
for (var j = 0; j < m.pnToLidMappings.length; ++j) {
|
|
100
|
+
d.pnToLidMappings[j] = $root.proto.LIDMigrationMapping.toObject(m.pnToLidMappings[j], o);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (m.chatDbMigrationTimestamp != null && m.hasOwnProperty("chatDbMigrationTimestamp")) {
|
|
104
|
+
if (typeof m.chatDbMigrationTimestamp === "number")
|
|
105
|
+
d.chatDbMigrationTimestamp = o.longs === String ? String(m.chatDbMigrationTimestamp) : m.chatDbMigrationTimestamp;
|
|
106
|
+
else
|
|
107
|
+
d.chatDbMigrationTimestamp = o.longs === String ? longToString(m.chatDbMigrationTimestamp, true) : o.longs === Number ? longToNumber(m.chatDbMigrationTimestamp, true) : m.chatDbMigrationTimestamp;
|
|
108
|
+
if (o.oneofs)
|
|
109
|
+
d._chatDbMigrationTimestamp = "chatDbMigrationTimestamp";
|
|
110
|
+
}
|
|
111
|
+
return d;
|
|
112
|
+
};
|
|
113
|
+
LIDMigrationMappingSyncPayload.prototype.toJSON = function toJSON() {
|
|
114
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
115
|
+
};
|
|
116
|
+
LIDMigrationMappingSyncPayload.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
117
|
+
if (typeUrlPrefix === undefined) {
|
|
118
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
119
|
+
}
|
|
120
|
+
return typeUrlPrefix + "/proto.LIDMigrationMappingSyncPayload";
|
|
121
|
+
};
|
|
122
|
+
return LIDMigrationMappingSyncPayload;
|