@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,84 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncdIndex(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
|
+
SyncdIndex.prototype.blob = null;
|
|
9
|
+
let $oneOfFields;
|
|
10
|
+
Object.defineProperty(SyncdIndex.prototype, "_blob", {
|
|
11
|
+
get: $util.oneOfGetter($oneOfFields = ["blob"]),
|
|
12
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
13
|
+
});
|
|
14
|
+
SyncdIndex.create = function create(properties) {
|
|
15
|
+
return new SyncdIndex(properties);
|
|
16
|
+
};
|
|
17
|
+
SyncdIndex.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
|
+
SyncdIndex.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.SyncdIndex();
|
|
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
|
+
SyncdIndex.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.SyncdIndex)
|
|
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.SyncdIndex();
|
|
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
|
+
SyncdIndex.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
|
+
SyncdIndex.prototype.toJSON = function toJSON() {
|
|
76
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
77
|
+
};
|
|
78
|
+
SyncdIndex.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
79
|
+
if (typeUrlPrefix === undefined) {
|
|
80
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
81
|
+
}
|
|
82
|
+
return typeUrlPrefix + "/proto.SyncdIndex";
|
|
83
|
+
};
|
|
84
|
+
return SyncdIndex;
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncdMutation(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
|
+
SyncdMutation.prototype.operation = null;
|
|
9
|
+
SyncdMutation.prototype.record = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(SyncdMutation.prototype, "_operation", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["operation"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(SyncdMutation.prototype, "_record", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["record"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
SyncdMutation.create = function create(properties) {
|
|
20
|
+
return new SyncdMutation(properties);
|
|
21
|
+
};
|
|
22
|
+
SyncdMutation.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.operation != null && Object.hasOwnProperty.call(m, "operation"))
|
|
26
|
+
w.uint32(8).int32(m.operation);
|
|
27
|
+
if (m.record != null && Object.hasOwnProperty.call(m, "record"))
|
|
28
|
+
$root.proto.SyncdRecord.encode(m.record, w.uint32(18).fork()).ldelim();
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
SyncdMutation.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.SyncdMutation();
|
|
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.operation = r.int32();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.record = $root.proto.SyncdRecord.decode(r, r.uint32(), undefined, n + 1);
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
SyncdMutation.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.SyncdMutation)
|
|
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.SyncdMutation();
|
|
67
|
+
switch (d.operation) {
|
|
68
|
+
default:
|
|
69
|
+
if (typeof d.operation === "number") {
|
|
70
|
+
m.operation = d.operation;
|
|
71
|
+
break;
|
|
72
|
+
}
|
|
73
|
+
break;
|
|
74
|
+
case "SET":
|
|
75
|
+
case 0:
|
|
76
|
+
m.operation = 0;
|
|
77
|
+
break;
|
|
78
|
+
case "REMOVE":
|
|
79
|
+
case 1:
|
|
80
|
+
m.operation = 1;
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
if (d.record != null) {
|
|
84
|
+
if (typeof d.record !== "object")
|
|
85
|
+
throw TypeError(".proto.SyncdMutation.record: object expected");
|
|
86
|
+
m.record = $root.proto.SyncdRecord.fromObject(d.record, n + 1);
|
|
87
|
+
}
|
|
88
|
+
return m;
|
|
89
|
+
};
|
|
90
|
+
SyncdMutation.toObject = function toObject(m, o) {
|
|
91
|
+
if (!o)
|
|
92
|
+
o = {};
|
|
93
|
+
var d = {};
|
|
94
|
+
if (m.operation != null && m.hasOwnProperty("operation")) {
|
|
95
|
+
d.operation = o.enums === String ? $root.proto.SyncdMutation.SyncdOperation[m.operation] === undefined ? m.operation : $root.proto.SyncdMutation.SyncdOperation[m.operation] : m.operation;
|
|
96
|
+
if (o.oneofs)
|
|
97
|
+
d._operation = "operation";
|
|
98
|
+
}
|
|
99
|
+
if (m.record != null && m.hasOwnProperty("record")) {
|
|
100
|
+
d.record = $root.proto.SyncdRecord.toObject(m.record, o);
|
|
101
|
+
if (o.oneofs)
|
|
102
|
+
d._record = "record";
|
|
103
|
+
}
|
|
104
|
+
return d;
|
|
105
|
+
};
|
|
106
|
+
SyncdMutation.prototype.toJSON = function toJSON() {
|
|
107
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
108
|
+
};
|
|
109
|
+
SyncdMutation.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
110
|
+
if (typeUrlPrefix === undefined) {
|
|
111
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
112
|
+
}
|
|
113
|
+
return typeUrlPrefix + "/proto.SyncdMutation";
|
|
114
|
+
};
|
|
115
|
+
$lazy(SyncdMutation, "SyncdOperation", function() {
|
|
116
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
117
|
+
values[valuesById[0] = "SET"] = 0;
|
|
118
|
+
values[valuesById[1] = "REMOVE"] = 1;
|
|
119
|
+
return values;
|
|
120
|
+
});
|
|
121
|
+
return SyncdMutation;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncdMutations(p) {
|
|
3
|
+
this.mutations = [];
|
|
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
|
+
SyncdMutations.prototype.mutations = $util.emptyArray;
|
|
10
|
+
SyncdMutations.create = function create(properties) {
|
|
11
|
+
return new SyncdMutations(properties);
|
|
12
|
+
};
|
|
13
|
+
SyncdMutations.encode = function encode(m, w) {
|
|
14
|
+
if (!w)
|
|
15
|
+
w = $Writer.create();
|
|
16
|
+
if (m.mutations != null && m.mutations.length) {
|
|
17
|
+
for (var i = 0; i < m.mutations.length; ++i)
|
|
18
|
+
$root.proto.SyncdMutation.encode(m.mutations[i], w.uint32(10).fork()).ldelim();
|
|
19
|
+
}
|
|
20
|
+
return w;
|
|
21
|
+
};
|
|
22
|
+
SyncdMutations.decode = function decode(r, l, e, n) {
|
|
23
|
+
if (!(r instanceof $Reader))
|
|
24
|
+
r = $Reader.create(r);
|
|
25
|
+
if (n === undefined)
|
|
26
|
+
n = 0;
|
|
27
|
+
if (n > $Reader.recursionLimit)
|
|
28
|
+
throw Error("maximum nesting depth exceeded");
|
|
29
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.SyncdMutations();
|
|
30
|
+
while (r.pos < c) {
|
|
31
|
+
var t = r.uint32();
|
|
32
|
+
if (t === e)
|
|
33
|
+
break;
|
|
34
|
+
switch (t >>> 3) {
|
|
35
|
+
case 1: {
|
|
36
|
+
if (!(m.mutations && m.mutations.length))
|
|
37
|
+
m.mutations = [];
|
|
38
|
+
m.mutations.push($root.proto.SyncdMutation.decode(r, r.uint32(), undefined, n + 1));
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
r.skipType(t & 7, n);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return m;
|
|
47
|
+
};
|
|
48
|
+
SyncdMutations.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.SyncdMutations)
|
|
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.SyncdMutations();
|
|
56
|
+
if (d.mutations) {
|
|
57
|
+
if (!Array.isArray(d.mutations))
|
|
58
|
+
throw TypeError(".proto.SyncdMutations.mutations: array expected");
|
|
59
|
+
m.mutations = [];
|
|
60
|
+
for (var i = 0; i < d.mutations.length; ++i) {
|
|
61
|
+
if (typeof d.mutations[i] !== "object")
|
|
62
|
+
throw TypeError(".proto.SyncdMutations.mutations: object expected");
|
|
63
|
+
m.mutations[i] = $root.proto.SyncdMutation.fromObject(d.mutations[i], n + 1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return m;
|
|
67
|
+
};
|
|
68
|
+
SyncdMutations.toObject = function toObject(m, o) {
|
|
69
|
+
if (!o)
|
|
70
|
+
o = {};
|
|
71
|
+
var d = {};
|
|
72
|
+
if (o.arrays || o.defaults) {
|
|
73
|
+
d.mutations = [];
|
|
74
|
+
}
|
|
75
|
+
if (m.mutations && m.mutations.length) {
|
|
76
|
+
d.mutations = [];
|
|
77
|
+
for (var j = 0; j < m.mutations.length; ++j) {
|
|
78
|
+
d.mutations[j] = $root.proto.SyncdMutation.toObject(m.mutations[j], o);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return d;
|
|
82
|
+
};
|
|
83
|
+
SyncdMutations.prototype.toJSON = function toJSON() {
|
|
84
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
85
|
+
};
|
|
86
|
+
SyncdMutations.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
87
|
+
if (typeUrlPrefix === undefined) {
|
|
88
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
89
|
+
}
|
|
90
|
+
return typeUrlPrefix + "/proto.SyncdMutations";
|
|
91
|
+
};
|
|
92
|
+
return SyncdMutations;
|
|
@@ -0,0 +1,262 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncdPatch(p) {
|
|
3
|
+
this.mutations = [];
|
|
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
|
+
SyncdPatch.prototype.version = null;
|
|
10
|
+
SyncdPatch.prototype.mutations = $util.emptyArray;
|
|
11
|
+
SyncdPatch.prototype.externalMutations = null;
|
|
12
|
+
SyncdPatch.prototype.snapshotMac = null;
|
|
13
|
+
SyncdPatch.prototype.patchMac = null;
|
|
14
|
+
SyncdPatch.prototype.keyId = null;
|
|
15
|
+
SyncdPatch.prototype.exitCode = null;
|
|
16
|
+
SyncdPatch.prototype.deviceIndex = null;
|
|
17
|
+
SyncdPatch.prototype.clientDebugData = null;
|
|
18
|
+
let $oneOfFields;
|
|
19
|
+
Object.defineProperty(SyncdPatch.prototype, "_version", {
|
|
20
|
+
get: $util.oneOfGetter($oneOfFields = ["version"]),
|
|
21
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(SyncdPatch.prototype, "_externalMutations", {
|
|
24
|
+
get: $util.oneOfGetter($oneOfFields = ["externalMutations"]),
|
|
25
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(SyncdPatch.prototype, "_snapshotMac", {
|
|
28
|
+
get: $util.oneOfGetter($oneOfFields = ["snapshotMac"]),
|
|
29
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(SyncdPatch.prototype, "_patchMac", {
|
|
32
|
+
get: $util.oneOfGetter($oneOfFields = ["patchMac"]),
|
|
33
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
34
|
+
});
|
|
35
|
+
Object.defineProperty(SyncdPatch.prototype, "_keyId", {
|
|
36
|
+
get: $util.oneOfGetter($oneOfFields = ["keyId"]),
|
|
37
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
38
|
+
});
|
|
39
|
+
Object.defineProperty(SyncdPatch.prototype, "_exitCode", {
|
|
40
|
+
get: $util.oneOfGetter($oneOfFields = ["exitCode"]),
|
|
41
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
42
|
+
});
|
|
43
|
+
Object.defineProperty(SyncdPatch.prototype, "_deviceIndex", {
|
|
44
|
+
get: $util.oneOfGetter($oneOfFields = ["deviceIndex"]),
|
|
45
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
46
|
+
});
|
|
47
|
+
Object.defineProperty(SyncdPatch.prototype, "_clientDebugData", {
|
|
48
|
+
get: $util.oneOfGetter($oneOfFields = ["clientDebugData"]),
|
|
49
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
50
|
+
});
|
|
51
|
+
SyncdPatch.create = function create(properties) {
|
|
52
|
+
return new SyncdPatch(properties);
|
|
53
|
+
};
|
|
54
|
+
SyncdPatch.encode = function encode(m, w) {
|
|
55
|
+
if (!w)
|
|
56
|
+
w = $Writer.create();
|
|
57
|
+
if (m.version != null && Object.hasOwnProperty.call(m, "version"))
|
|
58
|
+
$root.proto.SyncdVersion.encode(m.version, w.uint32(10).fork()).ldelim();
|
|
59
|
+
if (m.mutations != null && m.mutations.length) {
|
|
60
|
+
for (var i = 0; i < m.mutations.length; ++i)
|
|
61
|
+
$root.proto.SyncdMutation.encode(m.mutations[i], w.uint32(18).fork()).ldelim();
|
|
62
|
+
}
|
|
63
|
+
if (m.externalMutations != null && Object.hasOwnProperty.call(m, "externalMutations"))
|
|
64
|
+
$root.proto.ExternalBlobReference.encode(m.externalMutations, w.uint32(26).fork()).ldelim();
|
|
65
|
+
if (m.snapshotMac != null && Object.hasOwnProperty.call(m, "snapshotMac"))
|
|
66
|
+
w.uint32(34).bytes(m.snapshotMac);
|
|
67
|
+
if (m.patchMac != null && Object.hasOwnProperty.call(m, "patchMac"))
|
|
68
|
+
w.uint32(42).bytes(m.patchMac);
|
|
69
|
+
if (m.keyId != null && Object.hasOwnProperty.call(m, "keyId"))
|
|
70
|
+
$root.proto.KeyId.encode(m.keyId, w.uint32(50).fork()).ldelim();
|
|
71
|
+
if (m.exitCode != null && Object.hasOwnProperty.call(m, "exitCode"))
|
|
72
|
+
$root.proto.ExitCode.encode(m.exitCode, w.uint32(58).fork()).ldelim();
|
|
73
|
+
if (m.deviceIndex != null && Object.hasOwnProperty.call(m, "deviceIndex"))
|
|
74
|
+
w.uint32(64).uint32(m.deviceIndex);
|
|
75
|
+
if (m.clientDebugData != null && Object.hasOwnProperty.call(m, "clientDebugData"))
|
|
76
|
+
w.uint32(74).bytes(m.clientDebugData);
|
|
77
|
+
return w;
|
|
78
|
+
};
|
|
79
|
+
SyncdPatch.decode = function decode(r, l, e, n) {
|
|
80
|
+
if (!(r instanceof $Reader))
|
|
81
|
+
r = $Reader.create(r);
|
|
82
|
+
if (n === undefined)
|
|
83
|
+
n = 0;
|
|
84
|
+
if (n > $Reader.recursionLimit)
|
|
85
|
+
throw Error("maximum nesting depth exceeded");
|
|
86
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.SyncdPatch();
|
|
87
|
+
while (r.pos < c) {
|
|
88
|
+
var t = r.uint32();
|
|
89
|
+
if (t === e)
|
|
90
|
+
break;
|
|
91
|
+
switch (t >>> 3) {
|
|
92
|
+
case 1: {
|
|
93
|
+
m.version = $root.proto.SyncdVersion.decode(r, r.uint32(), undefined, n + 1);
|
|
94
|
+
break;
|
|
95
|
+
}
|
|
96
|
+
case 2: {
|
|
97
|
+
if (!(m.mutations && m.mutations.length))
|
|
98
|
+
m.mutations = [];
|
|
99
|
+
m.mutations.push($root.proto.SyncdMutation.decode(r, r.uint32(), undefined, n + 1));
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
case 3: {
|
|
103
|
+
m.externalMutations = $root.proto.ExternalBlobReference.decode(r, r.uint32(), undefined, n + 1);
|
|
104
|
+
break;
|
|
105
|
+
}
|
|
106
|
+
case 4: {
|
|
107
|
+
m.snapshotMac = r.bytes();
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
case 5: {
|
|
111
|
+
m.patchMac = r.bytes();
|
|
112
|
+
break;
|
|
113
|
+
}
|
|
114
|
+
case 6: {
|
|
115
|
+
m.keyId = $root.proto.KeyId.decode(r, r.uint32(), undefined, n + 1);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
case 7: {
|
|
119
|
+
m.exitCode = $root.proto.ExitCode.decode(r, r.uint32(), undefined, n + 1);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
case 8: {
|
|
123
|
+
m.deviceIndex = r.uint32();
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
case 9: {
|
|
127
|
+
m.clientDebugData = r.bytes();
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
default:
|
|
131
|
+
r.skipType(t & 7, n);
|
|
132
|
+
break;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
return m;
|
|
136
|
+
};
|
|
137
|
+
SyncdPatch.fromObject = function fromObject(d, n) {
|
|
138
|
+
if (d instanceof $root.proto.SyncdPatch)
|
|
139
|
+
return d;
|
|
140
|
+
if (n === undefined)
|
|
141
|
+
n = 0;
|
|
142
|
+
if (n > $util.recursionLimit)
|
|
143
|
+
throw Error("maximum nesting depth exceeded");
|
|
144
|
+
var m = new $root.proto.SyncdPatch();
|
|
145
|
+
if (d.version != null) {
|
|
146
|
+
if (typeof d.version !== "object")
|
|
147
|
+
throw TypeError(".proto.SyncdPatch.version: object expected");
|
|
148
|
+
m.version = $root.proto.SyncdVersion.fromObject(d.version, n + 1);
|
|
149
|
+
}
|
|
150
|
+
if (d.mutations) {
|
|
151
|
+
if (!Array.isArray(d.mutations))
|
|
152
|
+
throw TypeError(".proto.SyncdPatch.mutations: array expected");
|
|
153
|
+
m.mutations = [];
|
|
154
|
+
for (var i = 0; i < d.mutations.length; ++i) {
|
|
155
|
+
if (typeof d.mutations[i] !== "object")
|
|
156
|
+
throw TypeError(".proto.SyncdPatch.mutations: object expected");
|
|
157
|
+
m.mutations[i] = $root.proto.SyncdMutation.fromObject(d.mutations[i], n + 1);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
if (d.externalMutations != null) {
|
|
161
|
+
if (typeof d.externalMutations !== "object")
|
|
162
|
+
throw TypeError(".proto.SyncdPatch.externalMutations: object expected");
|
|
163
|
+
m.externalMutations = $root.proto.ExternalBlobReference.fromObject(d.externalMutations, n + 1);
|
|
164
|
+
}
|
|
165
|
+
if (d.snapshotMac != null) {
|
|
166
|
+
if (typeof d.snapshotMac === "string")
|
|
167
|
+
$util.base64.decode(d.snapshotMac, m.snapshotMac = $util.newBuffer($util.base64.length(d.snapshotMac)), 0);
|
|
168
|
+
else if (d.snapshotMac.length >= 0)
|
|
169
|
+
m.snapshotMac = d.snapshotMac;
|
|
170
|
+
}
|
|
171
|
+
if (d.patchMac != null) {
|
|
172
|
+
if (typeof d.patchMac === "string")
|
|
173
|
+
$util.base64.decode(d.patchMac, m.patchMac = $util.newBuffer($util.base64.length(d.patchMac)), 0);
|
|
174
|
+
else if (d.patchMac.length >= 0)
|
|
175
|
+
m.patchMac = d.patchMac;
|
|
176
|
+
}
|
|
177
|
+
if (d.keyId != null) {
|
|
178
|
+
if (typeof d.keyId !== "object")
|
|
179
|
+
throw TypeError(".proto.SyncdPatch.keyId: object expected");
|
|
180
|
+
m.keyId = $root.proto.KeyId.fromObject(d.keyId, n + 1);
|
|
181
|
+
}
|
|
182
|
+
if (d.exitCode != null) {
|
|
183
|
+
if (typeof d.exitCode !== "object")
|
|
184
|
+
throw TypeError(".proto.SyncdPatch.exitCode: object expected");
|
|
185
|
+
m.exitCode = $root.proto.ExitCode.fromObject(d.exitCode, n + 1);
|
|
186
|
+
}
|
|
187
|
+
if (d.deviceIndex != null) {
|
|
188
|
+
m.deviceIndex = d.deviceIndex >>> 0;
|
|
189
|
+
}
|
|
190
|
+
if (d.clientDebugData != null) {
|
|
191
|
+
if (typeof d.clientDebugData === "string")
|
|
192
|
+
$util.base64.decode(d.clientDebugData, m.clientDebugData = $util.newBuffer($util.base64.length(d.clientDebugData)), 0);
|
|
193
|
+
else if (d.clientDebugData.length >= 0)
|
|
194
|
+
m.clientDebugData = d.clientDebugData;
|
|
195
|
+
}
|
|
196
|
+
return m;
|
|
197
|
+
};
|
|
198
|
+
SyncdPatch.toObject = function toObject(m, o) {
|
|
199
|
+
if (!o)
|
|
200
|
+
o = {};
|
|
201
|
+
var d = {};
|
|
202
|
+
if (o.arrays || o.defaults) {
|
|
203
|
+
d.mutations = [];
|
|
204
|
+
}
|
|
205
|
+
if (m.version != null && m.hasOwnProperty("version")) {
|
|
206
|
+
d.version = $root.proto.SyncdVersion.toObject(m.version, o);
|
|
207
|
+
if (o.oneofs)
|
|
208
|
+
d._version = "version";
|
|
209
|
+
}
|
|
210
|
+
if (m.mutations && m.mutations.length) {
|
|
211
|
+
d.mutations = [];
|
|
212
|
+
for (var j = 0; j < m.mutations.length; ++j) {
|
|
213
|
+
d.mutations[j] = $root.proto.SyncdMutation.toObject(m.mutations[j], o);
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
if (m.externalMutations != null && m.hasOwnProperty("externalMutations")) {
|
|
217
|
+
d.externalMutations = $root.proto.ExternalBlobReference.toObject(m.externalMutations, o);
|
|
218
|
+
if (o.oneofs)
|
|
219
|
+
d._externalMutations = "externalMutations";
|
|
220
|
+
}
|
|
221
|
+
if (m.snapshotMac != null && m.hasOwnProperty("snapshotMac")) {
|
|
222
|
+
d.snapshotMac = o.bytes === String ? $util.base64.encode(m.snapshotMac, 0, m.snapshotMac.length) : o.bytes === Array ? Array.prototype.slice.call(m.snapshotMac) : m.snapshotMac;
|
|
223
|
+
if (o.oneofs)
|
|
224
|
+
d._snapshotMac = "snapshotMac";
|
|
225
|
+
}
|
|
226
|
+
if (m.patchMac != null && m.hasOwnProperty("patchMac")) {
|
|
227
|
+
d.patchMac = o.bytes === String ? $util.base64.encode(m.patchMac, 0, m.patchMac.length) : o.bytes === Array ? Array.prototype.slice.call(m.patchMac) : m.patchMac;
|
|
228
|
+
if (o.oneofs)
|
|
229
|
+
d._patchMac = "patchMac";
|
|
230
|
+
}
|
|
231
|
+
if (m.keyId != null && m.hasOwnProperty("keyId")) {
|
|
232
|
+
d.keyId = $root.proto.KeyId.toObject(m.keyId, o);
|
|
233
|
+
if (o.oneofs)
|
|
234
|
+
d._keyId = "keyId";
|
|
235
|
+
}
|
|
236
|
+
if (m.exitCode != null && m.hasOwnProperty("exitCode")) {
|
|
237
|
+
d.exitCode = $root.proto.ExitCode.toObject(m.exitCode, o);
|
|
238
|
+
if (o.oneofs)
|
|
239
|
+
d._exitCode = "exitCode";
|
|
240
|
+
}
|
|
241
|
+
if (m.deviceIndex != null && m.hasOwnProperty("deviceIndex")) {
|
|
242
|
+
d.deviceIndex = m.deviceIndex;
|
|
243
|
+
if (o.oneofs)
|
|
244
|
+
d._deviceIndex = "deviceIndex";
|
|
245
|
+
}
|
|
246
|
+
if (m.clientDebugData != null && m.hasOwnProperty("clientDebugData")) {
|
|
247
|
+
d.clientDebugData = o.bytes === String ? $util.base64.encode(m.clientDebugData, 0, m.clientDebugData.length) : o.bytes === Array ? Array.prototype.slice.call(m.clientDebugData) : m.clientDebugData;
|
|
248
|
+
if (o.oneofs)
|
|
249
|
+
d._clientDebugData = "clientDebugData";
|
|
250
|
+
}
|
|
251
|
+
return d;
|
|
252
|
+
};
|
|
253
|
+
SyncdPatch.prototype.toJSON = function toJSON() {
|
|
254
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
255
|
+
};
|
|
256
|
+
SyncdPatch.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
257
|
+
if (typeUrlPrefix === undefined) {
|
|
258
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
259
|
+
}
|
|
260
|
+
return typeUrlPrefix + "/proto.SyncdPatch";
|
|
261
|
+
};
|
|
262
|
+
return SyncdPatch;
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function SyncdRecord(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
|
+
SyncdRecord.prototype.index = null;
|
|
9
|
+
SyncdRecord.prototype.value = null;
|
|
10
|
+
SyncdRecord.prototype.keyId = null;
|
|
11
|
+
let $oneOfFields;
|
|
12
|
+
Object.defineProperty(SyncdRecord.prototype, "_index", {
|
|
13
|
+
get: $util.oneOfGetter($oneOfFields = ["index"]),
|
|
14
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(SyncdRecord.prototype, "_value", {
|
|
17
|
+
get: $util.oneOfGetter($oneOfFields = ["value"]),
|
|
18
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(SyncdRecord.prototype, "_keyId", {
|
|
21
|
+
get: $util.oneOfGetter($oneOfFields = ["keyId"]),
|
|
22
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23
|
+
});
|
|
24
|
+
SyncdRecord.create = function create(properties) {
|
|
25
|
+
return new SyncdRecord(properties);
|
|
26
|
+
};
|
|
27
|
+
SyncdRecord.encode = function encode(m, w) {
|
|
28
|
+
if (!w)
|
|
29
|
+
w = $Writer.create();
|
|
30
|
+
if (m.index != null && Object.hasOwnProperty.call(m, "index"))
|
|
31
|
+
$root.proto.SyncdIndex.encode(m.index, w.uint32(10).fork()).ldelim();
|
|
32
|
+
if (m.value != null && Object.hasOwnProperty.call(m, "value"))
|
|
33
|
+
$root.proto.SyncdValue.encode(m.value, w.uint32(18).fork()).ldelim();
|
|
34
|
+
if (m.keyId != null && Object.hasOwnProperty.call(m, "keyId"))
|
|
35
|
+
$root.proto.KeyId.encode(m.keyId, w.uint32(26).fork()).ldelim();
|
|
36
|
+
return w;
|
|
37
|
+
};
|
|
38
|
+
SyncdRecord.decode = function decode(r, l, e, n) {
|
|
39
|
+
if (!(r instanceof $Reader))
|
|
40
|
+
r = $Reader.create(r);
|
|
41
|
+
if (n === undefined)
|
|
42
|
+
n = 0;
|
|
43
|
+
if (n > $Reader.recursionLimit)
|
|
44
|
+
throw Error("maximum nesting depth exceeded");
|
|
45
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.SyncdRecord();
|
|
46
|
+
while (r.pos < c) {
|
|
47
|
+
var t = r.uint32();
|
|
48
|
+
if (t === e)
|
|
49
|
+
break;
|
|
50
|
+
switch (t >>> 3) {
|
|
51
|
+
case 1: {
|
|
52
|
+
m.index = $root.proto.SyncdIndex.decode(r, r.uint32(), undefined, n + 1);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case 2: {
|
|
56
|
+
m.value = $root.proto.SyncdValue.decode(r, r.uint32(), undefined, n + 1);
|
|
57
|
+
break;
|
|
58
|
+
}
|
|
59
|
+
case 3: {
|
|
60
|
+
m.keyId = $root.proto.KeyId.decode(r, r.uint32(), undefined, n + 1);
|
|
61
|
+
break;
|
|
62
|
+
}
|
|
63
|
+
default:
|
|
64
|
+
r.skipType(t & 7, n);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return m;
|
|
69
|
+
};
|
|
70
|
+
SyncdRecord.fromObject = function fromObject(d, n) {
|
|
71
|
+
if (d instanceof $root.proto.SyncdRecord)
|
|
72
|
+
return d;
|
|
73
|
+
if (n === undefined)
|
|
74
|
+
n = 0;
|
|
75
|
+
if (n > $util.recursionLimit)
|
|
76
|
+
throw Error("maximum nesting depth exceeded");
|
|
77
|
+
var m = new $root.proto.SyncdRecord();
|
|
78
|
+
if (d.index != null) {
|
|
79
|
+
if (typeof d.index !== "object")
|
|
80
|
+
throw TypeError(".proto.SyncdRecord.index: object expected");
|
|
81
|
+
m.index = $root.proto.SyncdIndex.fromObject(d.index, n + 1);
|
|
82
|
+
}
|
|
83
|
+
if (d.value != null) {
|
|
84
|
+
if (typeof d.value !== "object")
|
|
85
|
+
throw TypeError(".proto.SyncdRecord.value: object expected");
|
|
86
|
+
m.value = $root.proto.SyncdValue.fromObject(d.value, n + 1);
|
|
87
|
+
}
|
|
88
|
+
if (d.keyId != null) {
|
|
89
|
+
if (typeof d.keyId !== "object")
|
|
90
|
+
throw TypeError(".proto.SyncdRecord.keyId: object expected");
|
|
91
|
+
m.keyId = $root.proto.KeyId.fromObject(d.keyId, n + 1);
|
|
92
|
+
}
|
|
93
|
+
return m;
|
|
94
|
+
};
|
|
95
|
+
SyncdRecord.toObject = function toObject(m, o) {
|
|
96
|
+
if (!o)
|
|
97
|
+
o = {};
|
|
98
|
+
var d = {};
|
|
99
|
+
if (m.index != null && m.hasOwnProperty("index")) {
|
|
100
|
+
d.index = $root.proto.SyncdIndex.toObject(m.index, o);
|
|
101
|
+
if (o.oneofs)
|
|
102
|
+
d._index = "index";
|
|
103
|
+
}
|
|
104
|
+
if (m.value != null && m.hasOwnProperty("value")) {
|
|
105
|
+
d.value = $root.proto.SyncdValue.toObject(m.value, o);
|
|
106
|
+
if (o.oneofs)
|
|
107
|
+
d._value = "value";
|
|
108
|
+
}
|
|
109
|
+
if (m.keyId != null && m.hasOwnProperty("keyId")) {
|
|
110
|
+
d.keyId = $root.proto.KeyId.toObject(m.keyId, o);
|
|
111
|
+
if (o.oneofs)
|
|
112
|
+
d._keyId = "keyId";
|
|
113
|
+
}
|
|
114
|
+
return d;
|
|
115
|
+
};
|
|
116
|
+
SyncdRecord.prototype.toJSON = function toJSON() {
|
|
117
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
118
|
+
};
|
|
119
|
+
SyncdRecord.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
120
|
+
if (typeUrlPrefix === undefined) {
|
|
121
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
122
|
+
}
|
|
123
|
+
return typeUrlPrefix + "/proto.SyncdRecord";
|
|
124
|
+
};
|
|
125
|
+
return SyncdRecord;
|