@hiroosy/baileys-lite 0.3.3 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WAProto/index.js +247 -113252
- package/WAProto/parts/ADVDeviceIdentity.part +201 -0
- package/WAProto/parts/ADVEncryptionType.part +6 -0
- package/WAProto/parts/ADVKeyIndexList.part +201 -0
- package/WAProto/parts/ADVSignedDeviceIdentity.part +150 -0
- package/WAProto/parts/ADVSignedDeviceIdentityHMAC.part +142 -0
- package/WAProto/parts/ADVSignedKeyIndexList.part +128 -0
- package/WAProto/parts/AIHomeState.part +405 -0
- package/WAProto/parts/AIMediaCollectionMessage.part +119 -0
- package/WAProto/parts/AIMediaCollectionMetadata.part +100 -0
- package/WAProto/parts/AIMetadataOperation.part +83 -0
- package/WAProto/parts/AIQueryFanout.part +133 -0
- package/WAProto/parts/AIRegenerateMetadata.part +112 -0
- package/WAProto/parts/AIRichResponseCodeMetadata.part +252 -0
- package/WAProto/parts/AIRichResponseContentItemsMetadata.part +354 -0
- package/WAProto/parts/AIRichResponseDynamicMetadata.part +172 -0
- package/WAProto/parts/AIRichResponseGridImageMetadata.part +114 -0
- package/WAProto/parts/AIRichResponseImageURL.part +119 -0
- package/WAProto/parts/AIRichResponseInlineImageMetadata.part +164 -0
- package/WAProto/parts/AIRichResponseLatexMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMapMetadata.part +346 -0
- package/WAProto/parts/AIRichResponseMessage.part +167 -0
- package/WAProto/parts/AIRichResponseMessageType.part +5 -0
- package/WAProto/parts/AIRichResponseSubMessage.part +313 -0
- package/WAProto/parts/AIRichResponseSubMessageType.part +13 -0
- package/WAProto/parts/AIRichResponseTableMetadata.part +223 -0
- package/WAProto/parts/AIRichResponseUnifiedResponse.part +84 -0
- package/WAProto/parts/AISubscriptionRequestType.part +7 -0
- package/WAProto/parts/AISubscriptionUpsellMetadata.part +102 -0
- package/WAProto/parts/AIThreadInfo.part +316 -0
- package/WAProto/parts/Account.part +138 -0
- package/WAProto/parts/ActionLink.part +100 -0
- package/WAProto/parts/AutoDownloadSettings.part +138 -0
- package/WAProto/parts/AvatarUserSettings.part +100 -0
- package/WAProto/parts/BizAccountLinkInfo.part +210 -0
- package/WAProto/parts/BizAccountPayload.part +105 -0
- package/WAProto/parts/BizIdentityInfo.part +298 -0
- package/WAProto/parts/BotAgeCollectionMetadata.part +138 -0
- package/WAProto/parts/BotAgentDeepLinkMetadata.part +81 -0
- package/WAProto/parts/BotAgentMetadata.part +83 -0
- package/WAProto/parts/BotCapabilityMetadata.part +437 -0
- package/WAProto/parts/BotCommandMetadata.part +119 -0
- package/WAProto/parts/BotDocumentMessageMetadata.part +100 -0
- package/WAProto/parts/BotFeedbackMessage.part +1366 -0
- package/WAProto/parts/BotGroupMetadata.part +92 -0
- package/WAProto/parts/BotGroupParticipantMetadata.part +81 -0
- package/WAProto/parts/BotImagineMetadata.part +134 -0
- package/WAProto/parts/BotInfrastructureDiagnostics.part +148 -0
- package/WAProto/parts/BotLinkedAccount.part +95 -0
- package/WAProto/parts/BotLinkedAccountsMetadata.part +134 -0
- package/WAProto/parts/BotMediaMetadata.part +229 -0
- package/WAProto/parts/BotMemoryFact.part +100 -0
- package/WAProto/parts/BotMemoryMetadata.part +141 -0
- package/WAProto/parts/BotMemuMetadata.part +92 -0
- package/WAProto/parts/BotMessageOrigin.part +95 -0
- package/WAProto/parts/BotMessageOriginMetadata.part +92 -0
- package/WAProto/parts/BotMessageSharingInfo.part +297 -0
- package/WAProto/parts/BotMetadata.part +934 -0
- package/WAProto/parts/BotMetricsEntryPoint.part +51 -0
- package/WAProto/parts/BotMetricsMetadata.part +341 -0
- package/WAProto/parts/BotMetricsThreadEntryPoint.part +8 -0
- package/WAProto/parts/BotModeSelectionMetadata.part +151 -0
- package/WAProto/parts/BotModelMetadata.part +167 -0
- package/WAProto/parts/BotPluginMetadata.part +379 -0
- package/WAProto/parts/BotProgressIndicatorMetadata.part +837 -0
- package/WAProto/parts/BotPromotionMessageMetadata.part +124 -0
- package/WAProto/parts/BotPromptSuggestion.part +100 -0
- package/WAProto/parts/BotPromptSuggestions.part +92 -0
- package/WAProto/parts/BotPttPromptMetadata.part +81 -0
- package/WAProto/parts/BotQuotaMetadata.part +241 -0
- package/WAProto/parts/BotReminderMetadata.part +232 -0
- package/WAProto/parts/BotRenderingConfigMetadata.part +100 -0
- package/WAProto/parts/BotRenderingMetadata.part +203 -0
- package/WAProto/parts/BotResolvedToolCallMetadata.part +100 -0
- package/WAProto/parts/BotSessionMetadata.part +137 -0
- package/WAProto/parts/BotSessionSource.part +11 -0
- package/WAProto/parts/BotSignatureVerificationMetadata.part +92 -0
- package/WAProto/parts/BotSignatureVerificationUseCaseProof.part +183 -0
- package/WAProto/parts/BotSourcesMetadata.part +322 -0
- package/WAProto/parts/BotSuggestedPromptMetadata.part +150 -0
- package/WAProto/parts/BotUnifiedResponseMutation.part +339 -0
- package/WAProto/parts/CallLogRecord.part +646 -0
- package/WAProto/parts/CertChain.part +392 -0
- package/WAProto/parts/ChatLockSettings.part +102 -0
- package/WAProto/parts/ChatRowOpaqueData.part +712 -0
- package/WAProto/parts/Citation.part +119 -0
- package/WAProto/parts/ClientPairingProps.part +160 -0
- package/WAProto/parts/ClientPayload.part +2892 -0
- package/WAProto/parts/CollectionName.part +9 -0
- package/WAProto/parts/CommentMetadata.part +102 -0
- package/WAProto/parts/CompanionCommitment.part +84 -0
- package/WAProto/parts/CompanionEphemeralIdentity.part +227 -0
- package/WAProto/parts/Config.part +136 -0
- package/WAProto/parts/ContextInfo.part +4137 -0
- package/WAProto/parts/Conversation.part +1472 -0
- package/WAProto/parts/DeviceCapabilities.part +670 -0
- package/WAProto/parts/DeviceConsistencyCodeMessage.part +103 -0
- package/WAProto/parts/DeviceListMetadata.part +306 -0
- package/WAProto/parts/DeviceProps.part +982 -0
- package/WAProto/parts/DisappearingMode.part +206 -0
- package/WAProto/parts/EmbeddedContent.part +100 -0
- package/WAProto/parts/EmbeddedMessage.part +102 -0
- package/WAProto/parts/EmbeddedMusic.part +370 -0
- package/WAProto/parts/EncryptedPairingRequest.part +106 -0
- package/WAProto/parts/EphemeralSetting.part +110 -0
- package/WAProto/parts/EventAdditionalMetadata.part +81 -0
- package/WAProto/parts/EventResponse.part +152 -0
- package/WAProto/parts/ExitCode.part +110 -0
- package/WAProto/parts/ExternalBlobReference.part +195 -0
- package/WAProto/parts/Field.part +193 -0
- package/WAProto/parts/ForwardedAIBotMessageInfo.part +119 -0
- package/WAProto/parts/GlobalSettings.part +497 -0
- package/WAProto/parts/GroupHistoryBundleInfo.part +141 -0
- package/WAProto/parts/GroupHistoryIndividualMessageInfo.part +102 -0
- package/WAProto/parts/GroupMention.part +100 -0
- package/WAProto/parts/GroupParticipant.part +142 -0
- package/WAProto/parts/GroupRootKeyShare.part +92 -0
- package/WAProto/parts/GroupRootKeyShareEntry.part +161 -0
- package/WAProto/parts/HandshakeMessage.part +815 -0
- package/WAProto/parts/HatchMetadataSync.part +132 -0
- package/WAProto/parts/HistorySync.part +605 -0
- package/WAProto/parts/HistorySyncMsg.part +112 -0
- package/WAProto/parts/HydratedTemplateButton.part +501 -0
- package/WAProto/parts/IdentityKeyPairStructure.part +106 -0
- package/WAProto/parts/InThreadSurveyMetadata.part +779 -0
- package/WAProto/parts/InlineContact.part +157 -0
- package/WAProto/parts/InteractiveAnnotation.part +246 -0
- package/WAProto/parts/InteractiveMessageAdditionalMetadata.part +81 -0
- package/WAProto/parts/KeepInChat.part +225 -0
- package/WAProto/parts/KeepType.part +6 -0
- package/WAProto/parts/KeyExchangeMessage.part +169 -0
- package/WAProto/parts/KeyId.part +84 -0
- package/WAProto/parts/LIDMigrationMapping.part +149 -0
- package/WAProto/parts/LIDMigrationMappingSyncMessage.part +84 -0
- package/WAProto/parts/LIDMigrationMappingSyncPayload.part +122 -0
- package/WAProto/parts/LegacyMessage.part +104 -0
- package/WAProto/parts/LimitSharing.part +177 -0
- package/WAProto/parts/LocalizedName.part +119 -0
- package/WAProto/parts/Location.part +119 -0
- package/WAProto/parts/MediaData.part +81 -0
- package/WAProto/parts/MediaDomainInfo.part +120 -0
- package/WAProto/parts/MediaKeyDomain.part +6 -0
- package/WAProto/parts/MediaNotifyMessage.part +132 -0
- package/WAProto/parts/MediaRetryNotification.part +170 -0
- package/WAProto/parts/MediaVisibility.part +6 -0
- package/WAProto/parts/MemberLabel.part +110 -0
- package/WAProto/parts/Message.part +32376 -0
- package/WAProto/parts/MessageAddOn.part +305 -0
- package/WAProto/parts/MessageAddOnContextInfo.part +113 -0
- package/WAProto/parts/MessageAssociation.part +235 -0
- package/WAProto/parts/MessageContextInfo.part +451 -0
- package/WAProto/parts/MessageKey.part +138 -0
- package/WAProto/parts/MessageSecretMessage.part +125 -0
- package/WAProto/parts/Money.part +129 -0
- package/WAProto/parts/MsgOpaqueData.part +1732 -0
- package/WAProto/parts/MsgRowOpaqueData.part +104 -0
- package/WAProto/parts/MutationProps.part +89 -0
- package/WAProto/parts/NoiseCertificate.part +277 -0
- package/WAProto/parts/NotificationMessageInfo.part +152 -0
- package/WAProto/parts/NotificationSettings.part +176 -0
- package/WAProto/parts/PairingRequest.part +128 -0
- package/WAProto/parts/PastParticipant.part +148 -0
- package/WAProto/parts/PastParticipants.part +112 -0
- package/WAProto/parts/PatchDebugData.part +358 -0
- package/WAProto/parts/PaymentBackground.part +460 -0
- package/WAProto/parts/PaymentInfo.part +602 -0
- package/WAProto/parts/PhoneNumberToLIDMapping.part +100 -0
- package/WAProto/parts/PhotoChange.part +125 -0
- package/WAProto/parts/PinInChat.part +205 -0
- package/WAProto/parts/Point.part +138 -0
- package/WAProto/parts/PollAdditionalMetadata.part +216 -0
- package/WAProto/parts/PollEncValue.part +106 -0
- package/WAProto/parts/PollUpdate.part +202 -0
- package/WAProto/parts/PreKeyRecordStructure.part +125 -0
- package/WAProto/parts/PreKeySignalMessage.part +185 -0
- package/WAProto/parts/PremiumMessageInfo.part +81 -0
- package/WAProto/parts/PrimaryEphemeralIdentity.part +106 -0
- package/WAProto/parts/PrivacySystemMessage.part +6 -0
- package/WAProto/parts/ProcessedVideo.part +266 -0
- package/WAProto/parts/ProloguePayload.part +105 -0
- package/WAProto/parts/Pushname.part +100 -0
- package/WAProto/parts/QuarantinedMessage.part +103 -0
- package/WAProto/parts/Reaction.part +169 -0
- package/WAProto/parts/RecentEmojiWeight.part +100 -0
- package/WAProto/parts/RecordStructure.part +114 -0
- package/WAProto/parts/Reportable.part +138 -0
- package/WAProto/parts/ReportingTokenInfo.part +84 -0
- package/WAProto/parts/ScheduledMessageMetadata.part +132 -0
- package/WAProto/parts/SenderKeyDistributionMessage.part +144 -0
- package/WAProto/parts/SenderKeyMessage.part +122 -0
- package/WAProto/parts/SenderKeyRecordStructure.part +92 -0
- package/WAProto/parts/SenderKeyStateStructure.part +469 -0
- package/WAProto/parts/ServerErrorReceipt.part +81 -0
- package/WAProto/parts/SessionStructure.part +1087 -0
- package/WAProto/parts/SessionTransparencyMetadata.part +132 -0
- package/WAProto/parts/SessionTransparencyType.part +5 -0
- package/WAProto/parts/SignalMessage.part +144 -0
- package/WAProto/parts/SignedPreKeyRecordStructure.part +176 -0
- package/WAProto/parts/StatusAttribution.part +1235 -0
- package/WAProto/parts/StatusMentionMessage.part +83 -0
- package/WAProto/parts/StatusPSA.part +121 -0
- package/WAProto/parts/StickerMetadata.part +357 -0
- package/WAProto/parts/SyncActionData.part +146 -0
- package/WAProto/parts/SyncActionValue.part +12959 -0
- package/WAProto/parts/SyncdIndex.part +84 -0
- package/WAProto/parts/SyncdMutation.part +121 -0
- package/WAProto/parts/SyncdMutations.part +92 -0
- package/WAProto/parts/SyncdPatch.part +262 -0
- package/WAProto/parts/SyncdRecord.part +125 -0
- package/WAProto/parts/SyncdSnapshot.part +157 -0
- package/WAProto/parts/SyncdValue.part +84 -0
- package/WAProto/parts/SyncdVersion.part +91 -0
- package/WAProto/parts/TapLinkAction.part +100 -0
- package/WAProto/parts/TemplateButton.part +449 -0
- package/WAProto/parts/ThreadID.part +126 -0
- package/WAProto/parts/UrlTrackingMap.part +231 -0
- package/WAProto/parts/UserPassword.part +399 -0
- package/WAProto/parts/UserReceipt.part +221 -0
- package/WAProto/parts/VerifiedNameCertificate.part +318 -0
- package/WAProto/parts/WallpaperSettings.part +119 -0
- package/WAProto/parts/WebFeatures.part +1870 -0
- package/WAProto/parts/WebLinkRenderConfig.part +5 -0
- package/WAProto/parts/WebMessageInfo.part +2851 -0
- package/WAProto/parts/WebNotificationsInfo.part +160 -0
- package/package.json +1 -1
- package/src/binary/wa-binary.js +4 -2
- package/src/defaults.js +2 -1
- package/src/foundation/cache.js +99 -24
- package/src/foundation/memory.js +103 -0
- package/src/signal/libsignal.js +1 -8
- package/src/signal/signal-repository.js +6 -4
- package/src/socket/chats.js +2 -0
- package/src/socket/messages-recv.js +5 -3
- package/src/socket/messages-send.js +2 -2
- package/src/socket/socket-core.js +3 -0
- package/src/utils/auth-state-core.js +2 -1
- package/src/utils/chat-sync.js +4 -0
- package/src/utils/media.js +13 -8
- package/src/utils/message-processing.js +22 -6
- package/src/utils/wa-protocol-core.js +6 -5
- package/src/wam/wam-constants.js +22 -22851
- package/src/wam/wam-data.json +1 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncdSnapshot(p) {
|
|
3
|
+
this.records = [];
|
|
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
|
+
SyncdSnapshot.prototype.version = null;
|
|
10
|
+
SyncdSnapshot.prototype.records = $util.emptyArray;
|
|
11
|
+
SyncdSnapshot.prototype.mac = null;
|
|
12
|
+
SyncdSnapshot.prototype.keyId = null;
|
|
13
|
+
let $oneOfFields;
|
|
14
|
+
Object.defineProperty(SyncdSnapshot.prototype, "_version", {
|
|
15
|
+
get: $util.oneOfGetter($oneOfFields = ["version"]),
|
|
16
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(SyncdSnapshot.prototype, "_mac", {
|
|
19
|
+
get: $util.oneOfGetter($oneOfFields = ["mac"]),
|
|
20
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(SyncdSnapshot.prototype, "_keyId", {
|
|
23
|
+
get: $util.oneOfGetter($oneOfFields = ["keyId"]),
|
|
24
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
25
|
+
});
|
|
26
|
+
SyncdSnapshot.create = function create(properties) {
|
|
27
|
+
return new SyncdSnapshot(properties);
|
|
28
|
+
};
|
|
29
|
+
SyncdSnapshot.encode = function encode(m, w) {
|
|
30
|
+
if (!w)
|
|
31
|
+
w = $Writer.create();
|
|
32
|
+
if (m.version != null && Object.hasOwnProperty.call(m, "version"))
|
|
33
|
+
$root.proto.SyncdVersion.encode(m.version, w.uint32(10).fork()).ldelim();
|
|
34
|
+
if (m.records != null && m.records.length) {
|
|
35
|
+
for (var i = 0; i < m.records.length; ++i)
|
|
36
|
+
$root.proto.SyncdRecord.encode(m.records[i], w.uint32(18).fork()).ldelim();
|
|
37
|
+
}
|
|
38
|
+
if (m.mac != null && Object.hasOwnProperty.call(m, "mac"))
|
|
39
|
+
w.uint32(26).bytes(m.mac);
|
|
40
|
+
if (m.keyId != null && Object.hasOwnProperty.call(m, "keyId"))
|
|
41
|
+
$root.proto.KeyId.encode(m.keyId, w.uint32(34).fork()).ldelim();
|
|
42
|
+
return w;
|
|
43
|
+
};
|
|
44
|
+
SyncdSnapshot.decode = function decode(r, l, e, n) {
|
|
45
|
+
if (!(r instanceof $Reader))
|
|
46
|
+
r = $Reader.create(r);
|
|
47
|
+
if (n === undefined)
|
|
48
|
+
n = 0;
|
|
49
|
+
if (n > $Reader.recursionLimit)
|
|
50
|
+
throw Error("maximum nesting depth exceeded");
|
|
51
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.SyncdSnapshot();
|
|
52
|
+
while (r.pos < c) {
|
|
53
|
+
var t = r.uint32();
|
|
54
|
+
if (t === e)
|
|
55
|
+
break;
|
|
56
|
+
switch (t >>> 3) {
|
|
57
|
+
case 1: {
|
|
58
|
+
m.version = $root.proto.SyncdVersion.decode(r, r.uint32(), undefined, n + 1);
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case 2: {
|
|
62
|
+
if (!(m.records && m.records.length))
|
|
63
|
+
m.records = [];
|
|
64
|
+
m.records.push($root.proto.SyncdRecord.decode(r, r.uint32(), undefined, n + 1));
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
case 3: {
|
|
68
|
+
m.mac = r.bytes();
|
|
69
|
+
break;
|
|
70
|
+
}
|
|
71
|
+
case 4: {
|
|
72
|
+
m.keyId = $root.proto.KeyId.decode(r, r.uint32(), undefined, n + 1);
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
default:
|
|
76
|
+
r.skipType(t & 7, n);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return m;
|
|
81
|
+
};
|
|
82
|
+
SyncdSnapshot.fromObject = function fromObject(d, n) {
|
|
83
|
+
if (d instanceof $root.proto.SyncdSnapshot)
|
|
84
|
+
return d;
|
|
85
|
+
if (n === undefined)
|
|
86
|
+
n = 0;
|
|
87
|
+
if (n > $util.recursionLimit)
|
|
88
|
+
throw Error("maximum nesting depth exceeded");
|
|
89
|
+
var m = new $root.proto.SyncdSnapshot();
|
|
90
|
+
if (d.version != null) {
|
|
91
|
+
if (typeof d.version !== "object")
|
|
92
|
+
throw TypeError(".proto.SyncdSnapshot.version: object expected");
|
|
93
|
+
m.version = $root.proto.SyncdVersion.fromObject(d.version, n + 1);
|
|
94
|
+
}
|
|
95
|
+
if (d.records) {
|
|
96
|
+
if (!Array.isArray(d.records))
|
|
97
|
+
throw TypeError(".proto.SyncdSnapshot.records: array expected");
|
|
98
|
+
m.records = [];
|
|
99
|
+
for (var i = 0; i < d.records.length; ++i) {
|
|
100
|
+
if (typeof d.records[i] !== "object")
|
|
101
|
+
throw TypeError(".proto.SyncdSnapshot.records: object expected");
|
|
102
|
+
m.records[i] = $root.proto.SyncdRecord.fromObject(d.records[i], n + 1);
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
if (d.mac != null) {
|
|
106
|
+
if (typeof d.mac === "string")
|
|
107
|
+
$util.base64.decode(d.mac, m.mac = $util.newBuffer($util.base64.length(d.mac)), 0);
|
|
108
|
+
else if (d.mac.length >= 0)
|
|
109
|
+
m.mac = d.mac;
|
|
110
|
+
}
|
|
111
|
+
if (d.keyId != null) {
|
|
112
|
+
if (typeof d.keyId !== "object")
|
|
113
|
+
throw TypeError(".proto.SyncdSnapshot.keyId: object expected");
|
|
114
|
+
m.keyId = $root.proto.KeyId.fromObject(d.keyId, n + 1);
|
|
115
|
+
}
|
|
116
|
+
return m;
|
|
117
|
+
};
|
|
118
|
+
SyncdSnapshot.toObject = function toObject(m, o) {
|
|
119
|
+
if (!o)
|
|
120
|
+
o = {};
|
|
121
|
+
var d = {};
|
|
122
|
+
if (o.arrays || o.defaults) {
|
|
123
|
+
d.records = [];
|
|
124
|
+
}
|
|
125
|
+
if (m.version != null && m.hasOwnProperty("version")) {
|
|
126
|
+
d.version = $root.proto.SyncdVersion.toObject(m.version, o);
|
|
127
|
+
if (o.oneofs)
|
|
128
|
+
d._version = "version";
|
|
129
|
+
}
|
|
130
|
+
if (m.records && m.records.length) {
|
|
131
|
+
d.records = [];
|
|
132
|
+
for (var j = 0; j < m.records.length; ++j) {
|
|
133
|
+
d.records[j] = $root.proto.SyncdRecord.toObject(m.records[j], o);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
if (m.mac != null && m.hasOwnProperty("mac")) {
|
|
137
|
+
d.mac = o.bytes === String ? $util.base64.encode(m.mac, 0, m.mac.length) : o.bytes === Array ? Array.prototype.slice.call(m.mac) : m.mac;
|
|
138
|
+
if (o.oneofs)
|
|
139
|
+
d._mac = "mac";
|
|
140
|
+
}
|
|
141
|
+
if (m.keyId != null && m.hasOwnProperty("keyId")) {
|
|
142
|
+
d.keyId = $root.proto.KeyId.toObject(m.keyId, o);
|
|
143
|
+
if (o.oneofs)
|
|
144
|
+
d._keyId = "keyId";
|
|
145
|
+
}
|
|
146
|
+
return d;
|
|
147
|
+
};
|
|
148
|
+
SyncdSnapshot.prototype.toJSON = function toJSON() {
|
|
149
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
150
|
+
};
|
|
151
|
+
SyncdSnapshot.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
152
|
+
if (typeUrlPrefix === undefined) {
|
|
153
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
154
|
+
}
|
|
155
|
+
return typeUrlPrefix + "/proto.SyncdSnapshot";
|
|
156
|
+
};
|
|
157
|
+
return SyncdSnapshot;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncdValue(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
|
+
SyncdValue.prototype.blob = null;
|
|
9
|
+
let $oneOfFields;
|
|
10
|
+
Object.defineProperty(SyncdValue.prototype, "_blob", {
|
|
11
|
+
get: $util.oneOfGetter($oneOfFields = ["blob"]),
|
|
12
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
13
|
+
});
|
|
14
|
+
SyncdValue.create = function create(properties) {
|
|
15
|
+
return new SyncdValue(properties);
|
|
16
|
+
};
|
|
17
|
+
SyncdValue.encode = function encode(m, w) {
|
|
18
|
+
if (!w)
|
|
19
|
+
w = $Writer.create();
|
|
20
|
+
if (m.blob != null && Object.hasOwnProperty.call(m, "blob"))
|
|
21
|
+
w.uint32(10).bytes(m.blob);
|
|
22
|
+
return w;
|
|
23
|
+
};
|
|
24
|
+
SyncdValue.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.SyncdValue();
|
|
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.blob = r.bytes();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
r.skipType(t & 7, n);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return m;
|
|
47
|
+
};
|
|
48
|
+
SyncdValue.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.SyncdValue)
|
|
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.SyncdValue();
|
|
56
|
+
if (d.blob != null) {
|
|
57
|
+
if (typeof d.blob === "string")
|
|
58
|
+
$util.base64.decode(d.blob, m.blob = $util.newBuffer($util.base64.length(d.blob)), 0);
|
|
59
|
+
else if (d.blob.length >= 0)
|
|
60
|
+
m.blob = d.blob;
|
|
61
|
+
}
|
|
62
|
+
return m;
|
|
63
|
+
};
|
|
64
|
+
SyncdValue.toObject = function toObject(m, o) {
|
|
65
|
+
if (!o)
|
|
66
|
+
o = {};
|
|
67
|
+
var d = {};
|
|
68
|
+
if (m.blob != null && m.hasOwnProperty("blob")) {
|
|
69
|
+
d.blob = o.bytes === String ? $util.base64.encode(m.blob, 0, m.blob.length) : o.bytes === Array ? Array.prototype.slice.call(m.blob) : m.blob;
|
|
70
|
+
if (o.oneofs)
|
|
71
|
+
d._blob = "blob";
|
|
72
|
+
}
|
|
73
|
+
return d;
|
|
74
|
+
};
|
|
75
|
+
SyncdValue.prototype.toJSON = function toJSON() {
|
|
76
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
77
|
+
};
|
|
78
|
+
SyncdValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
79
|
+
if (typeUrlPrefix === undefined) {
|
|
80
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
81
|
+
}
|
|
82
|
+
return typeUrlPrefix + "/proto.SyncdValue";
|
|
83
|
+
};
|
|
84
|
+
return SyncdValue;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncdVersion(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
|
+
SyncdVersion.prototype.version = null;
|
|
9
|
+
let $oneOfFields;
|
|
10
|
+
Object.defineProperty(SyncdVersion.prototype, "_version", {
|
|
11
|
+
get: $util.oneOfGetter($oneOfFields = ["version"]),
|
|
12
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
13
|
+
});
|
|
14
|
+
SyncdVersion.create = function create(properties) {
|
|
15
|
+
return new SyncdVersion(properties);
|
|
16
|
+
};
|
|
17
|
+
SyncdVersion.encode = function encode(m, w) {
|
|
18
|
+
if (!w)
|
|
19
|
+
w = $Writer.create();
|
|
20
|
+
if (m.version != null && Object.hasOwnProperty.call(m, "version"))
|
|
21
|
+
w.uint32(8).uint64(m.version);
|
|
22
|
+
return w;
|
|
23
|
+
};
|
|
24
|
+
SyncdVersion.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.SyncdVersion();
|
|
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.version = r.uint64();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
r.skipType(t & 7, n);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return m;
|
|
47
|
+
};
|
|
48
|
+
SyncdVersion.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.SyncdVersion)
|
|
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.SyncdVersion();
|
|
56
|
+
if (d.version != null) {
|
|
57
|
+
if ($util.Long)
|
|
58
|
+
(m.version = $util.Long.fromValue(d.version)).unsigned = true;
|
|
59
|
+
else if (typeof d.version === "string")
|
|
60
|
+
m.version = parseInt(d.version, 10);
|
|
61
|
+
else if (typeof d.version === "number")
|
|
62
|
+
m.version = d.version;
|
|
63
|
+
else if (typeof d.version === "object")
|
|
64
|
+
m.version = new $util.LongBits(d.version.low >>> 0, d.version.high >>> 0).toNumber(true);
|
|
65
|
+
}
|
|
66
|
+
return m;
|
|
67
|
+
};
|
|
68
|
+
SyncdVersion.toObject = function toObject(m, o) {
|
|
69
|
+
if (!o)
|
|
70
|
+
o = {};
|
|
71
|
+
var d = {};
|
|
72
|
+
if (m.version != null && m.hasOwnProperty("version")) {
|
|
73
|
+
if (typeof m.version === "number")
|
|
74
|
+
d.version = o.longs === String ? String(m.version) : m.version;
|
|
75
|
+
else
|
|
76
|
+
d.version = o.longs === String ? longToString(m.version, true) : o.longs === Number ? longToNumber(m.version, true) : m.version;
|
|
77
|
+
if (o.oneofs)
|
|
78
|
+
d._version = "version";
|
|
79
|
+
}
|
|
80
|
+
return d;
|
|
81
|
+
};
|
|
82
|
+
SyncdVersion.prototype.toJSON = function toJSON() {
|
|
83
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
84
|
+
};
|
|
85
|
+
SyncdVersion.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
86
|
+
if (typeUrlPrefix === undefined) {
|
|
87
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
88
|
+
}
|
|
89
|
+
return typeUrlPrefix + "/proto.SyncdVersion";
|
|
90
|
+
};
|
|
91
|
+
return SyncdVersion;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function TapLinkAction(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
|
+
TapLinkAction.prototype.title = null;
|
|
9
|
+
TapLinkAction.prototype.tapUrl = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(TapLinkAction.prototype, "_title", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["title"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(TapLinkAction.prototype, "_tapUrl", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["tapUrl"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
TapLinkAction.create = function create(properties) {
|
|
20
|
+
return new TapLinkAction(properties);
|
|
21
|
+
};
|
|
22
|
+
TapLinkAction.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.title != null && Object.hasOwnProperty.call(m, "title"))
|
|
26
|
+
w.uint32(10).string(m.title);
|
|
27
|
+
if (m.tapUrl != null && Object.hasOwnProperty.call(m, "tapUrl"))
|
|
28
|
+
w.uint32(18).string(m.tapUrl);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
TapLinkAction.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.TapLinkAction();
|
|
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.title = r.string();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.tapUrl = r.string();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
TapLinkAction.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.TapLinkAction)
|
|
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.TapLinkAction();
|
|
67
|
+
if (d.title != null) {
|
|
68
|
+
m.title = String(d.title);
|
|
69
|
+
}
|
|
70
|
+
if (d.tapUrl != null) {
|
|
71
|
+
m.tapUrl = String(d.tapUrl);
|
|
72
|
+
}
|
|
73
|
+
return m;
|
|
74
|
+
};
|
|
75
|
+
TapLinkAction.toObject = function toObject(m, o) {
|
|
76
|
+
if (!o)
|
|
77
|
+
o = {};
|
|
78
|
+
var d = {};
|
|
79
|
+
if (m.title != null && m.hasOwnProperty("title")) {
|
|
80
|
+
d.title = m.title;
|
|
81
|
+
if (o.oneofs)
|
|
82
|
+
d._title = "title";
|
|
83
|
+
}
|
|
84
|
+
if (m.tapUrl != null && m.hasOwnProperty("tapUrl")) {
|
|
85
|
+
d.tapUrl = m.tapUrl;
|
|
86
|
+
if (o.oneofs)
|
|
87
|
+
d._tapUrl = "tapUrl";
|
|
88
|
+
}
|
|
89
|
+
return d;
|
|
90
|
+
};
|
|
91
|
+
TapLinkAction.prototype.toJSON = function toJSON() {
|
|
92
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
93
|
+
};
|
|
94
|
+
TapLinkAction.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
95
|
+
if (typeUrlPrefix === undefined) {
|
|
96
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
97
|
+
}
|
|
98
|
+
return typeUrlPrefix + "/proto.TapLinkAction";
|
|
99
|
+
};
|
|
100
|
+
return TapLinkAction;
|