@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,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function BotSessionMetadata(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
|
+
BotSessionMetadata.prototype.sessionId = null;
|
|
9
|
+
BotSessionMetadata.prototype.sessionSource = null;
|
|
10
|
+
let $oneOfFields;
|
|
11
|
+
Object.defineProperty(BotSessionMetadata.prototype, "_sessionId", {
|
|
12
|
+
get: $util.oneOfGetter($oneOfFields = ["sessionId"]),
|
|
13
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(BotSessionMetadata.prototype, "_sessionSource", {
|
|
16
|
+
get: $util.oneOfGetter($oneOfFields = ["sessionSource"]),
|
|
17
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
18
|
+
});
|
|
19
|
+
BotSessionMetadata.create = function create(properties) {
|
|
20
|
+
return new BotSessionMetadata(properties);
|
|
21
|
+
};
|
|
22
|
+
BotSessionMetadata.encode = function encode(m, w) {
|
|
23
|
+
if (!w)
|
|
24
|
+
w = $Writer.create();
|
|
25
|
+
if (m.sessionId != null && Object.hasOwnProperty.call(m, "sessionId"))
|
|
26
|
+
w.uint32(10).string(m.sessionId);
|
|
27
|
+
if (m.sessionSource != null && Object.hasOwnProperty.call(m, "sessionSource"))
|
|
28
|
+
w.uint32(16).int32(m.sessionSource);
|
|
29
|
+
return w;
|
|
30
|
+
};
|
|
31
|
+
BotSessionMetadata.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.BotSessionMetadata();
|
|
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.sessionId = r.string();
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
case 2: {
|
|
49
|
+
m.sessionSource = r.int32();
|
|
50
|
+
break;
|
|
51
|
+
}
|
|
52
|
+
default:
|
|
53
|
+
r.skipType(t & 7, n);
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
return m;
|
|
58
|
+
};
|
|
59
|
+
BotSessionMetadata.fromObject = function fromObject(d, n) {
|
|
60
|
+
if (d instanceof $root.proto.BotSessionMetadata)
|
|
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.BotSessionMetadata();
|
|
67
|
+
if (d.sessionId != null) {
|
|
68
|
+
m.sessionId = String(d.sessionId);
|
|
69
|
+
}
|
|
70
|
+
switch (d.sessionSource) {
|
|
71
|
+
default:
|
|
72
|
+
if (typeof d.sessionSource === "number") {
|
|
73
|
+
m.sessionSource = d.sessionSource;
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
break;
|
|
77
|
+
case "NONE":
|
|
78
|
+
case 0:
|
|
79
|
+
m.sessionSource = 0;
|
|
80
|
+
break;
|
|
81
|
+
case "NULL_STATE":
|
|
82
|
+
case 1:
|
|
83
|
+
m.sessionSource = 1;
|
|
84
|
+
break;
|
|
85
|
+
case "TYPEAHEAD":
|
|
86
|
+
case 2:
|
|
87
|
+
m.sessionSource = 2;
|
|
88
|
+
break;
|
|
89
|
+
case "USER_INPUT":
|
|
90
|
+
case 3:
|
|
91
|
+
m.sessionSource = 3;
|
|
92
|
+
break;
|
|
93
|
+
case "EMU_FLASH":
|
|
94
|
+
case 4:
|
|
95
|
+
m.sessionSource = 4;
|
|
96
|
+
break;
|
|
97
|
+
case "EMU_FLASH_FOLLOWUP":
|
|
98
|
+
case 5:
|
|
99
|
+
m.sessionSource = 5;
|
|
100
|
+
break;
|
|
101
|
+
case "VOICE":
|
|
102
|
+
case 6:
|
|
103
|
+
m.sessionSource = 6;
|
|
104
|
+
break;
|
|
105
|
+
case "AI_HOME_SESSION":
|
|
106
|
+
case 7:
|
|
107
|
+
m.sessionSource = 7;
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
return m;
|
|
111
|
+
};
|
|
112
|
+
BotSessionMetadata.toObject = function toObject(m, o) {
|
|
113
|
+
if (!o)
|
|
114
|
+
o = {};
|
|
115
|
+
var d = {};
|
|
116
|
+
if (m.sessionId != null && m.hasOwnProperty("sessionId")) {
|
|
117
|
+
d.sessionId = m.sessionId;
|
|
118
|
+
if (o.oneofs)
|
|
119
|
+
d._sessionId = "sessionId";
|
|
120
|
+
}
|
|
121
|
+
if (m.sessionSource != null && m.hasOwnProperty("sessionSource")) {
|
|
122
|
+
d.sessionSource = o.enums === String ? $root.proto.BotSessionSource[m.sessionSource] === undefined ? m.sessionSource : $root.proto.BotSessionSource[m.sessionSource] : m.sessionSource;
|
|
123
|
+
if (o.oneofs)
|
|
124
|
+
d._sessionSource = "sessionSource";
|
|
125
|
+
}
|
|
126
|
+
return d;
|
|
127
|
+
};
|
|
128
|
+
BotSessionMetadata.prototype.toJSON = function toJSON() {
|
|
129
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
130
|
+
};
|
|
131
|
+
BotSessionMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
132
|
+
if (typeUrlPrefix === undefined) {
|
|
133
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
134
|
+
}
|
|
135
|
+
return typeUrlPrefix + "/proto.BotSessionMetadata";
|
|
136
|
+
};
|
|
137
|
+
return BotSessionMetadata;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
3
|
+
values[valuesById[0] = "NONE"] = 0;
|
|
4
|
+
values[valuesById[1] = "NULL_STATE"] = 1;
|
|
5
|
+
values[valuesById[2] = "TYPEAHEAD"] = 2;
|
|
6
|
+
values[valuesById[3] = "USER_INPUT"] = 3;
|
|
7
|
+
values[valuesById[4] = "EMU_FLASH"] = 4;
|
|
8
|
+
values[valuesById[5] = "EMU_FLASH_FOLLOWUP"] = 5;
|
|
9
|
+
values[valuesById[6] = "VOICE"] = 6;
|
|
10
|
+
values[valuesById[7] = "AI_HOME_SESSION"] = 7;
|
|
11
|
+
return values;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function BotSignatureVerificationMetadata(p) {
|
|
3
|
+
this.proofs = [];
|
|
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
|
+
BotSignatureVerificationMetadata.prototype.proofs = $util.emptyArray;
|
|
10
|
+
BotSignatureVerificationMetadata.create = function create(properties) {
|
|
11
|
+
return new BotSignatureVerificationMetadata(properties);
|
|
12
|
+
};
|
|
13
|
+
BotSignatureVerificationMetadata.encode = function encode(m, w) {
|
|
14
|
+
if (!w)
|
|
15
|
+
w = $Writer.create();
|
|
16
|
+
if (m.proofs != null && m.proofs.length) {
|
|
17
|
+
for (var i = 0; i < m.proofs.length; ++i)
|
|
18
|
+
$root.proto.BotSignatureVerificationUseCaseProof.encode(m.proofs[i], w.uint32(10).fork()).ldelim();
|
|
19
|
+
}
|
|
20
|
+
return w;
|
|
21
|
+
};
|
|
22
|
+
BotSignatureVerificationMetadata.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.BotSignatureVerificationMetadata();
|
|
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.proofs && m.proofs.length))
|
|
37
|
+
m.proofs = [];
|
|
38
|
+
m.proofs.push($root.proto.BotSignatureVerificationUseCaseProof.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
|
+
BotSignatureVerificationMetadata.fromObject = function fromObject(d, n) {
|
|
49
|
+
if (d instanceof $root.proto.BotSignatureVerificationMetadata)
|
|
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.BotSignatureVerificationMetadata();
|
|
56
|
+
if (d.proofs) {
|
|
57
|
+
if (!Array.isArray(d.proofs))
|
|
58
|
+
throw TypeError(".proto.BotSignatureVerificationMetadata.proofs: array expected");
|
|
59
|
+
m.proofs = [];
|
|
60
|
+
for (var i = 0; i < d.proofs.length; ++i) {
|
|
61
|
+
if (typeof d.proofs[i] !== "object")
|
|
62
|
+
throw TypeError(".proto.BotSignatureVerificationMetadata.proofs: object expected");
|
|
63
|
+
m.proofs[i] = $root.proto.BotSignatureVerificationUseCaseProof.fromObject(d.proofs[i], n + 1);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
return m;
|
|
67
|
+
};
|
|
68
|
+
BotSignatureVerificationMetadata.toObject = function toObject(m, o) {
|
|
69
|
+
if (!o)
|
|
70
|
+
o = {};
|
|
71
|
+
var d = {};
|
|
72
|
+
if (o.arrays || o.defaults) {
|
|
73
|
+
d.proofs = [];
|
|
74
|
+
}
|
|
75
|
+
if (m.proofs && m.proofs.length) {
|
|
76
|
+
d.proofs = [];
|
|
77
|
+
for (var j = 0; j < m.proofs.length; ++j) {
|
|
78
|
+
d.proofs[j] = $root.proto.BotSignatureVerificationUseCaseProof.toObject(m.proofs[j], o);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return d;
|
|
82
|
+
};
|
|
83
|
+
BotSignatureVerificationMetadata.prototype.toJSON = function toJSON() {
|
|
84
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
85
|
+
};
|
|
86
|
+
BotSignatureVerificationMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
87
|
+
if (typeUrlPrefix === undefined) {
|
|
88
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
89
|
+
}
|
|
90
|
+
return typeUrlPrefix + "/proto.BotSignatureVerificationMetadata";
|
|
91
|
+
};
|
|
92
|
+
return BotSignatureVerificationMetadata;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
function BotSignatureVerificationUseCaseProof(p) {
|
|
3
|
+
this.certificateChain = [];
|
|
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
|
+
BotSignatureVerificationUseCaseProof.prototype.version = null;
|
|
10
|
+
BotSignatureVerificationUseCaseProof.prototype.useCase = null;
|
|
11
|
+
BotSignatureVerificationUseCaseProof.prototype.signature = null;
|
|
12
|
+
BotSignatureVerificationUseCaseProof.prototype.certificateChain = $util.emptyArray;
|
|
13
|
+
let $oneOfFields;
|
|
14
|
+
Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_version", {
|
|
15
|
+
get: $util.oneOfGetter($oneOfFields = ["version"]),
|
|
16
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_useCase", {
|
|
19
|
+
get: $util.oneOfGetter($oneOfFields = ["useCase"]),
|
|
20
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(BotSignatureVerificationUseCaseProof.prototype, "_signature", {
|
|
23
|
+
get: $util.oneOfGetter($oneOfFields = ["signature"]),
|
|
24
|
+
set: $util.oneOfSetter($oneOfFields)
|
|
25
|
+
});
|
|
26
|
+
BotSignatureVerificationUseCaseProof.create = function create(properties) {
|
|
27
|
+
return new BotSignatureVerificationUseCaseProof(properties);
|
|
28
|
+
};
|
|
29
|
+
BotSignatureVerificationUseCaseProof.encode = function encode(m, w) {
|
|
30
|
+
if (!w)
|
|
31
|
+
w = $Writer.create();
|
|
32
|
+
if (m.version != null && Object.hasOwnProperty.call(m, "version"))
|
|
33
|
+
w.uint32(8).int32(m.version);
|
|
34
|
+
if (m.useCase != null && Object.hasOwnProperty.call(m, "useCase"))
|
|
35
|
+
w.uint32(16).int32(m.useCase);
|
|
36
|
+
if (m.signature != null && Object.hasOwnProperty.call(m, "signature"))
|
|
37
|
+
w.uint32(26).bytes(m.signature);
|
|
38
|
+
if (m.certificateChain != null && m.certificateChain.length) {
|
|
39
|
+
for (var i = 0; i < m.certificateChain.length; ++i)
|
|
40
|
+
w.uint32(34).bytes(m.certificateChain[i]);
|
|
41
|
+
}
|
|
42
|
+
return w;
|
|
43
|
+
};
|
|
44
|
+
BotSignatureVerificationUseCaseProof.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.BotSignatureVerificationUseCaseProof();
|
|
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 = r.int32();
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case 2: {
|
|
62
|
+
m.useCase = r.int32();
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
case 3: {
|
|
66
|
+
m.signature = r.bytes();
|
|
67
|
+
break;
|
|
68
|
+
}
|
|
69
|
+
case 4: {
|
|
70
|
+
if (!(m.certificateChain && m.certificateChain.length))
|
|
71
|
+
m.certificateChain = [];
|
|
72
|
+
m.certificateChain.push(r.bytes());
|
|
73
|
+
break;
|
|
74
|
+
}
|
|
75
|
+
default:
|
|
76
|
+
r.skipType(t & 7, n);
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return m;
|
|
81
|
+
};
|
|
82
|
+
BotSignatureVerificationUseCaseProof.fromObject = function fromObject(d, n) {
|
|
83
|
+
if (d instanceof $root.proto.BotSignatureVerificationUseCaseProof)
|
|
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.BotSignatureVerificationUseCaseProof();
|
|
90
|
+
if (d.version != null) {
|
|
91
|
+
m.version = d.version | 0;
|
|
92
|
+
}
|
|
93
|
+
switch (d.useCase) {
|
|
94
|
+
default:
|
|
95
|
+
if (typeof d.useCase === "number") {
|
|
96
|
+
m.useCase = d.useCase;
|
|
97
|
+
break;
|
|
98
|
+
}
|
|
99
|
+
break;
|
|
100
|
+
case "UNSPECIFIED":
|
|
101
|
+
case 0:
|
|
102
|
+
m.useCase = 0;
|
|
103
|
+
break;
|
|
104
|
+
case "WA_BOT_MSG":
|
|
105
|
+
case 1:
|
|
106
|
+
m.useCase = 1;
|
|
107
|
+
break;
|
|
108
|
+
case "WA_TEE_BOT_MSG":
|
|
109
|
+
case 2:
|
|
110
|
+
m.useCase = 2;
|
|
111
|
+
break;
|
|
112
|
+
case "P2P_PILLS":
|
|
113
|
+
case 3:
|
|
114
|
+
m.useCase = 3;
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
if (d.signature != null) {
|
|
118
|
+
if (typeof d.signature === "string")
|
|
119
|
+
$util.base64.decode(d.signature, m.signature = $util.newBuffer($util.base64.length(d.signature)), 0);
|
|
120
|
+
else if (d.signature.length >= 0)
|
|
121
|
+
m.signature = d.signature;
|
|
122
|
+
}
|
|
123
|
+
if (d.certificateChain) {
|
|
124
|
+
if (!Array.isArray(d.certificateChain))
|
|
125
|
+
throw TypeError(".proto.BotSignatureVerificationUseCaseProof.certificateChain: array expected");
|
|
126
|
+
m.certificateChain = [];
|
|
127
|
+
for (var i = 0; i < d.certificateChain.length; ++i) {
|
|
128
|
+
if (typeof d.certificateChain[i] === "string")
|
|
129
|
+
$util.base64.decode(d.certificateChain[i], m.certificateChain[i] = $util.newBuffer($util.base64.length(d.certificateChain[i])), 0);
|
|
130
|
+
else if (d.certificateChain[i].length >= 0)
|
|
131
|
+
m.certificateChain[i] = d.certificateChain[i];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
return m;
|
|
135
|
+
};
|
|
136
|
+
BotSignatureVerificationUseCaseProof.toObject = function toObject(m, o) {
|
|
137
|
+
if (!o)
|
|
138
|
+
o = {};
|
|
139
|
+
var d = {};
|
|
140
|
+
if (o.arrays || o.defaults) {
|
|
141
|
+
d.certificateChain = [];
|
|
142
|
+
}
|
|
143
|
+
if (m.version != null && m.hasOwnProperty("version")) {
|
|
144
|
+
d.version = m.version;
|
|
145
|
+
if (o.oneofs)
|
|
146
|
+
d._version = "version";
|
|
147
|
+
}
|
|
148
|
+
if (m.useCase != null && m.hasOwnProperty("useCase")) {
|
|
149
|
+
d.useCase = o.enums === String ? $root.proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[m.useCase] === undefined ? m.useCase : $root.proto.BotSignatureVerificationUseCaseProof.BotSignatureUseCase[m.useCase] : m.useCase;
|
|
150
|
+
if (o.oneofs)
|
|
151
|
+
d._useCase = "useCase";
|
|
152
|
+
}
|
|
153
|
+
if (m.signature != null && m.hasOwnProperty("signature")) {
|
|
154
|
+
d.signature = o.bytes === String ? $util.base64.encode(m.signature, 0, m.signature.length) : o.bytes === Array ? Array.prototype.slice.call(m.signature) : m.signature;
|
|
155
|
+
if (o.oneofs)
|
|
156
|
+
d._signature = "signature";
|
|
157
|
+
}
|
|
158
|
+
if (m.certificateChain && m.certificateChain.length) {
|
|
159
|
+
d.certificateChain = [];
|
|
160
|
+
for (var j = 0; j < m.certificateChain.length; ++j) {
|
|
161
|
+
d.certificateChain[j] = o.bytes === String ? $util.base64.encode(m.certificateChain[j], 0, m.certificateChain[j].length) : o.bytes === Array ? Array.prototype.slice.call(m.certificateChain[j]) : m.certificateChain[j];
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return d;
|
|
165
|
+
};
|
|
166
|
+
BotSignatureVerificationUseCaseProof.prototype.toJSON = function toJSON() {
|
|
167
|
+
return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
|
|
168
|
+
};
|
|
169
|
+
BotSignatureVerificationUseCaseProof.getTypeUrl = function getTypeUrl(typeUrlPrefix) {
|
|
170
|
+
if (typeUrlPrefix === undefined) {
|
|
171
|
+
typeUrlPrefix = "type.googleapis.com";
|
|
172
|
+
}
|
|
173
|
+
return typeUrlPrefix + "/proto.BotSignatureVerificationUseCaseProof";
|
|
174
|
+
};
|
|
175
|
+
$lazy(BotSignatureVerificationUseCaseProof, "BotSignatureUseCase", function() {
|
|
176
|
+
const valuesById = {}, values = Object.create(valuesById);
|
|
177
|
+
values[valuesById[0] = "UNSPECIFIED"] = 0;
|
|
178
|
+
values[valuesById[1] = "WA_BOT_MSG"] = 1;
|
|
179
|
+
values[valuesById[2] = "WA_TEE_BOT_MSG"] = 2;
|
|
180
|
+
values[valuesById[3] = "P2P_PILLS"] = 3;
|
|
181
|
+
return values;
|
|
182
|
+
});
|
|
183
|
+
return BotSignatureVerificationUseCaseProof;
|