@deffa5556/bail 1.0.6 → 1.0.7
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/cjs/WAProto/index.cjs +106053 -0
- package/cjs/deffa/config.cjs +14 -0
- package/cjs/deffa/plugins/ai/deepseekr1.cjs +35 -0
- package/cjs/deffa/plugins/ai/gita.cjs +26 -0
- package/cjs/deffa/plugins/ai/glm47flash.cjs +35 -0
- package/cjs/deffa/plugins/ai/gptoss120b.cjs +35 -0
- package/cjs/deffa/plugins/ai/qwq32b.cjs +35 -0
- package/cjs/deffa/plugins/berita/antara.cjs +25 -0
- package/cjs/deffa/plugins/berita/cnbcindonesia.cjs +25 -0
- package/cjs/deffa/plugins/berita/cnn.cjs +25 -0
- package/cjs/deffa/plugins/berita/kompas.cjs +25 -0
- package/cjs/deffa/plugins/berita/liputan6.cjs +25 -0
- package/cjs/deffa/plugins/berita/merdeka.cjs +25 -0
- package/cjs/deffa/plugins/berita/sindonews.cjs +25 -0
- package/cjs/deffa/plugins/berita/tribunnews.cjs +25 -0
- package/cjs/deffa/plugins/downloader/douyin.cjs +30 -0
- package/cjs/deffa/plugins/downloader/facebook.cjs +30 -0
- package/cjs/deffa/plugins/downloader/github.cjs +35 -0
- package/cjs/deffa/plugins/downloader/lahelu.cjs +30 -0
- package/cjs/deffa/plugins/downloader/snackvideo.cjs +30 -0
- package/cjs/deffa/plugins/downloader/soundcloud.cjs +30 -0
- package/cjs/deffa/plugins/downloader/tiktok.cjs +30 -0
- package/cjs/deffa/plugins/downloader/tiktokhd.cjs +30 -0
- package/cjs/deffa/plugins/downloader/twitter.cjs +30 -0
- package/cjs/deffa/plugins/downloader/ummy.cjs +36 -0
- package/cjs/deffa/plugins/index.cjs +213 -0
- package/cjs/deffa/plugins/info/bmkg.cjs +34 -0
- package/cjs/deffa/plugins/info/cuaca.cjs +31 -0
- package/cjs/deffa/plugins/info/jadwaltv.cjs +29 -0
- package/cjs/deffa/plugins/maker/brat.cjs +45 -0
- package/cjs/deffa/plugins/maker/bratvid.cjs +52 -0
- package/cjs/deffa/plugins/search/8font.cjs +28 -0
- package/cjs/deffa/plugins/search/applemusic.cjs +28 -0
- package/cjs/deffa/plugins/search/bimg.cjs +30 -0
- package/cjs/deffa/plugins/search/brave.cjs +34 -0
- package/cjs/deffa/plugins/search/duckduckgo.cjs +28 -0
- package/cjs/deffa/plugins/search/lahelu.cjs +28 -0
- package/cjs/deffa/plugins/search/mangatoon.cjs +28 -0
- package/cjs/deffa/plugins/search/mcpedl.cjs +28 -0
- package/cjs/deffa/plugins/search/myinstants.cjs +28 -0
- package/cjs/deffa/plugins/search/otakotaku.cjs +28 -0
- package/cjs/deffa/plugins/search/pinterest.cjs +30 -0
- package/cjs/deffa/plugins/search/resep.cjs +28 -0
- package/cjs/deffa/plugins/search/seegore.cjs +30 -0
- package/cjs/deffa/plugins/search/soundcloud.cjs +28 -0
- package/cjs/deffa/plugins/search/youtube.cjs +28 -0
- package/cjs/deffa/plugins/stalk/github.cjs +38 -0
- package/cjs/deffa/plugins/stalk/pinterest.cjs +37 -0
- package/cjs/deffa/plugins/stalk/threads.cjs +34 -0
- package/cjs/deffa/plugins/stalk/tiktok.cjs +37 -0
- package/cjs/deffa/plugins/stalk/twitter.cjs +37 -0
- package/cjs/deffa/plugins/stalk/youtube.cjs +37 -0
- package/cjs/lib/Defaults/index.cjs +158 -0
- package/cjs/lib/Discord/Client.cjs +263 -0
- package/cjs/lib/Discord/Constants.cjs +1842 -0
- package/cjs/lib/Discord/connect-dc.cjs +11 -0
- package/cjs/lib/Discord/esm-bridge.cjs +136 -0
- package/cjs/lib/Discord/gateway/Dispatcher.cjs +93 -0
- package/cjs/lib/Discord/gateway/Shard.cjs +695 -0
- package/cjs/lib/Discord/gateway/ShardManager.cjs +344 -0
- package/cjs/lib/Discord/gateway/compression/base.cjs +13 -0
- package/cjs/lib/Discord/gateway/compression/config.cjs +47 -0
- package/cjs/lib/Discord/gateway/compression/pako.cjs +44 -0
- package/cjs/lib/Discord/gateway/compression/zlib-native.cjs +47 -0
- package/cjs/lib/Discord/gateway/compression/zlib-sync.cjs +31 -0
- package/cjs/lib/Discord/gateway/compression/zstd-napi.cjs +80 -0
- package/cjs/lib/Discord/gateway/compression/zstd-native.cjs +46 -0
- package/cjs/lib/Discord/gateway/events.cjs +956 -0
- package/cjs/lib/Discord/index.cjs +238 -0
- package/cjs/lib/Discord/rest/Bucket.cjs +69 -0
- package/cjs/lib/Discord/rest/DiscordHTTPError.cjs +63 -0
- package/cjs/lib/Discord/rest/DiscordRESTError.cjs +84 -0
- package/cjs/lib/Discord/rest/OAuthHelper.cjs +226 -0
- package/cjs/lib/Discord/rest/RESTManager.cjs +116 -0
- package/cjs/lib/Discord/rest/RequestHandler.cjs +320 -0
- package/cjs/lib/Discord/rest/SequentialBucket.cjs +69 -0
- package/cjs/lib/Discord/routes/Applications.cjs +625 -0
- package/cjs/lib/Discord/routes/Channels.cjs +1199 -0
- package/cjs/lib/Discord/routes/Guilds.cjs +1792 -0
- package/cjs/lib/Discord/routes/Interactions.cjs +212 -0
- package/cjs/lib/Discord/routes/Lobbies.cjs +197 -0
- package/cjs/lib/Discord/routes/Miscellaneous.cjs +120 -0
- package/cjs/lib/Discord/routes/OAuth.cjs +350 -0
- package/cjs/lib/Discord/routes/Users.cjs +107 -0
- package/cjs/lib/Discord/routes/Webhooks.cjs +308 -0
- package/cjs/lib/Discord/structures/AnnouncementChannel.cjs +46 -0
- package/cjs/lib/Discord/structures/AnnouncementThreadChannel.cjs +28 -0
- package/cjs/lib/Discord/structures/Application.cjs +345 -0
- package/cjs/lib/Discord/structures/ApplicationCommand.cjs +109 -0
- package/cjs/lib/Discord/structures/Attachment.cjs +46 -0
- package/cjs/lib/Discord/structures/AuditLogEntry.cjs +41 -0
- package/cjs/lib/Discord/structures/AutoModerationRule.cjs +117 -0
- package/cjs/lib/Discord/structures/AutocompleteInteraction.cjs +90 -0
- package/cjs/lib/Discord/structures/Base.cjs +56 -0
- package/cjs/lib/Discord/structures/BaseEntitlement.cjs +40 -0
- package/cjs/lib/Discord/structures/CategoryChannel.cjs +102 -0
- package/cjs/lib/Discord/structures/Channel.cjs +89 -0
- package/cjs/lib/Discord/structures/ClientApplication.cjs +269 -0
- package/cjs/lib/Discord/structures/CommandInteraction.cjs +294 -0
- package/cjs/lib/Discord/structures/ComponentInteraction.cjs +306 -0
- package/cjs/lib/Discord/structures/Entitlement.cjs +24 -0
- package/cjs/lib/Discord/structures/ExtendedUser.cjs +48 -0
- package/cjs/lib/Discord/structures/ForumChannel.cjs +20 -0
- package/cjs/lib/Discord/structures/GroupChannel.cjs +160 -0
- package/cjs/lib/Discord/structures/Guild.cjs +1289 -0
- package/cjs/lib/Discord/structures/GuildChannel.cjs +82 -0
- package/cjs/lib/Discord/structures/GuildPreview.cjs +141 -0
- package/cjs/lib/Discord/structures/GuildScheduledEvent.cjs +166 -0
- package/cjs/lib/Discord/structures/GuildTemplate.cjs +96 -0
- package/cjs/lib/Discord/structures/Integration.cjs +123 -0
- package/cjs/lib/Discord/structures/Interaction.cjs +78 -0
- package/cjs/lib/Discord/structures/InteractionResolvedChannel.cjs +36 -0
- package/cjs/lib/Discord/structures/Invite.cjs +196 -0
- package/cjs/lib/Discord/structures/InviteGuild.cjs +117 -0
- package/cjs/lib/Discord/structures/InviteRole.cjs +88 -0
- package/cjs/lib/Discord/structures/Lobby.cjs +84 -0
- package/cjs/lib/Discord/structures/LobbyMember.cjs +30 -0
- package/cjs/lib/Discord/structures/MediaChannel.cjs +20 -0
- package/cjs/lib/Discord/structures/Member.cjs +300 -0
- package/cjs/lib/Discord/structures/Message.cjs +553 -0
- package/cjs/lib/Discord/structures/ModalSubmitInteraction.cjs +263 -0
- package/cjs/lib/Discord/structures/OAuthApplication.cjs +203 -0
- package/cjs/lib/Discord/structures/OAuthGuild.cjs +98 -0
- package/cjs/lib/Discord/structures/PartialApplication.cjs +97 -0
- package/cjs/lib/Discord/structures/Permission.cjs +61 -0
- package/cjs/lib/Discord/structures/PermissionOverwrite.cjs +46 -0
- package/cjs/lib/Discord/structures/PingInteraction.cjs +27 -0
- package/cjs/lib/Discord/structures/Poll.cjs +69 -0
- package/cjs/lib/Discord/structures/PrimaryGuild.cjs +93 -0
- package/cjs/lib/Discord/structures/PrivateChannel.cjs +131 -0
- package/cjs/lib/Discord/structures/PrivateThreadChannel.cjs +28 -0
- package/cjs/lib/Discord/structures/PublicThreadChannel.cjs +36 -0
- package/cjs/lib/Discord/structures/Role.cjs +126 -0
- package/cjs/lib/Discord/structures/SKU.cjs +58 -0
- package/cjs/lib/Discord/structures/Soundboard.cjs +58 -0
- package/cjs/lib/Discord/structures/StageChannel.cjs +45 -0
- package/cjs/lib/Discord/structures/StageInstance.cjs +80 -0
- package/cjs/lib/Discord/structures/Subscription.cjs +21 -0
- package/cjs/lib/Discord/structures/Team.cjs +70 -0
- package/cjs/lib/Discord/structures/TestEntitlement.cjs +22 -0
- package/cjs/lib/Discord/structures/TextChannel.cjs +48 -0
- package/cjs/lib/Discord/structures/TextableChannel.cjs +265 -0
- package/cjs/lib/Discord/structures/TextableVoiceChannel.cjs +70 -0
- package/cjs/lib/Discord/structures/ThreadChannel.cjs +276 -0
- package/cjs/lib/Discord/structures/ThreadOnlyChannel.cjs +205 -0
- package/cjs/lib/Discord/structures/ThreadableChannel.cjs +57 -0
- package/cjs/lib/Discord/structures/UnavailableGuild.cjs +21 -0
- package/cjs/lib/Discord/structures/User.cjs +223 -0
- package/cjs/lib/Discord/structures/VoiceChannel.cjs +34 -0
- package/cjs/lib/Discord/structures/VoiceState.cjs +113 -0
- package/cjs/lib/Discord/structures/Webhook.cjs +224 -0
- package/cjs/lib/Discord/util/Collection.cjs +77 -0
- package/cjs/lib/Discord/util/Errors.cjs +81 -0
- package/cjs/lib/Discord/util/QueryBuilder.cjs +20 -0
- package/cjs/lib/Discord/util/Routes.cjs +293 -0
- package/cjs/lib/Discord/util/SimpleCollection.cjs +78 -0
- package/cjs/lib/Discord/util/Time.cjs +92 -0
- package/cjs/lib/Discord/util/TypedCollection.cjs +78 -0
- package/cjs/lib/Discord/util/TypedEmitter.cjs +20 -0
- package/cjs/lib/Discord/util/Util.cjs +906 -0
- package/cjs/lib/Discord/util/interactions/InteractionOptionsWrapper.cjs +207 -0
- package/cjs/lib/Discord/util/interactions/MessageInteractionResponse.cjs +26 -0
- package/cjs/lib/Discord/util/interactions/ModalSubmitInteractionComponentsWrapper.cjs +98 -0
- package/cjs/lib/Discord/util/interactions/SelectMenuValuesWrapper.cjs +77 -0
- package/cjs/lib/Discord/util/interactions/shared.cjs +20 -0
- package/cjs/lib/Discord/util/warning.cjs +34 -0
- package/cjs/lib/Signal/Group/ciphertext-message.cjs +16 -0
- package/cjs/lib/Signal/Group/group-session-builder.cjs +67 -0
- package/cjs/lib/Signal/Group/group_cipher.cjs +86 -0
- package/cjs/lib/Signal/Group/index.cjs +58 -0
- package/cjs/lib/Signal/Group/keyhelper.cjs +56 -0
- package/cjs/lib/Signal/Group/sender-chain-key.cjs +30 -0
- package/cjs/lib/Signal/Group/sender-key-distribution-message.cjs +67 -0
- package/cjs/lib/Signal/Group/sender-key-message.cjs +70 -0
- package/cjs/lib/Signal/Group/sender-key-name.cjs +52 -0
- package/cjs/lib/Signal/Group/sender-key-record.cjs +45 -0
- package/cjs/lib/Signal/Group/sender-key-state.cjs +88 -0
- package/cjs/lib/Signal/Group/sender-message-key.cjs +30 -0
- package/cjs/lib/Signal/libsignal.cjs +467 -0
- package/cjs/lib/Signal/lid-mapping.cjs +281 -0
- package/cjs/lib/Socket/Client/index.cjs +19 -0
- package/cjs/lib/Socket/Client/types.cjs +15 -0
- package/cjs/lib/Socket/Client/websocket.cjs +61 -0
- package/cjs/lib/Socket/business.cjs +384 -0
- package/cjs/lib/Socket/chats.cjs +1221 -0
- package/cjs/lib/Socket/communities.cjs +440 -0
- package/cjs/lib/Socket/groups.cjs +353 -0
- package/cjs/lib/Socket/index.cjs +14 -0
- package/cjs/lib/Socket/messages-recv.cjs +1772 -0
- package/cjs/lib/Socket/messages-send.cjs +1376 -0
- package/cjs/lib/Socket/mex.cjs +46 -0
- package/cjs/lib/Socket/newsletter.cjs +230 -0
- package/cjs/lib/Socket/socket.cjs +976 -0
- package/cjs/lib/Store/index.cjs +20 -0
- package/cjs/lib/Store/make-in-memory-store.cjs +470 -0
- package/cjs/lib/Store/make-ordered-dictionary.cjs +82 -0
- package/cjs/lib/Store/object-repository.cjs +28 -0
- package/cjs/lib/Telegram/button.cjs +147 -0
- package/cjs/lib/Telegram/composer.cjs +582 -0
- package/cjs/lib/Telegram/context.cjs +853 -0
- package/cjs/lib/Telegram/core/helpers/args.cjs +57 -0
- package/cjs/lib/Telegram/core/helpers/check.cjs +55 -0
- package/cjs/lib/Telegram/core/helpers/compact.cjs +16 -0
- package/cjs/lib/Telegram/core/helpers/deunionize.cjs +12 -0
- package/cjs/lib/Telegram/core/helpers/formatting.cjs +91 -0
- package/cjs/lib/Telegram/core/helpers/util.cjs +50 -0
- package/cjs/lib/Telegram/core/network/client.cjs +338 -0
- package/cjs/lib/Telegram/core/network/error.cjs +21 -0
- package/cjs/lib/Telegram/core/network/multipart-stream.cjs +79 -0
- package/cjs/lib/Telegram/core/network/polling.cjs +87 -0
- package/cjs/lib/Telegram/core/network/webhook.cjs +54 -0
- package/cjs/lib/Telegram/core/types/typegram.cjs +31 -0
- package/cjs/lib/Telegram/deffa-telegraf.cjs +264 -0
- package/cjs/lib/Telegram/esm-bridge.cjs +20 -0
- package/cjs/lib/Telegram/filters.cjs +69 -0
- package/cjs/lib/Telegram/format.cjs +58 -0
- package/cjs/lib/Telegram/future.cjs +140 -0
- package/cjs/lib/Telegram/index.cjs +67 -0
- package/cjs/lib/Telegram/input.cjs +61 -0
- package/cjs/lib/Telegram/markup.cjs +129 -0
- package/cjs/lib/Telegram/middleware.cjs +2 -0
- package/cjs/lib/Telegram/reactions.cjs +84 -0
- package/cjs/lib/Telegram/router.cjs +46 -0
- package/cjs/lib/Telegram/scenes/base.cjs +39 -0
- package/cjs/lib/Telegram/scenes/context.cjs +104 -0
- package/cjs/lib/Telegram/scenes/index.cjs +21 -0
- package/cjs/lib/Telegram/scenes/stage.cjs +49 -0
- package/cjs/lib/Telegram/scenes/wizard/context.cjs +31 -0
- package/cjs/lib/Telegram/scenes/wizard/index.cjs +45 -0
- package/cjs/lib/Telegram/scenes.cjs +21 -0
- package/cjs/lib/Telegram/session.cjs +166 -0
- package/cjs/lib/Telegram/telegram-types.cjs +6 -0
- package/cjs/lib/Telegram/telegram.cjs +945 -0
- package/cjs/lib/Telegram/types.cjs +2 -0
- package/cjs/lib/Telegram/utils.cjs +5 -0
- package/cjs/lib/Types/Auth.cjs +3 -0
- package/cjs/lib/Types/Bussines.cjs +3 -0
- package/cjs/lib/Types/Call.cjs +3 -0
- package/cjs/lib/Types/Chat.cjs +11 -0
- package/cjs/lib/Types/Contact.cjs +3 -0
- package/cjs/lib/Types/Events.cjs +4 -0
- package/cjs/lib/Types/GroupMetadata.cjs +3 -0
- package/cjs/lib/Types/Label.cjs +26 -0
- package/cjs/lib/Types/LabelAssociation.cjs +8 -0
- package/cjs/lib/Types/Message.cjs +19 -0
- package/cjs/lib/Types/Mex.cjs +40 -0
- package/cjs/lib/Types/Product.cjs +3 -0
- package/cjs/lib/Types/RichType.cjs +24 -0
- package/cjs/lib/Types/Signal.cjs +4 -0
- package/cjs/lib/Types/Socket.cjs +4 -0
- package/cjs/lib/Types/State.cjs +54 -0
- package/cjs/lib/Types/USync.cjs +4 -0
- package/cjs/lib/Types/index.cjs +42 -0
- package/cjs/lib/Utils/auth-utils.cjs +312 -0
- package/cjs/lib/Utils/browser-utils.cjs +39 -0
- package/cjs/lib/Utils/business.cjs +241 -0
- package/cjs/lib/Utils/chat-utils.cjs +890 -0
- package/cjs/lib/Utils/companion-reg-client-utils.cjs +51 -0
- package/cjs/lib/Utils/crypto.cjs +170 -0
- package/cjs/lib/Utils/decode-wa-message.cjs +330 -0
- package/cjs/lib/Utils/event-buffer.cjs +629 -0
- package/cjs/lib/Utils/generics.cjs +427 -0
- package/cjs/lib/Utils/history.cjs +141 -0
- package/cjs/lib/Utils/identity-change-handler.cjs +56 -0
- package/cjs/lib/Utils/index.cjs +43 -0
- package/cjs/lib/Utils/link-preview.cjs +122 -0
- package/cjs/lib/Utils/logger.cjs +8 -0
- package/cjs/lib/Utils/lt-hash.cjs +11 -0
- package/cjs/lib/Utils/make-mutex.cjs +38 -0
- package/cjs/lib/Utils/message-retry-manager.cjs +267 -0
- package/cjs/lib/Utils/messages-media.cjs +906 -0
- package/cjs/lib/Utils/messages.cjs +1909 -0
- package/cjs/lib/Utils/noise-handler.cjs +205 -0
- package/cjs/lib/Utils/offline-node-processor.cjs +43 -0
- package/cjs/lib/Utils/pre-key-manager.cjs +113 -0
- package/cjs/lib/Utils/process-message.cjs +755 -0
- package/cjs/lib/Utils/reporting-utils.cjs +263 -0
- package/cjs/lib/Utils/rich-message-utils.cjs +434 -0
- package/cjs/lib/Utils/session-guard.cjs +163 -0
- package/cjs/lib/Utils/signal.cjs +214 -0
- package/cjs/lib/Utils/stanza-ack.cjs +41 -0
- package/cjs/lib/Utils/sync-action-utils.cjs +54 -0
- package/cjs/lib/Utils/tc-token-utils.cjs +174 -0
- package/cjs/lib/Utils/text-sticker.cjs +174 -0
- package/cjs/lib/Utils/use-multi-file-auth-state.cjs +125 -0
- package/cjs/lib/Utils/use-single-file-auth-state.cjs +113 -0
- package/cjs/lib/Utils/use-sqlite-auth-state.cjs +145 -0
- package/cjs/lib/Utils/validate-connection.cjs +210 -0
- package/cjs/lib/WABinary/constants.cjs +1470 -0
- package/cjs/lib/WABinary/decode.cjs +301 -0
- package/cjs/lib/WABinary/encode.cjs +257 -0
- package/cjs/lib/WABinary/generic-utils.cjs +240 -0
- package/cjs/lib/WABinary/index.cjs +22 -0
- package/cjs/lib/WABinary/jid-utils.cjs +114 -0
- package/cjs/lib/WABinary/types.cjs +37 -0
- package/cjs/lib/WAM/BinaryInfo.cjs +14 -0
- package/cjs/lib/WAM/constants.cjs +22856 -0
- package/cjs/lib/WAM/encode.cjs +154 -0
- package/cjs/lib/WAM/index.cjs +20 -0
- package/cjs/lib/WAUSync/Protocols/USyncContactProtocol.cjs +56 -0
- package/cjs/lib/WAUSync/Protocols/USyncDeviceProtocol.cjs +58 -0
- package/cjs/lib/WAUSync/Protocols/USyncDisappearingModeProtocol.cjs +31 -0
- package/cjs/lib/WAUSync/Protocols/USyncStatusProtocol.cjs +42 -0
- package/cjs/lib/WAUSync/Protocols/USyncUsernameProtocol.cjs +29 -0
- package/cjs/lib/WAUSync/Protocols/UsyncBotProfileProtocol.cjs +55 -0
- package/cjs/lib/WAUSync/Protocols/UsyncLIDProtocol.cjs +33 -0
- package/cjs/lib/WAUSync/Protocols/index.cjs +22 -0
- package/cjs/lib/WAUSync/USyncQuery.cjs +102 -0
- package/cjs/lib/WAUSync/USyncUser.cjs +35 -0
- package/cjs/lib/WAUSync/index.cjs +20 -0
- package/cjs/lib/index.cjs +372 -0
- package/cjs/lib/plugins/loader.cjs +117 -0
- package/lib/Defaults/index.js +1 -1
- package/package.json +11 -6
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBizBinaryNode = exports.getBinaryNodeMessages = exports.reduceBinaryNodeToDictionary = exports.assertNodeErrorFree = exports.getBinaryNodeChildUInt = exports.getBinaryNodeChildString = exports.getBinaryNodeChildBuffer = exports.getAllBinaryNodeChildren = exports.getBinaryNodeChild = exports.getBinaryNodeChildren = void 0;
|
|
4
|
+
exports.binaryNodeToString = binaryNodeToString;
|
|
5
|
+
const boom_1 = require("@hapi/boom");
|
|
6
|
+
const crypto_1 = require("crypto");
|
|
7
|
+
const index_js_1 = require("../../WAProto/index.cjs");
|
|
8
|
+
// some extra useful utilities
|
|
9
|
+
const indexCache = new WeakMap();
|
|
10
|
+
const getBinaryNodeChildren = (node, childTag) => {
|
|
11
|
+
if (!node || !Array.isArray(node.content))
|
|
12
|
+
return [];
|
|
13
|
+
let index = indexCache.get(node);
|
|
14
|
+
// Build the index once per node
|
|
15
|
+
if (!index) {
|
|
16
|
+
index = new Map();
|
|
17
|
+
for (const child of node.content) {
|
|
18
|
+
let arr = index.get(child.tag);
|
|
19
|
+
if (!arr)
|
|
20
|
+
index.set(child.tag, (arr = []));
|
|
21
|
+
arr.push(child);
|
|
22
|
+
}
|
|
23
|
+
indexCache.set(node, index);
|
|
24
|
+
}
|
|
25
|
+
// Return first matching child
|
|
26
|
+
return index.get(childTag) || [];
|
|
27
|
+
};
|
|
28
|
+
exports.getBinaryNodeChildren = getBinaryNodeChildren;
|
|
29
|
+
const getBinaryNodeChild = (node, childTag) => {
|
|
30
|
+
return (0, exports.getBinaryNodeChildren)(node, childTag)[0];
|
|
31
|
+
};
|
|
32
|
+
exports.getBinaryNodeChild = getBinaryNodeChild;
|
|
33
|
+
const getAllBinaryNodeChildren = ({ content }) => {
|
|
34
|
+
if (Array.isArray(content)) {
|
|
35
|
+
return content;
|
|
36
|
+
}
|
|
37
|
+
return [];
|
|
38
|
+
};
|
|
39
|
+
exports.getAllBinaryNodeChildren = getAllBinaryNodeChildren;
|
|
40
|
+
const getBinaryNodeChildBuffer = (node, childTag) => {
|
|
41
|
+
const child = (0, exports.getBinaryNodeChild)(node, childTag)?.content;
|
|
42
|
+
if (Buffer.isBuffer(child) || child instanceof Uint8Array) {
|
|
43
|
+
return child;
|
|
44
|
+
}
|
|
45
|
+
};
|
|
46
|
+
exports.getBinaryNodeChildBuffer = getBinaryNodeChildBuffer;
|
|
47
|
+
const getBinaryNodeChildString = (node, childTag) => {
|
|
48
|
+
const child = (0, exports.getBinaryNodeChild)(node, childTag)?.content;
|
|
49
|
+
if (Buffer.isBuffer(child) || child instanceof Uint8Array) {
|
|
50
|
+
return Buffer.from(child).toString('utf-8');
|
|
51
|
+
}
|
|
52
|
+
else if (typeof child === 'string') {
|
|
53
|
+
return child;
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
exports.getBinaryNodeChildString = getBinaryNodeChildString;
|
|
57
|
+
const getBinaryNodeChildUInt = (node, childTag, length) => {
|
|
58
|
+
const buff = (0, exports.getBinaryNodeChildBuffer)(node, childTag);
|
|
59
|
+
if (buff) {
|
|
60
|
+
return bufferToUInt(buff, length);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
exports.getBinaryNodeChildUInt = getBinaryNodeChildUInt;
|
|
64
|
+
const assertNodeErrorFree = (node) => {
|
|
65
|
+
const errNode = (0, exports.getBinaryNodeChild)(node, 'error');
|
|
66
|
+
if (errNode) {
|
|
67
|
+
throw new boom_1.Boom(errNode.attrs.text || 'Unknown error', { data: +errNode.attrs.code });
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
exports.assertNodeErrorFree = assertNodeErrorFree;
|
|
71
|
+
const reduceBinaryNodeToDictionary = (node, tag) => {
|
|
72
|
+
const nodes = (0, exports.getBinaryNodeChildren)(node, tag);
|
|
73
|
+
const dict = nodes.reduce((dict, { attrs }) => {
|
|
74
|
+
if (typeof attrs.name === 'string') {
|
|
75
|
+
dict[attrs.name] = attrs.value || attrs.config_value;
|
|
76
|
+
}
|
|
77
|
+
else {
|
|
78
|
+
dict[attrs.config_code] = attrs.value || attrs.config_value;
|
|
79
|
+
}
|
|
80
|
+
return dict;
|
|
81
|
+
}, {});
|
|
82
|
+
return dict;
|
|
83
|
+
};
|
|
84
|
+
exports.reduceBinaryNodeToDictionary = reduceBinaryNodeToDictionary;
|
|
85
|
+
const getBinaryNodeMessages = ({ content }) => {
|
|
86
|
+
const msgs = [];
|
|
87
|
+
if (Array.isArray(content)) {
|
|
88
|
+
for (const item of content) {
|
|
89
|
+
if (item.tag === 'message') {
|
|
90
|
+
msgs.push(index_js_1.proto.WebMessageInfo.decode(item.content).toJSON());
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
return msgs;
|
|
95
|
+
};
|
|
96
|
+
exports.getBinaryNodeMessages = getBinaryNodeMessages;
|
|
97
|
+
function bufferToUInt(e, t) {
|
|
98
|
+
let a = 0;
|
|
99
|
+
for (let i = 0; i < t; i++) {
|
|
100
|
+
a = 256 * a + e[i];
|
|
101
|
+
}
|
|
102
|
+
return a;
|
|
103
|
+
}
|
|
104
|
+
const tabs = (n) => '\t'.repeat(n);
|
|
105
|
+
function binaryNodeToString(node, i = 0) {
|
|
106
|
+
if (!node) {
|
|
107
|
+
return node;
|
|
108
|
+
}
|
|
109
|
+
if (typeof node === 'string') {
|
|
110
|
+
return tabs(i) + node;
|
|
111
|
+
}
|
|
112
|
+
if (node instanceof Uint8Array) {
|
|
113
|
+
return tabs(i) + Buffer.from(node).toString('hex');
|
|
114
|
+
}
|
|
115
|
+
if (Array.isArray(node)) {
|
|
116
|
+
return node.map(x => tabs(i + 1) + binaryNodeToString(x, i + 1)).join('\n');
|
|
117
|
+
}
|
|
118
|
+
const children = binaryNodeToString(node.content, i + 1);
|
|
119
|
+
const tag = `<${node.tag} ${Object.entries(node.attrs || {})
|
|
120
|
+
.filter(([, v]) => v !== undefined)
|
|
121
|
+
.map(([k, v]) => `${k}='${v}'`)
|
|
122
|
+
.join(' ')}`;
|
|
123
|
+
const content = children ? `>\n${children}\n${tabs(i)}</${node.tag}>` : '/>';
|
|
124
|
+
return tag + content;
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Lia@Changes 30-01-26
|
|
128
|
+
* ---
|
|
129
|
+
* Produce the binary node (WABinary-like JSON shape) required for the specific
|
|
130
|
+
* interactive button / list type.
|
|
131
|
+
* compatible with observed official client traffic.
|
|
132
|
+
*
|
|
133
|
+
* NOTE: Returning different "v" (version) and "name" values influences how
|
|
134
|
+
* WhatsApp renders & validates flows. The constants here are empirically derived.
|
|
135
|
+
*
|
|
136
|
+
* @param {object} message Normalized message content (after Baileys normalization).
|
|
137
|
+
* @returns {object} A node with shape { tag, attrs, [content] } to inject into additionalNodes.
|
|
138
|
+
*/
|
|
139
|
+
const FLOWS_MAP = {
|
|
140
|
+
mpm: true,
|
|
141
|
+
cta_catalog: true,
|
|
142
|
+
send_location: true,
|
|
143
|
+
call_permission_request: true,
|
|
144
|
+
wa_payment_transaction_details: true,
|
|
145
|
+
automated_greeting_message_view_catalog: true
|
|
146
|
+
};
|
|
147
|
+
const DECISION_SOURCE_CONTENT = [
|
|
148
|
+
{
|
|
149
|
+
tag: 'decision_source',
|
|
150
|
+
attrs: { value: 'df' }
|
|
151
|
+
}
|
|
152
|
+
];
|
|
153
|
+
const LIST_TYPE_CONTENT = {
|
|
154
|
+
tag: 'list',
|
|
155
|
+
attrs: { v: '2', type: 'product_list' }
|
|
156
|
+
};
|
|
157
|
+
const NATIVE_FLOW_ATTRIBUTE = { type: 'native_flow', v: '1' };
|
|
158
|
+
const MIXED_NATIVE_FLOW = {
|
|
159
|
+
tag: 'interactive',
|
|
160
|
+
attrs: NATIVE_FLOW_ATTRIBUTE,
|
|
161
|
+
content: [
|
|
162
|
+
{
|
|
163
|
+
tag: 'native_flow',
|
|
164
|
+
attrs: { v: '9', name: 'mixed' }
|
|
165
|
+
}
|
|
166
|
+
]
|
|
167
|
+
};
|
|
168
|
+
const getBizBinaryNode = (message) => {
|
|
169
|
+
const flowMsg = message.interactiveMessage?.nativeFlowMessage;
|
|
170
|
+
const firstButtonName = flowMsg?.buttons?.[0]?.name;
|
|
171
|
+
const qualityContent = {
|
|
172
|
+
tag: 'quality_control',
|
|
173
|
+
attrs: {
|
|
174
|
+
decision_id: (0, crypto_1.randomBytes)(20).toString('hex'),
|
|
175
|
+
source_type: 'third_party'
|
|
176
|
+
},
|
|
177
|
+
content: DECISION_SOURCE_CONTENT
|
|
178
|
+
};
|
|
179
|
+
const bizAttributes = {
|
|
180
|
+
actual_actors: '2',
|
|
181
|
+
host_storage: '2',
|
|
182
|
+
privacy_mode_ts: `${Date.now() / 1000 | 0}`
|
|
183
|
+
};
|
|
184
|
+
if (firstButtonName === 'review_and_pay' || firstButtonName === 'payment_info') {
|
|
185
|
+
bizAttributes.native_flow_name = firstButtonName === 'review_and_pay' ?
|
|
186
|
+
'order_details' :
|
|
187
|
+
firstButtonName;
|
|
188
|
+
return {
|
|
189
|
+
tag: 'biz',
|
|
190
|
+
attrs: bizAttributes,
|
|
191
|
+
content: [qualityContent]
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
if (firstButtonName && FLOWS_MAP[firstButtonName]) {
|
|
195
|
+
return {
|
|
196
|
+
tag: 'biz',
|
|
197
|
+
attrs: bizAttributes,
|
|
198
|
+
content: [
|
|
199
|
+
{
|
|
200
|
+
tag: 'interactive',
|
|
201
|
+
attrs: NATIVE_FLOW_ATTRIBUTE,
|
|
202
|
+
content: [
|
|
203
|
+
{
|
|
204
|
+
tag: 'native_flow',
|
|
205
|
+
attrs: { v: '2', name: firstButtonName }
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
qualityContent
|
|
210
|
+
]
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
if (flowMsg || message.buttonsMessage || message.templateMessage) {
|
|
214
|
+
return {
|
|
215
|
+
tag: 'biz',
|
|
216
|
+
attrs: bizAttributes,
|
|
217
|
+
content: [
|
|
218
|
+
MIXED_NATIVE_FLOW,
|
|
219
|
+
qualityContent
|
|
220
|
+
]
|
|
221
|
+
};
|
|
222
|
+
}
|
|
223
|
+
if (message.listMessage) {
|
|
224
|
+
return {
|
|
225
|
+
tag: 'biz',
|
|
226
|
+
attrs: bizAttributes,
|
|
227
|
+
content: [
|
|
228
|
+
LIST_TYPE_CONTENT,
|
|
229
|
+
qualityContent
|
|
230
|
+
]
|
|
231
|
+
};
|
|
232
|
+
}
|
|
233
|
+
return {
|
|
234
|
+
tag: 'biz',
|
|
235
|
+
attrs: bizAttributes,
|
|
236
|
+
content: [qualityContent]
|
|
237
|
+
};
|
|
238
|
+
};
|
|
239
|
+
exports.getBizBinaryNode = getBizBinaryNode;
|
|
240
|
+
//# sourceMappingURL=generic-utils.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./encode.cjs"), exports);
|
|
18
|
+
__exportStar(require("./decode.cjs"), exports);
|
|
19
|
+
__exportStar(require("./generic-utils.cjs"), exports);
|
|
20
|
+
__exportStar(require("./jid-utils.cjs"), exports);
|
|
21
|
+
__exportStar(require("./types.cjs"), exports);
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.transferDevice = exports.jidNormalizedUser = exports.isJidBot = exports.isHostedLidUser = exports.isHostedPnUser = exports.isJidNewsletter = exports.isJidStatusBroadcast = exports.isJidGroup = exports.isJidBroadcast = exports.isLidUser = exports.isPnUser = exports.isJidMetaAI = exports.areJidsSameUser = exports.jidDecode = exports.jidEncode = exports.getServerFromDomainType = exports.WAJIDDomains = exports.META_AI_JID = exports.STORIES_JID = exports.PSA_WID = exports.SERVER_JID = exports.OFFICIAL_BIZ_JID = exports.S_WHATSAPP_NET = void 0;
|
|
4
|
+
exports.S_WHATSAPP_NET = '@s.whatsapp.net';
|
|
5
|
+
exports.OFFICIAL_BIZ_JID = '16505361212@c.us';
|
|
6
|
+
exports.SERVER_JID = 'server@c.us';
|
|
7
|
+
exports.PSA_WID = '0@c.us';
|
|
8
|
+
exports.STORIES_JID = 'status@broadcast';
|
|
9
|
+
exports.META_AI_JID = '13135550002@c.us';
|
|
10
|
+
(function (WAJIDDomains) {
|
|
11
|
+
WAJIDDomains[WAJIDDomains["WHATSAPP"] = 0] = "WHATSAPP";
|
|
12
|
+
WAJIDDomains[WAJIDDomains["LID"] = 1] = "LID";
|
|
13
|
+
WAJIDDomains[WAJIDDomains["HOSTED"] = 128] = "HOSTED";
|
|
14
|
+
WAJIDDomains[WAJIDDomains["HOSTED_LID"] = 129] = "HOSTED_LID";
|
|
15
|
+
})(exports.WAJIDDomains || (exports.WAJIDDomains = {}));
|
|
16
|
+
const getServerFromDomainType = (initialServer, domainType) => {
|
|
17
|
+
switch (domainType) {
|
|
18
|
+
case exports.WAJIDDomains.LID:
|
|
19
|
+
return 'lid';
|
|
20
|
+
case exports.WAJIDDomains.HOSTED:
|
|
21
|
+
return 'hosted';
|
|
22
|
+
case exports.WAJIDDomains.HOSTED_LID:
|
|
23
|
+
return 'hosted.lid';
|
|
24
|
+
case exports.WAJIDDomains.WHATSAPP:
|
|
25
|
+
default:
|
|
26
|
+
return initialServer;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
exports.getServerFromDomainType = getServerFromDomainType;
|
|
30
|
+
const jidEncode = (user, server, device, agent) => {
|
|
31
|
+
return `${user || ''}${!!agent ? `_${agent}` : ''}${!!device ? `:${device}` : ''}@${server || 'lid'}`;
|
|
32
|
+
};
|
|
33
|
+
exports.jidEncode = jidEncode;
|
|
34
|
+
const jidDecode = (jid) => {
|
|
35
|
+
// todo: investigate how to implement hosted ids in this case
|
|
36
|
+
const sepIdx = typeof jid === 'string' ? jid.indexOf('@') : -1;
|
|
37
|
+
if (sepIdx < 0) {
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
const server = jid.slice(sepIdx + 1);
|
|
41
|
+
const userCombined = jid.slice(0, sepIdx);
|
|
42
|
+
const [userAgent, device] = userCombined.split(':');
|
|
43
|
+
const [user, agent] = userAgent.split('_');
|
|
44
|
+
let domainType = exports.WAJIDDomains.WHATSAPP;
|
|
45
|
+
if (server === 'lid') {
|
|
46
|
+
domainType = exports.WAJIDDomains.LID;
|
|
47
|
+
}
|
|
48
|
+
else if (server === 'hosted') {
|
|
49
|
+
domainType = exports.WAJIDDomains.HOSTED;
|
|
50
|
+
}
|
|
51
|
+
else if (server === 'hosted.lid') {
|
|
52
|
+
domainType = exports.WAJIDDomains.HOSTED_LID;
|
|
53
|
+
}
|
|
54
|
+
else if (agent) {
|
|
55
|
+
domainType = parseInt(agent);
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
server: server,
|
|
59
|
+
user: user,
|
|
60
|
+
domainType,
|
|
61
|
+
device: device ? +device : undefined
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
exports.jidDecode = jidDecode;
|
|
65
|
+
/** is the jid a user */
|
|
66
|
+
const areJidsSameUser = (jid1, jid2) => (0, exports.jidDecode)(jid1)?.user === (0, exports.jidDecode)(jid2)?.user;
|
|
67
|
+
exports.areJidsSameUser = areJidsSameUser;
|
|
68
|
+
/** is the jid Meta AI */
|
|
69
|
+
const isJidMetaAI = (jid) => jid?.endsWith('@bot');
|
|
70
|
+
exports.isJidMetaAI = isJidMetaAI;
|
|
71
|
+
/** is the jid a PN user */
|
|
72
|
+
const isPnUser = (jid) => jid?.endsWith('@s.whatsapp.net');
|
|
73
|
+
exports.isPnUser = isPnUser;
|
|
74
|
+
/** is the jid a LID */
|
|
75
|
+
const isLidUser = (jid) => jid?.endsWith('@lid');
|
|
76
|
+
exports.isLidUser = isLidUser;
|
|
77
|
+
/** is the jid a broadcast */
|
|
78
|
+
const isJidBroadcast = (jid) => jid?.endsWith('@broadcast');
|
|
79
|
+
exports.isJidBroadcast = isJidBroadcast;
|
|
80
|
+
/** is the jid a group */
|
|
81
|
+
const isJidGroup = (jid) => jid?.endsWith('@g.us');
|
|
82
|
+
exports.isJidGroup = isJidGroup;
|
|
83
|
+
/** is the jid the status broadcast */
|
|
84
|
+
const isJidStatusBroadcast = (jid) => jid === 'status@broadcast';
|
|
85
|
+
exports.isJidStatusBroadcast = isJidStatusBroadcast;
|
|
86
|
+
/** is the jid a newsletter */
|
|
87
|
+
const isJidNewsletter = (jid) => jid?.endsWith('@newsletter');
|
|
88
|
+
exports.isJidNewsletter = isJidNewsletter;
|
|
89
|
+
/** is the jid a hosted PN */
|
|
90
|
+
const isHostedPnUser = (jid) => jid?.endsWith('@hosted');
|
|
91
|
+
exports.isHostedPnUser = isHostedPnUser;
|
|
92
|
+
/** is the jid a hosted LID */
|
|
93
|
+
const isHostedLidUser = (jid) => jid?.endsWith('@hosted.lid');
|
|
94
|
+
exports.isHostedLidUser = isHostedLidUser;
|
|
95
|
+
const botRegexp = /^1313555\d{4}$|^131655500\d{2}$/;
|
|
96
|
+
const isJidBot = (jid) => jid && botRegexp.test(jid.split('@')[0]) && jid.endsWith('@c.us');
|
|
97
|
+
exports.isJidBot = isJidBot;
|
|
98
|
+
const jidNormalizedUser = (jid) => {
|
|
99
|
+
const result = (0, exports.jidDecode)(jid);
|
|
100
|
+
if (!result) {
|
|
101
|
+
return '';
|
|
102
|
+
}
|
|
103
|
+
const { user, server } = result;
|
|
104
|
+
return (0, exports.jidEncode)(user, server === 'c.us' ? 's.whatsapp.net' : server);
|
|
105
|
+
};
|
|
106
|
+
exports.jidNormalizedUser = jidNormalizedUser;
|
|
107
|
+
const transferDevice = (fromJid, toJid) => {
|
|
108
|
+
const fromDecoded = (0, exports.jidDecode)(fromJid);
|
|
109
|
+
const deviceId = fromDecoded?.device || 0;
|
|
110
|
+
const { server, user } = (0, exports.jidDecode)(toJid);
|
|
111
|
+
return (0, exports.jidEncode)(user, server, deviceId);
|
|
112
|
+
};
|
|
113
|
+
exports.transferDevice = transferDevice;
|
|
114
|
+
//# sourceMappingURL=jid-utils.js.map
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
+
var ownKeys = function(o) {
|
|
20
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
+
var ar = [];
|
|
22
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
+
return ar;
|
|
24
|
+
};
|
|
25
|
+
return ownKeys(o);
|
|
26
|
+
};
|
|
27
|
+
return function (mod) {
|
|
28
|
+
if (mod && mod.__esModule) return mod;
|
|
29
|
+
var result = {};
|
|
30
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
+
__setModuleDefault(result, mod);
|
|
32
|
+
return result;
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
+
const constants = __importStar(require("./constants.cjs"));
|
|
37
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BinaryInfo = void 0;
|
|
4
|
+
class BinaryInfo {
|
|
5
|
+
constructor(options = {}) {
|
|
6
|
+
this.protocolVersion = 5;
|
|
7
|
+
this.sequence = 0;
|
|
8
|
+
this.events = [];
|
|
9
|
+
this.buffer = [];
|
|
10
|
+
Object.assign(this, options);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
exports.BinaryInfo = BinaryInfo;
|
|
14
|
+
//# sourceMappingURL=BinaryInfo.js.map
|