@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,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function BotMediaMetadata(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
|
+
BotMediaMetadata.prototype.fileSha256 = null;
|
|
9
|
+
BotMediaMetadata.prototype.mediaKey = null;
|
|
10
|
+
BotMediaMetadata.prototype.fileEncSha256 = null;
|
|
11
|
+
BotMediaMetadata.prototype.directPath = null;
|
|
12
|
+
BotMediaMetadata.prototype.mediaKeyTimestamp = null;
|
|
13
|
+
BotMediaMetadata.prototype.mimetype = null;
|
|
14
|
+
BotMediaMetadata.prototype.orientationType = null;
|
|
15
|
+
let $oneOfFields;
|
|
16
|
+
Object.defineProperty(BotMediaMetadata.prototype, "_fileSha256", {
|
|
17
|
+
get: $util.oneOfGetter($oneOfFields = ["fileSha256"]),
|
|
18
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(BotMediaMetadata.prototype, "_mediaKey", {
|
|
21
|
+
get: $util.oneOfGetter($oneOfFields = ["mediaKey"]),
|
|
22
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(BotMediaMetadata.prototype, "_fileEncSha256", {
|
|
25
|
+
get: $util.oneOfGetter($oneOfFields = ["fileEncSha256"]),
|
|
26
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(BotMediaMetadata.prototype, "_directPath", {
|
|
29
|
+
get: $util.oneOfGetter($oneOfFields = ["directPath"]),
|
|
30
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(BotMediaMetadata.prototype, "_mediaKeyTimestamp", {
|
|
33
|
+
get: $util.oneOfGetter($oneOfFields = ["mediaKeyTimestamp"]),
|
|
34
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(BotMediaMetadata.prototype, "_mimetype", {
|
|
37
|
+
get: $util.oneOfGetter($oneOfFields = ["mimetype"]),
|
|
38
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(BotMediaMetadata.prototype, "_orientationType", {
|
|
41
|
+
get: $util.oneOfGetter($oneOfFields = ["orientationType"]),
|
|
42
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
43
|
+
});
|
|
44
|
+
BotMediaMetadata.create = function create(properties) {
|
|
45
|
+
return new BotMediaMetadata(properties);
|
|
46
|
+
};
|
|
47
|
+
BotMediaMetadata.encode = function encode(m, w) {
|
|
48
|
+
if (!w)
|
|
49
|
+
w = $Writer.create();
|
|
50
|
+
if (m.fileSha256 != null && Object.hasOwnProperty.call(m, "fileSha256"))
|
|
51
|
+
w.uint32(10).string(m.fileSha256);
|
|
52
|
+
if (m.mediaKey != null && Object.hasOwnProperty.call(m, "mediaKey"))
|
|
53
|
+
w.uint32(18).string(m.mediaKey);
|
|
54
|
+
if (m.fileEncSha256 != null && Object.hasOwnProperty.call(m, "fileEncSha256"))
|
|
55
|
+
w.uint32(26).string(m.fileEncSha256);
|
|
56
|
+
if (m.directPath != null && Object.hasOwnProperty.call(m, "directPath"))
|
|
57
|
+
w.uint32(34).string(m.directPath);
|
|
58
|
+
if (m.mediaKeyTimestamp != null && Object.hasOwnProperty.call(m, "mediaKeyTimestamp"))
|
|
59
|
+
w.uint32(40).int64(m.mediaKeyTimestamp);
|
|
60
|
+
if (m.mimetype != null && Object.hasOwnProperty.call(m, "mimetype"))
|
|
61
|
+
w.uint32(50).string(m.mimetype);
|
|
62
|
+
if (m.orientationType != null && Object.hasOwnProperty.call(m, "orientationType"))
|
|
63
|
+
w.uint32(56).int32(m.orientationType);
|
|
64
|
+
return w;
|
|
65
|
+
};
|
|
66
|
+
BotMediaMetadata.decode = function decode(r, l, e, n) {
|
|
67
|
+
if (!(r instanceof $Reader))
|
|
68
|
+
r = $Reader.create(r);
|
|
69
|
+
if (n === undefined)
|
|
70
|
+
n = 0;
|
|
71
|
+
if (n > $Reader.recursionLimit)
|
|
72
|
+
throw Error("maximum nesting depth exceeded");
|
|
73
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.BotMediaMetadata();
|
|
74
|
+
while (r.pos < c) {
|
|
75
|
+
var t = r.uint32();
|
|
76
|
+
if (t === e)
|
|
77
|
+
break;
|
|
78
|
+
switch (t >>> 3) {
|
|
79
|
+
case 1: {
|
|
80
|
+
m.fileSha256 = r.string();
|
|
81
|
+
break;
|
|
82
|
+
}
|
|
83
|
+
case 2: {
|
|
84
|
+
m.mediaKey = r.string();
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
case 3: {
|
|
88
|
+
m.fileEncSha256 = r.string();
|
|
89
|
+
break;
|
|
90
|
+
}
|
|
91
|
+
case 4: {
|
|
92
|
+
m.directPath = r.string();
|
|
93
|
+
break;
|
|
94
|
+
}
|
|
95
|
+
case 5: {
|
|
96
|
+
m.mediaKeyTimestamp = r.int64();
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
case 6: {
|
|
100
|
+
m.mimetype = r.string();
|
|
101
|
+
break;
|
|
102
|
+
}
|
|
103
|
+
case 7: {
|
|
104
|
+
m.orientationType = r.int32();
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
default:
|
|
108
|
+
r.skipType(t & 7, n);
|
|
109
|
+
break;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return m;
|
|
113
|
+
};
|
|
114
|
+
BotMediaMetadata.fromObject = function fromObject(d, n) {
|
|
115
|
+
if (d instanceof $root.proto.BotMediaMetadata)
|
|
116
|
+
return d;
|
|
117
|
+
if (n === undefined)
|
|
118
|
+
n = 0;
|
|
119
|
+
if (n > $util.recursionLimit)
|
|
120
|
+
throw Error("maximum nesting depth exceeded");
|
|
121
|
+
var m = new $root.proto.BotMediaMetadata();
|
|
122
|
+
if (d.fileSha256 != null) {
|
|
123
|
+
m.fileSha256 = String(d.fileSha256);
|
|
124
|
+
}
|
|
125
|
+
if (d.mediaKey != null) {
|
|
126
|
+
m.mediaKey = String(d.mediaKey);
|
|
127
|
+
}
|
|
128
|
+
if (d.fileEncSha256 != null) {
|
|
129
|
+
m.fileEncSha256 = String(d.fileEncSha256);
|
|
130
|
+
}
|
|
131
|
+
if (d.directPath != null) {
|
|
132
|
+
m.directPath = String(d.directPath);
|
|
133
|
+
}
|
|
134
|
+
if (d.mediaKeyTimestamp != null) {
|
|
135
|
+
if ($util.Long)
|
|
136
|
+
(m.mediaKeyTimestamp = $util.Long.fromValue(d.mediaKeyTimestamp)).unsigned = false;
|
|
137
|
+
else if (typeof d.mediaKeyTimestamp === "string")
|
|
138
|
+
m.mediaKeyTimestamp = parseInt(d.mediaKeyTimestamp, 10);
|
|
139
|
+
else if (typeof d.mediaKeyTimestamp === "number")
|
|
140
|
+
m.mediaKeyTimestamp = d.mediaKeyTimestamp;
|
|
141
|
+
else if (typeof d.mediaKeyTimestamp === "object")
|
|
142
|
+
m.mediaKeyTimestamp = new $util.LongBits(d.mediaKeyTimestamp.low >>> 0, d.mediaKeyTimestamp.high >>> 0).toNumber();
|
|
143
|
+
}
|
|
144
|
+
if (d.mimetype != null) {
|
|
145
|
+
m.mimetype = String(d.mimetype);
|
|
146
|
+
}
|
|
147
|
+
switch (d.orientationType) {
|
|
148
|
+
default:
|
|
149
|
+
if (typeof d.orientationType === "number") {
|
|
150
|
+
m.orientationType = d.orientationType;
|
|
151
|
+
break;
|
|
152
|
+
}
|
|
153
|
+
break;
|
|
154
|
+
case "CENTER":
|
|
155
|
+
case 1:
|
|
156
|
+
m.orientationType = 1;
|
|
157
|
+
break;
|
|
158
|
+
case "LEFT":
|
|
159
|
+
case 2:
|
|
160
|
+
m.orientationType = 2;
|
|
161
|
+
break;
|
|
162
|
+
case "RIGHT":
|
|
163
|
+
case 3:
|
|
164
|
+
m.orientationType = 3;
|
|
165
|
+
break;
|
|
166
|
+
}
|
|
167
|
+
return m;
|
|
168
|
+
};
|
|
169
|
+
BotMediaMetadata.toObject = function toObject(m, o) {
|
|
170
|
+
if (!o)
|
|
171
|
+
o = {};
|
|
172
|
+
var d = {};
|
|
173
|
+
if (m.fileSha256 != null && m.hasOwnProperty("fileSha256")) {
|
|
174
|
+
d.fileSha256 = m.fileSha256;
|
|
175
|
+
if (o.oneofs)
|
|
176
|
+
d._fileSha256 = "fileSha256";
|
|
177
|
+
}
|
|
178
|
+
if (m.mediaKey != null && m.hasOwnProperty("mediaKey")) {
|
|
179
|
+
d.mediaKey = m.mediaKey;
|
|
180
|
+
if (o.oneofs)
|
|
181
|
+
d._mediaKey = "mediaKey";
|
|
182
|
+
}
|
|
183
|
+
if (m.fileEncSha256 != null && m.hasOwnProperty("fileEncSha256")) {
|
|
184
|
+
d.fileEncSha256 = m.fileEncSha256;
|
|
185
|
+
if (o.oneofs)
|
|
186
|
+
d._fileEncSha256 = "fileEncSha256";
|
|
187
|
+
}
|
|
188
|
+
if (m.directPath != null && m.hasOwnProperty("directPath")) {
|
|
189
|
+
d.directPath = m.directPath;
|
|
190
|
+
if (o.oneofs)
|
|
191
|
+
d._directPath = "directPath";
|
|
192
|
+
}
|
|
193
|
+
if (m.mediaKeyTimestamp != null && m.hasOwnProperty("mediaKeyTimestamp")) {
|
|
194
|
+
if (typeof m.mediaKeyTimestamp === "number")
|
|
195
|
+
d.mediaKeyTimestamp = o.longs === String ? String(m.mediaKeyTimestamp) : m.mediaKeyTimestamp;
|
|
196
|
+
else
|
|
197
|
+
d.mediaKeyTimestamp = o.longs === String ? longToString(m.mediaKeyTimestamp) : o.longs === Number ? longToNumber(m.mediaKeyTimestamp) : m.mediaKeyTimestamp;
|
|
198
|
+
if (o.oneofs)
|
|
199
|
+
d._mediaKeyTimestamp = "mediaKeyTimestamp";
|
|
200
|
+
}
|
|
201
|
+
if (m.mimetype != null && m.hasOwnProperty("mimetype")) {
|
|
202
|
+
d.mimetype = m.mimetype;
|
|
203
|
+
if (o.oneofs)
|
|
204
|
+
d._mimetype = "mimetype";
|
|
205
|
+
}
|
|
206
|
+
if (m.orientationType != null && m.hasOwnProperty("orientationType")) {
|
|
207
|
+
d.orientationType = o.enums === String ? $root.proto.BotMediaMetadata.OrientationType[m.orientationType] === undefined ? m.orientationType : $root.proto.BotMediaMetadata.OrientationType[m.orientationType] : m.orientationType;
|
|
208
|
+
if (o.oneofs)
|
|
209
|
+
d._orientationType = "orientationType";
|
|
210
|
+
}
|
|
211
|
+
return d;
|
|
212
|
+
};
|
|
213
|
+
BotMediaMetadata.prototype.toJSON = function toJSON() {
|
|
214
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
215
|
+
};
|
|
216
|
+
BotMediaMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
217
|
+
if (typeUrlPrefix === undefined) {
|
|
218
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
219
|
+
}
|
|
220
|
+
return typeUrlPrefix + "/proto.BotMediaMetadata";
|
|
221
|
+
};
|
|
222
|
+
$lazy(BotMediaMetadata, "OrientationType", function() {
|
|
223
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
224
|
+
values[valuesById[1] = "CENTER"] = 1;
|
|
225
|
+
values[valuesById[2] = "LEFT"] = 2;
|
|
226
|
+
values[valuesById[3] = "RIGHT"] = 3;
|
|
227
|
+
return values;
|
|
228
|
+
});
|
|
229
|
+
return BotMediaMetadata;
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function BotMemoryFact(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
|
+
BotMemoryFact.prototype.fact = null;
|
|
9
|
+
BotMemoryFact.prototype.factId = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(BotMemoryFact.prototype, "_fact", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["fact"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(BotMemoryFact.prototype, "_factId", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["factId"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
BotMemoryFact.create = function create(properties) {
|
|
20
|
+
return new BotMemoryFact(properties);
|
|
21
|
+
};
|
|
22
|
+
BotMemoryFact.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.fact != null && Object.hasOwnProperty.call(m, "fact"))
|
|
26
|
+
w.uint32(10).string(m.fact);
|
|
27
|
+
if (m.factId != null && Object.hasOwnProperty.call(m, "factId"))
|
|
28
|
+
w.uint32(18).string(m.factId);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
BotMemoryFact.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.BotMemoryFact();
|
|
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.fact = r.string();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.factId = r.string();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
BotMemoryFact.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.BotMemoryFact)
|
|
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.BotMemoryFact();
|
|
67
|
+
if (d.fact != null) {
|
|
68
|
+
m.fact = String(d.fact);
|
|
69
|
+
}
|
|
70
|
+
if (d.factId != null) {
|
|
71
|
+
m.factId = String(d.factId);
|
|
72
|
+
}
|
|
73
|
+
return m;
|
|
74
|
+
};
|
|
75
|
+
BotMemoryFact.toObject = function toObject(m, o) {
|
|
76
|
+
if (!o)
|
|
77
|
+
o = {};
|
|
78
|
+
var d = {};
|
|
79
|
+
if (m.fact != null && m.hasOwnProperty("fact")) {
|
|
80
|
+
d.fact = m.fact;
|
|
81
|
+
if (o.oneofs)
|
|
82
|
+
d._fact = "fact";
|
|
83
|
+
}
|
|
84
|
+
if (m.factId != null && m.hasOwnProperty("factId")) {
|
|
85
|
+
d.factId = m.factId;
|
|
86
|
+
if (o.oneofs)
|
|
87
|
+
d._factId = "factId";
|
|
88
|
+
}
|
|
89
|
+
return d;
|
|
90
|
+
};
|
|
91
|
+
BotMemoryFact.prototype.toJSON = function toJSON() {
|
|
92
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
93
|
+
};
|
|
94
|
+
BotMemoryFact.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
95
|
+
if (typeUrlPrefix === undefined) {
|
|
96
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
97
|
+
}
|
|
98
|
+
return typeUrlPrefix + "/proto.BotMemoryFact";
|
|
99
|
+
};
|
|
100
|
+
return BotMemoryFact;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function BotMemoryMetadata(p) {
|
|
3
|
+
this.addedFacts = [];
|
|
4
|
+
this.removedFacts = [];
|
|
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
|
+
BotMemoryMetadata.prototype.addedFacts = $util.emptyArray;
|
|
11
|
+
BotMemoryMetadata.prototype.removedFacts = $util.emptyArray;
|
|
12
|
+
BotMemoryMetadata.prototype.disclaimer = null;
|
|
13
|
+
let $oneOfFields;
|
|
14
|
+
Object.defineProperty(BotMemoryMetadata.prototype, "_disclaimer", {
|
|
15
|
+
get: $util.oneOfGetter($oneOfFields = ["disclaimer"]),
|
|
16
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
17
|
+
});
|
|
18
|
+
BotMemoryMetadata.create = function create(properties) {
|
|
19
|
+
return new BotMemoryMetadata(properties);
|
|
20
|
+
};
|
|
21
|
+
BotMemoryMetadata.encode = function encode(m, w) {
|
|
22
|
+
if (!w)
|
|
23
|
+
w = $Writer.create();
|
|
24
|
+
if (m.addedFacts != null && m.addedFacts.length) {
|
|
25
|
+
for (var i = 0; i < m.addedFacts.length; ++i)
|
|
26
|
+
$root.proto.BotMemoryFact.encode(m.addedFacts[i], w.uint32(10).fork()).ldelim();
|
|
27
|
+
}
|
|
28
|
+
if (m.removedFacts != null && m.removedFacts.length) {
|
|
29
|
+
for (var i = 0; i < m.removedFacts.length; ++i)
|
|
30
|
+
$root.proto.BotMemoryFact.encode(m.removedFacts[i], w.uint32(18).fork()).ldelim();
|
|
31
|
+
}
|
|
32
|
+
if (m.disclaimer != null && Object.hasOwnProperty.call(m, "disclaimer"))
|
|
33
|
+
w.uint32(26).string(m.disclaimer);
|
|
34
|
+
return w;
|
|
35
|
+
};
|
|
36
|
+
BotMemoryMetadata.decode = function decode(r, l, e, n) {
|
|
37
|
+
if (!(r instanceof $Reader))
|
|
38
|
+
r = $Reader.create(r);
|
|
39
|
+
if (n === undefined)
|
|
40
|
+
n = 0;
|
|
41
|
+
if (n > $Reader.recursionLimit)
|
|
42
|
+
throw Error("maximum nesting depth exceeded");
|
|
43
|
+
var c = l === undefined ? r.len : r.pos + l, m = new $root.proto.BotMemoryMetadata();
|
|
44
|
+
while (r.pos < c) {
|
|
45
|
+
var t = r.uint32();
|
|
46
|
+
if (t === e)
|
|
47
|
+
break;
|
|
48
|
+
switch (t >>> 3) {
|
|
49
|
+
case 1: {
|
|
50
|
+
if (!(m.addedFacts && m.addedFacts.length))
|
|
51
|
+
m.addedFacts = [];
|
|
52
|
+
m.addedFacts.push($root.proto.BotMemoryFact.decode(r, r.uint32(), undefined, n + 1));
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case 2: {
|
|
56
|
+
if (!(m.removedFacts && m.removedFacts.length))
|
|
57
|
+
m.removedFacts = [];
|
|
58
|
+
m.removedFacts.push($root.proto.BotMemoryFact.decode(r, r.uint32(), undefined, n + 1));
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case 3: {
|
|
62
|
+
m.disclaimer = r.string();
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
default:
|
|
66
|
+
r.skipType(t & 7, n);
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return m;
|
|
71
|
+
};
|
|
72
|
+
BotMemoryMetadata.fromObject = function fromObject(d, n) {
|
|
73
|
+
if (d instanceof $root.proto.BotMemoryMetadata)
|
|
74
|
+
return d;
|
|
75
|
+
if (n === undefined)
|
|
76
|
+
n = 0;
|
|
77
|
+
if (n > $util.recursionLimit)
|
|
78
|
+
throw Error("maximum nesting depth exceeded");
|
|
79
|
+
var m = new $root.proto.BotMemoryMetadata();
|
|
80
|
+
if (d.addedFacts) {
|
|
81
|
+
if (!Array.isArray(d.addedFacts))
|
|
82
|
+
throw TypeError(".proto.BotMemoryMetadata.addedFacts: array expected");
|
|
83
|
+
m.addedFacts = [];
|
|
84
|
+
for (var i = 0; i < d.addedFacts.length; ++i) {
|
|
85
|
+
if (typeof d.addedFacts[i] !== "object")
|
|
86
|
+
throw TypeError(".proto.BotMemoryMetadata.addedFacts: object expected");
|
|
87
|
+
m.addedFacts[i] = $root.proto.BotMemoryFact.fromObject(d.addedFacts[i], n + 1);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
if (d.removedFacts) {
|
|
91
|
+
if (!Array.isArray(d.removedFacts))
|
|
92
|
+
throw TypeError(".proto.BotMemoryMetadata.removedFacts: array expected");
|
|
93
|
+
m.removedFacts = [];
|
|
94
|
+
for (var i = 0; i < d.removedFacts.length; ++i) {
|
|
95
|
+
if (typeof d.removedFacts[i] !== "object")
|
|
96
|
+
throw TypeError(".proto.BotMemoryMetadata.removedFacts: object expected");
|
|
97
|
+
m.removedFacts[i] = $root.proto.BotMemoryFact.fromObject(d.removedFacts[i], n + 1);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
if (d.disclaimer != null) {
|
|
101
|
+
m.disclaimer = String(d.disclaimer);
|
|
102
|
+
}
|
|
103
|
+
return m;
|
|
104
|
+
};
|
|
105
|
+
BotMemoryMetadata.toObject = function toObject(m, o) {
|
|
106
|
+
if (!o)
|
|
107
|
+
o = {};
|
|
108
|
+
var d = {};
|
|
109
|
+
if (o.arrays || o.defaults) {
|
|
110
|
+
d.addedFacts = [];
|
|
111
|
+
d.removedFacts = [];
|
|
112
|
+
}
|
|
113
|
+
if (m.addedFacts && m.addedFacts.length) {
|
|
114
|
+
d.addedFacts = [];
|
|
115
|
+
for (var j = 0; j < m.addedFacts.length; ++j) {
|
|
116
|
+
d.addedFacts[j] = $root.proto.BotMemoryFact.toObject(m.addedFacts[j], o);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
if (m.removedFacts && m.removedFacts.length) {
|
|
120
|
+
d.removedFacts = [];
|
|
121
|
+
for (var j = 0; j < m.removedFacts.length; ++j) {
|
|
122
|
+
d.removedFacts[j] = $root.proto.BotMemoryFact.toObject(m.removedFacts[j], o);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
if (m.disclaimer != null && m.hasOwnProperty("disclaimer")) {
|
|
126
|
+
d.disclaimer = m.disclaimer;
|
|
127
|
+
if (o.oneofs)
|
|
128
|
+
d._disclaimer = "disclaimer";
|
|
129
|
+
}
|
|
130
|
+
return d;
|
|
131
|
+
};
|
|
132
|
+
BotMemoryMetadata.prototype.toJSON = function toJSON() {
|
|
133
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
134
|
+
};
|
|
135
|
+
BotMemoryMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
136
|
+
if (typeUrlPrefix === undefined) {
|
|
137
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
138
|
+
}
|
|
139
|
+
return typeUrlPrefix + "/proto.BotMemoryMetadata";
|
|
140
|
+
};
|
|
141
|
+
return BotMemoryMetadata;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function BotMemuMetadata(p) {
|
|
3
|
+
this.faceImages = [];
|
|
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
|
+
BotMemuMetadata.prototype.faceImages = $util.emptyArray;
|
|
10
|
+
BotMemuMetadata.create = function create(properties) {
|
|
11
|
+
return new BotMemuMetadata(properties);
|
|
12
|
+
};
|
|
13
|
+
BotMemuMetadata.encode = function encode(m, w) {
|
|
14
|
+
if (!w)
|
|
15
|
+
w = $Writer.create();
|
|
16
|
+
if (m.faceImages != null && m.faceImages.length) {
|
|
17
|
+
for (var i = 0; i < m.faceImages.length; ++i)
|
|
18
|
+
$root.proto.BotMediaMetadata.encode(m.faceImages[i], w.uint32(10).fork()).ldelim();
|
|
19
|
+
}
|
|
20
|
+
return w;
|
|
21
|
+
};
|
|
22
|
+
BotMemuMetadata.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.BotMemuMetadata();
|
|
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.faceImages && m.faceImages.length))
|
|
37
|
+
m.faceImages = [];
|
|
38
|
+
m.faceImages.push($root.proto.BotMediaMetadata.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
|
+
BotMemuMetadata.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.BotMemuMetadata)
|
|
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.BotMemuMetadata();
|
|
56
|
+
if (d.faceImages) {
|
|
57
|
+
if (!Array.isArray(d.faceImages))
|
|
58
|
+
throw TypeError(".proto.BotMemuMetadata.faceImages: array expected");
|
|
59
|
+
m.faceImages = [];
|
|
60
|
+
for (var i = 0; i < d.faceImages.length; ++i) {
|
|
61
|
+
if (typeof d.faceImages[i] !== "object")
|
|
62
|
+
throw TypeError(".proto.BotMemuMetadata.faceImages: object expected");
|
|
63
|
+
m.faceImages[i] = $root.proto.BotMediaMetadata.fromObject(d.faceImages[i], n + 1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return m;
|
|
67
|
+
};
|
|
68
|
+
BotMemuMetadata.toObject = function toObject(m, o) {
|
|
69
|
+
if (!o)
|
|
70
|
+
o = {};
|
|
71
|
+
var d = {};
|
|
72
|
+
if (o.arrays || o.defaults) {
|
|
73
|
+
d.faceImages = [];
|
|
74
|
+
}
|
|
75
|
+
if (m.faceImages && m.faceImages.length) {
|
|
76
|
+
d.faceImages = [];
|
|
77
|
+
for (var j = 0; j < m.faceImages.length; ++j) {
|
|
78
|
+
d.faceImages[j] = $root.proto.BotMediaMetadata.toObject(m.faceImages[j], o);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return d;
|
|
82
|
+
};
|
|
83
|
+
BotMemuMetadata.prototype.toJSON = function toJSON() {
|
|
84
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
85
|
+
};
|
|
86
|
+
BotMemuMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
87
|
+
if (typeUrlPrefix === undefined) {
|
|
88
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
89
|
+
}
|
|
90
|
+
return typeUrlPrefix + "/proto.BotMemuMetadata";
|
|
91
|
+
};
|
|
92
|
+
return BotMemuMetadata;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function BotMessageOrigin(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
|
+
BotMessageOrigin.prototype.type = null;
|
|
9
|
+
let $oneOfFields;
|
|
10
|
+
Object.defineProperty(BotMessageOrigin.prototype, "_type", {
|
|
11
|
+
get: $util.oneOfGetter($oneOfFields = ["type"]),
|
|
12
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
13
|
+
});
|
|
14
|
+
BotMessageOrigin.create = function create(properties) {
|
|
15
|
+
return new BotMessageOrigin(properties);
|
|
16
|
+
};
|
|
17
|
+
BotMessageOrigin.encode = function encode(m, w) {
|
|
18
|
+
if (!w)
|
|
19
|
+
w = $Writer.create();
|
|
20
|
+
if (m.type != null && Object.hasOwnProperty.call(m, "type"))
|
|
21
|
+
w.uint32(8).int32(m.type);
|
|
22
|
+
return w;
|
|
23
|
+
};
|
|
24
|
+
BotMessageOrigin.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.BotMessageOrigin();
|
|
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.type = r.int32();
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
default:
|
|
42
|
+
r.skipType(t & 7, n);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return m;
|
|
47
|
+
};
|
|
48
|
+
BotMessageOrigin.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.BotMessageOrigin)
|
|
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.BotMessageOrigin();
|
|
56
|
+
switch (d.type) {
|
|
57
|
+
default:
|
|
58
|
+
if (typeof d.type === "number") {
|
|
59
|
+
m.type = d.type;
|
|
60
|
+
break;
|
|
61
|
+
}
|
|
62
|
+
break;
|
|
63
|
+
case "BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED":
|
|
64
|
+
case 0:
|
|
65
|
+
m.type = 0;
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
return m;
|
|
69
|
+
};
|
|
70
|
+
BotMessageOrigin.toObject = function toObject(m, o) {
|
|
71
|
+
if (!o)
|
|
72
|
+
o = {};
|
|
73
|
+
var d = {};
|
|
74
|
+
if (m.type != null && m.hasOwnProperty("type")) {
|
|
75
|
+
d.type = o.enums === String ? $root.proto.BotMessageOrigin.BotMessageOriginType[m.type] === undefined ? m.type : $root.proto.BotMessageOrigin.BotMessageOriginType[m.type] : m.type;
|
|
76
|
+
if (o.oneofs)
|
|
77
|
+
d._type = "type";
|
|
78
|
+
}
|
|
79
|
+
return d;
|
|
80
|
+
};
|
|
81
|
+
BotMessageOrigin.prototype.toJSON = function toJSON() {
|
|
82
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
83
|
+
};
|
|
84
|
+
BotMessageOrigin.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
85
|
+
if (typeUrlPrefix === undefined) {
|
|
86
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
87
|
+
}
|
|
88
|
+
return typeUrlPrefix + "/proto.BotMessageOrigin";
|
|
89
|
+
};
|
|
90
|
+
$lazy(BotMessageOrigin, "BotMessageOriginType", function() {
|
|
91
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
92
|
+
values[valuesById[0] = "BOT_MESSAGE_ORIGIN_TYPE_AI_INITIATED"] = 0;
|
|
93
|
+
return values;
|
|
94
|
+
});
|
|
95
|
+
return BotMessageOrigin;
|