@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,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function DeviceConsistencyCodeMessage(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
|
+
DeviceConsistencyCodeMessage.prototype.generation = null;
|
|
9
|
+
DeviceConsistencyCodeMessage.prototype.signature = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(DeviceConsistencyCodeMessage.prototype, "_generation", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["generation"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(DeviceConsistencyCodeMessage.prototype, "_signature", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["signature"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
DeviceConsistencyCodeMessage.create = function create(properties) {
|
|
20
|
+
return new DeviceConsistencyCodeMessage(properties);
|
|
21
|
+
};
|
|
22
|
+
DeviceConsistencyCodeMessage.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.generation != null && Object.hasOwnProperty.call(m, "generation"))
|
|
26
|
+
w.uint32(8).uint32(m.generation);
|
|
27
|
+
if (m.signature != null && Object.hasOwnProperty.call(m, "signature"))
|
|
28
|
+
w.uint32(18).bytes(m.signature);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
DeviceConsistencyCodeMessage.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.DeviceConsistencyCodeMessage();
|
|
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.generation = r.uint32();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.signature = r.bytes();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
DeviceConsistencyCodeMessage.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.DeviceConsistencyCodeMessage)
|
|
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.DeviceConsistencyCodeMessage();
|
|
67
|
+
if (d.generation != null) {
|
|
68
|
+
m.generation = d.generation >>> 0;
|
|
69
|
+
}
|
|
70
|
+
if (d.signature != null) {
|
|
71
|
+
if (typeof d.signature === "string")
|
|
72
|
+
$util.base64.decode(d.signature, m.signature = $util.newBuffer($util.base64.length(d.signature)), 0);
|
|
73
|
+
else if (d.signature.length >= 0)
|
|
74
|
+
m.signature = d.signature;
|
|
75
|
+
}
|
|
76
|
+
return m;
|
|
77
|
+
};
|
|
78
|
+
DeviceConsistencyCodeMessage.toObject = function toObject(m, o) {
|
|
79
|
+
if (!o)
|
|
80
|
+
o = {};
|
|
81
|
+
var d = {};
|
|
82
|
+
if (m.generation != null && m.hasOwnProperty("generation")) {
|
|
83
|
+
d.generation = m.generation;
|
|
84
|
+
if (o.oneofs)
|
|
85
|
+
d._generation = "generation";
|
|
86
|
+
}
|
|
87
|
+
if (m.signature != null && m.hasOwnProperty("signature")) {
|
|
88
|
+
d.signature = o.bytes === String ? $util.base64.encode(m.signature, 0, m.signature.length) : o.bytes === Array ? Array.prototype.slice.call(m.signature) : m.signature;
|
|
89
|
+
if (o.oneofs)
|
|
90
|
+
d._signature = "signature";
|
|
91
|
+
}
|
|
92
|
+
return d;
|
|
93
|
+
};
|
|
94
|
+
DeviceConsistencyCodeMessage.prototype.toJSON = function toJSON() {
|
|
95
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
96
|
+
};
|
|
97
|
+
DeviceConsistencyCodeMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
98
|
+
if (typeUrlPrefix === undefined) {
|
|
99
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
100
|
+
}
|
|
101
|
+
return typeUrlPrefix + "/proto.DeviceConsistencyCodeMessage";
|
|
102
|
+
};
|
|
103
|
+
return DeviceConsistencyCodeMessage;
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function DeviceListMetadata(p) {
|
|
3
|
+
this.senderKeyIndexes = [];
|
|
4
|
+
this.recipientKeyIndexes = [];
|
|
5
|
+
if (p)
|
|
6
|
+
for (var ks = Object.keys(p), i = 0; i < ks.length; ++i)
|
|
7
|
+
if (p[ks[i]] != null && ks[i] !== "__proto__")
|
|
8
|
+
this[ks[i]] = p[ks[i]];
|
|
9
|
+
}
|
|
10
|
+
DeviceListMetadata.prototype.senderKeyHash = null;
|
|
11
|
+
DeviceListMetadata.prototype.senderTimestamp = null;
|
|
12
|
+
DeviceListMetadata.prototype.senderKeyIndexes = $util.emptyArray;
|
|
13
|
+
DeviceListMetadata.prototype.senderAccountType = null;
|
|
14
|
+
DeviceListMetadata.prototype.receiverAccountType = null;
|
|
15
|
+
DeviceListMetadata.prototype.recipientKeyHash = null;
|
|
16
|
+
DeviceListMetadata.prototype.recipientTimestamp = null;
|
|
17
|
+
DeviceListMetadata.prototype.recipientKeyIndexes = $util.emptyArray;
|
|
18
|
+
let $oneOfFields;
|
|
19
|
+
Object.defineProperty(DeviceListMetadata.prototype, "_senderKeyHash", {
|
|
20
|
+
get: $util.oneOfGetter($oneOfFields = ["senderKeyHash"]),
|
|
21
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(DeviceListMetadata.prototype, "_senderTimestamp", {
|
|
24
|
+
get: $util.oneOfGetter($oneOfFields = ["senderTimestamp"]),
|
|
25
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(DeviceListMetadata.prototype, "_senderAccountType", {
|
|
28
|
+
get: $util.oneOfGetter($oneOfFields = ["senderAccountType"]),
|
|
29
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(DeviceListMetadata.prototype, "_receiverAccountType", {
|
|
32
|
+
get: $util.oneOfGetter($oneOfFields = ["receiverAccountType"]),
|
|
33
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(DeviceListMetadata.prototype, "_recipientKeyHash", {
|
|
36
|
+
get: $util.oneOfGetter($oneOfFields = ["recipientKeyHash"]),
|
|
37
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(DeviceListMetadata.prototype, "_recipientTimestamp", {
|
|
40
|
+
get: $util.oneOfGetter($oneOfFields = ["recipientTimestamp"]),
|
|
41
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
42
|
+
});
|
|
43
|
+
DeviceListMetadata.create = function create(properties) {
|
|
44
|
+
return new DeviceListMetadata(properties);
|
|
45
|
+
};
|
|
46
|
+
DeviceListMetadata.encode = function encode(m, w) {
|
|
47
|
+
if (!w)
|
|
48
|
+
w = $Writer.create();
|
|
49
|
+
if (m.senderKeyHash != null && Object.hasOwnProperty.call(m, "senderKeyHash"))
|
|
50
|
+
w.uint32(10).bytes(m.senderKeyHash);
|
|
51
|
+
if (m.senderTimestamp != null && Object.hasOwnProperty.call(m, "senderTimestamp"))
|
|
52
|
+
w.uint32(16).uint64(m.senderTimestamp);
|
|
53
|
+
if (m.senderKeyIndexes != null && m.senderKeyIndexes.length) {
|
|
54
|
+
w.uint32(26).fork();
|
|
55
|
+
for (var i = 0; i < m.senderKeyIndexes.length; ++i)
|
|
56
|
+
w.uint32(m.senderKeyIndexes[i]);
|
|
57
|
+
w.ldelim();
|
|
58
|
+
}
|
|
59
|
+
if (m.senderAccountType != null && Object.hasOwnProperty.call(m, "senderAccountType"))
|
|
60
|
+
w.uint32(32).int32(m.senderAccountType);
|
|
61
|
+
if (m.receiverAccountType != null && Object.hasOwnProperty.call(m, "receiverAccountType"))
|
|
62
|
+
w.uint32(40).int32(m.receiverAccountType);
|
|
63
|
+
if (m.recipientKeyHash != null && Object.hasOwnProperty.call(m, "recipientKeyHash"))
|
|
64
|
+
w.uint32(66).bytes(m.recipientKeyHash);
|
|
65
|
+
if (m.recipientTimestamp != null && Object.hasOwnProperty.call(m, "recipientTimestamp"))
|
|
66
|
+
w.uint32(72).uint64(m.recipientTimestamp);
|
|
67
|
+
if (m.recipientKeyIndexes != null && m.recipientKeyIndexes.length) {
|
|
68
|
+
w.uint32(82).fork();
|
|
69
|
+
for (var i = 0; i < m.recipientKeyIndexes.length; ++i)
|
|
70
|
+
w.uint32(m.recipientKeyIndexes[i]);
|
|
71
|
+
w.ldelim();
|
|
72
|
+
}
|
|
73
|
+
return w;
|
|
74
|
+
};
|
|
75
|
+
DeviceListMetadata.decode = function decode(r, l, e, n) {
|
|
76
|
+
if (!(r instanceof $Reader))
|
|
77
|
+
r = $Reader.create(r);
|
|
78
|
+
if (n === undefined)
|
|
79
|
+
n = 0;
|
|
80
|
+
if (n > $Reader.recursionLimit)
|
|
81
|
+
throw Error("maximum nesting depth exceeded");
|
|
82
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.DeviceListMetadata();
|
|
83
|
+
while (r.pos < c) {
|
|
84
|
+
var t = r.uint32();
|
|
85
|
+
if (t === e)
|
|
86
|
+
break;
|
|
87
|
+
switch (t >>> 3) {
|
|
88
|
+
case 1: {
|
|
89
|
+
m.senderKeyHash = r.bytes();
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
case 2: {
|
|
93
|
+
m.senderTimestamp = r.uint64();
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
case 3: {
|
|
97
|
+
if (!(m.senderKeyIndexes && m.senderKeyIndexes.length))
|
|
98
|
+
m.senderKeyIndexes = [];
|
|
99
|
+
if ((t & 7) === 2) {
|
|
100
|
+
var c2 = r.uint32() + r.pos;
|
|
101
|
+
while (r.pos < c2)
|
|
102
|
+
m.senderKeyIndexes.push(r.uint32());
|
|
103
|
+
} else
|
|
104
|
+
m.senderKeyIndexes.push(r.uint32());
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
case 4: {
|
|
108
|
+
m.senderAccountType = r.int32();
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
case 5: {
|
|
112
|
+
m.receiverAccountType = r.int32();
|
|
113
|
+
break;
|
|
114
|
+
}
|
|
115
|
+
case 8: {
|
|
116
|
+
m.recipientKeyHash = r.bytes();
|
|
117
|
+
break;
|
|
118
|
+
}
|
|
119
|
+
case 9: {
|
|
120
|
+
m.recipientTimestamp = r.uint64();
|
|
121
|
+
break;
|
|
122
|
+
}
|
|
123
|
+
case 10: {
|
|
124
|
+
if (!(m.recipientKeyIndexes && m.recipientKeyIndexes.length))
|
|
125
|
+
m.recipientKeyIndexes = [];
|
|
126
|
+
if ((t & 7) === 2) {
|
|
127
|
+
var c2 = r.uint32() + r.pos;
|
|
128
|
+
while (r.pos < c2)
|
|
129
|
+
m.recipientKeyIndexes.push(r.uint32());
|
|
130
|
+
} else
|
|
131
|
+
m.recipientKeyIndexes.push(r.uint32());
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
default:
|
|
135
|
+
r.skipType(t & 7, n);
|
|
136
|
+
break;
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return m;
|
|
140
|
+
};
|
|
141
|
+
DeviceListMetadata.fromObject = function fromObject(d, n) {
|
|
142
|
+
if (d instanceof $root.proto.DeviceListMetadata)
|
|
143
|
+
return d;
|
|
144
|
+
if (n === undefined)
|
|
145
|
+
n = 0;
|
|
146
|
+
if (n > $util.recursionLimit)
|
|
147
|
+
throw Error("maximum nesting depth exceeded");
|
|
148
|
+
var m = new $root.proto.DeviceListMetadata();
|
|
149
|
+
if (d.senderKeyHash != null) {
|
|
150
|
+
if (typeof d.senderKeyHash === "string")
|
|
151
|
+
$util.base64.decode(d.senderKeyHash, m.senderKeyHash = $util.newBuffer($util.base64.length(d.senderKeyHash)), 0);
|
|
152
|
+
else if (d.senderKeyHash.length >= 0)
|
|
153
|
+
m.senderKeyHash = d.senderKeyHash;
|
|
154
|
+
}
|
|
155
|
+
if (d.senderTimestamp != null) {
|
|
156
|
+
if ($util.Long)
|
|
157
|
+
(m.senderTimestamp = $util.Long.fromValue(d.senderTimestamp)).unsigned = true;
|
|
158
|
+
else if (typeof d.senderTimestamp === "string")
|
|
159
|
+
m.senderTimestamp = parseInt(d.senderTimestamp, 10);
|
|
160
|
+
else if (typeof d.senderTimestamp === "number")
|
|
161
|
+
m.senderTimestamp = d.senderTimestamp;
|
|
162
|
+
else if (typeof d.senderTimestamp === "object")
|
|
163
|
+
m.senderTimestamp = new $util.LongBits(d.senderTimestamp.low >>> 0, d.senderTimestamp.high >>> 0).toNumber(true);
|
|
164
|
+
}
|
|
165
|
+
if (d.senderKeyIndexes) {
|
|
166
|
+
if (!Array.isArray(d.senderKeyIndexes))
|
|
167
|
+
throw TypeError(".proto.DeviceListMetadata.senderKeyIndexes: array expected");
|
|
168
|
+
m.senderKeyIndexes = [];
|
|
169
|
+
for (var i = 0; i < d.senderKeyIndexes.length; ++i) {
|
|
170
|
+
m.senderKeyIndexes[i] = d.senderKeyIndexes[i] >>> 0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
switch (d.senderAccountType) {
|
|
174
|
+
default:
|
|
175
|
+
if (typeof d.senderAccountType === "number") {
|
|
176
|
+
m.senderAccountType = d.senderAccountType;
|
|
177
|
+
break;
|
|
178
|
+
}
|
|
179
|
+
break;
|
|
180
|
+
case "E2EE":
|
|
181
|
+
case 0:
|
|
182
|
+
m.senderAccountType = 0;
|
|
183
|
+
break;
|
|
184
|
+
case "HOSTED":
|
|
185
|
+
case 1:
|
|
186
|
+
m.senderAccountType = 1;
|
|
187
|
+
break;
|
|
188
|
+
case "NON_E2EE":
|
|
189
|
+
case 2:
|
|
190
|
+
m.senderAccountType = 2;
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
193
|
+
switch (d.receiverAccountType) {
|
|
194
|
+
default:
|
|
195
|
+
if (typeof d.receiverAccountType === "number") {
|
|
196
|
+
m.receiverAccountType = d.receiverAccountType;
|
|
197
|
+
break;
|
|
198
|
+
}
|
|
199
|
+
break;
|
|
200
|
+
case "E2EE":
|
|
201
|
+
case 0:
|
|
202
|
+
m.receiverAccountType = 0;
|
|
203
|
+
break;
|
|
204
|
+
case "HOSTED":
|
|
205
|
+
case 1:
|
|
206
|
+
m.receiverAccountType = 1;
|
|
207
|
+
break;
|
|
208
|
+
case "NON_E2EE":
|
|
209
|
+
case 2:
|
|
210
|
+
m.receiverAccountType = 2;
|
|
211
|
+
break;
|
|
212
|
+
}
|
|
213
|
+
if (d.recipientKeyHash != null) {
|
|
214
|
+
if (typeof d.recipientKeyHash === "string")
|
|
215
|
+
$util.base64.decode(d.recipientKeyHash, m.recipientKeyHash = $util.newBuffer($util.base64.length(d.recipientKeyHash)), 0);
|
|
216
|
+
else if (d.recipientKeyHash.length >= 0)
|
|
217
|
+
m.recipientKeyHash = d.recipientKeyHash;
|
|
218
|
+
}
|
|
219
|
+
if (d.recipientTimestamp != null) {
|
|
220
|
+
if ($util.Long)
|
|
221
|
+
(m.recipientTimestamp = $util.Long.fromValue(d.recipientTimestamp)).unsigned = true;
|
|
222
|
+
else if (typeof d.recipientTimestamp === "string")
|
|
223
|
+
m.recipientTimestamp = parseInt(d.recipientTimestamp, 10);
|
|
224
|
+
else if (typeof d.recipientTimestamp === "number")
|
|
225
|
+
m.recipientTimestamp = d.recipientTimestamp;
|
|
226
|
+
else if (typeof d.recipientTimestamp === "object")
|
|
227
|
+
m.recipientTimestamp = new $util.LongBits(d.recipientTimestamp.low >>> 0, d.recipientTimestamp.high >>> 0).toNumber(true);
|
|
228
|
+
}
|
|
229
|
+
if (d.recipientKeyIndexes) {
|
|
230
|
+
if (!Array.isArray(d.recipientKeyIndexes))
|
|
231
|
+
throw TypeError(".proto.DeviceListMetadata.recipientKeyIndexes: array expected");
|
|
232
|
+
m.recipientKeyIndexes = [];
|
|
233
|
+
for (var i = 0; i < d.recipientKeyIndexes.length; ++i) {
|
|
234
|
+
m.recipientKeyIndexes[i] = d.recipientKeyIndexes[i] >>> 0;
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
return m;
|
|
238
|
+
};
|
|
239
|
+
DeviceListMetadata.toObject = function toObject(m, o) {
|
|
240
|
+
if (!o)
|
|
241
|
+
o = {};
|
|
242
|
+
var d = {};
|
|
243
|
+
if (o.arrays || o.defaults) {
|
|
244
|
+
d.senderKeyIndexes = [];
|
|
245
|
+
d.recipientKeyIndexes = [];
|
|
246
|
+
}
|
|
247
|
+
if (m.senderKeyHash != null && m.hasOwnProperty("senderKeyHash")) {
|
|
248
|
+
d.senderKeyHash = o.bytes === String ? $util.base64.encode(m.senderKeyHash, 0, m.senderKeyHash.length) : o.bytes === Array ? Array.prototype.slice.call(m.senderKeyHash) : m.senderKeyHash;
|
|
249
|
+
if (o.oneofs)
|
|
250
|
+
d._senderKeyHash = "senderKeyHash";
|
|
251
|
+
}
|
|
252
|
+
if (m.senderTimestamp != null && m.hasOwnProperty("senderTimestamp")) {
|
|
253
|
+
if (typeof m.senderTimestamp === "number")
|
|
254
|
+
d.senderTimestamp = o.longs === String ? String(m.senderTimestamp) : m.senderTimestamp;
|
|
255
|
+
else
|
|
256
|
+
d.senderTimestamp = o.longs === String ? longToString(m.senderTimestamp, true) : o.longs === Number ? longToNumber(m.senderTimestamp, true) : m.senderTimestamp;
|
|
257
|
+
if (o.oneofs)
|
|
258
|
+
d._senderTimestamp = "senderTimestamp";
|
|
259
|
+
}
|
|
260
|
+
if (m.senderKeyIndexes && m.senderKeyIndexes.length) {
|
|
261
|
+
d.senderKeyIndexes = [];
|
|
262
|
+
for (var j = 0; j < m.senderKeyIndexes.length; ++j) {
|
|
263
|
+
d.senderKeyIndexes[j] = m.senderKeyIndexes[j];
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
if (m.senderAccountType != null && m.hasOwnProperty("senderAccountType")) {
|
|
267
|
+
d.senderAccountType = o.enums === String ? $root.proto.ADVEncryptionType[m.senderAccountType] === undefined ? m.senderAccountType : $root.proto.ADVEncryptionType[m.senderAccountType] : m.senderAccountType;
|
|
268
|
+
if (o.oneofs)
|
|
269
|
+
d._senderAccountType = "senderAccountType";
|
|
270
|
+
}
|
|
271
|
+
if (m.receiverAccountType != null && m.hasOwnProperty("receiverAccountType")) {
|
|
272
|
+
d.receiverAccountType = o.enums === String ? $root.proto.ADVEncryptionType[m.receiverAccountType] === undefined ? m.receiverAccountType : $root.proto.ADVEncryptionType[m.receiverAccountType] : m.receiverAccountType;
|
|
273
|
+
if (o.oneofs)
|
|
274
|
+
d._receiverAccountType = "receiverAccountType";
|
|
275
|
+
}
|
|
276
|
+
if (m.recipientKeyHash != null && m.hasOwnProperty("recipientKeyHash")) {
|
|
277
|
+
d.recipientKeyHash = o.bytes === String ? $util.base64.encode(m.recipientKeyHash, 0, m.recipientKeyHash.length) : o.bytes === Array ? Array.prototype.slice.call(m.recipientKeyHash) : m.recipientKeyHash;
|
|
278
|
+
if (o.oneofs)
|
|
279
|
+
d._recipientKeyHash = "recipientKeyHash";
|
|
280
|
+
}
|
|
281
|
+
if (m.recipientTimestamp != null && m.hasOwnProperty("recipientTimestamp")) {
|
|
282
|
+
if (typeof m.recipientTimestamp === "number")
|
|
283
|
+
d.recipientTimestamp = o.longs === String ? String(m.recipientTimestamp) : m.recipientTimestamp;
|
|
284
|
+
else
|
|
285
|
+
d.recipientTimestamp = o.longs === String ? longToString(m.recipientTimestamp, true) : o.longs === Number ? longToNumber(m.recipientTimestamp, true) : m.recipientTimestamp;
|
|
286
|
+
if (o.oneofs)
|
|
287
|
+
d._recipientTimestamp = "recipientTimestamp";
|
|
288
|
+
}
|
|
289
|
+
if (m.recipientKeyIndexes && m.recipientKeyIndexes.length) {
|
|
290
|
+
d.recipientKeyIndexes = [];
|
|
291
|
+
for (var j = 0; j < m.recipientKeyIndexes.length; ++j) {
|
|
292
|
+
d.recipientKeyIndexes[j] = m.recipientKeyIndexes[j];
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
return d;
|
|
296
|
+
};
|
|
297
|
+
DeviceListMetadata.prototype.toJSON = function toJSON() {
|
|
298
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
299
|
+
};
|
|
300
|
+
DeviceListMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
301
|
+
if (typeUrlPrefix === undefined) {
|
|
302
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
303
|
+
}
|
|
304
|
+
return typeUrlPrefix + "/proto.DeviceListMetadata";
|
|
305
|
+
};
|
|
306
|
+
return DeviceListMetadata;
|